Disclosure of Invention
In order to solve the defects in the prior art, the application aims to provide a device and a method for operating application programs across operating systems, which are convenient for operating application programs of other sides between different operating systems.
To achieve the above object, the present application provides a method for operating an application program across an operating system, including,
The method comprises the steps that a first operating system sends an application starting instruction to a second operating system through a first communication interface, the first operating system operates on a first hardware set of a multi-core heterogeneous system on chip, the second operating system operates on a second hardware set of the multi-core heterogeneous system on chip, the first hardware set and the second hardware set belong to different hardware domains, and the first communication interface is a first inter-core communication channel between the hardware domains;
Based on the received application starting instruction, the second operating system creates a virtual display to start a corresponding application, and sends display picture data of the application obtained by the virtual display to the first operating system in real time through a second communication interface, wherein the second communication interface is a second inter-core communication channel between the hardware domains, and the bandwidth of the second inter-core communication channel is larger than that of the first inter-core communication channel;
The first operating system synchronously displays the display picture of the application so as to be checked and triggered by a user, and based on the triggering operation of the user, the first operating system sends an in-application operation instruction comprising the position information of the triggering operation in the display picture of the first system to the second operating system through a first communication interface;
based on the position information in the application operation instruction, the application in the second operating system responds to the actual operation in the application corresponding to the position information.
The type of the first operating system is the same as or different from the system type of the second operating system.
Further, after the first operating system acquires the display picture data of the application, the display picture data is subjected to format conversion and then synchronously displayed on the first operating system.
The method further comprises the steps that the first operating system obtains application information of each application program in the second operating system through the first communication interface and displays the application information on the first operating system for a user to select the application program to start, and the application information comprises application icons, application names and application identification information.
Further, the first communication interface is socket communication, and the second communication interface is any one of Mailbox and PCIe.
Further, the protocol data of the socket communication includes a 1-byte data identifier and an 8-byte data content, wherein the data identifier is used for identifying a response type of the data content, and the response type includes application starting, application closing and intra-application operation.
To achieve the above object, the present application further provides an apparatus for operating an application program across an operating system, including:
the display control unit is configured on the operating system, is in communication connection with the display control units on other operating systems through a first communication interface to transmit application information and operation instructions, and is used for controlling the display unit, the application starting unit and the image transmission unit to respond to the operation instructions based on the user operation instructions and the operation instructions sent by the other operating systems;
the application starting unit is used for starting corresponding applications in the operating system based on the operation instruction;
The display unit comprises a virtual display unit and a physical display unit, wherein the virtual display unit is used for capturing display picture data after the application program is started, and the physical display unit is used for displaying application information on an operating system screen so as to enable a user to select to start or display the display picture data after the application program is started, which is received by the image transmission unit, so as to enable the user to view and operate;
the image transmission unit is in communication connection with the image transmission unit on other operating systems through a second communication interface so as to transmit the display picture data captured by the virtual display unit;
The system comprises a first communication interface, a second communication interface and a first inter-core communication channel, wherein the first communication interface is a first inter-core communication channel between the hardware domains, the second communication interface is a second inter-core communication channel between the hardware domains, and the bandwidth of the second inter-core communication channel is larger than that of the first inter-core communication channel.
Further, the operation instructions include an application start instruction, an intra-application operation instruction, and an application close instruction.
Further, the application information includes an application icon, an application name, and application identification information.
Further, the first communication interface is socket communication, and the second communication interface is any one of Mailbox and PCIe.
In order to achieve the above object, the present application provides an electronic device, including:
A processor;
a memory including one or more computer program modules;
Wherein the one or more computer program modules are stored in the memory and configured to be executed by the processor, the one or more computer program modules comprising a method for implementing the cross-operating system operating application program as described above.
To achieve the above object, the present application provides a computer-readable storage medium having stored thereon computer instructions which, when run, perform the steps of the method of operating an application across an operating system as described above.
The device and the method for operating the application programs across the operating systems are convenient for operating the application programs of the opposite side between the operating systems, do not influence the use of the opposite side operating systems, and have high interactive use efficiency.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While the application is susceptible of embodiment in the drawings, it is to be understood that the application may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided to provide a more thorough and complete understanding of the application. It should be understood that the drawings and embodiments of the application are for illustration purposes only and are not intended to limit the scope of the present application.
It should be understood that the various steps recited in the method embodiments of the present application may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the application is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment," another embodiment "means" at least one additional embodiment, "and" some embodiments "means" at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those skilled in the art will appreciate that "one or more" is intended to be construed as "one or more" unless the context clearly indicates otherwise. "plurality" is understood to mean two or more.
Hereinafter, embodiments of the present application will be described in detail with reference to the accompanying drawings.
Example 1
The embodiment of the application provides a method for operating application programs across operating systems, which is convenient for operating the application programs across the operating systems.
FIG. 1 is a flow chart of a method of operating an application across operating systems according to the present application, and the method of operating an application across operating systems according to the present application will be described in detail with reference to FIG. 1 below:
Step S101, a first operating system sends an application starting instruction to a second operating system through a first communication interface, wherein the first operating system operates on a first hardware set of a multi-core heterogeneous system on chip, the second operating system operates on a second hardware set of the multi-core heterogeneous system on chip, the first hardware set and the second hardware set belong to different hardware domains, and the first communication interface is a first inter-core communication channel between the hardware domains;
step S102, based on the received application starting instruction, the second operating system creates a virtual display to start a corresponding application, and sends display picture data of the application obtained by the virtual display to the first operating system in real time through a second communication interface, wherein the second communication interface is a second inter-core communication channel between the hardware domains, and the bandwidth of the second inter-core communication channel is larger than that of the first inter-core communication channel;
Step S103, the first operating system synchronously displays the display picture of the application for the user to check and trigger operation, and based on the trigger operation of the user, the first operating system sends an in-application operation instruction comprising the position information of the trigger operation in the display picture of the first system to the second operating system through a first communication interface;
Step S104, based on the position information in the application operation instruction, the application in the second operation system responds to the actual operation in the application corresponding to the position information.
In this embodiment, the type of the first operating system is the same as the type of the system of the second operating system, and the types of the operating systems include, but are not limited to Android, linux, QNX and FREERTOS in some other embodiments.
In this embodiment, after the first operating system acquires the display screen data of the application, the display screen data is subjected to format conversion and then synchronously displayed on the first operating system. It will be appreciated that due to operating system differences and display screen differences, it is necessary to format the display data prior to display of the display.
In this embodiment, when the first operating system operates the application of the second operating system, the second operating system starts the application in the background, and the display screen of the application is not displayed on the screen of the second operating system.
In this embodiment, before step S101, the first operating system obtains application information of each application program in the second operating system through the first communication interface, and displays the application information on the first operating system for the user to select to start the application program, where the application information includes, but is not limited to, an application icon, an application name, and application identification information.
It can be understood that the application information is only for letting the user know which applications are on the second operating system, and further select the applications to issue the application start operation instruction, in this embodiment, the first operating system obtains the reference information through the first communication interface, in other embodiments, the application information of the second operating system may be pre-stored in the first operating system, and when the applications in the second operating system need to be operated, the first operating system directly reads the pre-stored application information.
In this embodiment, the first communication interface is socket communication, and is mainly used for transmitting operation instructions and operation information, and the second communication interface is PCIe, and PCIe has a large transmission bandwidth and a fast transmission speed, so that synchronization between operation and display to the greatest extent is ensured.
In this embodiment, the protocol data of socket communication includes a 1-byte data identifier and an 8-byte data content, where the data identifier is used to identify a response type of the data content, and the response type includes application start, application close, and intra-application operation.
It can be understood that, for an operation instruction with a response type of application start, the data content of the operation instruction is application related information of an application to be started, and the application related information is used by the second operating system to enable the second operating system to start a matched and unique application, in this embodiment, because the first operating system can acquire an application icon, an application name and application identification information through the second operating system, after the user selects the application to be started, the first operating system issues the operation instruction with application data as an application name corresponding to the application; in other embodiments, the data content may also be location information of the application in the second operating system, application serial number information, and the like.
In this embodiment, for an operation instruction with a response type of application shutdown, when the first operating system wants to exit after finishing the operation of the application of the second operating system, the user may issue an application shutdown instruction through the first operating system, based on which the first operating system stops displaying the acquired display screen data and stops acquiring the display screen data from the second operating system, and at the same time, the second operating system shuts down the application and destroys the virtual display, and ends the cross-system operation application.
In this embodiment, for an operation instruction with an intra-application operation response type, the data content of the operation instruction is the position information of the trigger operation in the display screen of the first system, in this embodiment, the first operation system and the second operation system are both Android operation systems, when a user starts the application of the second operation system to see the display screen of the application on the first operation system, and then, through the touch operation application, the first operation system obtains the position information of the touch operation in the display screen through the actual display window of the first operation system and the report point of onTouch (), and issues the intra-application operation instruction including the position information to the second operation system, and after receiving the operation instruction, the second operation system transmits the operation instruction to the virtual display through the interface of inputmanager.
Example 2
The embodiment of the application provides a device for operating application programs across operating systems, which is convenient for operating the application programs across the operating systems.
In the present embodiment, the device for operating an application program across the operating systems of the present application will be described in detail with respect to the device for operating an application program across the operating systems between two systems. It will be appreciated that the apparatus may be used between any number of systems.
FIG. 2 is a schematic structural diagram of an apparatus for operating an application program across operating systems according to the present application, as shown in FIG. 2, including:
The display control unit 110, the display unit 120, the application starting unit 130 and the image transmission unit 140 which are configured on the first operating system 100, the display control unit 210, the display unit 220, the application starting unit 230 and the image transmission unit 240 which are configured on the second operating system 200, wherein the display unit, the application starting unit and the image transmission unit in each operating system are connected with the display control unit of the system, a plurality of applications are respectively mounted in each operating system, and the first operating system 100 is provided with applications 301, 302 and 303 and the second operating system 200 is provided with applications 304 and 305.
The display control unit 110 is communicatively connected to the display control unit 210 through a first communication interface to transmit application information and operation instructions, and is configured to control the display unit, the application start unit, and the image transmission unit of the present operating system to respond to the operation instructions based on the user operation instructions and the operation instructions sent by other operating systems.
By way of example, the first operating system is taken as an example to explain the roles of the units, wherein the application starting unit 130 is used for starting the corresponding application in the first operating system based on the operation instruction, the display unit 120 comprises a virtual display unit 121 and a physical display unit 122, the virtual display unit 121 is used for capturing display screen data after the starting of the application program, the physical display unit 122 is used for displaying application information on the screen of the first operating system 100 for a user to select starting or displaying the display screen data after the starting of the application program received by the image transmission unit 140 for the user to view and operate, and the image transmission unit 140 is in communication connection with the image transmission unit 240 on the second operating system 200 through a second communication interface to transmit the display screen data captured by the virtual display unit 121.
The virtual display unit is created after receiving the application start instruction, and the physical display unit is created when the image processing unit receives the display screen data of the application and displays the application information.
Each operating system respectively operates on different hardware sets of the multi-core heterogeneous system on chip, the different hardware sets belong to different hardware domains, a first communication interface is a first inter-core communication channel between the hardware domains, a second communication interface is a second inter-core communication channel between the hardware domains, and the bandwidth of the second inter-core communication channel is larger than that of the first inter-core communication channel.
It is understood that the first operating system and the second operating system each have a screen belonging to the use of their operating systems.
In the present embodiment, the operation instructions include an application start instruction, an in-application operation instruction, and an application close instruction.
In this embodiment, the application information includes an application icon, an application name, and application identification information.
In this embodiment, the first communication interface is socket communication, and the second communication interface is any one of Mailbox and PCIe.
In the present embodiment, the image transmission unit 140 uses the v4L2 architecture to transmit the display screen data of the application.
The working engineering of this embodiment is that when a user of the first operating system 100 wants to operate the application 305 of the second operating system 200, the display control unit 110 of the first operating system 100 acquires all application information on the second operating system 200 from the display control unit 210 of the second operating system, and displays the application information on the screen of the first operating system 100 for selection by the user, when the user selects to start the application 305 according to the displayed information, the display control unit 110 of the first operating system 100 sends an application start instruction to the display control unit 210 of the second operating system 200, the second operating system 200 receives the application start instruction, controls the application start unit 230 to start the corresponding application 305, and controls the display unit 220 to create a virtual display unit 221 to capture the picture data after the start of the application 305, synchronously, the image transmission unit 240 transmits the picture data after the start to the image transmission unit 140 of the first operating system 100, the physical display unit 122 displays the picture data on the screen for the user to view and operate the application 305 after receiving the picture data, when the user triggers the operation in the application, the display control unit 110 of the first operating system 100 sends the application start instruction to the display control unit 200, and when the user stops the display control unit 200 receives the command corresponding to stop the input of the application control unit 200, and the display control unit receives the input of the instruction to stop the display control unit 200 to stop the image transmission of the application control unit 100, and the display control unit 122 to stop the display control unit 100, the display control unit 210 of the second operating system 200 receives the application closing instruction, closes the application and destroys the virtual display, and ends the cross-system operating application.
Similarly, the process of operating the application of the first operating system 100 by the user of the second operating system 200 is not described herein.
It should be noted that, when the user starts the application of the second operating system to see the display screen of the application on the first operating system, and when the user triggers the operation in the application, the display control unit 110 of the first operating system 100 may obtain the position information of the touch operation in the display screen through the actual display window of the first operating system 100 and the report point of onTouch (), the display control unit 110 of the first operating system 100 sends the operation instruction in the application including the position information to the display control unit 210 of the second operating system 200, and after the second operating system 200 receives the operation instruction, the operation instruction is transmitted to the virtual display through the interface of the inputmanager.
Example 3
In this embodiment, an electronic device is further provided, and fig. 3 is a schematic block diagram of an electronic device provided by the present application. As shown in fig. 3, the electronic device 130 includes a processor 131 and a memory 132. Memory 132 is used to store non-transitory computer-readable instructions (e.g., one or more computer program modules). Processor 131 is configured to execute non-transitory computer readable instructions that when executed by processor 131 may perform one or more of the steps of the method of operating an application across an operating system described above. The memory 132 and the processor 131 may be interconnected by a bus system and/or other forms of connection mechanisms (not shown).
For example, the processor 131 may be a Central Processing Unit (CPU), a Digital Signal Processor (DSP), or other form of processing unit having data processing and/or program execution capabilities, such as a Field Programmable Gate Array (FPGA) or the like, for example, the Central Processing Unit (CPU) may be an X86 or ARM architecture or the like.
For example, the memory 132 may comprise any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, random Access Memory (RAM) and/or cache memory (cache) and the like. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, flash memory, and the like. One or more computer program modules may be stored on the computer readable storage medium and executed by the processor 131 to implement various functions of the electronic device 130. Various applications and various data, as well as various data used and/or generated by the applications, etc., may also be stored in the computer readable storage medium.
It should be noted that, in the embodiments of the present application, specific functions and technical effects of the electronic device 130 may refer to the above description about the method for operating the application program across the operating system, which is not repeated herein.
Example 4
In this embodiment, a computer readable storage medium is also provided, and fig. 4 is a schematic diagram of a storage medium of the present application. As shown in fig. 4, the storage medium 150 is used to store non-transitory computer readable instructions 151. For example, non-transitory computer readable instructions 151, when executed by a computer, may perform one or more steps in a method of operating an application across an operating system according to the description above.
For example, the storage medium 150 may be applied to the electronic device 130 described above. For example, the storage medium 150 may be the memory 132 in the electronic device 130 shown in fig. 3. For example, the relevant description of the storage medium 150 may refer to the corresponding description of the memory 132 in the electronic device 130 shown in fig. 3, and will not be repeated here.
The storage medium (computer readable medium) of the present application may be a computer readable signal medium, a non-transitory computer readable storage medium, or any combination of the two. The non-transitory computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of a non-transitory computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In the context of this document, a non-transitory computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a non-transitory computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to electrical wiring, fiber optic cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be included in the electronic device or may exist alone without being incorporated into the electronic device.
Computer program code for carrying out operations of the present application may be written in one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C ++, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented in software or in hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic that may be used include Field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems-on-chip (System-on-a-chip), complex Programmable Logic Devices (CPLDs), and the like.
The above description is only illustrative of some of the embodiments of the present application and of the principles of the technology employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in the present application is not limited to the specific combinations of technical features described above, but also covers other technical features formed by any combination of the technical features described above or their equivalents without departing from the spirit of the disclosure. Such as the above-mentioned features and the technical features disclosed in the present application (but not limited to) having similar functions are replaced with each other.
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the application. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.