CN105573934B - Method and device for operating multi-system slave device to access master device through USB connection - Google Patents

Method and device for operating multi-system slave device to access master device through USB connection Download PDF

Info

Publication number
CN105573934B
CN105573934B CN201510924082.3A CN201510924082A CN105573934B CN 105573934 B CN105573934 B CN 105573934B CN 201510924082 A CN201510924082 A CN 201510924082A CN 105573934 B CN105573934 B CN 105573934B
Authority
CN
China
Prior art keywords
usb
equipment
usb device
device function
main equipment
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.)
Active
Application number
CN201510924082.3A
Other languages
Chinese (zh)
Other versions
CN105573934A (en
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.)
Yuanxin Information Technology Group Co ltd
Original Assignee
Yuanxin Technology
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 Yuanxin Technology filed Critical Yuanxin Technology
Priority to CN201510924082.3A priority Critical patent/CN105573934B/en
Publication of CN105573934A publication Critical patent/CN105573934A/en
Application granted granted Critical
Publication of CN105573934B publication Critical patent/CN105573934B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4072Drivers or receivers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Information Transfer Systems (AREA)

Abstract

The invention provides a scheme for accessing a slave device running multiple systems into a master device through USB connection, wherein the slave device is accessed into the master device through the USB connection through a USB device function provided in a system kernel of the slave device, a connection event is sent to any system matched with the USB device function provided in the system kernel in the slave device, and then the connection event and interactive data between the connection event and the master device are processed through the USB device function in any system. The invention fills the blank that the prior art has no solution for the connection of the slave equipment of multiple systems to the master equipment through the USB. The kernel USB setting function is correspondingly set through the USB device function of each system in the slave device, so that different USB device functions can be provided according to different systems in the slave device, the actual use requirements of users are met, and the use experience of the users is improved.

Description

