CN110018894A - A kind of multisystem based on Android container and single system switching method and device - Google Patents

A kind of multisystem based on Android container and single system switching method and device Download PDF

Info

Publication number
CN110018894A
CN110018894A CN201910281473.6A CN201910281473A CN110018894A CN 110018894 A CN110018894 A CN 110018894A CN 201910281473 A CN201910281473 A CN 201910281473A CN 110018894 A CN110018894 A CN 110018894A
Authority
CN
China
Prior art keywords
virtual
virtual system
switched
switching
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910281473.6A
Other languages
Chinese (zh)
Inventor
杨在华
王爱
闫振国
庄懞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian International University
Original Assignee
Xian International University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian International University filed Critical Xian International University
Priority to CN201910281473.6A priority Critical patent/CN110018894A/en
Publication of CN110018894A publication Critical patent/CN110018894A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45587Isolation or security of virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a kind of multisystems based on Android container and single system switching method, operate in a main system and multiple virtual systems on intelligent terminal, make the data field of different virtual system carry different directories, when being switched to multi-mode, virtual system brings into operation, and only one virtual system enters foreground, other systems are in running background;When being switched to single system mode, main system enters foreground, and virtual system is out of service.Compared with prior art, the solution that the present invention can provide multisystem for intelligent terminal and single system coexists and switches, make user can be with flexible choice in scene compatibility and functional requirement, both user can have been allowed to be switched to multi-mode under the higher scene of safety, it can also be switched to single system mode in the case where the performance indicators such as the CPU of intelligent terminal, memory are bad, the loss of data will not be caused in entire handoff procedure.

Description

