CN105138480B - A kind of method and apparatus for performing operational order - Google Patents

A kind of method and apparatus for performing operational order Download PDF

Info

Publication number
CN105138480B
CN105138480B CN201510451181.4A CN201510451181A CN105138480B CN 105138480 B CN105138480 B CN 105138480B CN 201510451181 A CN201510451181 A CN 201510451181A CN 105138480 B CN105138480 B CN 105138480B
Authority
CN
China
Prior art keywords
type
identity
identity type
terminal
operational order
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
CN201510451181.4A
Other languages
Chinese (zh)
Other versions
CN105138480A (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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510451181.4A priority Critical patent/CN105138480B/en
Publication of CN105138480A publication Critical patent/CN105138480A/en
Application granted granted Critical
Publication of CN105138480B publication Critical patent/CN105138480B/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/10Program control for peripheral devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The present invention is on a kind of method and apparatus for performing operation, belongs to field of computer technology.Methods described includes:The first operational order of user's input is received, according to the operational order and the corresponding relation of identity type prestored, determines the first identity type corresponding to first operational order, wherein, the identity type includes main control device type and slave type;If local current identity type mismatches with first identity type, the identity type of local is switched into first identity type, and notifies locally-attached first terminal switching identity type;Based on first identity type, first operational order is performed.Using the present invention, the efficiency for performing operation can be improved.

Description

A kind of method and apparatus for performing operational order
Technical field
The disclosure is directed to field of computer technology, especially with respect to a kind of method and apparatus for performing operational order.
Background technology
With the development of mobile terminal technology, the purposes of mobile terminal is more and more extensive, has become the daily work of people Make, one of most important instrument in life.People can carry out between two terminals USB (Universal Serial Bus, USB) data transfer, provide in USB transport protocol, it is main control device that can only have a terminal in the data transmission, Another terminal is slave, and the data that can only be read and write by main control device in slave.Wherein, type C-terminals mouth is One of well known port of USB data transmission.
Before two terminals carry out USB data transmission, people need that the both ends of type C connecting lines are inserted into two respectively In the type C-terminal mouths of individual terminal, the controller for carrying out type C connections can be provided with terminal, controller can be by According to the level of the CCpin (Configuration Channel pin, channel configuration pin) in default periodic Control type ports Height conversion is carried out, and the level of other side can be detected by controller.When any terminal detects itself in two terminals Level is high level, when the level of other side is low level, itself CCpin output level can be maintained at into high level, and really It oneself is main control device to recognize, meanwhile, distant terminal can detect opposite level result, then by its own CCpin output Level is maintained at low level, and confirms oneself to be slave, and then the terminal of main control device can read and write the end of slave The data at end.
During the disclosure is realized, inventor has found problems with least be present:
Based on above-mentioned type C connection procedure, the distribution of the identity type of main control device and slave be it is random, When user wants to be written and read operation by a certain another terminal of the terminal-pair specified, it is possible to which repeatedly plug connecting line can not yet The equipment for making to specify turns into main control device, can so cause to perform the less efficient of operation.
The content of the invention
In order to overcome problem present in correlation technique, present disclose provides a kind of method and dress for performing operational order Put.The technical scheme is as follows:
According to the first aspect of the embodiment of the present disclosure, there is provided a kind of method for performing operational order, methods described include:
The first operational order of user's input is received, is closed according to the operational order prestored is corresponding with identity type System, determine the first identity type corresponding to first operational order, wherein, the identity type include main control device type and Slave type;
If local current identity type mismatches with first identity type, the identity type of local is switched For first identity type, and notify locally-attached first terminal switching identity type;
Based on first identity type, first operational order is performed.
Optionally, first operational order instructs for the local reading and writing data to first terminal, the first identity class Type is master control device type;
If the current identity type identity type corresponding with first operational order in the local mismatches, will Local identity type switches to identity type corresponding to first operational order, and notifies locally-attached first terminal to cut Identity type is changed, including:
If local current identity type is slave type, the identity type of local is switched into main control device Type, and notify the first terminal that the identity type of the first terminal is switched into slave type.
Optionally, if the local current identity type mismatches with first identity type, by local Identity type switches to first identity type, and notifies locally-attached first terminal switching identity type, including:
If local current identity type mismatches with first identity type, by described in locality connection first eventually Identity in the port at end sets the output level of pin to be arranged to level value corresponding to first identity type, so that described the One terminal is set its identity when detecting that its identity sets the incoming level of pin to be level value corresponding to the first identity type The output level of pin is arranged to level value corresponding to other identity types beyond first identity type.
Optionally, first identity type is master control device type;
If the local current identity type mismatches with first identity type, by described in locality connection the Identity in the port of one terminal sets the output level of pin to be arranged to level value corresponding to first identity type, so that institute First terminal is stated when detecting that its identity sets the incoming level of pin to be level value corresponding to the first identity type, by its identity The output level of pin is set to be arranged to level value corresponding to other identity types beyond first identity type, including:
If local current identity type is slave type, by the port of first terminal described in locality connection Identity set pin output level be arranged to high level so that the first terminal detecting its identity set pin input When level is high level, the output level that its identity sets pin is arranged to low level.
Optionally, it is described to be based on first identity type, first operational order is performed, including:
Based on first identity type, re-establish data with the first terminal and be connected;
Based on first identity type, connected by the data re-established, perform first operational order.
According to the second aspect of the embodiment of the present disclosure, there is provided a kind of device for performing operational order, described device include:
Determining module, for receiving the first operational order of user's input, according to the operational order and identity prestored The corresponding relation of type, the first identity type corresponding to first operational order is determined, wherein, the identity type includes master Control device type and slave type;
Handover module, will be local if mismatched for local current identity type with first identity type Identity type switch to first identity type, and notify locally-attached first terminal switching identity type;
Execution module, for based on first identity type, performing first operational order.
Optionally, first operational order instructs for the local reading and writing data to first terminal, the first identity class Type is master control device type;
The handover module, is used for:
If local current identity type is slave type, the identity type of local is switched into main control device Type, and notify the first terminal that the identity type of the first terminal is switched into slave type.
Optionally, the handover module, is used for:
If local current identity type mismatches with first identity type, by described in locality connection first eventually Identity in the port at end sets the output level of pin to be arranged to level value corresponding to first identity type, so that described the One terminal is set its identity when detecting that its identity sets the incoming level of pin to be level value corresponding to the first identity type The output level of pin is arranged to level value corresponding to other identity types beyond first identity type.
Optionally, first identity type is master control device type;
The handover module, is used for:
If local current identity type is slave type, by the port of first terminal described in locality connection Identity set pin output level be arranged to high level so that the first terminal detecting its identity set pin input When level is high level, the output level that its identity sets pin is arranged to low level.
Optionally, the execution module, including:
Submodule is connected, for based on first identity type, re-establishing data with the first terminal and being connected;
Implementation sub-module, for based on first identity type, being connected by the data re-established, perform described the One operational order.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of device for performing operational order, described device include:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
The first operational order of user's input is received, is closed according to the operational order prestored is corresponding with identity type System, determine the first identity type corresponding to first operational order, wherein, the identity type include main control device type and Slave type;
If local current identity type mismatches with first identity type, the identity type of local is switched For first identity type, and notify locally-attached first terminal switching identity type;
Based on first identity type, first operational order is performed.
The technical scheme provided by this disclosed embodiment can include the following benefits:
In the embodiment of the present disclosure, the first operational order of user's input is received, according to the operational order and body prestored The corresponding relation of part type, determines the first identity type corresponding to the first operational order, wherein, identity type includes main control device Type and slave type, if local current identity type mismatches with the first identity type, by the identity of local Type switches to the first identity type, and notifies locally-attached first terminal switching identity type, based on the first identity type, The first operational order is performed, so, the operational order automatic switchover identity type that can be inputted according to user is multiple without user Connecting line is plugged, so as to improve the efficiency for performing operation.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the disclosure Example, and be used to together with specification to explain the principle of the disclosure.In the accompanying drawings:
Fig. 1 is a kind of flow chart of the method for execution operational order according to an exemplary embodiment;
Fig. 2 is the application scenarios schematic diagram according to an exemplary embodiment;
Fig. 3 is a kind of schematic diagram of the device of execution operational order according to an exemplary embodiment;
Fig. 4 is a kind of schematic diagram of the device of execution operational order according to an exemplary embodiment;
Fig. 5 is a kind of structural representation of terminal according to an exemplary embodiment.
Pass through above-mentioned accompanying drawing, it has been shown that the clear and definite embodiment of the disclosure, will hereinafter be described in more detail.These accompanying drawings It is not intended to limit the scope of disclosure design by any mode with word description, but is by reference to specific embodiment Those skilled in the art illustrate the concept of the disclosure.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the disclosure.
The exemplary embodiment of the disclosure one provides a kind of method for performing operational order, as shown in figure 1, the place of this method Reason flow can include the steps:
In a step 101, the first operational order of user's input is received, according to the operational order prestored and identity class The corresponding relation of type, the first identity type corresponding to the first operational order is determined, wherein, identity type includes main control device type With slave type.
In a step 102, if local current identity type mismatches with the first identity type, by the identity of local Type switches to the first identity type, and notifies locally-attached first terminal switching identity type.
In step 103, based on the first identity type, the first operational order is performed.
In the embodiment of the present disclosure, the first operational order of user's input is received, according to the operational order and body prestored The corresponding relation of part type, determines the first identity type corresponding to the first operational order, wherein, identity type includes main control device Type and slave type, if local current identity type mismatches with the first identity type, by the identity of local Type switches to the first identity type, and notifies locally-attached first terminal switching identity type, based on the first identity type, The first operational order is performed, so, the operational order automatic switchover identity type that can be inputted according to user is multiple without user Connecting line is plugged, so as to improve the efficiency for performing operation.
Disclosure another exemplary embodiment provides a kind of method for performing operational order, and this method can be used for terminal In, wherein, terminal can be the mobile terminals such as mobile phone or tablet personal computer.Terminal can include data transmission port, data transfer Port can be type C-terminal mouths, be connected for establishing data with first terminal;Terminal can include display unit, display unit Can be liquid crystal display, display unit is displayed for the data in first terminal;Terminal can include input block, defeated It can be button to enter unit, can be touch-screen, user can be controlled operation by input block, such as by first terminal Data duplication into local terminal, or by the data duplication in local terminal into first terminal;Terminal can include place Device is managed, processor can be used for the first operational order for receiving user's input, according to the operational order prestored and identity class The corresponding relation of type, the first identity type corresponding to the first operational order is determined, if local current identity type and first Identity type is mismatched, then the identity type of local is switched to the first identity type by trigger controller, to perform the first behaviour Instruct;Terminal can include controller, and controller is used for after the switching command of processor is received, by the identity class of local Type switches to the first identity type, and notifies locally-attached first terminal switching identity type;In addition, terminal can also include The portions such as memory, sensor, voicefrequency circuit, bluetooth, WiFi (Wirelessfidelity, adopting wireless fidelity technology) and power supply Part.
Below in conjunction with embodiment, the handling process shown in Fig. 1 is described in detail, content can be as follows:
In a step 101, the first operational order of user's input is received, according to the operational order prestored and identity class The corresponding relation of type, the first identity type corresponding to the first operational order is determined, wherein, identity type includes main control device type With slave type.
In force, when user wishes to carry out USB (Universal Serial Bus, general string between two terminals Row bus) data transfer when, the both ends of type C connecting lines can be inserted into the USB port of two terminals by user respectively, The USB port can be type C-terminal mouths.Wherein, two terminals can be respectively first terminal and second terminal, and the present invention is real Example is applied using the terminal of other side as first terminal, local terminal be second terminal exemplified by illustrate.
The controller for carrying out type C connections can be provided with terminal, controller can be according to the default cycle pair Level in CCpin (Configuration Channelpin, channel configuration pin) carries out height conversion, and can pass through control Device processed detects the level value in connecting line corresponding to CCpin.When the level of the CCpin of a terminal in two terminals is high electricity Flat, when the CCpin of another terminal level is low level, the level value in connecting line corresponding to CCpin can be in default electricity In the range of level values, at this moment, the controller of two terminals can send connection to the processor of each self terminal and be successfully established signal, Itself CCpin output level can be maintained at high level by CCpin output level for the terminal of high level, and can confirm that Oneself it is main control device, itself CCpin output level can be maintained at low by CCpin output level for low level terminal Level, and can confirm that oneself to be slave, main control device can send data connection request to slave, establish data Connection.And the CCpin of two terminals level is when being high level or being low level, the electricity in connecting line corresponding to CCpin Level values are not then in the range of default level value, and at this moment, the controller of two terminals will not be sent to the processor of each self terminal Connection is successfully established signal, after a terminal carries out height conversion according to the default cycle to the level in its CCpin, two Controller in terminal can detect that the level value in connecting line corresponding to CCpin can be in the range of default level value, so After can carry out subsequent treatment as procedure described above so that the terminal of main control device can read and write the number of the terminal of slave According to as shown in Figure 2.
After two terminals determine identity type, the identity type of itself can be stored, and data company can be established Connect.After establishing data connection, the data message in distant terminal can be shown in terminal.User can be to second terminal therein It is controlled operation.Control operation can be any operation, and the control operation can download or delete number in second terminal According to or data read-write operation pair with locally-attached terminal (can be described as first terminal), as by first terminal Data duplication is into second terminal, or by the data duplication in second terminal into first terminal.
For user after second terminal is controlled operation, second terminal can then receive the operational order of user's input (i.e. the first operational order), then it can determine first according to the operational order and the corresponding relation of identity type prestored First identity type corresponding to operational order.
In a step 102, if local current identity type mismatches with the first identity type, by the identity of local Type switches to the first identity type, and notifies locally-attached first terminal switching identity type.
In force, after second terminal determines the first identity type corresponding to the first operational order, local work as can be obtained The identity type of preceding storage, then may determine that whether local currently stored identity type matches with the first identity type, such as Locally current identity type mismatches fruit with the first identity type, then the identity type of local can be switched into the first identity Type, and can notify to switch identity type with locally-attached first terminal.For example, local current identity type is master control Device type, the first identity type are slave type, then the identity type of local can be switched into slave type; Local current identity type is slave type, and the first identity type is master control device type, then can be by the body of local Part type switches to main control device type., then can be with addition, if local current identity type matches with the first identity type Keep local current identity type constant, do not notify locally-attached first terminal switching identity type.
Optionally, the first operational order can be that the local reading and writing data to first terminal instructs, and the first identity type is Main control device type, accordingly, the processing procedure of step 102 can be as follows:If local current identity type sets for subordinate Standby type, then switch to main control device type, and notify first terminal by the identity class of first terminal by the identity type of local Type switches to slave type.
In force, user can pair with locally-attached first terminal carry out data read-write operation, such as by first terminal In data duplication into second terminal, or by the data duplication in second terminal into first terminal, second terminal then may be used Instructed with receiving the reading and writing data of user's input.Provided in USB transport protocol, the number that can only be read and write by main equipment in slave unit According to, therefore, in the above-mentioned operational order prestored and the corresponding relation of identity type, identity corresponding to reading and writing data instruction Type is master control device type.
Second terminal determines identity type corresponding to reading and writing data instruction as that after master control device type, can obtain local work as The identity type of preceding storage, it then may determine that whether local currently stored identity type is master control device type, if this The current identity type in ground is slave type, then the identity type of local can be switched into main control device type, and can The identity type of first terminal is switched to by slave type with locally-attached first terminal with notice.In addition, if this The current identity type in ground is master control device type, then local current identity type can be kept constant, do not notify local connect The first terminal switching identity type connect.
Optionally, identity type can be switched by adjusting level, corresponding processing procedure can be as follows:It is if local Current identity type mismatches with the first identity type, then the identity in the port of locality connection first terminal is set into pin Output level is arranged to level value corresponding to the first identity type, so that first terminal is detecting the input of its identity setting pin Level is corresponding to the first identity type during level value, by its identity set the output level of pin be arranged to the first identity type with Level value corresponding to other outer identity types.
In force, identity type can be pre-set corresponding to different identity types in terminal to identify, for example, can be with Set and be identified as 1 corresponding to main control device type, 0 is identified as corresponding to slave type.Second terminal determines the first operation After first identity type corresponding to instruction, the system program of second terminal can generate packet corresponding to the first operational order, Destination corresponding to the first operational order (such as second terminal or distant terminal), the first identity type pair can be included in packet The the first identity type mark and data content (image data such as to be copied) information answered.
The system program of second terminal can obtain local currently stored identity type, then may determine that local current Whether the identity type of storage matches with the first identity type, if local current identity type and the first identity type are not Match somebody with somebody, then above-mentioned packet can be sent to local controller, local controller can then obtain the identity in packet Type identification, then the output level of pin can be set to be arranged to the first body the identity in the port of locality connection first terminal Level value corresponding to part type identification.Wherein, it can be the CCpin in Type C-terminal mouths that identity, which sets pin,.Local identity is set The output level for putting pin is arranged to corresponding to the first identity type mark after level value, and first terminal can detect that its identity is set The incoming level for putting pin is level value corresponding to the first identity type, then can set its identity the output level of pin to set For level value corresponding to other identity types beyond the first identity type.In addition, if local current identity type and the One identity type matching, then the identity in the port of locality connection first terminal can be kept to set the output level of pin constant.
Optionally, the first identity type can be master control device type, and corresponding processing procedure can be as follows:It is if local Current identity type is slave type, then the identity in the port of locality connection first terminal is set to the output electricity of pin It is flat to be arranged to high level, so that first terminal is when detecting that its identity sets the incoming level of pin to be high level, by its identity The output level of pin is set to be arranged to low level.
In force, if the first operational order instructs for the local reading and writing data to first terminal, the first identity type For master control device type, then the system program of second terminal can generate packet corresponding to reading and writing data instruction, in packet Destination (i.e. first terminal) corresponding to reading and writing data instruction, main control device type mark corresponding to main control device type can be included Know the information such as (i.e. 1) and data content (i.e. target read-write data).
The system program of second terminal can obtain local currently stored identity type, then may determine that local current Whether the identity type of storage is numerical control device type, can be with if local current identity type is slave type Above-mentioned packet is sent to local controller, local controller can then obtain the main control device type mark in packet Know, then the output level of pin can be set to be arranged to high level the identity in the port of locality connection first terminal.It is local Identity set pin output level set high level after, first terminal can detect its identity set pin incoming level be For high level, then the output level of pin can be set to be arranged to low level its identity.In addition, if local current identity Type is slave type, then the identity in the port of locality connection first terminal can be kept to set the output level of pin not Become.
In step 103, based on the first identity type, the first operational order is performed.
In force, the identity type of local is switched to the first identity type by second terminal, and is notified locally-attached After first terminal switching identity type, the first operational order can be performed, if the first operation according to based on the first identity type Instruct and the reading and writing data of first terminal is instructed for local, then the data in first terminal can be written and read.For example, can be with Picture in second terminal is copied in first terminal.
Optionally, after carrying out identity type switching, data connection can be re-established, accordingly, step 103 treats Journey can be as follows:Based on the first identity type, re-establish data with first terminal and be connected;Based on the first identity type, pass through The data connection re-established, performs the first operational order.
In force, the identity type of local is switched to the first identity type by second terminal, and is notified locally-attached After first terminal switching identity type, identity type is that the terminal of master control device type can be slave class to identity type The terminal of type resends data connection request, and the data connection request can be USB handshake requests, and latter two right terminal can be with USB handshake process is carried out, and then data connection can be re-established.Second terminal re-establishes data with first terminal and connected Afterwards, the first identity type can be based on, is connected by the data re-established, performs the first operational order.
In the embodiment of the present disclosure, the first operational order of user's input is received, according to the operational order and body prestored The corresponding relation of part type, determines the first identity type corresponding to the first operational order, wherein, identity type includes main control device Type and slave type, if local current identity type mismatches with the first identity type, by the identity of local Type switches to the first identity type, and notifies locally-attached first terminal switching identity type, based on the first identity type, The first operational order is performed, so, the operational order automatic switchover identity type that can be inputted according to user is multiple without user Connecting line is plugged, so as to improve the efficiency for performing operation.
Disclosure further example embodiment provides a kind of device for performing operational order, as shown in figure 3, the device bag Include:Determining module 310, handover module 320 and execution module 330.
Determining module 310, for receiving the first operational order of user's input, according to the operational order and body prestored The corresponding relation of part type, determines the first identity type corresponding to first operational order, wherein, the identity type includes Main control device type and slave type;
Handover module 320, if mismatched for local current identity type with first identity type, it incite somebody to action this The identity type on ground switches to first identity type, and notifies locally-attached first terminal switching identity type;
Execution module 330, for based on first identity type, performing first operational order.
Optionally, first operational order instructs for the local reading and writing data to first terminal, the first identity class Type is master control device type;
The handover module 320, is used for:
If local current identity type is slave type, the identity type of local is switched into main control device Type, and notify the first terminal that the identity type of the first terminal is switched into slave type.
Optionally, the handover module 320, is used for:
If local current identity type mismatches with first identity type, by described in locality connection first eventually Identity in the port at end sets the output level of pin to be arranged to level value corresponding to first identity type, so that described the One terminal is set its identity when detecting that its identity sets the incoming level of pin to be level value corresponding to the first identity type The output level of pin is arranged to level value corresponding to other identity types beyond first identity type.
Optionally, first identity type is master control device type;
The handover module 320, is used for:
If local current identity type is slave type, by the port of first terminal described in locality connection Identity set pin output level be arranged to high level so that the first terminal detecting its identity set pin input When level is high level, the output level that its identity sets pin is arranged to low level.
Optionally, as shown in figure 4, the execution module 330, including:
Submodule 331 is connected, for based on first identity type, re-establishing data with the first terminal and connecting Connect;
Implementation sub-module 332, for based on first identity type, being connected by the data re-established, performing institute State the first operational order.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
In the embodiment of the present disclosure, the first operational order of user's input is received, according to the operational order and body prestored The corresponding relation of part type, determines the first identity type corresponding to the first operational order, wherein, identity type includes main control device Type and slave type, if local current identity type mismatches with the first identity type, by the identity of local Type switches to the first identity type, and notifies locally-attached first terminal switching identity type, based on the first identity type, The first operational order is performed, so, the operational order automatic switchover identity type that can be inputted according to user is multiple without user Connecting line is plugged, so as to improve the efficiency for performing operation.
It should be noted that:Above-described embodiment provide execution operational order device when performing operational order, only with The division progress of above-mentioned each functional module, can be as needed and by above-mentioned function distribution by not for example, in practical application Same functional module is completed, i.e., the internal structure of equipment is divided into different functional modules, to complete whole described above Or partial function.In addition, the device for the execution operational order that above-described embodiment provides is implemented with performing the method for operational order Example belongs to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The another exemplary embodiment of the disclosure provides a kind of structural representation of terminal.The terminal can be mobile phone or put down The mobile terminals such as plate computer, it can be used for performing the method in above-described embodiment.
Reference picture 5, terminal 800 can include following one or more assemblies:Processing component 802, memory 804, power supply Component 806, multimedia groupware 808, audio-frequency assembly 810, the interface 812 of input/output (I/O), sensor cluster 814, and Communication component 816.
Processing component 802 generally controls the integrated operation of terminal 800, is such as communicated with display, call, data, phase The operation that machine operates and record operation is associated.Treatment element 802 can refer to including one or more processors 820 to perform Order, to complete all or part of step of above-mentioned method.In addition, processing component 802 can include one or more modules, just Interaction between processing component 802 and other assemblies.For example, processing component 802 can include multi-media module, it is more to facilitate Interaction between media component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in terminal 800.These data are shown Example includes the instruction of any application program or method for being operated in terminal 800, contact data, telephone book data, disappears Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group Close and realize, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM) are erasable to compile Journey read-only storage (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash Device, disk or CD.
Electric power assembly 806 provides electric power for the various assemblies of terminal 800.Electric power assembly 806 can include power management system System, one or more power supplys, and other components associated with generating, managing and distributing electric power for audio output apparatus 800.
Multimedia groupware 808 is included in the screen of one output interface of offer between the terminal 800 and user.One In a little embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch-screen, to receive the input signal from user.Touch panel includes one or more touch sensings Device is with the gesture on sensing touch, slip and touch panel.The touch sensor can not only sensing touch or sliding action Border, but also detect and touched or the related duration and pressure of slide with described.In certain embodiments, more matchmakers Body component 808 includes a front camera and/or rear camera.When terminal 800 is in operator scheme, such as screening-mode or During video mode, front camera and/or rear camera can receive outside multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio-frequency assembly 810 is configured as output and/or input audio signal.For example, audio-frequency assembly 810 includes a Mike Wind (MIC), when audio output apparatus 800 is in operator scheme, during such as call model, logging mode and speech recognition mode, wheat Gram wind is configured as receiving external audio signal.The audio signal received can be further stored in memory 804 or warp Sent by communication component 816.
I/O interfaces 812 provide interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.
Sensor cluster 814 includes one or more sensors, and the state for providing various aspects for terminal 800 is commented Estimate.For example, sensor cluster 814 can detect opening/closed mode of terminal 800, and the relative positioning of component, for example, it is described Component is the display and keypad of terminal 800, and sensor cluster 814 can be with 800 1 components of detection terminal 800 or terminal Position change, the existence or non-existence that user contacts with terminal 800, the orientation of terminal 800 or acceleration/deceleration and terminal 800 Temperature change.Sensor cluster 814 can include proximity transducer, be configured to detect in no any physical contact The presence of neighbouring object.Sensor cluster 814 can also include optical sensor, such as CMOS or ccd image sensor, for into As being used in application.In certain embodiments, the sensor cluster 814 can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between terminal 800 and other equipment.Terminal 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.In an exemplary implementation In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 816 also includes near-field communication (NFC) module, to promote junction service.Example Such as, in NFC module radio frequency identification (RFID) technology can be based on, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, terminal 800 can be believed by one or more application specific integrated circuits (ASIC), numeral Number processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for performing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally provided Such as include the memory 804 of instruction, above-mentioned instruction can be performed to complete the above method by the processor 820 of terminal 800.For example, The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk With optical data storage devices etc..
Those skilled in the art will readily occur to the disclosure its after considering specification and putting into practice disclosure disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledges in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by following Claim is pointed out.
It should be appreciated that the precision architecture that the disclosure is not limited to be described above and is shown in the drawings, and And various modifications and changes can be being carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.

Claims (11)

  1. A kind of 1. method for performing operational order, it is characterised in that methods described includes:
    The first operational order of user's input is received, according to the operational order and the corresponding relation of identity type prestored, really First identity type corresponding to fixed first operational order, wherein, the identity type includes main control device type and subordinate Device type;
    If local current identity type mismatches with first identity type, the identity type of local is switched into institute The first identity type is stated, and notifies locally-attached first terminal switching identity type;
    Based on first identity type, first operational order is performed.
  2. 2. according to the method for claim 1, it is characterised in that first operational order is the local number to first terminal According to read write command, first identity type is master control device type;
    If the current identity type identity type corresponding with first operational order in the local mismatches, will be local Identity type switch to identity type corresponding to first operational order, and notify locally-attached first terminal switching body Part type, including:
    If local current identity type is slave type, the identity type of local is switched into main control device class Type, and notify the first terminal that the identity type of the first terminal is switched into slave type.
  3. 3. according to the method for claim 1, it is characterised in that if the local current identity type and described first Identity type mismatches, then the identity type of local is switched into first identity type, and notify locally-attached first Terminal switches identity type, including:
    If local current identity type mismatches with first identity type, by first terminal described in locality connection Identity in port sets the output level of pin to be arranged to level value corresponding to first identity type, so that described first is whole Hold when detecting that its identity sets the incoming level of pin to be level value corresponding to the first identity type, its identity is set into pin Output level is arranged to level value corresponding to other identity types beyond first identity type.
  4. 4. according to the method for claim 3, it is characterised in that first identity type is master control device type;
    If the local current identity type mismatches with first identity type, by described in locality connection first eventually Identity in the port at end sets the output level of pin to be arranged to level value corresponding to first identity type, so that described the One terminal is set its identity when detecting that its identity sets the incoming level of pin to be level value corresponding to the first identity type The output level of pin is arranged to level value corresponding to other identity types beyond first identity type, including:
    If local current identity type is slave type, by the body in the port of first terminal described in locality connection Part sets the output level of pin to be arranged to high level, so that the first terminal is detecting the incoming level of its identity setting pin For high level when, by its identity set pin output level be arranged to low level.
  5. 5. according to the method for claim 1, it is characterised in that described be based on first identity type, execution described the One operational order, including:
    Based on first identity type, re-establish data with the first terminal and be connected;
    Based on first identity type, connected by the data re-established, perform first operational order.
  6. 6. a kind of device for performing operational order, it is characterised in that described device includes:
    Determining module, for receiving the first operational order of user's input, according to the operational order and identity type prestored Corresponding relation, determine the first identity type corresponding to first operational order, wherein, the identity type is set including master control Standby type and slave type;
    Handover module, if mismatched for local current identity type with first identity type, by the body of local Part type switches to first identity type, and notifies locally-attached first terminal switching identity type;
    Execution module, for based on first identity type, performing first operational order.
  7. 7. device according to claim 6, it is characterised in that first operational order is the local number to first terminal According to read write command, first identity type is master control device type;
    The handover module, is used for:
    If local current identity type is slave type, the identity type of local is switched into main control device class Type, and notify the first terminal that the identity type of the first terminal is switched into slave type.
  8. 8. device according to claim 6, it is characterised in that the handover module, be used for:
    If local current identity type mismatches with first identity type, by first terminal described in locality connection Identity in port sets the output level of pin to be arranged to level value corresponding to first identity type, so that described first is whole Hold when detecting that its identity sets the incoming level of pin to be level value corresponding to the first identity type, its identity is set into pin Output level is arranged to level value corresponding to other identity types beyond first identity type.
  9. 9. device according to claim 8, it is characterised in that first identity type is master control device type;
    The handover module, is used for:
    If local current identity type is slave type, by the body in the port of first terminal described in locality connection Part sets the output level of pin to be arranged to high level, so that the first terminal is detecting the incoming level of its identity setting pin For high level when, by its identity set pin output level be arranged to low level.
  10. 10. device according to claim 6, it is characterised in that the execution module, including:
    Submodule is connected, for based on first identity type, re-establishing data with the first terminal and being connected;
    Implementation sub-module, for based on first identity type, being connected by the data re-established, performing first behaviour Instruct.
  11. A kind of 11. device for performing operational order, it is characterised in that including:
    Processor;
    For storing the memory of processor-executable instruction;
    Wherein, the processor is configured as:
    The first operational order of user's input is received, according to the operational order and the corresponding relation of identity type prestored, really First identity type corresponding to fixed first operational order, wherein, the identity type includes main control device type and subordinate Device type;
    If local current identity type mismatches with first identity type, the identity type of local is switched into institute The first identity type is stated, and notifies locally-attached first terminal switching identity type;
    Based on first identity type, first operational order is performed.
CN201510451181.4A 2015-07-28 2015-07-28 A kind of method and apparatus for performing operational order Active CN105138480B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510451181.4A CN105138480B (en) 2015-07-28 2015-07-28 A kind of method and apparatus for performing operational order

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510451181.4A CN105138480B (en) 2015-07-28 2015-07-28 A kind of method and apparatus for performing operational order

Publications (2)

Publication Number Publication Date
CN105138480A CN105138480A (en) 2015-12-09
CN105138480B true CN105138480B (en) 2018-04-06

Family

ID=54723833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510451181.4A Active CN105138480B (en) 2015-07-28 2015-07-28 A kind of method and apparatus for performing operational order

Country Status (1)

Country Link
CN (1) CN105138480B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105956458A (en) * 2016-04-28 2016-09-21 乐视控股(北京)有限公司 Interaction control method and device for terminals

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101471833A (en) * 2007-12-29 2009-07-01 联想(北京)有限公司 Method and apparatus for processing data
CN101526930A (en) * 2008-10-13 2009-09-09 建荣集成电路科技(珠海)有限公司 USB interface master-slave machine detection device and detection method
CN102117251A (en) * 2009-12-31 2011-07-06 比亚迪股份有限公司 Method for selecting application mode of universal serial bus (USB) equipment and USB equipment
CN102421159A (en) * 2011-12-19 2012-04-18 华为终端有限公司 Method and system for switching dual-mode communication terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3513147B2 (en) * 2002-05-29 2004-03-31 株式会社ハギワラシスコム USB storage device and its control device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101471833A (en) * 2007-12-29 2009-07-01 联想(北京)有限公司 Method and apparatus for processing data
CN101526930A (en) * 2008-10-13 2009-09-09 建荣集成电路科技(珠海)有限公司 USB interface master-slave machine detection device and detection method
CN102117251A (en) * 2009-12-31 2011-07-06 比亚迪股份有限公司 Method for selecting application mode of universal serial bus (USB) equipment and USB equipment
CN102421159A (en) * 2011-12-19 2012-04-18 华为终端有限公司 Method and system for switching dual-mode communication terminal

Also Published As

Publication number Publication date
CN105138480A (en) 2015-12-09

Similar Documents

Publication Publication Date Title
CN104159218B (en) Internetwork connection establishing method and device
CN105468152A (en) Terminal operation control method and device based on wearable equipment, and equipment
CN104955126A (en) Operator network access method and device
CN104702762A (en) Incoming call reminding method and incoming call reminding device
CN104219092A (en) Router management application and router firmware compatible method and router management application and router firmware compatible device
CN105068958A (en) Switching control method and device
CN105467874A (en) Method and device for identifying categories of electronic devices on intelligent sockets
CN104683248A (en) Method and device for switching working mode
CN105117033A (en) Connection method and device of external equipment
CN104238912A (en) Application control method and application control device
CN104320774A (en) Updating method, device and facility
CN105511749A (en) Method and device for equipment control
CN105553963A (en) Control method and device of positioning services
CN105120505A (en) Method, apparatus and system for making intelligent equipment accessed to router
CN108038034A (en) Electronic equipment adjustment method, adapter, device and storage medium
CN104837154A (en) Wireless access point control method and device
CN104464238A (en) Method and device for controlling operation between mobile terminals
CN105827489A (en) Intelligent household electrical appliance control method and device and intelligent household electrical appliance
CN105162193A (en) Charging method and charging apparatus for terminal, and terminal
CN106211033A (en) Data sharing method, device and electronic equipment
CN104216672A (en) Display control method and display control device
CN105739760A (en) Control method and device for anti-false touch mode
CN107703348A (en) The detection method and device of smart jack
CN105101125A (en) Method and device for setting call forwarding
CN106507282A (en) The control method of wireless connection and device

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