Summary of the invention
The problem that this invention address that is how to enrich the application run in real time operating system, and reduces development cost and development difficulty.
For solving the problems referred to above, technical scheme provides the application running gear of a kind of terminal, described terminal is mounted with the first operating system, described first operating system is configured with first interface and the first system calling interface, described terminal also includes: applying unit, and described applying unit is configured to run on the second operating system;
Described application running gear includes:
Determining unit, for determining the second system calling interface corresponding to described applying unit, described second system calling interface adapts to described second operating system;
Dispensing unit, the second system calling interface for would correspond to described applying unit is configured to correspond to the first system calling interface of described applying unit;
Running unit, for calling described first interface or the first system calling interface corresponding to described applying unit, or call described first interface and corresponding to the first system calling interface of described applying unit, run on described first operating system realizing described applying unit.
Optionally, described determine unit, dispensing unit and running unit be suitable to receive start described applying unit instruction after run.
Optionally, described running unit is additionally operable to call the second interface, and described second interface adapts to described second operating system; Described application running gear also includes: screen unit, is used for shielding described second interface.
Optionally, described screen unit is suitable to run after receiving the instruction starting described applying unit.
Optionally, described first operating system is Threadx operating system, and described first interface is thread interface, and described the first system calling interface is the system call interfaces of Threadx operating system; Described second operating system is Android operation system, and described second interface is process interface, and described second system calling interface is the system call interfaces of Android operation system.
Optionally, described first operating system is real time operating system, and described second operating system is intelligent operating system.
Optionally, described first operating system is Threadx operating system, and described first interface is thread interface, and described the first system calling interface is the system call interfaces of Threadx operating system; Described second operating system is Android operation system, and described second system calling interface is the system call interfaces of Android operation system.
Optionally, described running unit includes virtual machine, local library and application framework, is respectively used to call described first interface.
Optionally, the system call interfaces of described Threadx operating system is reading and writing of files interface, brush screen interface or socket read-write interface; The system call interfaces of described Android operation system is operation document system interface, brush screen interface or sockets interface.
For solving the problems referred to above, technical scheme additionally provides a kind of terminal, including the application running gear of above-mentioned terminal.
For solving the problems referred to above, technical scheme additionally provides the application operation method of a kind of terminal, described terminal is mounted with the first operating system, described first operating system is configured with first interface and the first system calling interface, described terminal also includes: applying unit, and described applying unit is configured to run on the second operating system;
The application operation method of described terminal includes:
Determining the second system calling interface corresponding to described applying unit, described second system calling interface adapts to described second operating system;
Would correspond to the second system calling interface of described applying unit and be configured to correspond to the first system calling interface of described applying unit;
Call described first interface or corresponding to the first system calling interface of described applying unit, or call described first interface and the first system calling interface corresponding to described applying unit, run on described first operating system realizing described applying unit.
Optionally, the application operation method of described terminal is suitable to implement after receiving the instruction starting described applying unit.
Optionally, described second operating system has the second interface with its adaptation; The application operation method of described terminal also includes: shield described second interface.
Optionally, after receiving the instruction starting described applying unit, described second interface is shielded.
Optionally, described first operating system is Threadx operating system, and described first interface is thread interface, and described the first system calling interface is the system call interfaces of Threadx operating system; Described second operating system is Android operation system, and described second interface is process interface, and described second system calling interface is the system call interfaces of Android operation system.
Optionally, described first operating system is real time operating system, and described second operating system is intelligent operating system.
Optionally, described first operating system is Threadx operating system, and described first interface is thread interface, and described the first system calling interface is the system call interfaces of Threadx operating system; Described second operating system is Android operation system, and described second system calling interface is the system call interfaces of Android operation system.
Optionally, described first interface is called by least one in virtual machine, local library and application framework.
Optionally, the system call interfaces of described Threadx operating system is reading and writing of files interface, brush screen interface or socket read-write interface; The system call interfaces of described Android operation system is operation document system interface, brush screen interface or sockets interface.
For solving the problems referred to above, technical scheme additionally provides a kind of method running application program, including: when the application program being matched with the second operating system runs, the instruction calling described second operating system is converted to the first discernible instruction of operating system, by the instruction after the first operating system response conversion, to realize the operation of described application program.
Compared with prior art, the invention have the advantages that
Part framework in intelligent operating system is implanted into real time operating system by technical scheme, is realized the operation of the application of intelligent operating system by the calling interface in real time operating system. Owing to the internal structure of real time operating system need not be revised, and do not need to revise the application of intelligent operating system, therefore greatly reduce development cost and development difficulty. It addition, directly run the application of intelligent operating system in the terminal be provided with real time operating system, also enrich the application run in real time operating system greatly.
Further, since be only, after the part framework in intelligent operating system is carried out amendment on a small quantity, be implanted into real time operating system, and only just start this part framework when running application, this reduces power consumption, improve the performance of system, decrease the expense of internal memory.
Detailed description of the invention
Understandable for enabling the above-mentioned purpose of the present invention, feature and advantage to become apparent from, below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.
Elaborate detail in the following description so that fully understanding the present invention. But the present invention can be different from alternate manner described here implement with multiple, and those skilled in the art can do similar popularization when without prejudice to intension of the present invention. Therefore the present invention is not by the restriction of following public detailed description of the invention.
Fig. 1 is the flow chart of the application operation method of the terminal that the embodiment of the present invention provides, and describes in detail below in conjunction with Fig. 1.
Described terminal is mounted with the first operating system, and described first operating system is configured with first interface and the first system calling interface, and described terminal also includes the applying unit being suitable to other operating systems, and described applying unit is configured to run on the second operating system; The application operation method of described terminal includes:
Step S1, it is determined that corresponding to the second system calling interface of described applying unit, described second system calling interface adapts to described second operating system;
Step S2, would correspond to the second system calling interface of described applying unit and is configured to correspond to the first system calling interface of described applying unit;
Step S3, call described first interface or the first system calling interface corresponding to described applying unit, or call described first interface and corresponding to the first system calling interface of described applying unit, run on described first operating system realizing described applying unit.
In described step S1, described applying unit adapts to described second operating system of operation, it is thus necessary to determine that described applying unit is the second system calling interface of run time call in described second operating system. Described second system calling interface adapts to described second operating system. Described first operating system is also configured with first interface, described applying unit runs in the terminal being mounted with described first operating system, also need to call the first interface of described first operating system configuration, in this step, it is also possible to determine the first interface corresponding to described applying unit.
In described step S2, described applying unit runs in the terminal being mounted with described first operating system, it is necessary to would correspond to the second system calling interface of described applying unit and is configured to correspond to the first system calling interface of described applying unit.
In described step S3, only call described first interface or only call the first system calling interface corresponding to described applying unit or call described first interface and corresponding to the first system calling interface of described applying unit, running on described first operating system realizing described applying unit.
Described second operating system has the second interface with its adaptation; The application operation method of described terminal also includes: shield described second interface. Described applying unit needs to call the operation that described second interface realizes, and changes the first interface by calling correspondence and realizes. Described second interface can shield after receiving the instruction starting described applying unit, it is also possible to shields in advance, it is also possible to dynamic barrier, such as, shielding after receiving the instruction starting described applying unit, recovers after described applying unit end of run, and next time, applying unit shielded after running again.
The application operation method of described terminal is suitable to implement after receiving the instruction starting described applying unit, and stops implementing after applying unit end of run until applying unit is implemented after being again started up. The number of the applying unit of each run is optionally one. This can save system resource, reduces the consumption to system resource.
Described first operating system can be real time operating system, and described second operating system can be intelligent operating system. Described first operating system can be Threadx operating system, and described first interface is thread interface, and described the first system calling interface is the system call interfaces of Threadx operating system; Described second operating system is Android operation system, and described second interface is process interface, and described second system calling interface is the system call interfaces of Android operation system. Described first interface is called by the virtual machine of Android operation system, local library and application framework.
The system call interfaces of described Threadx operating system is reading and writing of files interface, brush screen interface or socket read-write interface; The system call interfaces of described Android operation system is operation document system interface, brush screen interface or sockets interface.
In other embodiments, described first operating system and the second operating system can also be all intelligent operating system, for instance the first operating system can be Meego operating system, and the second operating system can be Android operation system.
Described terminal can be mobile phone, panel computer or e-book etc.
Fig. 2 is the structure chart of the application running gear of the terminal that the embodiment of the present invention provides, and describes in detail below in conjunction with Fig. 2.
Described terminal is mounted with the first operating system, and described first operating system is configured with first interface and the first system calling interface, and described terminal also includes: applying unit, and described applying unit is configured to run on the second operating system;
Described application running gear includes:
Determining unit 1, for determining the second system calling interface corresponding to described applying unit, described second system calling interface adapts to described second operating system;
Dispensing unit 2, the second system calling interface for would correspond to described applying unit is configured to correspond to the first system calling interface of described applying unit; With described, dispensing unit 2 determines that unit 1 is connected;
Running unit 3, for calling described first interface or the first system calling interface corresponding to described applying unit, or call described first interface and corresponding to the first system calling interface of described applying unit, run on described first operating system realizing described applying unit; Running unit 3 is connected with described dispensing unit 2.
Described determine unit 1, dispensing unit 2 and running unit 3 be suitable to receive start described applying unit instruction after run.
Described running unit 3 is additionally operable to call the second interface, and described second interface adapts to described second operating system; Described application running gear also includes: screen unit, is used for shielding described second interface. (can shield before activation) described screen unit is suitable to run after receiving the instruction starting described applying unit. Described screen unit is further adapted for the second interface described in dynamic barrier. Such as after receiving the instruction starting described applying unit, shield described second interface, after obtaining the instruction that described applying unit is out of service, recover described second interface, after again receiving the instruction starting described applying unit, again shield described second interface.
Described first operating system is Threadx operating system, and described first interface is thread interface, and described the first system calling interface is the system call interfaces of Threadx operating system; Described second operating system is Android operation system, and described second system calling interface is the system call interfaces of Android operation system. Described running unit 3 includes virtual machine, local library and application framework, is respectively used to call described first interface.
The application running gear of described terminal can run after described applying unit starts, after described applying unit end of run, out of service.
The application running gear of described terminal can integrated in the terminal, described terminal can be mobile phone, panel computer or e-book etc.
Illustrate for the application running Android intelligent operating system on the mobile phone being provided with Threadx real time operating system below.
In the present embodiment, Threadx real time operating system is called for short Threadx operating system, for being arranged on the first operating system on mobile phone, described Threadx operating system is configured with the system call interfaces (corresponding the first system calling interface) of thread interface (corresponding first interface) and Threadx. Android intelligent operating system is called for short Android operation system, is suitable to run multiple APK (AndroidPackage, Android installation kit) application program. Android operation system configuration is by the system call interfaces (corresponding second system calling interface) of process interface (corresponding second interface) and Android.
Android operation system is a kind of open source code operating system based on Linux, in recent years along with the progress of technology is increasingly widely used in the terminal such as mobile phone, panel computer. In view of the exploration that it is good, develop its special application program more and more therewith. Threadx operating system is a kind of real time operating system, it is adaptable to functional mobile phone, it is possible to achieve basic mobile phone communication, note receives the functions such as transmission. In view of the closure of the restriction of Threadx system architecture and code, the application being suitable to this operating system is less.
Android operation system is a kind of operating system supporting multi-process multithreading, and the framework of Android operation system includes application layer (APPLICATIONS), application framework layer (APPLICATIONFRAMEWORK), local library (LIBRARIES), virtual machine (VirtualMachine) and linux kernel (LINUXKERNEL). Wherein said application layer, application framework layer, local library and virtual machine rely primarily on the system call interfaces in linux kernel to realize its operation.
Android application (being arranged in described application layer) of Android operation system calls the interface in described application framework layer, local library and virtual machine, then is realized the operation of Android application by the system call interfaces in this interface interchange linux kernel.
Android operation system is a kind of operating system supporting multi-process multithreading, and the interface in described application framework layer, local library and virtual machine is realized by process interface substantially, but there is also part of interface and realized by thread interface. Wherein, the interface in the described application framework layer of the Android application call of Android operation system, local library and virtual machine is realized by process interface substantially, but there is also part of interface and realized by thread interface.
Threadx operating system is the real time operating system of a kind of similar (SuSE) Linux OS, and it is the operating system supporting one process multithreading, realizes mainly through thread interface. Functional mobile phone runs the Android application of Android operation system, need to be transplanted on the functional mobile phone having been loaded with Threadx operating system after the amendment of the application framework layer of Android operation system, local library and virtual machine, Threadx operating system replace the linux kernel in Android operation system on this functional mobile phone, form the Organization Chart of the operating system shown in Fig. 3. Wherein revise the application framework layer of Android operation system, local library and virtual machine to include all masking the process interface in application framework layer, local library and virtual machine. Operating system shown in Fig. 3 also includes abstract operation layer 44, and application framework layer 11, local library 22 and virtual machine 33 call the system call interfaces in Threadx operating system 55 by abstract operation layer 44.
The concrete structure chart that by the operating system loading shown in Fig. 3 in mobile phone, can form the terminal shown in Fig. 4, described terminal is mobile phone 100, is also mounted with Android application 66 and functional mobile phone application 77 in mobile phone 100.
Android application 66 (also referred to as the applying units) of Android operation system run on the mobile phone 100 shown in Fig. 4, it needs to be determined that this Android application 66 interface of run time call in Android operation system, the system call interfaces of such as Android operation system, one or more (being referred to the operation of cell really shown in step S1 and the Fig. 2 shown in Fig. 1) in thread interface or process interface. Android application 66 system call interfaces that the interface of the Android operation system of run time call can pass through in the interface interchange Android operation system in the application framework layer in Android operation system, local library and virtual machine in linux kernel in Android operation system realize, it is also possible to realize by calling process interface in application framework layer, local library and virtual machine or thread interface. The system call interfaces of the Android operation system that described Android application 66 is called relates to the multiple systems calling interfaces such as file system, Memory Allocation, dynamic link library, network, base library, intervalometer and display.
No longer having linux kernel structure in Android operation system in mobile phone 100 shown in Fig. 4, in the Android operation system that therefore Android application 66 operation is required, the system call interfaces in linux kernel is realized by the system call interfaces of Threadx operating system. In view of the system call interfaces of Threadx operating system and the system call interfaces of Android operation system there are differences, such as, the title of interface is different, the function that interface realizes is not equal, it is therefore desirable to would correspond to the system call interfaces (being referred to the operation of the dispensing unit shown in step S2 and Fig. 2 shown in Fig. 1) that the system call interfaces of the Android operation system of described Android application 66 is configured to correspond to the Threadx operating system of described Android application 66. Concrete can be set up abstract operation layer, would correspond to the system call interfaces that the system call interfaces of the Android operation system of described Android application 66 is configured to correspond to the Threadx operating system of described Android application 66 in abstract operation layer.
Such as, the system call interfaces of Android operation system has: operation document system interface, brush screen interface and sockets interface, and the system call interfaces of Threadx operating system has reading and writing of files interface, brush screen interface and socket read-write interface. Wherein, operation document system interface is different from reading and writing of files interface name but that realize function is identical, if the operation document system interfaces that Android operation system is called in Android application 66, then corresponding is configured to call the reading and writing of files interface of Threadx operating system. The brush screen interface of Android operation system is identical with the brush screen interface name of Threadx operating system, it is achieved function also identical, can not make an amendment herein. Sockets interface is different from socket read-write interface title but function is identical, if the sockets interface of Android operation system is called in Android application 66, then correspondence is configured to call the socket read-write interface of Threadx operating system. The system call interfaces being herein merely illustrative of the Android operation system that how would correspond to described Android application 66 is configured to correspond to the system call interfaces that described Android applies the Threadx operating system of 66, is as the criterion with practical situation in specific implementation process.
After would correspond to the system call interfaces of Threadx operating system that the system call interfaces of the Android operation system of described Android application 66 is configured to correspond to described Android application 66, call the system call interfaces of the Threadx operating system applying 66 corresponding to described Android, to realize the Android application 66 operation in Threadx operating system.
The interface applied in 66 described application framework layer, local library and the virtual machines called in view of the Android of Android operation system is realized by process interface, and Threadx operating system does not support process interface, therefore if Android applies the operation calling process interface of 66, it is necessary to the process interface called is made corresponding amendment.
Owing to namely the interface in the application framework layer of Android operation system, local library and virtual machine can be realized by process interface, can also be realized by thread interface, therefore being masked by the process interface in application framework layer, local library and virtual machine, the interface in mandatory use ccf layer, local library and virtual machine is realized by thread.
By shielding the process interface in the application framework layer of Android operation system, local library and virtual machine, the interface in mandatory use ccf layer, local library and virtual machine is realized by thread; And would correspond to the system call interfaces that the system call interfaces of the Android operation system of described Android application 66 is configured to correspond to the Threadx operating system of described Android application 66. Android application 66 can call thread interface or the system call interfaces of the Threadx operating system corresponding to this Android application 66, it is achieved that Android application 66 operations in Threadx operating system.
Fig. 5 is the workflow schematic diagram of terminal shown in Fig. 4, and described terminal is mobile phone, is provided with the operating system shown in Fig. 3, describes in detail below in conjunction with Fig. 5.
After starting up of terminal, perform step S11, start real time operating system (the Threadx operating system in Fig. 4); Then perform step S22, select Android application, send the instruction starting Android application; Perform step S33 after obtaining the instruction of described startup Android application, start Android virtual machine, the operation of cell really shown in step S1 and the Fig. 2 shown in concrete corresponding diagram 1; Then perform step S44, start necessary Android service, the operation of the dispensing unit shown in step S2 and Fig. 2 shown in concrete corresponding diagram 1; Then perform step S55, run Android application, the operation of the running unit shown in step S3 and Fig. 2 shown in concrete corresponding diagram 1. After Android application is out of service, the application running gear of terminal is also out of service until after again obtaining the instruction starting Android application, being again started up.
Based on aforesaid terminal, the application running gear of terminal and method, technical scheme additionally provides a kind of method running application program, including: when the application program being matched with the second operating system runs, the instruction calling described second operating system is converted to the first discernible instruction of operating system, by the instruction after the first operating system response conversion, to realize the operation of described application program.
It will be appreciated by those skilled in the art that, the terminal of above-described embodiment, the application running gear of terminal and method, run method all or part of of application program to can be by the hardware that program carrys out instruction relevant and complete, described program can be stored in computer-readable recording medium, and described storage medium can be ROM, RAM, magnetic disc, CD etc.
Compared with prior art, the present invention at least has the advantage that
Real time operating system need not be revised, also do not need the application of amendment intelligent operating system, therefore greatly reduce development cost and development difficulty. It addition, directly run the application of intelligent operating system in the terminal be provided with real time operating system, also enrich the application run in real time operating system greatly.
Additionally, due to be only the part framework in intelligent operating system is carried out amendment on a small quantity after, be implanted into real time operating system, and only just start this part framework when running application, this reduces power consumption, improve the performance of system, decrease the expense of internal memory.
Although the present invention is with preferred embodiment openly as above; but it is not for limiting the present invention; any those skilled in the art are without departing from the spirit and scope of the present invention; may be by the method for the disclosure above and technology contents and technical solution of the present invention is made possible variation and amendment; therefore; every content without departing from technical solution of the present invention; according to any simple modification, equivalent variations and modification that above example is made by the technical spirit of the present invention, belong to the protection domain of technical solution of the present invention.