The slave equipment for running multisystem accesses the method and device of main equipment by USB connection
Technical field
The present invention relates to field of computer technology, specifically, the present invention relates to a kind of slave equipment for running multisystem is logical Cross the method and device of USB connection access main equipment.
Background technique
With the development of the times, various emerging operating systems continue to bring out, and it is novel and more convenient to bring for user Terminal usage experience.When traditional single-system terminals equipment is connected to host by USB, host is set according in single system equipment Fixed USB function identified accordingly, such as recognize USB device function be MTP (Media Transfer Protocol, Media transmission protocol) or PTP (picture transfer protocol, picture transfer protocol) or Mass storage (great Rong Measure memory) etc..But if the terminal device of multisystem is attached using traditional USB connection host mode, work as multisystem Terminal device generating system front and back switching when, host can not identify switching after be in foreground system USB device function, because This, needs a kind of implementation of terminal device access host for running multisystem, when the terminal device of multisystem is connected by USB When being connected to host, the USB device function of corresponding system can recognize.
Summary of the invention
To overcome above-mentioned technical problem or at least being partially solved above-mentioned technical problem, spy proposes following technical scheme:
The embodiment of the present invention proposes a kind of side that the slave equipment for running multisystem passes through USB connection access main equipment Method, comprising:
It is connect from equipment by USB connection by the USB device function of being provided in the system kernel from equipment by described Enter main equipment;
Connection event is sent to and described is matched from the device with the USB device function of being provided in the system kernel Any system;
By the USB device function in any system to the connection event and the interaction between the main equipment Data are handled.
Preferably, any system includes the first system for being currently at front stage operation, this method further include:
By be currently at front stage operation the first system USB device function to the USB in the system kernel Functions of the equipments are configured.
Preferably, when Foreground and Background switching occurs for multisystem, the system for being currently at front stage operation is cut from the first system It is changed to second system, if described do not access the main equipment, this method by USB connection from equipment further include:
By the USB device function of the second system in front stage operation after switching in the system kernel USB device function is configured.
Preferably, when Foreground and Background switching occurs for multisystem, the system for being currently at front stage operation is cut from the first system It is changed to second system, if described accessed the main equipment, this method by USB connection from equipment further include:
The USB device function of providing to the main equipment and provide in the system kernel is provided;
By the USB device function of the second system in front stage operation after switching in the system kernel USB device function is configured.
Preferably, this method further include:
Again the USB device function of providing in the system kernel is provided to the main equipment;
Between USB device function pair and the main equipment by the second system in front stage operation after switching Interaction data is handled.
The slave equipment that another embodiment of the present invention proposes a kind of operation multisystem passes through USB connection and accesses main equipment Device, comprising:
AM access module is passed through described from equipment by the USB device function of providing in the system kernel from equipment USB connection accesses main equipment;
Connection event is sent to and described sets from the device with the USB provided in the system kernel by event sending module Any system that standby function matches;
First processing module, by the USB device function in any system to the connection event and with the master Interaction data between equipment is handled.
Preferably, any system includes the first system for being currently at front stage operation, the device further include:
First setup module, by be currently at front stage operation the first system USB device function to the system USB device function in system kernel is configured.
Preferably, the device further include:
First setup module when Foreground and Background switching occurs for multisystem, is currently at the system of front stage operation from described first System is switched to second system, if described do not access the main equipment by USB connection from equipment, by being in foreground after switching The USB device function of the second system of operation is configured the USB device function in the system kernel.
Preferably, the device further include:
Interrupt module when Foreground and Background switching occurs for multisystem, is currently at the system of front stage operation from the first system It is switched to second system, if described accessed the main equipment by USB connection from equipment, interrupts to the main equipment and institute is provided The USB device function of providing in system kernel is provided;
Second setup module, by the USB device function of the second system in front stage operation after switching to described USB device function in system kernel is configured.
Preferably, the device further include:
Module is provided, the USB device function of providing in the system kernel is provided to the main equipment again;
Second processing module, USB device function pair and institute by the second system in front stage operation after switching The interaction data stated between main equipment is handled.
In the embodiment of the present invention, the slave equipment for proposing a kind of operation multisystem passes through USB connection and accesses main equipment Scheme will access main equipment from equipment by USB connection by the USB device function of providing from the system kernel of equipment, from And it fills up the prior art and has not been directed to the blank that the slave equipment of multisystem accesses the solution of main equipment by USB connection. Function is arranged to kernel USB by the USB device function of each system from the device to be accordingly arranged, it can be achieved that root from the device Different USB device functions is provided according to not homologous ray, to more meet the actual use demand of user;Further, main equipment It can be according to the USB device function of multi-system equipment Dynamic Recognition correspondence switching in the case where switching at runtime system, so that USB function Can switching smooth switching in user's unaware ground with system switching, to improve the usage experience of user.
The additional aspect of the present invention and advantage will be set forth in part in the description, these will become from the following description Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is that the slave equipment of the operation multisystem of one embodiment in the present invention accesses the side of main equipment by USB connection The flow chart of method;
Fig. 2 is that the slave equipment of the operation multisystem of a preferred embodiment in the present invention accesses main equipment by USB connection Method flow chart;
Fig. 3 is that the slave equipment of the operation multisystem of another preferred embodiment in the present invention accesses main equipment by USB connection Method flow chart;
Fig. 4 is that the slave equipment of the operation multisystem of another embodiment in the present invention accesses the dress of main equipment by USB connection The structural schematic diagram set;
Fig. 5 is that the slave equipment of the operation multisystem of another preferred embodiment in the present invention accesses main equipment by USB connection Device structural schematic diagram;
Fig. 6 is that the slave equipment of the operation multisystem of another preferred embodiment in the present invention accesses main equipment by USB connection Device structural schematic diagram.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, and for explaining only the invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in specification of the invention Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their group.It should be understood that when we claim member Part is " connected " or when " coupled " to another element, it can be directly connected or coupled to other elements, or there may also be Intermediary element.In addition, " connection " used herein or " coupling " may include being wirelessly connected or wirelessly coupling.It is used herein to arrange Diction "and/or" includes one or more associated wholes for listing item or any cell and all combinations.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Should also Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art The consistent meaning of meaning, and unless idealization or meaning too formal otherwise will not be used by specific definitions as here To explain.
Multisystem in the embodiment of the present invention can be realized based on a variety of virtual technologies, hereafter under linux system The detailed description of embodiment is carried out for container technique.Wherein, the multiple operating system realized using linux container technology, each It is packed into independent system in container, it is mutually indepedent between multiple systems, and multiple systems operate in same physical terminal device On.
In the embodiment of the present invention, by two equipment of USB connection, one is main equipment, and one is from equipment.Such as U Disk is connected in PC machine, and USB flash disk is from equipment, and PC machine is main equipment.Terminal device based on container multisystem is connect by USB connection When entering PC machine, the terminal device based on container multisystem is from equipment, and PC machine is main equipment.
Fig. 1 is that the slave equipment of the operation multisystem of one embodiment in the present invention accesses the side of main equipment by USB connection The flow chart of method.
Step S110: it will be connect from equipment by USB connection by the USB device function of being provided from the system kernel of equipment Enter main equipment;Step S120: connection event is sent to and is matched from the device with the USB device function of being provided in system kernel Any system;Step S130: pass through interaction of the USB device function to connection event and between main equipment in any system Data are handled.
In the embodiment of the present invention, the slave equipment for proposing a kind of operation multisystem passes through USB connection and accesses main equipment Scheme will access main equipment from equipment by USB connection by the USB device function of providing from the system kernel of equipment, from And it fills up the prior art and has not been directed to the blank that the slave equipment of multisystem accesses the solution of main equipment by USB connection. Function is arranged to kernel USB by the USB device function of each system from the device to be accordingly arranged, it can be achieved that root from the device Different USB device functions is provided according to not homologous ray, to more meet the actual use demand of user;Further, main equipment It can be according to the USB device function of multi-system equipment Dynamic Recognition correspondence switching in the case where switching at runtime system, so that USB function Can switching smooth switching in user's unaware ground with system switching, to improve the usage experience of user.
Step S110: it will be connect from equipment by USB connection by the USB device function of being provided from the system kernel of equipment Enter main equipment.
Wherein, the USB device in system kernel is carried out by the USB device function of scheduled any system from the device Setting.
Wherein, USB device function includes at least:
1) MTP (Media Transfer Protocol, media transmission protocol), MTP utilize intelligent terminal and PC machine Between connection can with the media application in PC machine, such as Windows media player synchrodata, such as multimedia Video, audio, picture etc..
2) PTP (picture transfer protocol, picture transfer protocol);
3) Mass storage (mass storage) executes intelligent terminal and PC by Mass storage agreement Data transmission, storage and read-write between machine etc.;
4) ADB is debugged, and is the program at client-server end, wherein client PC machine, server-side set for intelligent terminal It is standby.
Preferably, the USB in system kernel is set by being currently at the USB device function of the first system of front stage operation Standby function is configured.
Wherein, the multisystem based on container from the device, before each system is managed by multisystem management service Information transmitting etc. between the running correlation function setting of backstage information converting, each system and each system, which specifically may be used It is realized by the modes such as such as multisystem managing process.
For example, including at least the first system and second system from the device in multisystem, the first system is system OS1, Second system is system OS2, and the system OS from the device of multisystem1It is currently at foreground state, system OS2After being currently at Mesa-shaped state, when being attached from equipment by USB interface and main equipment, predetermined main equipment preferentially identify in multi-system equipment when The preceding USB device function in foreground system, reservation system OS1USB device function be MTP equipment, multisystem management service Notice system OS1USB device service, system OS will be set as from the USB device function in device core1USB device function Can, i.e., MTP equipment then will pass through USB connection from equipment from the MTP function of the USB device in device core by multisystem Access main equipment.
In another example predetermined main equipment preferentially identifies multisystem when being attached from equipment by USB interface and main equipment It is currently at the USB device function of foreground system in equipment, is to be in the system for being currently at foreground from the device of multisystem Unite OS1, reservation system OS1USB device function be MTP equipment, by multisystem management service be arranged from device core USB device function is system OS1USB device function set by MTP function, then, through multisystem from device core USB device the corresponding service routine of MTP function will from equipment pass through USB connection access main equipment.
Step S120: connection event is sent to and is matched from the device with the USB device function of being provided in system kernel Any system.
For example, connect example, when multisystem is accessed main equipment by USB connection from equipment, by connection event be sent to from Equipment is currently at the system OS on foreground1
Step S130: pass through interaction number of the USB device function in any system to connection event and between main equipment According to being handled.
For example, example is connected, system OS1After receiving connection event, pass through system OS1In service journey corresponding with MTP function Sequence handles connection event, such as establishes connection, and handle the interaction data between main equipment, such as data sharing.
In being preferably implemented one, when from equipment Foreground and Background system, which occurs, for multisystem switches, it is currently at front stage operation System is switched to second system from the first system, if not accessing main equipment, this method by USB connection from equipment further include: logical The USB device function of crossing the second system for being in front stage operation after switching is configured the USB device function in system kernel.
For example, the system for being currently at foreground from the device is OS1, system OS2In backstage;Reservation system OS2USB Functions of the equipments are PTP equipment, when multisystem management service is detected from equipment generating system OS1With system OS2Front and back switching When, if not accessing main equipment by USB connection from equipment, set by the USB that multisystem management service is arranged from device core Standby function is system OS2USB device function set by PTP function, then, by multisystem from the USB in device core The corresponding service routine of PTP function of equipment will access main equipment from equipment by USB connection.
In another example the system for being currently at foreground from the device is OS1, system OS2In backstage;Predefined system OS2's USB device function is PTP equipment, when multisystem management service is detected from equipment generating system OS1With system OS2Front and back When switching, if not accessing main equipment by USB connection from equipment, multisystem management service notifies system OS2USB device clothes Business, will be set as system OS from the USB device function in device core2USB device function, that is, be set as PTP equipment, with Afterwards, it will be connect from the corresponding service routine of USB device PTP function in device core from equipment by USB connection by multisystem Enter main equipment.
In another preferred implementation, as shown in Fig. 2, when from equipment the switching of Foreground and Background system occurs for multisystem, it is current to locate It is switched to second system from the first system in the system of front stage operation, if having accessed main equipment, the party by USB connection from equipment Method further includes step S210 and step S220.Step S210: it interrupts and provides the USB device function provided in system kernel to main equipment Energy;Step S220: the USB in system kernel is set by the USB device function of the second system in front stage operation after switching Standby function is configured.
For example, if main equipment has been accessed by USB connection from equipment, when multisystem is currently at foreground from equipment System OS1With the system OS for being currently at backstage2Front and back switching when, interrupt from the USB device function in device core to master Equipment provides the MTP function of the USB device in the kernel, i.e., USB device and main equipment in kernel are arranged by software mode It disconnects, then, the system OS of front stage operation is in after the notice switching of multisystem management service2USB device service, will be from USB device function in device core is set as system OS2USB device function, that is, be set as PTP equipment.
In another preferred implementation, as shown in figure 3, this method further includes step S310 and step S320.Step S310: weight The USB device function of providing in system kernel is newly provided to main equipment;Step S320: by being in front stage operation after switching Interaction data between the USB device function pair and main equipment of second system is handled.
For example, connecting example, it will be provided to main equipment from the PTP functions of the equipments of the USB device in device core, then, led to It crosses after switching and is in the system OS of front stage operation2USB device the corresponding service routine pair of PTP functions of the equipments and main equipment it Between interaction data handled, such as realize system OS2In picture and main equipment between the operation such as shared, copied.
In a concrete application scene, predetermined main equipment, which preferentially identifies, is currently at foreground system in multi-system equipment USB device function is system OS in the system for being currently at foreground from the device of multisystem1, predefined system OS1USB set Standby function is MTP equipment, will be set as system OS from the USB device function in device core by multisystem management service1's USB device function is set as MTP equipment;Then, pass through the corresponding service of MTP function from the USB device in device core Program will access main equipment from equipment by USB connection, as the system OS for being currently at foreground from equipment1Be currently at The system OS on backstage2Front and back switching when, interrupt from the USB device function in device core to main equipment and provide in the kernel USB device MTP function, then, multisystem management service notice switching after be in front stage operation system OS2USB set Standby service, will be set as system OS from the USB device function in device core2USB device function, that is, be set as PTP equipment, It will be provided to main equipment from the PTP functions of the equipments of the USB device in device core, then, by being in front stage operation after switching System OS2USB device the corresponding service routine pair of PTP functions of the equipments and main equipment between interaction data at Reason such as realizes system OS2In picture and main equipment between the operation such as shared, copied.
Fig. 4 is that the slave equipment of the operation multisystem of another embodiment in the present invention accesses the dress of main equipment by USB connection The structural schematic diagram set.
AM access module 410 will pass through USB connection from equipment by the USB device function of providing from the system kernel of equipment Access main equipment;Event sending module 420 by connection event be sent to from the device with the USB device function that is provided in system kernel Any system that can be matched;First processing module 430 by the USB device function in any system to connection event and with master Interaction data between equipment is handled.
In the embodiment of the present invention, the slave equipment for proposing a kind of operation multisystem passes through USB connection and accesses main equipment Scheme will access main equipment from equipment by USB connection by the USB device function of providing from the system kernel of equipment, from And it fills up the prior art and has not been directed to the blank that the slave equipment of multisystem accesses the solution of main equipment by USB connection. Function is arranged to kernel USB by the USB device function of each system from the device to be accordingly arranged, it can be achieved that root from the device Different USB device functions is provided according to not homologous ray, to more meet the actual use demand of user;Further, main equipment It can be according to the USB device function of multi-system equipment Dynamic Recognition correspondence switching in the case where switching at runtime system, so that USB function Can switching smooth switching in user's unaware ground with system switching, to improve the usage experience of user.
AM access module 410 will pass through USB connection from equipment by the USB device function of providing from the system kernel of equipment Access main equipment.
Wherein, the USB device in system kernel is carried out by the USB device function of scheduled any system from the device Setting.
Preferably, any system includes the first system for being currently at front stage operation, which further includes the first setting mould Block, the first setup module set the USB in system kernel by being currently at the USB device function of the first system of front stage operation Standby function is configured.
Wherein, the multisystem based on container from the device, before each system is managed by multisystem management service Information transmitting etc. between the running correlation function setting of backstage information converting, each system and each system, which specifically may be used It is realized by the modes such as such as multisystem managing process.
For example, including at least the first system and second system from the device in multisystem, the first system is system OS1, Second system is system OS2, and the system OS from the device of multisystem1It is currently at foreground state, system OS2After being currently at Mesa-shaped state, when being attached from equipment by USB interface and main equipment, predetermined main equipment preferentially identify in multi-system equipment when The preceding USB device function in foreground system, reservation system OS1USB device function be MTP equipment, multisystem management service Notice system OS1USB device service, system OS will be set as from the USB device function in device core1USB device function Can, i.e., MTP equipment then will pass through USB connection from equipment from the MTP function of the USB device in device core by multisystem Access main equipment.
In another example predetermined main equipment preferentially identifies multisystem when being attached from equipment by USB interface and main equipment It is currently at the USB device function of foreground system in equipment, is to be in the system for being currently at foreground from the device of multisystem Unite OS1, reservation system OS1USB device function be MTP equipment, by multisystem management service be arranged from device core USB device function is system OS1USB device function set by MTP function, then, through multisystem from device core USB device the corresponding service routine of MTP function will from equipment pass through USB connection access main equipment.
Event sending module 420 by connection event be sent to from the device with the USB device function that is provided in system kernel Any system to match.
For example, connect example, when multisystem is accessed main equipment by USB connection from equipment, by connection event be sent to from Equipment is currently at the system OS on foreground1
First processing module 430 is by the USB device function in any system to connection event and between main equipment Interaction data is handled.
For example, example is connected, system OS1After receiving connection event, pass through system OS1In service journey corresponding with MTP function Sequence handles connection event, such as establishes connection, and handle the interaction data between main equipment, such as data sharing.
In being preferably implemented one, when from equipment Foreground and Background system, which occurs, for multisystem switches, it is currently at front stage operation System is switched to second system from the first system, if not accessing main equipment by USB connection from equipment, which further includes second Setup module;Second setup module is by the USB device function of the second system in front stage operation after switching to system kernel In USB device function be configured.
For example, the system for being currently at foreground from the device is OS1, system OS2In backstage;Reservation system OS2USB Functions of the equipments are PTP equipment, when multisystem management service is detected from equipment generating system OS1With system OS2Front and back switching When, if not accessing main equipment by USB connection from equipment, set by the USB that multisystem management service is arranged from device core Standby function is system OS2USB device function set by PTP function, then, by multisystem from the USB in device core The corresponding service routine of PTP function of equipment will access main equipment from equipment by USB connection.
In another example the system for being currently at foreground from the device is OS1, system OS2In backstage;Predefined system OS2's USB device function is PTP equipment, when multisystem management service is detected from equipment generating system OS1With system OS2Front and back When switching, if not accessing main equipment by USB connection from equipment, multisystem management service notifies system OS2USB device clothes Business, will be set as system OS from the USB device function in device core2USB device function, that is, be set as PTP equipment, with Afterwards, it will be connect from the corresponding service routine of USB device PTP function in device core from equipment by USB connection by multisystem Enter main equipment.
In another preferred implementation, as shown in figure 5, when from equipment the switching of Foreground and Background system occurs for multisystem, it is current to locate It is switched to second system from the first system in the system of front stage operation, if having accessed main equipment, the dress by USB connection from equipment Set further includes interrupt module 510 and the second setup module 520.Interrupt module 510 is interrupted to provide in system kernel to main equipment and be mentioned The USB device function of confession;The USB device function that second setup module member 520 passes through the second system in front stage operation after switching USB device function in system kernel can be configured.
For example, if main equipment has been accessed by USB connection from equipment, when multisystem is currently at foreground from equipment System OS1With the system OS for being currently at backstage2Front and back switching when, interrupt from the USB device function in device core to master Equipment provides the MTP function of the USB device in the kernel, i.e., USB device and main equipment in kernel are arranged by software mode It disconnects, then, the system OS of front stage operation is in after the notice switching of multisystem management service2USB device service, will be from USB device function in device core is set as system OS2USB device function, that is, be set as PTP equipment.
In another preferred implementation, as shown in fig. 6, the device further includes providing module 610 and Second processing module 620. Module 610 is provided, the USB device function of providing in system kernel is provided to main equipment again;Second processing module 620 passes through Interaction data between the USB device function pair and main equipment of second system after switching in front stage operation is handled.
For example, connecting example, it will be provided to main equipment from the PTP functions of the equipments of the USB device in device core, then, led to It crosses after switching and is in the system OS of front stage operation2USB device the corresponding service routine pair of PTP functions of the equipments and main equipment it Between interaction data handled, such as realize system OS2In picture and main equipment between the operation such as shared, copied.
In a concrete application scene, predetermined main equipment, which preferentially identifies, is currently at foreground system in multi-system equipment USB device function is system OS in the system for being currently at foreground from the device of multisystem1, predefined system OS1USB set Standby function is MTP equipment, will be set as system OS from the USB device function in device core by multisystem management service1's USB device function is set as MTP equipment;Then, pass through the corresponding service of MTP function from the USB device in device core Program will access main equipment from equipment by USB connection, as the system OS for being currently at foreground from equipment1Be currently at The system OS on backstage2Front and back switching when, interrupt from the USB device function in device core to main equipment and provide in the kernel USB device MTP function, then, multisystem management service notice switching after be in front stage operation system OS2USB set Standby service, will be set as system OS from the USB device function in device core2USB device function, that is, be set as PTP equipment, It will be provided to main equipment from the PTP functions of the equipments of the USB device in device core, then, by being in front stage operation after switching System OS2USB device the corresponding service routine pair of PTP functions of the equipments and main equipment between interaction data at Reason such as realizes system OS2In picture and main equipment between the operation such as shared, copied.
Those skilled in the art of the present technique are appreciated that the present invention includes being related to for executing in operation described herein One or more equipment.These equipment can specially design and manufacture for required purpose, or also may include general Known device in computer.These equipment have the computer program being stored in it, these computer programs are selectively Activation or reconstruct.Such computer program can be stored in equipment (for example, computer) readable medium or be stored in It e-command and is coupled in any kind of medium of bus respectively suitable for storage, the computer-readable medium includes but not Be limited to any kind of disk (including floppy disk, hard disk, CD, CD-ROM and magneto-optic disk), ROM (Read-Only Memory, only Read memory), RAM (Random Access Memory, immediately memory), EPROM (Erasable Programmable Read-Only Memory, Erarable Programmable Read only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or light card Piece.It is, readable medium includes by equipment (for example, computer) with any Jie for the form storage or transmission information that can be read Matter.
Those skilled in the art of the present technique be appreciated that can be realized with computer program instructions these structure charts and/or The combination of each frame and these structure charts and/or the frame in block diagram and/or flow graph in block diagram and/or flow graph.This technology neck Field technique personnel be appreciated that these computer program instructions can be supplied to general purpose computer, special purpose computer or other The processor of programmable data processing method is realized, to pass through the processing of computer or other programmable data processing methods The scheme specified in frame or multiple frames of the device to execute structure chart and/or block diagram and/or flow graph disclosed by the invention.
Those skilled in the art of the present technique have been appreciated that in the present invention the various operations crossed by discussion, method, in process Steps, measures, and schemes can be replaced, changed, combined or be deleted.Further, each with having been crossed by discussion in the present invention Kind of operation, method, other steps, measures, and schemes in process may also be alternated, changed, rearranged, decomposed, combined or deleted. Further, in the prior art to have and the step in various operations, method disclosed in the present invention, process, measure, scheme It may also be alternated, changed, rearranged, decomposed, combined or deleted.
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (10)

1. a kind of method that the slave equipment for running multisystem accesses main equipment by USB connection characterized by comprising
It described will be accessed and be led by USB connection from equipment by the USB device function of being provided in the system kernel from equipment Equipment;
Connection event is sent to described any to match from the device with the USB device function of providing in the system kernel System;
By the USB device function in any system to the connection event and the interaction data between the main equipment It is handled, the USB device function in any system is the USB device function for being currently at the first system of front stage operation Energy.
2. the method that the slave equipment of operation multisystem according to claim 1 accesses main equipment by USB connection, feature It is, any system includes the first system for being currently at front stage operation, this method further include:
By be currently at front stage operation the first system USB device function to the USB device in the system kernel Function is configured.
3. the method that the slave equipment of operation multisystem according to claim 2 accesses main equipment by USB connection, feature It is, when Foreground and Background switching occurs for multisystem, the system for being currently at front stage operation is switched to the second system from the first system System, if described do not access the main equipment, this method by USB connection from equipment further include:
The USB in the system kernel is set by the USB device function of the second system in front stage operation after switching Standby function is configured.
4. the method that the slave equipment of operation multisystem according to claim 2 accesses main equipment by USB connection, feature It is, when Foreground and Background switching occurs for multisystem, the system for being currently at front stage operation is switched to the second system from the first system System, if described accessed the main equipment by USB connection from equipment, which is characterized in that this method further include:
The USB device function of providing to the main equipment and provide in the system kernel is provided;
The USB in the system kernel is set by the USB device function of the second system in front stage operation after switching Standby function is configured.
5. the method that the slave equipment of operation multisystem according to claim 4 accesses main equipment by USB connection, feature It is, this method further include:
Again the USB device function of providing in the system kernel is provided to the main equipment;
Pass through the interaction between the USB device function pair and the main equipment of the second system in front stage operation after switching Data are handled.
6. the device that a kind of slave equipment for running multisystem accesses main equipment by USB connection characterized by comprising
AM access module described will be connected from equipment by USB by the USB device function of providing in the system kernel from equipment Access main equipment;
Event sending module, by connection event be sent to it is described from the device with the USB device function that is provided in the system kernel Any system that can be matched;
First processing module, by the USB device function in any system to the connection event and with the main equipment Between interaction data handled, the USB device function in any system is to be currently at the first system of front stage operation The USB device function of system.
7. the slave equipment of operation multisystem according to claim 6 accesses the device of main equipment, feature by USB connection It is, any system includes the first system for being currently at front stage operation, the device further include:
First setup module, by be currently at front stage operation the first system USB device function in the system USB device function in core is configured.
8. the slave equipment of operation multisystem according to claim 7 accesses the device of main equipment, feature by USB connection It is, the device further include:
Second setup module when Foreground and Background switching occurs for multisystem, is currently at the system of front stage operation from the first system It is switched to second system, if described do not access the main equipment by USB connection from equipment, by being in front stage operation after switching The USB device function of the second system USB device function in the system kernel is configured.
9. the slave equipment of operation multisystem according to claim 7 accesses the device of main equipment, feature by USB connection It is, which is characterized in that the device further include:
Interrupt module, when Foreground and Background switching occurs for multisystem, the system for being currently at front stage operation switches from the first system It interrupts to the main equipment and the system is provided if described accessed the main equipment by USB connection from equipment for second system The USB device function of being provided in system kernel;
Second setup module, by the USB device function of the second system in front stage operation after switching to the system USB device function in kernel is configured.
10. the slave equipment of operation multisystem according to claim 9 accesses the device of main equipment by USB connection, special Sign is, the device further include:
Module is provided, the USB device function of providing in the system kernel is provided to the main equipment again;
Second processing module, USB device function pair and the master by the second system in front stage operation after switching Interaction data between equipment is handled.
CN201510924082.3A 2015-12-11 2015-12-11 Method and device for operating multi-system slave device to access master device through USB connection Active CN105573934B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510924082.3A CN105573934B (en) 2015-12-11 2015-12-11 Method and device for operating multi-system slave device to access master device through USB connection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510924082.3A CN105573934B (en) 2015-12-11 2015-12-11 Method and device for operating multi-system slave device to access master device through USB connection

Publications (2)

Publication Number Publication Date
CN105573934A CN105573934A (en) 2016-05-11
CN105573934B true CN105573934B (en) 2019-11-12

Family

ID=55884093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510924082.3A Active CN105573934B (en) 2015-12-11 2015-12-11 Method and device for operating multi-system slave device to access master device through USB connection

Country Status (1)

Country Link
CN (1) CN105573934B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844206B (en) * 2017-01-13 2020-03-27 北京元心科技有限公司 Method and device for debugging multiple systems in mobile terminal
CN106970844A (en) * 2017-03-01 2017-07-21 北京海杭通讯科技有限公司 A kind of MTP management methods of pair of android system
CN108388506B (en) * 2018-01-05 2021-10-12 郑州信大捷安信息技术股份有限公司 ADB multiplexing system and ADB multiplexing method based on single Linux kernel and multiple Android systems

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101452435A (en) * 2008-12-12 2009-06-10 深圳华为通信技术有限公司 USB terminal mode switching method and terminal
CN104199789A (en) * 2014-08-28 2014-12-10 中兴通讯股份有限公司 Port self-adaptive configuration method and system, management system and driving system
CN104281542A (en) * 2014-09-26 2015-01-14 中兴通讯股份有限公司 Method, device and system for adaptation of multifunctional USB (universal serial bus) terminal equipment
CN104516760A (en) * 2014-12-12 2015-04-15 华为技术有限公司 Operating system hot-switching method and device and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101452435A (en) * 2008-12-12 2009-06-10 深圳华为通信技术有限公司 USB terminal mode switching method and terminal
CN104199789A (en) * 2014-08-28 2014-12-10 中兴通讯股份有限公司 Port self-adaptive configuration method and system, management system and driving system
CN104281542A (en) * 2014-09-26 2015-01-14 中兴通讯股份有限公司 Method, device and system for adaptation of multifunctional USB (universal serial bus) terminal equipment
CN104516760A (en) * 2014-12-12 2015-04-15 华为技术有限公司 Operating system hot-switching method and device and mobile terminal

Also Published As

Publication number Publication date
CN105573934A (en) 2016-05-11

Similar Documents

Publication Publication Date Title
CN107493310B (en) Cloud resource processing method and cloud management platform
EP3668009A1 (en) Life cycle management method and device for network service
CN105573934B (en) Method and device for operating multi-system slave device to access master device through USB connection
CN111459665A (en) Distributed edge computing system and distributed edge computing method
CN103995567B (en) A kind of dual system intelligent interaction all-in-one and its dual system switching method
US20170201563A1 (en) Video data providing method, video playback method, device, and system
CN114416352A (en) Computing resource allocation method and device, electronic equipment and storage medium
CN110515762A (en) Data reconstruction method, device, terminal device and storage medium
CN101960435B (en) Method and apparatus for performing a host enumeration process
CN107996026A (en) Multiple operating system multimedia coding-decoding method, device and electronic equipment
CN106201526B (en) Service Component method and system
CN110505516A (en) A kind of throwing screen control method, device and system
CN110245585A (en) Reverse backsight system implementation method, device, computer equipment and its storage medium
CN104469420B (en) Business emergency method, the apparatus and system of network TV terminal
US9372819B2 (en) I/O device N—port ID virtualization
CN103209209B (en) Based on applying virtual implementation method and the system of the transmission of Windows System and Network
CN105245579A (en) Power distribution network system massive data communication processing method and system
CN111614702B (en) Edge calculation method and edge calculation system
CN110515489A (en) Intelligent interaction device and its control method
CN108874699B (en) Method and device for using MTP (Multi-time transfer protocol) function by multiple systems and electronic equipment
CN110868330B (en) Evaluation method, device and evaluation system for CPU resources which can be divided by cloud platform
CN103793279A (en) Virtualization method for integrating application virtualization and desktop virtualization
CN110136018A (en) A kind of intelligence adds method, equipment and the system of social good friend
CN114389868B (en) Cloud resource allocation method, system, device and storage medium
CN111277626A (en) Server upgrading method and device, electronic equipment and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210203

Address after: 101300 room 153, 1 / F, building 17, 16 Caixiang East Road, Nancai Town, Shunyi District, Beijing

Patentee after: Yuanxin Information Technology Group Co.,Ltd.

Address before: 100176 room 2222, building D, building 33, 99 Kechuang 14th Street, Beijing Economic and Technological Development Zone, Beijing

Patentee before: BEIJING YUANXIN SCIENCE & TECHNOLOGY Co.,Ltd.

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20160511

Assignee: Beijing Yuanxin Junsheng Technology Co.,Ltd.

Assignor: Yuanxin Information Technology Group Co.,Ltd.

Contract record no.: X2021110000018

Denomination of invention: A method and device for accessing a slave device running a multi system to a master device through a USB connection

Granted publication date: 20191112

License type: Common License

Record date: 20210531