Disclosure of Invention
In view of the foregoing, the present application has been developed to provide a cross-process data transmission method, apparatus, electronic device, and storage medium that overcome, or at least partially solve, the foregoing problems.
According to a first aspect of the present application, there is provided a cross-process data transmission method, the method being applied to a data transmission layer in an android operating system, the method comprising:
receiving transmission data of a first process through a data transmission interface realized in the first process;
writing the transmission data into a memory space;
receiving an acquisition request of the second process for the transmission data through a data transmission interface realized in the second process;
extracting the transmission data from the memory space according to the acquisition request and sending the transmission data to the second process;
the data transmission interface realized in the first process and the data transmission interface realized in the second process are realized based on the data transmission interface defined by the data transmission layer.
Optionally, the writing the transmission data into the memory space includes:
analyzing the transmission data, and determining the data type of the transmission data according to the analysis result, wherein the data type comprises basic data and/or object data;
Encapsulating the transmission data according to the data type of the transmission data to obtain encapsulated transmission data;
and writing the encapsulated transmission data into the memory space.
Optionally, the encapsulating the transmission data according to the data type of the transmission data, and obtaining the encapsulated transmission data includes:
and if the transmission data comprises the basic data and the object data, respectively packaging the basic data and the object data.
Optionally, the encapsulating the object data includes:
determining whether the object data has been serialized;
if the object data is serialized, directly packaging the object data;
if the object data is not serialized, recording the object format of the object data, and packaging the object data so as to write the object format of the object data and the packaged object data into the memory space.
Optionally, the extracting the transmission data from the memory space according to the obtaining request and sending the transmission data to the second process includes:
acquiring the transmission data from the memory space according to the acquisition request;
Analyzing the transmission data, and determining the data type of the transmission data according to the analysis result, wherein the data type comprises basic data and/or object data;
restoring the analyzed transmission data according to the data type of the transmission data to obtain restored transmission data;
and sending the restored transmission data to the second process through a data transmission interface realized in the second process.
Optionally, the restoring the parsed transmission data according to the data type of the transmission data, to obtain restored transmission data includes:
and if the transmission data comprises the basic data and the object data, respectively restoring the basic data and the object data.
Optionally, the restoring the object data includes:
acquiring an object format of the object data from the memory space;
and restoring the object data according to the object format of the object data.
Optionally, after receiving the transmission data of the first process through the data transmission interface implemented in the first process, the method further includes:
handshake verification is performed with the first process;
If the handshake verification is successful, writing the transmission data into a memory space;
after receiving, through a data transmission interface implemented in a second process, an acquisition request of the second process for the transmission data, the method further includes:
carrying out handshake verification with the second process;
and if the handshake verification is successful, extracting the transmission data from the memory space according to the acquisition request and sending the transmission data to the second process.
Optionally, the method further comprises:
if the transmission data of the first process is received, opening up a memory space in the android operating system so as to write the transmission data into the memory space;
and if the handshake verification with the second process fails or the return parameter of the second process is successful in data transmission, releasing the memory space.
According to a second aspect of the present application, there is provided a cross-process data transmission device, the device being applied to a data transmission layer in an android operating system, the device comprising:
the first receiving unit is used for receiving the transmission data of the first process through a data transmission interface realized in the first process;
the first writing unit is used for writing the transmission data into the memory space;
The second receiving unit is used for receiving the acquisition request of the second process for the transmission data through a data transmission interface realized in the second process;
the first sending unit is used for extracting the transmission data from the memory space according to the acquisition request and sending the transmission data to the second process;
the data transmission interface realized in the first process and the data transmission interface realized in the second process are realized based on the data transmission interface defined by the data transmission layer.
According to a third aspect of the present application, there is provided an electronic device comprising: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform a cross-process data transmission method as described in any of the above.
According to a fourth aspect of the present application, there is provided a computer readable storage medium storing one or more programs which when executed by a processor implement a cross-process data transmission method as described in any of the above.
From the above, the technical solution of the present application achieves the following technical effects: the cross-process data transmission method is mainly applied to a data transmission layer in an android operating system, and data transmission interfaces for data transmission are respectively realized in the first process and the second process aiming at any two first processes and second processes needing data transmission, wherein the data transmission interfaces are realized based on data transmission interfaces defined by the data transmission layer. When the cross-process data transmission is carried out, firstly, the transmission data of the first process is received through a data transmission interface realized in the first process; then writing the transmission data into the memory space of the android operating system; then, through a data transmission interface realized in the second process, receiving an acquisition request of the second process for transmission data; and finally, extracting transmission data from the memory space according to the acquisition request and sending the transmission data to the second process. According to the cross-process data transmission method, a data transmission interface is arranged in a process, and the data transmission interface supports data transmission and data reception; the method not only supports the data transmission of basic types such as int, long, list, string and the like, but also supports the data transmission of complex types such as class objects and the like, so that the realization of the data transmission is simpler, the bidirectional transmission of the data can be realized by one-time communication connection, and the transmission direction and the transmission efficiency of the data are improved.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The android operating system is developed based on Linux kernels of different versions, and in a Linux environment, each process has different user address spaces due to the fact that the process address spaces are mutually independent. The global variable of any process cannot be seen in the other process, so that the processes cannot access each other, data to be exchanged must pass through the kernel, by opening a block buffer in the kernel, the process a copies the data from the user space to the kernel buffer, the process B reads the data from the kernel buffer, the block memory space for storing the data can be accessed by two processes, which is called shared memory, and the mechanism provided by the kernel is called shared memory-based inter-process Communication (IPC, interProcess Communication).
However, since memory entities exist in a computer system, they can only be shared by processes residing in the same computer system. The android operating system opens up a virtual machine for each process, which makes it difficult to implement IPC by using shared memory in the android operating system.
In view of the above, the proposal provided by the application is to realize a data transmission layer in the android operating system, the data transmission layer or the data transmission module is used for carrying out memory caching of data to be transmitted, and define a data transmission interface which can realize data transmission and data reception, thereby solving the problem that two AIDL schemes are needed to be realized in the prior art to respectively carry out data transmission and data reception.
Based on this, the embodiment of the application provides a cross-process data transmission method, which is applied to a data transmission layer in an android operating system, as shown in fig. 1, and includes the following steps S110 to S140:
step S110, receiving the transmission data of the first process through a data transmission interface realized in the first process.
The cross-process data transmission method is mainly applied to a data transmission layer in an android operating system. For any two processes needing to perform cross-process data transmission, data transmission interfaces which can be used for performing data transmission can be respectively arranged in the two processes in advance so as to establish a communication bridge with other processes. The data transmission interface is understood to be a data transmission interface defined by a data transmission layer according to an embodiment of the present application, and the data transmission interface not only can implement data transmission, but also can implement data reception, that is, implement bidirectional data transfer.
When the cross-process data transmission is carried out, the transmission data of the first process is received through a data transmission interface realized in the first process. In the practical application scenario, the process herein may be understood as an execution entity of an application program installed in various terminal devices implemented based on the android operating system, so the transmission data of the first process may be understood as data of the application program.
Step S120, writing the transmission data into the memory space.
After receiving the transmission data of the first process, the transmission data can be stored in the memory space, so that other processes can acquire the transmission data of the first process from the memory space. The memory space refers to the memory space of the android operating system, which can be regarded as a buffer area for storing the database, and any process can store own data into the memory space or read data from the memory space.
Step S130, receiving, by a data transmission interface implemented in a second process, an acquisition request of the second process for the transmission data.
In an actual application scene, the second process can initiate an acquisition request of the transmission data of the first process according to actual requirements, and the acquisition request usually carries a corresponding process identifier so as to acquire the corresponding transmission data according to the process identifier. Specifically, the data transmission interface implemented in the second process may receive the request for acquiring the transmission data by the second process, where the data transmission interface implemented in the second process is the same as the data transmission interface implemented in the first process, and may be understood as a data transmission interface defined based on a data transmission layer, so that not only can data be received, but also data transmission can be achieved.
Step S140, extracting the transmission data from the memory space according to the acquisition request and sending the transmission data to the second process; the data transmission interface realized in the first process and the data transmission interface realized in the second process are realized based on the data transmission interface defined by the data transmission layer.
After obtaining the request for obtaining the transmission data by the second process, the corresponding transmission data can be extracted from the memory space of the android operating system according to the request for obtaining, and then the extracted transmission data is sent to the second process through the data transmission interface realized in the second process, so that the transmission process of the data is completed once.
Therefore, the memory space for storing the transmission data is not directly accessed by the first process and the second process, but is read and written by the data transmission layer, the transmission data cannot generate copies due to the access of a plurality of processes, and the data consistency is ensured.
In addition, since the data transmission interface in the embodiment of the present application is a data transmission interface defined by the data transmission layer, through which data can be received and data can be sent, the above-mentioned "first process" and "second process" can be regarded as both a data sender and a data receiver, and further, bidirectional communication between processes is achieved.
The existing scheme for implementing inter-process communication based on AIDL is unidirectional transmission, for example, when a process a wants to transmit data to a process B, an interface X required for the process B is defined in an AIDL file, through which only the data transmission of the process a directly to the process B can be implemented, and if the data transmission of the process B to the process a is implemented, another AIDL file is required to define another interface Y required for the process a.
The embodiment of the application realizes bidirectional transmission of data through the data transmission interface arranged in the process, so that data transmission and data reception are supported; the method not only supports the data transmission of basic types such as int, long, list, string and the like, but also supports the data transmission of complex types such as class objects and the like, so that the realization of the data transmission is simpler, the bidirectional transmission of the data can be realized by one-time communication connection, and the transmission direction and the transmission efficiency of the data are improved. In addition, the data transmission interface set in the process of the embodiment of the application is not used for directly transmitting data between the process A and the process B, but is realized through a data transmission layer between the process A and the process B, so that the consistency of transmitted data is ensured.
In one embodiment of the present application, when writing transmission data into a memory space, the received transmission data may be parsed, then the type of the transmission data is determined according to the parsing result, where the data type may include basic data and object data, then the corresponding transmission data is encapsulated according to the parsed data type, and finally the obtained encapsulated transmission data is stored into the memory space for subsequent transmission.
The above-mentioned basic data mainly includes int, long, list, string and the like, for example, a keyword in Java (an object-oriented programming language) that specifies basic data is started in lowercase letters, and the basic data has only a numeric value and no ID (i.e., a position in memory space). At the same time, the type of basic data is not variable, memory is allocated in the stack, which makes the overhead of basic data relatively low. The object data mainly includes Integer, boolean, double and the like, and for example, keywords in Java specifying the object data are all written with capital letters, and the object data has both numerical values and IDs. Furthermore, the type of object data is both an immutable type and a variable type, which allocates memory in the heap at a relatively high cost.
The above-mentioned data encapsulation can be understood as mapping data into a payload of a certain encapsulation protocol, then filling a packet header of a corresponding protocol to form a data packet of the encapsulation protocol, and completing rate adaptation, where the main purpose of encapsulation is to ensure security of critical data, and conceal implementation details and isolate complexity from the outside.
Because the formats of the basic data and the object data are different, and the data packaging modes are different, in one embodiment of the application, if the received transmission data of the first process is analyzed to include the basic data and the object data, the basic data and the object data can be packaged respectively and finally stored in the memory space respectively.
In an actual application scenario, if the transmission data of the first process includes data of an object type, the object data is usually required to be subjected to serialization, which is a process of converting state information of the object into a form capable of being stored or transmitted, that is, converting the object into a character sequence, and capable of completely restoring the byte sequence into the original object later, so as to facilitate storage and transmission. The existing method for serializing the objects is to independently realize the Parcelable or Serializable interfaces in the process, so that the cost and the complexity are high.
In one embodiment of the present application, since a serialized interface may already be implemented in some processes, when the parsed data type includes the object data, whether the object data is serialized may be determined first, and if the object data is serialized, the object data may be directly encapsulated; if the object data is not serialized, the object format of the object data can be recorded, then the object data is encapsulated, and finally the object format of the object data and the encapsulated object data are written into the memory space so as to facilitate the subsequent data transmission.
The embodiment of the application can be compatible with the process which has realized the serialization interface, and for the object data without serialization, the interface for serializing the object is not needed to be additionally realized in the process, and the requirements of data storage and transmission can be met by recording the object format and storing the object format into the memory space, and meanwhile, the development cost and the development complexity are reduced.
In one embodiment of the present application, when the second process wants to acquire the transmission data of the first process, an acquisition request for the transmission data is initiated, so that the corresponding transmission data can be acquired from the memory space according to the received acquisition request, and since the data stored in the memory space is encapsulated data, the transmission data acquired from the memory space can be resolved first, then a specific data type including basic data and/or object data can be obtained according to the resolving result, and then the resolved transmission data can be restored, namely, decapsulated according to the resolved data type, to obtain restored transmission data; and finally, sending the restored transmission data to the second process through a data transmission interface realized in the second process, thereby completing a complete data transmission process.
It should be noted that, the "parsing" mentioned in the process of extracting the transmission data from the memory space and sending the transmission data to the second process is different from the "parsing" mentioned in the process of storing the transmission data of the first process into the memory space, that is, specific parsing objects and parsing manners are different.
Because the formats of the basic data and the object data are different, and the data restoring modes are different, in one embodiment of the application, if the transmission data of the first process acquired from the memory space is analyzed to include the basic data and the object data, the basic data and the object data can be restored respectively, and finally the restored basic data and the object data are sent to the second process together through a data transmission interface implemented in the second process.
For the object data, the application stores the object format of the object data in the memory space in the data storage stage, so in one embodiment of the application, if the analyzed data type includes the object data, the object format of the object data can be directly obtained from the memory space, and then the object data is restored, i.e. unpacked, by using the object format of the object data, so as to obtain the transmission data in the original form.
The cross-process data transmission method is realized based on inter-process communication, and specifically solves the problem of mutual communication between different processes on the same host, and the existing LocalSocket is a main means for solving the problem. LocalSocket is based on UNIX-domain Socket (UNIX domain Socket), which is an IPC communication mechanism derived on the Socket basis. Compared with a socket used for network communication, the Localsocket does not need to pass through a network protocol stack, does not need to be packaged and unpacked, calculates and checks, has high natural execution efficiency, and is widely used as an IPC communication means in an Android system.
In particular, when data transmission between the first process and the second process is performed, a communication connection with the first process may be established through a LocalSocket, that is, handshake verification is performed with the first process, where handshake refers to that parameters, such as an information transmission rate, an alphabet, parity check, an interrupt process, and other protocol characteristics, are achieved through handshake before information transmission starts after a communication link is established. If the handshake check is successful, the transmission data of the first process may be stored into the memory space.
When the second process needs to acquire the transmission data, communication connection with the second process can be established through the Localsocket, namely handshake verification is carried out on the second process, and if the handshake verification is successful, the corresponding transmission data can be extracted from the memory space according to the acquisition request and sent to the second process.
The memory space in an android operating system generally includes two parts, namely physical memory, i.e., RAM (Random Access Memory ) on a mobile device, and process memory, and when a program in the device is started, the system allocates a fixed memory space (e.g., 16m,32 m) to the RAM, and the program runs on the RAM. The process memory is only virtual memory (or called logical memory), while the program operation requires real memory, i.e., physical memory. Therefore, if necessary, the operating system maps the memory (virtual memory) applied during the program running to the RAM, so that the process can use the physical memory.
The memory space in the embodiment of the application may refer to a physical memory or a process memory of the android operating system. When the data transmission of the process A is required, a small area for caching the transmission data of the process A can be opened up in a process memory of the android system, and then the small area can be mapped to a certain area on the RAM, so that the process A can run on the certain area of the RAM. By adopting the mode of only temporarily opening up the memory space during data transmission, the resource allocation rate and the utilization rate of the memory space of the android operating system can be greatly improved.
In one embodiment of the present application, if handshake verification with the second process fails, it is indicated that the data of the first process cannot be transmitted to the second process at this time, and at this time, the memory space in the android operating system may be released; or when the return parameter of the second process is that the data transmission is successful, the second process is indicated to have successfully received the transmission data of the first process, and the memory space can be released at the moment, so that the released memory space can be used for storing the transmission data of other processes, and the resource utilization rate of the memory space is improved.
For the situation that the handshake verification with the second process fails, when the first handshake verification fails, the handshake verification can be performed again by calling a retry mechanism, and if the handshake verification still fails within a period of time, the memory space in the android operating system can be released and the communication link can be released at the same time.
As shown in fig. 2, a flow chart of a cross-process data transmission method according to an embodiment of the present application is provided. Taking the process A as an example of transmitting data to the process B, firstly establishing the IPC communication connection relation between the process A and the process B, after successfully establishing the communication connection relation, the process A can transmit the transmission data to a data transmission layer through a data communication interface realized in the process A, then analyze and package the transmission data in the data transmission layer, and then write the packaged transmission data into a memory space of an android operating system.
When the transmission data of the process A in the memory space is transmitted to the process B, the transmission data in the memory space can be analyzed and restored first, and finally the restored transmission data is transmitted to the process B, so that a data transmission process from the process A to the process B is completed.
The scene of transmitting data from the process B to the process A is the same as the process, but the process does not need to establish the IPC communication connection relationship with the process A and the process B again, namely, the bidirectional transmission of the data between the process A and the process B can be realized only by establishing the IPC communication connection once, so that the data transmission efficiency is greatly improved.
As shown in fig. 3, a logic block diagram of a cross-process data transmission according to an embodiment of the present application is provided. Taking the process a to transmit data to the process B as an example, firstly, establishing an IPC communication connection relationship with the process a and the process B, and after successfully establishing the communication connection relationship, the process a will write the data for transmission to the data transmission interface. And then carrying out handshake verification with the process A, if the handshake verification is passed, analyzing the transmission data of the process A, opening up a memory space, obtaining the type of the transmission data according to the analysis result, if the transmission data is basic data, directly packaging, if the transmission data is object data, further judging whether the object data is serialized, if the transmission data is serialized, directly packaging the object data, if the transmission data is not serialized, recording the object format of the object data, and then packaging the object data. And finally, storing the encapsulated basic data, object data and object formats into the opened memory space.
When the process B needs to acquire the transmission data, handshake verification can be carried out with the process B, if the first handshake verification fails, a retry mechanism is called, and if the first handshake verification still fails within a period of time, the memory space in the android operating system is released and the communication link is released. If the handshake verification is successful, corresponding transmission data is obtained from the memory space and analyzed to obtain a data type, if the data type contains object data, an object format is obtained from the memory space, then the object data is restored according to the object format, the basic data can be restored directly, finally the restored transmission data is sent to the process B through a data transmission interface of the process B, parameters are returned in the process B, if the returned parameters are successful in data transmission, the process A is considered to successfully transmit the data to the process B, namely, a complete data transmission process is completed, and then the memory space can be released to provide a storage space for other processes.
The embodiment of the application provides a cross-process data transmission device 400, which is applied to a data transmission layer in an android operating system, as shown in fig. 4, the device 400 includes:
A first receiving unit 410, configured to receive, through a data transmission interface implemented in a first process, transmission data of the first process;
a first writing unit 420, configured to write the transmission data into a memory space;
a second receiving unit 430, configured to receive, through a data transmission interface implemented in a second process, an acquisition request of the second process for the transmission data;
a first sending unit 440, configured to extract the transmission data from the memory space according to the acquisition request and send the transmission data to the second process;
the data transmission interface realized in the first process and the data transmission interface realized in the second process are realized based on the data transmission interface defined by the data transmission layer.
In one embodiment of the present application, the first writing unit 420 is specifically configured to: analyzing the transmission data, and determining the data type of the transmission data according to the analysis result, wherein the data type comprises basic data and/or object data; encapsulating the transmission data according to the data type of the transmission data to obtain encapsulated transmission data; and writing the encapsulated transmission data into the memory space.
In one embodiment of the present application, the first writing unit 420 is specifically configured to: and if the transmission data comprises the basic data and the object data, respectively packaging the basic data and the object data.
In one embodiment of the present application, the first writing unit 420 is specifically configured to: determining whether the object data has been serialized; if the object data is serialized, directly packaging the object data; if the object data is not serialized, recording the object format of the object data, and packaging the object data so as to write the object format of the object data and the packaged object data into the memory space.
In one embodiment of the present application, the first transmitting unit 440 is specifically configured to: acquiring the transmission data from the memory space according to the acquisition request; analyzing the transmission data, and determining the data type of the transmission data according to the analysis result, wherein the data type comprises basic data and/or object data; restoring the analyzed transmission data according to the data type of the transmission data to obtain restored transmission data; and sending the restored transmission data to the second process through a data transmission interface realized in the second process.
In one embodiment of the present application, the first transmitting unit 440 is specifically configured to: and if the transmission data comprises the basic data and the object data, respectively restoring the basic data and the object data.
In one embodiment of the present application, the first transmitting unit 440 is specifically configured to: acquiring an object format of the object data from the memory space; and restoring the object data according to the object format of the object data.
In one embodiment of the present application, the apparatus further comprises: the first handshake checking unit is used for performing handshake checking with the first process after receiving the transmission data of the first process through a data transmission interface realized in the first process; the second writing unit is used for writing the transmission data into the memory space if the handshake verification is successful; the second handshake checking unit is used for performing handshake checking with the second process after receiving the request of the second process for acquiring the transmission data through a data transmission interface realized in the second process; and the second sending unit is used for extracting the transmission data from the memory space according to the acquisition request and sending the transmission data to the second process if the handshake verification is successful.
In one embodiment of the present application, the apparatus further comprises: the memory space opening unit is used for opening up a memory space in the android operating system if the transmission data of the first process is received, so that the transmission data is written into the memory space; and the memory space releasing unit is used for releasing the memory space if handshake verification with the second process fails or the return parameter of the second process is successful in data transmission.
It should be noted that, the specific implementation manner of each embodiment of the apparatus may be performed with reference to the specific implementation manner of the corresponding embodiment of the method, which is not described herein.
In summary, according to the technical scheme of the application, the data transmission interface is arranged in the process, so that the bidirectional transmission of the data can be realized through one-time communication connection, and the transmission direction and the transmission efficiency of the data are improved; in addition, in the cross-process data transmission process, the transmission of complex data types such as object data is increased, and the process does not need to realize a serialization interface in the process, so that the development cost and the development complexity are greatly reduced.
It should be noted that:
the algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may also be used with the teachings herein. The required structure for the construction of such devices is apparent from the description above. In addition, the present application is not directed to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the present application as described herein, and the above description of specific languages is provided for disclosure of preferred embodiments of the present application.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the present application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the application and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed application requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the present application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
Various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a cross-process data transmission apparatus according to embodiments of the present application. The present application may also be embodied as an apparatus or device program (e.g., computer program and computer program product) for performing a portion or all of the methods described herein. Such a program embodying the present application may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
For example, fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 500 comprises a processor 510 and a memory 520 arranged to store computer executable instructions (computer readable program code). The memory 520 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. The memory 520 has a memory space 530 storing computer readable program code 531 for performing any of the method steps described above. For example, the memory space 530 for storing computer readable program code may include respective computer readable program code 531 for implementing the respective steps in the above method, respectively. The computer readable program code 531 may be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. Such a computer program product is typically a computer readable storage medium, such as shown in fig. 6. Fig. 6 illustrates a schematic structure of a computer-readable storage medium according to an embodiment of the present application. The computer readable storage medium 600 stores computer readable program code 531 for performing the steps of the method according to the present application, which can be read by the processor 510 of the electronic device 500, which when the computer readable program code 531 is executed by the electronic device 500 causes the electronic device 500 to perform the steps of the method described above, in particular, the computer readable program code 531 stored by the computer readable storage medium can perform the method shown in any of the embodiments described above. The computer readable program code 531 may be compressed in a suitable form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.