A kind of multisystem based on Android container and single system switching method and device
Technical field
The present invention relates to Android mobile system control technology field, especially a kind of polyphyly based on Android container System and single system switching method and device.
Background technique
Current mobile intelligent terminal is very universal, and the function and performance of intelligent terminal are also improved day by day, and user is in side Just it is communicated, Streaming Media, document process, mobile payment and when various professional applications, the number of many need for confidentiality can be generated According to so that more stringent requirements are proposed in data safety.
Mobile intelligent terminal mainstream is single system scheme at present, and individual intelligent terminals are used for the higher demand of safety Multisystem scheme, but either any intelligent terminal, all only support a kind of scheme, cannot in scene compatibility and functional requirement It is selected by user flexibility.The operation of multisystem has higher requirement to performance indicators such as CPU, the memories of intelligent terminal, once It is not achieved, the loss of data can be caused in handoff procedure.
Summary of the invention
The invention aims to provide a kind of multisystem based on Android container and single system switching method and dress It sets.
In order to achieve the above objectives, the present invention is implemented according to following technical scheme:
A kind of multisystem based on Android container and single system switching method, make a main system and multiple virtual systems System operates on intelligent terminal, makes the data field of different virtual system carry different directories, when being switched to multi-mode, virtually System brings into operation, and only one virtual system enters foreground, and other systems are in running background;It is switched to single system mode When, main system enters foreground, and virtual system is out of service.
Further, the multisystem and single system switching method include actively switching and monitoring switching both of which, described Actively switching is: active switching interface being arranged on intelligent terminal, when user triggers system handover operation, in cells Start thread creation Socket communication intercept persist.sys.stop.vpsystem system property, when attribute value is TRUE, It is switched to single system mode;When attribute value is FALSE, it is switched to multi-mode;The monitoring switching is: working as automatic switchover When indicating that autoSwitch is opened, starts thread creation Socket in cells and communicate real-time monitoring CPU, indicator memory, when CPU usage is more than threshold value CmaxOr memory occupation rate is more than threshold value MmaxWhen, multi-mode is switched to single system mode, when CPU usage is not above threshold value CmaxAnd memory occupation rate is not above threshold value MmaxWhen, it is polyphyly by single system pattern switching System mode.
Further, the active switching interface is Desktop Button, shortcut key or gesture.
In addition, the present invention also provides a kind of multisystems based on Android container and single system switching device, comprising:
Configuration module is specifically included for initializing cells framework: initialization of virtual system identifier, Process identifier PID, Automatically switch mark autoSwitch, initialization of virtual system rc file creates virtual system configuration file, data path, hangs Data field and file system are carried, virtual system list is created;
Master scheduling module, the module are the nucleus module in cells framework, and cells will be empty by different NameSpaces Quasi- system is mutually isolated, and different virtual systems possesses different ID, different Process identifier PID and Context, it is ensured that The Bug or malicious application run in one virtual system will not have a negative impact to other virtual systems, each virtual System maintenance data field independent, even if the mount point of data field will not in the state that virtual system is out of service unMount;By safeguarding the front and back operating status of virtual system, realize to the share and access of hardware device, hardware resource by Currently running foreground virtual system is possessed;Virtual system processes PID in cells synchronous maintenance Kernel and Context in Framework;Multiple virtual systems are communicated by the channel Socket, use message in Socket communication The stacking of queue goes out stack mechanism;The master scheduling module is mainly used for obtaining virtual system list, increases, deletes, starting, stopping Specified virtual system, is switched to appointing system, and safeguards virtual system according to virtual system ID, Process identifier PID or Name State.
System switching module connects for providing active switching interface on intelligent terminal when user triggers actively switching When mouth, persist.sys.stop.vpsystem system property value changes, and when attribute value is TRUE, is switched to monosystem System mode;When attribute value is FALSE, it is switched to multi-mode;It is main or when automatically switching mark autoSwitch opening The performance indicators such as system meeting real-time monitoring CPU, memory, when CPU usage is more than threshold value CmaxOr memory occupation rate is more than threshold value MmaxWhen, multi-mode is switched to single system mode, when CPU usage is not above threshold value CmaxAnd memory occupation rate does not surpass Cross threshold value MmaxWhen, it is multi-mode by single system pattern switching.
Compared with prior art, the solution that the present invention can provide multisystem for intelligent terminal and single system coexists and switches Scheme makes user that can both allow user in the higher scene of safety with flexible choice in scene compatibility and functional requirement Under be switched to multi-mode, monosystem can also be switched in the case where the performance indicators such as the CPU of intelligent terminal, memory are bad System mode will not cause the loss of data in entire handoff procedure.
Detailed description of the invention
Fig. 1 is a kind of multisystem based on Android container of the embodiment of the present invention and the structure of single system switching device Block diagram.
Fig. 2 is a kind of multisystem based on Android container of the embodiment of the present invention and the principle of single system switching method Figure.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention more comprehensible, with reference to embodiments, to the present invention into Row is further to be described in detail.Described herein the specific embodiments are only for explaining the present invention, is not used to limit invention.
As shown in Figure 1, a kind of multisystem based on Android container of the present embodiment and single system switching device, comprising:
Configuration module 1 specifically includes: initialization of virtual system identifier, Process identifier for initializing cells framework PID, automatically switch mark autoSwitch, initialization of virtual system rc file creates virtual system configuration file, data road Diameter, carry data field and file system create virtual system list;
Master scheduling module 2, the module are the nucleus module in cells framework, and cells will be empty by different NameSpaces Quasi- system is mutually isolated, and different virtual systems possesses different ID, different Process identifier PID and Context, it is ensured that The Bug or malicious application run in one virtual system will not have a negative impact to other virtual systems, each virtual System maintenance data field independent, even if the mount point of data field will not in the state that virtual system is out of service unMount;By safeguarding the front and back operating status of virtual system, realize to the share and access of hardware device, hardware resource by Currently running foreground virtual system is possessed;Virtual system processes PID in cells synchronous maintenance Kernel and Context in Framework;Multiple virtual systems are communicated by the channel Socket, use message in Socket communication The stacking of queue goes out stack mechanism;The master scheduling module is mainly used for obtaining virtual system list, increases, deletes, starting, stopping Specified virtual system, is switched to appointing system, and safeguards virtual system according to virtual system ID, Process identifier PID or Name State.
System switching module 3 connects for providing active switching interface on intelligent terminal when user triggers actively switching When mouth, persist.sys.stop.vpsystem system property value changes, and when attribute value is TRUE, is switched to monosystem System mode;When attribute value is FALSE, it is switched to multi-mode;It is main or when automatically switching mark autoSwitch opening The performance indicators such as system meeting real-time monitoring CPU, memory, when CPU usage is more than threshold value CmaxOr memory occupation rate is more than threshold value MmaxWhen, multi-mode is switched to single system mode, when CPU usage is not above threshold value CmaxAnd memory occupation rate does not surpass Cross threshold value MmaxWhen, it is multi-mode by single system pattern switching.
As shown in Fig. 2, when being cut using above-mentioned apparatus progress multisystem and single system, the specific steps are as follows:
(1) after intelligent terminal booting, start cells operation in system init.rc file, configuration module 1 starts initially Change cells framework, including mark autoSwitch, creation and initialization of virtual system configuration file and rc are automatically switched in initialization File creates virtual system list.Each virtual system in virtual system list includes system identifier, Process identifier PID, fortune The information such as row state.The operating status of virtual system includes starting START, operation RUNNING, activation ACTIVE, stops STOP Etc. states.
(2) virtual system list is read, circulation reads the configuration file of each virtual system, according to the virtual system got The configuration informations such as ID, Process identifier PID of uniting start thread creation virtual system node Node, carry data field and file system System, operating status are set to START.The data field of virtual system and file system mounted in catalogue data/cells/ virtual system Under the path ID/.
(3) starting thread thread1 creation Socket monitors switch switching command in real time, according in master scheduling module 2 In the instruction execution that receives create accordingly create/ destroys destroy, starting start/ stops stop, switching switch, The operation such as setting/acquisition ID, Mount/UnMount.Wherein, creation create instruction is one new virtual system of creation, pin Destroy instruction is ruined to destroy specified virtual system.Start start instruction for one specified virtual system of starting, virtually System mode is to become RUNNING from START, stops stop instruction to stop a specified virtual system, virtual system shape State becomes STOP from RUNNING.After the foreground virtual system for being currently at ACTIVE state is is placed in by switching switch instruction Platform operation, operating status become RUNNING from ACTIVE;By the backstage virtual system in specified RUNNING operating status It is placed in front stage operation, operating status becomes ACTIVE from RUNNING.It is virtual in synchronous maintenance Kernel when virtual system switches Context in system process PID and Framework.
(4) starting thread thread2 creation Socket monitors persist.sys.stop.vpsystem system category in real time Property, when attribute value is TRUE, start user's switching module 3, the virtual system ID that current operating conditions are ACTIVE saved, And the instruction for stopping stop virtual system and switching switch main system, the operation of all virtual systems are sent to master scheduling module State becomes STOP, and the operating status of main system becomes ACTIVE.When attribute value is FALSE, start user's switching module 3, Starting start virtual system is sent to master scheduling module and switches the instruction of switch virtual system, and main system operating status becomes Virtual system operating status for STOP, preservation becomes ACTIVE, remaining virtual system operating status becomes RUNNING.
(5) when automatically switching mark autoSwitch is TRUE, starting thread thread3 creates Socket real-time monitoring The performance indicators such as CPU, memory.When currently for multisystem operation and CPU usage be more than threshold value CmaxOr memory occupation rate is more than threshold Value MmaxWhen, the virtual system ID that current operating conditions are ACTIVE is saved, and virtual to master scheduling module transmission stopping stop The instruction of system and switching switch main system, the operating status of all virtual systems become STOP, the operating status of main system Become ACTIVE.When currently for single system and CPU usage is lower than threshold value CmaxAnd memory occupation rate is lower than threshold value MmaxWhen, to master Scheduler module sends starting start virtual system and switches the instruction of switch virtual system, and main system operating status becomes The virtual system operating status of STOP, preservation become ACTIVE, remaining virtual system operating status becomes RUNNING.Wherein Cmax And MmaxIt can be configured by system property.
Summary, the present invention can provide the solution that multisystem/single system coexists and switches for intelligent terminal, user made to exist User can have both been allowed to be switched to multisystem under the higher scene of safety with flexible choice on scene compatibility and functional requirement Mode can also be switched to single system mode in the case where the performance indicators such as the CPU of intelligent terminal, memory are bad, entirely cut It will not cause the loss of data during changing.
The limitation that technical solution of the present invention is not limited to the above specific embodiments, it is all to do according to the technique and scheme of the present invention Technology deformation out, falls within the scope of protection of the present invention.

