Summary of the invention
For overcoming above-mentioned technical matters or solving the problems of the technologies described above at least in part, the following technical scheme of special proposition:
One embodiment of the present of invention propose the method for event information process in a kind of multisystem, are applied to and comprise in the terminal device running environment of core system and multiple subsystem, comprising:
When event trigger information being detected by arbitrary subsystem, the Archive sit corresponding with described event trigger information provided described core system by this subsystem performs corresponding operating, to generate event information;
Determine at least one subsystem corresponding to the event type of described event information;
Control at least one subsystem corresponding by described core system and read the service data that described Archive sit is performed, to obtain described event information.
Preferably, determine at least one subsystem corresponding to the event type of described event information, comprise following at least arbitrary situation:
When the event type of described event information is the read-only event in foreground, determine that at least one subsystem corresponding is front station subsystem;
When the event type of described event information is the read-only event of reservation system, determine that at least one subsystem corresponding is this predetermined subsystems;
When the event type of described event information is multisystem event, determine that at least one subsystem corresponding is described multiple subsystem.
Preferably, when determining that the subsystem corresponding to the event type of described event information is one, control at least one subsystem corresponding by described core system and read the service data that described Archive sit is performed, to obtain described event information, specifically comprise:
Control this subsystem by described core system and directly read the service data that described Archive sit is performed, to obtain described event information.
Preferably, when determining the subsystem corresponding to the event type of described event information at least two, control at least one subsystem corresponding by described core system and read the service data that described Archive sit is performed, to obtain described event information, specifically comprise:
By described core system, the service data that described Archive sit performs is copied in the buffer zone corresponding to subsystems;
Control multiple subsystem respectively and read the service data that described Archive sit is performed, to obtain described event information in respective corresponding buffer zone.
Alternatively, the method also comprises:
Be respectively multiple subsystem by described core system and create its respective buffer zone.
An alternative embodiment of the invention proposes the device of event information process in a kind of multisystem, is applied to and comprises in the terminal device running environment of core system and multiple subsystem, comprising:
Event information generation module, for when event trigger information being detected by arbitrary subsystem, the Archive sit corresponding with described event trigger information provided described core system by this subsystem performs corresponding operating, to generate event information;
Subsystem determination module, for determining at least one subsystem corresponding to the event type of described event information;
Event information read module, reads the service data performed described Archive sit, to obtain described event information for being controlled at least one subsystem corresponding by described core system.
Preferably, subsystem determination module is specifically for following at least arbitrary situation:
When the event type of described event information is the read-only event in foreground, determine that at least one subsystem corresponding is front station subsystem;
When the event type of described event information is the read-only event of reservation system, determine that at least one subsystem corresponding is this predetermined subsystems;
When the event type of described event information is multisystem event, determine that at least one subsystem corresponding is described multiple subsystem.
Preferably, when subsystem determination module determines that the subsystem corresponding to the event type of described event information is one, event information read module specifically comprises:
First reading unit, directly reads the service data performed described Archive sit, to obtain described event information for being controlled this subsystem by described core system.
Preferably, when subsystem determination module determines the subsystem corresponding to the event type of described event information at least two, event information read module specifically comprises:
Data copy cell, for being copied in the buffer zone corresponding to subsystems by described core system by the service data that described Archive sit performs;
Second reading unit, reads the service data performed described Archive sit, to obtain described event information for controlling multiple subsystem respectively in respective corresponding buffer zone.
Alternatively, this device also comprises:
Buffer zone creating unit, creates its respective buffer zone for being respectively multiple subsystem by described core system.
In technical scheme of the present invention, fill up the blank not dealing with scheme in prior art for event information in multisystem.On the one hand, event is divided into different event types by the feature according to event, and decide the subsystem that can obtain event according to event type, and control corresponding subsystem acquisition event, ensure that the integrality of reporting events, and there will not be situations such as the maloperations of rear station subsystem, the needs of practical application sight of more fitting.Time on the other hand, carry out event read operation between sub-system by introducing core system to carry out unifying cooperation control, make subsystem while separate operation, also can meet independent under terminal operating rule or common reading event to make system cloud gray model more effective and smooth and easy, therefore user experience also can promote greatly.
The aspect that the present invention adds and advantage will part provide in the following description, and these will become obvious from the following description, or be recognized by practice of the present invention.
Embodiment
Be described below in detail embodiments of the invention, the example of embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has element that is identical or similar functions from start to finish.Being exemplary below by the embodiment be described with reference to the drawings, only for explaining the present invention, and can not limitation of the present invention being interpreted as.
Those skilled in the art of the present technique are appreciated that unless expressly stated, and singulative used herein " ", " one ", " " and " being somebody's turn to do " also can comprise plural form.Should be further understood that, the wording used in instructions of the present invention " comprises " and refers to existing characteristics, integer, step, operation, element and/or assembly, but does not get rid of and exist or add other features one or more, integer, step, operation, element, assembly and/or their group.Should be appreciated that, when we claim element to be " connected " or " coupling " to another element time, it can be directly connected or coupled to other elements, or also can there is intermediary element.In addition, " connection " used herein or " coupling " can comprise wireless connections or wirelessly to couple.Wording "and/or" used herein comprises one or more whole or arbitrary unit listing item be associated and all combinations.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, and all terms used herein (comprising technical term and scientific terminology), have the meaning identical with the general understanding of the those of ordinary skill in field belonging to the present invention.It should also be understood that, those terms defined in such as general dictionary, should be understood to that there is the meaning consistent with the meaning in the context of prior art, unless and by specific definitions as here, otherwise can not explain by idealized or too formal implication.
Those skilled in the art of the present technique are appreciated that, here used " terminal ", " terminal device " had both comprised the equipment of wireless signal receiver, it only possesses the equipment of the wireless signal receiver without emissive ability, comprise again the equipment receiving and launch hardware, it has and on bidirectional communication link, can carry out the reception of two-way communication and launch the equipment of hardware.This equipment can comprise: honeycomb or other communication facilitiess, its honeycomb or other communication facilities of having single line display or multi-line display or not having multi-line display; PCS (PersonalCommunicationsService, PCS Personal Communications System), it can combine voice, data processing, fax and/or its communication ability; PDA (PersonalDigitalAssistant, personal digital assistant), it can comprise radio frequency receiver, pager, the Internet/intranet access, web browser, notepad, calendar and/or GPS (GlobalPositioningSystem, GPS) receiver; Conventional laptop and/or palmtop computer or other equipment, it has and/or comprises the conventional laptop of radio frequency receiver and/or palmtop computer or other equipment.Here used " terminal ", " terminal device " can be portable, can transport, be arranged in the vehicles (aviation, sea-freight and/or land), or be suitable for and/or be configured at local runtime, and/or with distribution form, any other position operating in the earth and/or space is run.Here used " terminal ", " terminal device " can also be communication terminal, access terminals, music/video playback terminal, can be such as PDA, MID (MobileInternetDevice, mobile internet device) and/or there is the mobile phone of music/video playing function, also can be the equipment such as intelligent television, Set Top Box.
Multisystem in embodiments of the invention comprises at least core system and multiple subsystem.Wherein, subsystem can comprise various operating system, such as the intelligent terminal operation system such as Android, Windows and first heart.Core system is used for controlling multiple subsystem, and provides service for subsystems.Multisystem in embodiments of the invention can realize based on multiple virtual technology, hereafter carries out the detailed description of embodiment for the container technique under linux system.Wherein, the multisystem using linux container technology to realize, loads independently system in each container, separate between multiple system, and multiple system cloud gray model is on same physical terminal device.
Linux container instrument, can provide the virtual of lightweight, so that isolated process and resource.Use the advantage of container to be exactly do not need to install too many software package, use procedure also can not take too many resource.Container effectively by the resource division that managed by single operating in isolated group, with better between isolated group balance have the resource user demand of conflict.Compared with virtual machine technique, container technique neither needs instruction level simulation, does not also need Just-In-Time.Container can in the instruction of core CPU local runtime, and without any need for special explanation facility.In addition, it also avoid the complicacy in accurate virtual and system call replacement.Container, while providing isolation, also being pared down expenses by sharing these resources, be this means that container is more much smaller than real virtualized expense.By providing a kind of mode creating and enter container, operating system allows application program just as running on independently machine, but can share system and the physical resource of bottom.Therefore, the subsystem in this programme can carry out the process of event information under the control of core system.
Fig. 1 is the schematic flow sheet of event information disposal route in the multisystem of the embodiment of the present invention.
Step S110: when event trigger information being detected by arbitrary subsystem, the Archive sit corresponding with event trigger information provided core system by this subsystem performs corresponding operating, to generate event information.
Such as, intelligent terminal has carried two subsystems: unit feels concerned about system OS
1with android system OS
2.Unit feels concerned about system OS
1be in foreground, and android system OS
2be in running background.When being in the OS on foreground
1detect that user presses screen locking button, when screen locking event trigger information namely being detected, pass through OS
1the Archive sit corresponding with screen locking event trigger information provided core system writes " 1 " as in/dev/input/event0, to generate screen locking event information.
Step S120: determine at least one subsystem corresponding to the event type of event information.
Particularly, determine at least one subsystem corresponding to the event type of event information, following at least arbitrary situation can be included but not limited to:
(1) when the event type of event information is the read-only event in foreground, determine that at least one subsystem corresponding is front station subsystem.
Wherein, the read-only event in foreground is the event only allowing front station subsystem to get, and includes but not limited to: the touch operation etc. return event, performing to current foreground display interface.
Such as, be the operation that user carries out for front station subsystem owing to returning button, invisible for backstage Subsystem subscribers, therefore corresponding to the returning button event that returns should not report as backstage subsystem; If rear station subsystem also gets this and returns event, then after, station subsystem can perform maloperation when user's unaware.Operation like this also has user to the situation of the touch operation that foreground display interface performs, and differ a citing in embodiments of the present invention.In these cases, event information is the read-only event in foreground.
(2) when the event type of event information is the read-only event of reservation system, determine that at least one subsystem corresponding is this predetermined subsystems.
Wherein, the read-only event of reservation system is the event only allowing predetermined subsystem to get.
Such as, predetermined only android system has call function, and when terminal device receives call event, no matter android system is in foreground or backstage, all needs this call event to report to android system.In this case call event is the read-only event of reservation system, determines that android system is the subsystem relevant to event information.
(3) when the event type of event information is multisystem event, determine that at least one subsystem corresponding is multiple subsystem.
Wherein, the read-only event of reservation system is the event that multiple subsystem all can get, and includes but not limited to: screen locking event, system push the log information etc. in event, system.
Such as, screen locking event is the operation that user carries out at front station subsystem, if but only before station subsystem when getting this screen locking event then station subsystem cannot obtain, every system then in station subsystem, application function and process all continue to keep running status, make the power consumption of whole terminal device higher, therefore need to make front station subsystem and rear station subsystem all get this screen locking event, front station subsystem and rear station subsystem can enter dormant state to reduce equipment power dissipation in response to this screen locking event subsequently, in this case screen locking event is multisystem event, determine that all subsystems are the subsystem relevant to screen locking event.Again such as, system log message is queue events, and AM/BAM subsystem all needs to obtain such queue events, therefore queue events is multisystem event, determines that all subsystems are the subsystem relevant to queue events.
Step S130: control at least one subsystem corresponding by core system and read the service data that Archive sit is performed, to obtain event information.
Wherein, Archive sit refers to the driver file node that linux core system provides, different Archive sits is corresponding from different event informations, Archive sit can be provided to subsystems according to configuration by linux core system, and by linux core system determination subsystems to the access limit of each Archive sit.Such as, the Archive sit corresponding to screen locking event is /dev/input/event0, can arrange all visible and this Archive sit readable of system A and system B by linux core system.Again such as, the Archive sit corresponding to the event that returns is /dev/input/event1, can be arranged the system being in foreground readable to this Archive sit, and the system being in backstage is not readable to this Archive sit by linux core system.Again such as, the Archive sit corresponding to queue events is /proc/message, wherein can continue hold queue event a, b, c, d.
Preferably, when determining that the subsystem corresponding to the event type of event information is one, control at least one subsystem corresponding by core system and read the service data that Archive sit is performed, to obtain event information, can comprise: control this subsystem by core system and directly read the service data that Archive sit is performed, to obtain event information.
Such as, unit feels concerned about system OS
1be in foreground, android system OS
2be in running background; When being in the OS on foreground
1detect that user presses and return button, namely detect when returning event trigger information, pass through OS
1the Archive sit corresponding with returning event trigger information provided core system writes " 1 " as in/dev/input/event1, returns event information to generate; This event type returning event information is the read-only event in foreground, and the subsystem that core system determines to return to this event type of event information corresponding is foreground system OS
1, namely core system is so that Archive sit/dev/input/event1 is provided to foreground system is readable, subsequently, by core system control OS by relevant to the event that returns in advance
1read the service data " 1 " to Archive sit/dev/input/event1 write, then foreground system OS
1get and return event information.
Again such as, unit feels concerned about system OS
1be in foreground, android system OS
2be in running background, predetermined only android system has call function; When terminal device detects that call request generates call event, core system determines that the subsystem corresponding to the event type of call event is for being in backstage Android system, namely core system is readable in advance Archive sit/the dev/input/event2 relevant to call event is only provided to android system, subsequently, control android system by core system and read the service data write Archive sit/dev/input/event2, then android system gets call event information.
Preferably, when determining the subsystem corresponding to the event type of event information at least two, control at least one subsystem corresponding by core system and read the service data that Archive sit is performed, to obtain event information, can comprise: by core system, the service data that Archive sit performs is copied as in the corresponding buffer zone of subsystems; Control multiple subsystem respectively and read the service data that Archive sit is performed, to obtain event information in respective corresponding buffer zone.
Such as, unit feels concerned about system OS
1be in foreground, android system OS
2be in running background, when being in the OS on foreground
1detect that user presses screen locking button, when screen locking event trigger information namely being detected, pass through OS
1the Archive sit corresponding with screen locking event trigger information provided core system writes " 1 " as in/dev/input/event0, to generate screen locking event information, core system determines that the subsystem corresponding to the event type of screen locking event information is whole subsystem, and namely unit feels concerned about system OS
1with Android system OS
2; Subsequently, the service data write in Archive sit/dev/input/event0 relevant to screen locking event copies as OS by core system
1and OS
2in corresponding buffer zone, by core system control OS respectively
1and OS
2the service data to Archive sit/dev/input/event0 write is read, as " 1 " in respective corresponding buffer zone.
It should be noted that, when determining the subsystem corresponding to the event type of event information at least two, after reading in a certain system the service data performed Archive sit, service data can automatically be deleted, therefore read when another system carrys out read operation data again less than.
Again such as, unit feels concerned about system OS
1be in foreground, android system OS
2be in running background, when the queue events A relevant to system journal pushed information, B, C, D occur, core system determines that the subsystem corresponding to the event type of queue events is OS
1and OS
2, the service data write in Archive sit/dev/input/event4 copies as OS by core system
1and OS
2in corresponding buffer zone, control OS respectively subsequently
1and OS
2the service data write in Archive sit/dev/input/event4 is read in, to obtain event A, B, C, D in respective corresponding buffer zone.When each system reads queue events respectively in the buffer zone corresponding with it, read an event and just in respective buffer zone, deleted this event information, the event information that therefore each system reads is all complete, and reading process does not interfere with each other.
It should be noted that, linux container instrument can provide the virtual of lightweight, so that isolated process and resource.Accordingly, subsystem multiple in intelligent terminal can be placed in each container respectively, and by namespace, each subsystem be marked.Namespace is used for representing the space residing for subsystems; Such as, carry out Mk system A by namespace and operate in namespaceA, system B operates in namespaceB, and system A and B operates in different spaces, is isolation mutually, thus can ensures not interfere with each other between them between them.But system A and system B is based on linux kernel System Core, realize Archive sit in linux kernel system, and identify the data manipulation of Archive sit from namespace by core system.During event information corresponding to subsystem file reading node, core system can get the subsystem performing file reading nodal operation and belong to which namespace.
Such as, when determining that the subsystem corresponding to the event type of event information is one, Archive sit/dev/input/event2 that systemic presupposition is relevant to event information can only be read by namespaceB and android system, when namespaceA and unit feel concerned about this Archive sit of system reading, it is subsystem from namespaceA that core system gets what need execute file node/dev/input/event2 read operation, judges that this read operation does not have authority.
Such as, mark unit by namespace and feel concerned about system and operate in namespaceA, android system operates in namespaceB, and unit feels concerned about system OS
1be in foreground, android system OS
2be in running background; When being in the OS on foreground
1detect that user presses screen locking button, namely generate screen locking event information, core system determines that the subsystem corresponding to the event type of screen locking event information is whole subsystem, i.e. OS
1and OS
2; Subsequently, the service data write in Archive sit/dev/input/event0 relevant to screen locking event copies as in the corresponding buffer zone of namespaceA and namespaceB by core system, control the unit corresponding to namespaceA respectively by core system to feel concerned about the android system corresponding with namespaceB of unifying in buffer zone corresponding separately, read the service data write Archive sit/dev/input/event0, as " 1 ", to obtain screen locking event information.
Alternatively, multiple subsystem can be respectively by core system and create its respective buffer zone.The service data that Archive sit performs to be copied as before in the corresponding buffer zone of subsystems by core system, whether detection subsystem exists corresponding buffer zone, is then if there is no that subsystem creates corresponding buffer zone by core system immediately.
In technical scheme of the present invention, fill up the blank not dealing with scheme in prior art for event information in multisystem.On the one hand, event is divided into different event types by the feature according to event, and decide the subsystem that can obtain event according to event type, and control corresponding subsystem acquisition event, ensure that the integrality of reporting events, and there will not be situations such as the maloperations of rear station subsystem, the needs of practical application sight of more fitting.On the other hand, carry out event read operation between sub-system by introducing core system to carry out unifying cooperation control, make subsystem while separate operation, also can meet independent under terminal operating rule or common reading event to make system cloud gray model more effective and smooth and easy, therefore user experience also can promote greatly.
Fig. 2 is the structural framing schematic diagram of event information disposal route in the multisystem of another embodiment of the present invention.
When event trigger information being detected by arbitrary subsystem, the Archive sit corresponding with event trigger information that event information generation module 210 is provided core system by this subsystem performs corresponding operating, to generate event information.
Such as, intelligent terminal has carried two subsystems: unit feels concerned about system OS
1with android system OS
2.Unit feels concerned about system OS
1be in foreground, and android system OS
2be in running background.When being in the OS on foreground
1detect that user presses screen locking button, when screen locking event trigger information namely being detected, pass through OS
1the Archive sit corresponding with screen locking event trigger information provided core system writes " 1 " as in/dev/input/event0, to generate screen locking event information.
Subsystem determination module 220 determines at least one subsystem corresponding to the event type of event information.
Particularly, subsystem determination module 220 may be used for but is not limited to following at least arbitrary situation:
(1) when the event type of event information is the read-only event in foreground, subsystem determination module 220 determines that at least one subsystem corresponding is front station subsystem.
Wherein, the read-only event in foreground is the event only allowing front station subsystem to get, and includes but not limited to: the touch operation etc. return event, performing to current foreground display interface.
Such as, be the operation that user carries out for front station subsystem owing to returning button, invisible for backstage Subsystem subscribers, therefore corresponding to the returning button event that returns should not report as backstage subsystem; If rear station subsystem also gets this and returns event, then after, station subsystem can perform maloperation when user's unaware.Operation like this also has user to the situation of the touch operation that foreground display interface performs, and differ a citing in embodiments of the present invention.In these cases, event information is the read-only event in foreground.
(2) when the event type of event information is the read-only event of reservation system, subsystem determination module 220 determines that at least one subsystem corresponding is this predetermined subsystems.
Wherein, the read-only event of reservation system is the event only allowing predetermined subsystem to get.
Such as, predetermined only android system has call function, and when terminal device receives call event, no matter android system is in foreground or backstage, all needs this call event to report to android system.In this case call event is the read-only event of reservation system, determines that android system is the subsystem relevant to event information.
(3) when the event type of event information is multisystem event, subsystem determination module 220 determines that at least one subsystem corresponding is multiple subsystem.
Wherein, the read-only event of reservation system is the event that multiple subsystem all can get, and includes but not limited to: screen locking event, system push the log information etc. in event, system.
Such as, screen locking event is the operation that user carries out at front station subsystem, if but only before station subsystem when getting this screen locking event then station subsystem cannot obtain, every system then in station subsystem, application function and process all continue to keep running status, make the power consumption of whole terminal device higher, therefore need to make front station subsystem and rear station subsystem all get this screen locking event, front station subsystem and rear station subsystem can enter dormant state to reduce equipment power dissipation in response to this screen locking event subsequently, in this case screen locking event is multisystem event, determine that all subsystems are the subsystem relevant to screen locking event.Again such as, system log message is queue events, and AM/BAM subsystem all needs to obtain such queue events, therefore queue events is multisystem event, determines that all subsystems are the subsystem relevant to queue events.
Event information read module 230 controls at least one subsystem corresponding by core system and reads the service data performed Archive sit, to obtain event information.
Wherein, Archive sit refers to the driver file node that linux core system provides, different Archive sits is corresponding from different event informations, Archive sit can be provided to subsystems according to configuration by linux core system, and by linux core system determination subsystems to the access limit of each Archive sit.Such as, the Archive sit corresponding to screen locking event is /dev/input/event0, can arrange all visible and this Archive sit readable of system A and system B by linux core system.Again such as, the Archive sit corresponding to the event that returns is /dev/input/event1, can be arranged the system being in foreground readable to this Archive sit, and the system being in backstage is not readable to this Archive sit by linux core system.Again such as, the Archive sit corresponding to queue events is /proc/message, wherein can continue hold queue event a, b, c, d.
Preferably, when determining that the subsystem corresponding to the event type of event information is one, event information read module 230 can comprise the first reading unit: the first reading unit controls this subsystem by core system and directly reads the service data performed Archive sit, to obtain event information.
Such as, unit feels concerned about system OS
1be in foreground, android system OS
2be in running background; When being in the OS on foreground
1detect that user presses and return button, namely detect when returning event trigger information, pass through OS
1the Archive sit corresponding with returning event trigger information provided core system writes " 1 " as in/dev/input/event1, returns event information to generate; This event type returning event information is the read-only event in foreground, and the subsystem that core system determines to return to this event type of event information corresponding is foreground system OS
1, namely core system is so that Archive sit/dev/input/event1 is provided to foreground system is readable, subsequently, by core system control OS by relevant to the event that returns in advance
1read the service data " 1 " to Archive sit/dev/input/event1 write, then foreground system OS
1get and return event information.
Again such as, unit feels concerned about system OS
1be in foreground, android system OS
2be in running background, predetermined only android system has call function; When terminal device detects that call request generates call event, core system determines that the subsystem corresponding to the event type of call event is for being in backstage Android system, namely core system is readable in advance Archive sit/the dev/input/event2 relevant to call event is only provided to android system, subsequently, control android system by core system and read the service data write Archive sit/dev/input/event2, then android system gets call event information.
Preferably, when determining the subsystem corresponding to the event type of event information at least two, event information read module 230 can comprise the second reading unit: the service data that Archive sit performs copies as in the corresponding buffer zone of subsystems by core system by the second reading unit; Control multiple subsystem respectively and read the service data that Archive sit is performed, to obtain event information in respective corresponding buffer zone.
Such as, unit feels concerned about system OS
1be in foreground, android system OS
2be in running background, when being in the OS on foreground
1detect that user presses screen locking button, when screen locking event trigger information namely being detected, pass through OS
1the Archive sit corresponding with screen locking event trigger information provided core system writes " 1 " as in/dev/input/event0, to generate screen locking event information, core system determines that the subsystem corresponding to the event type of screen locking event information is whole subsystem, and namely unit feels concerned about system OS
1with Android system OS
2; Subsequently, the service data write in Archive sit/dev/input/event0 relevant to screen locking event copies as OS by core system
1and OS
2in corresponding buffer zone, by core system control OS respectively
1and OS
2the service data to Archive sit/dev/input/event0 write is read, as " 1 " in respective corresponding buffer zone.
It should be noted that, when determining the subsystem corresponding to the event type of event information at least two, after reading in a certain system the service data performed Archive sit, service data can automatically be deleted, therefore read when another system carrys out read operation data again less than.
Again such as, unit feels concerned about system OS
1be in foreground, android system OS
2be in running background, when the queue events A relevant to system journal pushed information, B, C, D occur, core system determines that the subsystem corresponding to the event type of queue events is OS
1and OS
2, the service data write in Archive sit/dev/input/event4 copies as OS by core system
1and OS
2in corresponding buffer zone, control OS respectively subsequently
1and OS
2the service data write in Archive sit/dev/input/event4 is read in, to obtain event A, B, C, D in respective corresponding buffer zone.When each system reads queue events respectively in the buffer zone corresponding with it, read an event and just in respective buffer zone, deleted this event information, the event information that therefore each system reads is all complete, and reading process does not interfere with each other.
It should be noted that, linux container instrument can provide the virtual of lightweight, so that isolated process and resource.Accordingly, subsystem multiple in intelligent terminal can be placed in each container respectively, and by namespace, each subsystem be marked.Namespace is used for representing the space residing for subsystems; Such as, carry out Mk system A by namespace and operate in namespaceA, system B operates in namespaceB, and system A and B operates in different spaces, is isolation mutually, thus can ensures not interfere with each other between them between them.But system A and system B is based on linux kernel System Core, realize Archive sit in linux kernel system, and identify the data manipulation of Archive sit from namespace by core system.During event information corresponding to subsystem file reading node, core system can get the subsystem performing file reading nodal operation and belong to which namespace.
Such as, when determining that the subsystem corresponding to the event type of event information is one, Archive sit/dev/input/event2 that systemic presupposition is relevant to event information can only be read by namespaceB and android system, when namespaceA and unit feel concerned about this Archive sit of system reading, it is subsystem from namespaceA that core system gets what need execute file node/dev/input/event2 read operation, judges that this read operation does not have authority.
Such as, mark unit by namespace and feel concerned about system and operate in namespaceA, android system operates in namespaceB, and unit feels concerned about system OS
1be in foreground, android system OS
2be in running background; When being in the OS on foreground
1detect that user presses screen locking button, namely generate screen locking event information, core system determines that the subsystem corresponding to the event type of screen locking event information is whole subsystem, i.e. OS
1and OS
2; Subsequently, the service data write in Archive sit/dev/input/event0 relevant to screen locking event copies as in the corresponding buffer zone of namespaceA and namespaceB by core system, control the unit corresponding to namespaceA respectively by core system to feel concerned about the android system corresponding with namespaceB of unifying in buffer zone corresponding separately, read the service data write Archive sit/dev/input/event0, as " 1 ", to obtain screen locking event information.
Alternatively, the present invention can also comprise: buffer zone creating unit.Buffer zone creating unit can be respectively multiple subsystem by core system and create its respective buffer zone.The service data that Archive sit performs to be copied as before in the corresponding buffer zone of subsystems by core system, whether detection subsystem exists corresponding buffer zone, is then if there is no that subsystem creates corresponding buffer zone by core system immediately.
In technical scheme of the present invention, fill up the blank not dealing with scheme in prior art for event information in multisystem.On the one hand, event is divided into different event types by the feature according to event, and decide the subsystem that can obtain event according to event type, and control corresponding subsystem acquisition event, ensure that the integrality of reporting events, and there will not be situations such as the maloperations of rear station subsystem, the needs of practical application sight of more fitting.On the other hand, carry out event read operation between sub-system by introducing core system to carry out unifying cooperation control, make subsystem while separate operation, also can meet independent under terminal operating rule or common reading event to make system cloud gray model more effective and smooth and easy, therefore user experience also can promote greatly.
Those skilled in the art of the present technique are appreciated that the one or more equipment that the present invention includes and relate to for performing in operation described in the application.These equipment for required object and specialized designs and manufacture, or also can comprise the known device in multi-purpose computer.These equipment have storage computer program within it, and these computer programs optionally activate or reconstruct.Such computer program can be stored in equipment (such as, computing machine) in computer-readable recording medium or be stored in and be suitable for store electrons instruction and be coupled in the medium of any type of bus respectively, described computer-readable medium includes but not limited to that the dish of any type (comprises floppy disk, hard disk, CD, CD-ROM, and magneto-optic disk), ROM (Read-OnlyMemory, ROM (read-only memory)), RAM (RandomAccessMemory, storer immediately), EPROM (ErasableProgrammableRead-OnlyMemory, Erarable Programmable Read only Memory), EEPROM (ElectricallyErasableProgrammableRead-OnlyMemory, EEPROM (Electrically Erasable Programmable Read Only Memo)), flash memory, magnetic card or light card.Namely, computer-readable recording medium comprises and being stored or any medium of transmission information with the form that can read by equipment (such as, computing machine).
Those skilled in the art of the present technique are appreciated that the combination that can realize the frame in each frame in these structural drawing and/or block diagram and/or flow graph and these structural drawing and/or block diagram and/or flow graph with computer program instructions.Those skilled in the art of the present technique are appreciated that, the processor that these computer program instructions can be supplied to multi-purpose computer, special purpose computer or other programmable data disposal routes realizes, thus is performed the scheme of specifying in the frame of structural drawing disclosed by the invention and/or block diagram and/or flow graph or multiple frame by the processor of computing machine or other programmable data disposal routes.
Those skilled in the art of the present technique are appreciated that various operations, method, the step in flow process, measure, the scheme discussed in the present invention can be replaced, changes, combines or delete.Further, there is various operations, method, other steps in flow process, measure, the scheme discussed in the present invention also can be replaced, change, reset, decompose, combine or delete.Further, of the prior art have also can be replaced with the step in operation various disclosed in the present invention, method, flow process, measure, scheme, changed, reset, decomposed, combined or deleted.
The above is only some embodiments of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.