Claims (4)

1. a kind of multisystem based on Android container and single system switching method, which is characterized in that make main system and more A virtual system operates on intelligent terminal, makes the data field of different virtual system carry different directories, is switched to multisystem mould When formula, virtual system brings into operation, and only one virtual system enters foreground, and other systems are in running background;It is switched to When single system mode, main system enters foreground, and virtual system is out of service.
2. the multisystem according to claim 1 based on Android container and single system switching method, it is characterised in that: The multisystem and single system switching method include actively switching and monitoring switching both of which, and the active switching is: in intelligence Setting active switching interface starts thread creation when user triggers system handover operation in cells in energy terminal Socket communication intercept persist.sys.stop.vpsystem system property is switched to single system when attribute value is TRUE Mode;When attribute value is FALSE, it is switched to multi-mode;The monitoring switching is: when automatic switchover indicates When autoSwitch is opened, starts thread creation Socket in cells and communicate real-time monitoring CPU, indicator memory, when CPU makes It is more than threshold value C with ratemaxOr memory occupation rate is more than threshold value MmaxWhen, multi-mode is switched to single system mode, when CPU is used Rate is not above threshold value CmaxAnd memory occupation rate is not above threshold value MmaxWhen, it is multi-mode by single system pattern switching.
3. the multisystem according to claim 1 based on Android container and single system switching method, it is characterised in that: The active switching interface is Desktop Button, shortcut key or gesture.
4. a kind of multisystem based on Android container and single system switching device characterized by comprising
Configuration module is specifically included for initializing cells framework: initialization of virtual system identifier, Process identifier PID, automatic Switching mark autoSwitch, initialization of virtual system rc file create virtual system configuration file, data path, carry number According to area and file system, virtual system list is created;
Master scheduling module, the module are the nucleus module in cells framework, and cells will virtually be by different NameSpaces It unites mutually isolated, different virtual systems possesses different ID, different Process identifier PID and Context, it is ensured that at one The Bug or malicious application run in virtual system will not have a negative impact to other virtual systems, each virtual system Data field independent is safeguarded, even if the mount point of data field will not in the state that virtual system is out of service unMount;By safeguarding the front and back operating status of virtual system, realize to the share and access of hardware device, hardware resource by Currently running foreground virtual system is possessed;Virtual system processes PID in cells synchronous maintenance Kernel and Context in Framework;Multiple virtual systems are communicated by the channel Socket, use message in Socket communication The stacking of queue goes out stack mechanism;The master scheduling module is mainly used for obtaining virtual system list, increases, deletes, starting, stopping Specified virtual system, is switched to appointing system, and safeguards virtual system according to virtual system ID, Process identifier PID or Name State.
System switching module, for providing active switching interface on intelligent terminal, when user triggers active switching interface, Persist.sys.stop.vpsystem system property value changes, and when attribute value is TRUE, is switched to single system mould Formula;When attribute value is FALSE, it is switched to multi-mode;Or when automatically switching mark autoSwitch opening, main system The performance indicators such as meeting real-time monitoring CPU, memory, when CPU usage is more than threshold value CmaxOr memory occupation rate is more than threshold value MmaxWhen, Multi-mode is switched to single system mode, when CPU usage is not above threshold value CmaxAnd memory occupation rate is not above threshold value MmaxWhen, it is multi-mode by single system pattern switching.
CN201910281473.6A 2019-04-09 2019-04-09 A kind of multisystem based on Android container and single system switching method and device Pending CN110018894A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910281473.6A CN110018894A (en) 2019-04-09 2019-04-09 A kind of multisystem based on Android container and single system switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910281473.6A CN110018894A (en) 2019-04-09 2019-04-09 A kind of multisystem based on Android container and single system switching method and device

Publications (1)

Publication Number Publication Date
CN110018894A true CN110018894A (en) 2019-07-16

Family

ID=67190808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910281473.6A Pending CN110018894A (en) 2019-04-09 2019-04-09 A kind of multisystem based on Android container and single system switching method and device

Country Status (1)

Country Link
CN (1) CN110018894A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111447692A (en) * 2019-01-16 2020-07-24 成都鼎桥通信技术有限公司 Call method and device for multi-system terminal, electronic equipment and storage medium
CN113900754A (en) * 2021-10-09 2022-01-07 深圳技德智能科技研究院有限公司 Desktop sharing method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677989A (en) * 2013-12-13 2014-03-26 Tcl集团股份有限公司 Device and method for obtaining multiple systems through linux kernel
US20140359445A1 (en) * 2013-06-03 2014-12-04 Shanghai Powermo Information Tech. Co. Ltd. Audio Management Method for a Multiple-Window Electronic Device
CN104516782A (en) * 2014-12-26 2015-04-15 上海迈微软件科技有限公司 Method for switching operating environments of intelligent system and equipment
CN105183551A (en) * 2015-09-10 2015-12-23 电子科技大学 Switching method among multiple Android systems based on Linux container technology
CN108279963A (en) * 2018-01-05 2018-07-13 郑州信大捷安信息技术股份有限公司 A kind of intelligent terminal of the more android systems of list linux kernel shows virtual method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140359445A1 (en) * 2013-06-03 2014-12-04 Shanghai Powermo Information Tech. Co. Ltd. Audio Management Method for a Multiple-Window Electronic Device
CN103677989A (en) * 2013-12-13 2014-03-26 Tcl集团股份有限公司 Device and method for obtaining multiple systems through linux kernel
CN104516782A (en) * 2014-12-26 2015-04-15 上海迈微软件科技有限公司 Method for switching operating environments of intelligent system and equipment
CN105183551A (en) * 2015-09-10 2015-12-23 电子科技大学 Switching method among multiple Android systems based on Linux container technology
CN108279963A (en) * 2018-01-05 2018-07-13 郑州信大捷安信息技术股份有限公司 A kind of intelligent terminal of the more android systems of list linux kernel shows virtual method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张少鑫,: "移动终端语音与数据通信虚拟化技术的研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑(月刊)》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111447692A (en) * 2019-01-16 2020-07-24 成都鼎桥通信技术有限公司 Call method and device for multi-system terminal, electronic equipment and storage medium
CN113900754A (en) * 2021-10-09 2022-01-07 深圳技德智能科技研究院有限公司 Desktop sharing method and device, computer equipment and storage medium
CN113900754B (en) * 2021-10-09 2023-10-31 深圳技德智能科技研究院有限公司 Shared desktop method, shared desktop device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103154922B (en) Virtual USB compound device enumeration
EP3166254B1 (en) Virtual-operation administration and maintenance deployment method, device and virtual network system
US10623415B2 (en) Virtual network function (VNF) hardware trust in a network function virtualization (NFV) software defined network (SDN)
CN110018894A (en) A kind of multisystem based on Android container and single system switching method and device
CN103530193A (en) Method and device used for adjusting application process
CN103532823A (en) Message processing method, device and system for Internet of Things
US20150223252A1 (en) Resource Allocation Method and Device
WO2015027771A1 (en) Resource configuration method for virtual machines and communication device
CN106888111B (en) A method of solving dual computer group FC-SAN switching
CN106462455B (en) The method and apparatus that process is taken over
CN106031227A (en) Data traffic management method and device
EP2466943B1 (en) Method and device for monitoring running state of card
CN102710486B (en) Channel S state advertisement method and apparatus
CN102497288A (en) Dual-server backup method and dual system implementation device
EP4068708A1 (en) Network operation method, apparatus, and device and storage medium
US20220382920A1 (en) Terminal and communication method
CN106888475B (en) Wireless system processing method, device and base station
CN106557404B (en) Application control method and mobile terminal
CN109673027B (en) Multi-centralized unit CU fusion method, corresponding equipment and system
CN103914335A (en) Invoking method, equipment and system for background service
WO2020108537A1 (en) Software-defined virtual network-based resource allocation system
CN112363836A (en) Android system camera resource control method
CN110333973A (en) A kind of method and system of multi-host hot swap
CN105338077A (en) Smart home management method and terminal
CN112015515B (en) Instantiation method and device of virtual network function

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190716

RJ01 Rejection of invention patent application after publication