CN106201930A - A kind of device port determines device, terminal and method - Google Patents
A kind of device port determines device, terminal and method Download PDFInfo
- Publication number
- CN106201930A CN106201930A CN201610597301.6A CN201610597301A CN106201930A CN 106201930 A CN106201930 A CN 106201930A CN 201610597301 A CN201610597301 A CN 201610597301A CN 106201930 A CN106201930 A CN 106201930A
- Authority
- CN
- China
- Prior art keywords
- port
- saltus step
- physical interface
- equipment
- interface position
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/12—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
- G06F13/122—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware performs an I/O function other than control of data transfer
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Systems (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses a kind of device port and determine device, terminal and method, when old port at least two equipment being detected occurs saltus step simultaneously, then the physical interface position of the physical interface position port old with before saltus step of port new after saltus step is mated;If the physical interface location matches success of old port before the physical interface position of new port and saltus step after saltus step, it is determined that the new port after saltus step is device port so that equipment carries out data communication by this device port and terminal.The scheme provided by the present invention, characteristic according to physical interface invariant position determines the new port that equipment is corresponding after port-hopping, thus after ensureing port-hopping, can effectively determine the new port that equipment is corresponding, make to carry out data communication by appropriate ports between equipment and terminal, complete to download accordingly, the work such as backup, meanwhile, Consumer's Experience is also improved.
Description
Technical field
The present invention relates to network communication technology field, more particularly, it relates to a kind of device port determine device, terminal and
Method.
Background technology
At present, windows platform uses during USB device port, USB device insert USB physical interface with
Computer connects, and carries out data communication by the port numbers corresponding with USB device and computer.But, once equipment is restarted, port numbers
It may happen that saltus step (such as COM1 becomes COM2), causing computer to find the new port that this equipment is corresponding, such as, a computer is same
Time connect multiple devices, if the originating port saltus step simultaneously of these equipment, then cannot determine the corresponding relation of equipment and new port,
Also cannot determine which the new port that certain equipment is corresponding is, thus the data communication of computer and equipment room cannot be realized, fall
The experience of low user.
Summary of the invention
The technical problem to be solved in the present invention is in prior art that multiple device ports occur saltus step simultaneously, cause terminal
The corresponding relation of new port after cannot determining equipment and saltus step, thus affect Consumer's Experience.For this technical problem, it is provided that a kind of
Device port determines device, terminal and method.
For solving above-mentioned technical problem, the embodiment of the present invention provides a device port to determine device, including:
Interface position matching module, if for detecting that the old port of at least two equipment occurs saltus step simultaneously, then will jump
After change, the physical interface position of the physical interface position port old with before saltus step of new port is mated;
Device port determines module, if the physics of old port before the physical interface position of new port and saltus step after the saltus step
The match is successful for interface position, it is determined that the new port after saltus step is device port.
Wherein, if described interface position matching module is for detecting that the old port of at least two equipment is jumped simultaneously
Become, then the physical interface position of each new port after acquisition saltus step, by physical interface position and the saltus step of new port arbitrary after saltus step
The physical interface position of front each old port is mated successively;
If described device port determines that module is after saltus step before the physical interface position of this new port and saltus step wherein one
The physical interface location matches success of Geju City port, it is determined that this new port after saltus step is device port.
Wherein, also include:
Memory module, for before the old port saltus step simultaneously at least two equipment being detected, by described old port
Physical interface position stores.
Wherein, each equipment that described interface position matching module is connected with terminal for detection is restarted the most simultaneously, if with
At least two equipment that terminal connects is restarted simultaneously, it is determined that the old port of described at least two equipment occurs saltus step simultaneously.
Further, the invention provides a kind of terminal, determine device including device port as above;
Described device port determine device determine saltus step after device port;
Described terminal carries out data communication by described device port and equipment.
Further, present invention also offers a kind of device port and determine method, including:
If detecting, there is saltus step in the old port of at least two equipment, then by the physical interface position of port new after saltus step simultaneously
The physical interface position putting port old with before saltus step is mated;
If the physical interface location matches success of old port before the physical interface position of new port and saltus step after saltus step, the most really
Determining the new port after saltus step is device port.
Wherein, described method includes:
If detecting there is saltus step in the old port of at least two equipment simultaneously, then after obtaining saltus step, the physics of each new port connects
Mouth position;
By the physical interface position of each old port before the physical interface position of new port arbitrary after saltus step and saltus step successively
Join;
If the physical interface position of one of them old port before the physical interface position of this new port and saltus step after saltus step
It is made into merit, it is determined that this new port after saltus step is device port.
Wherein, after described acquisition saltus step, the physical interface position of new port includes:
Obtain the new port after saltus step;
The physical interface position of new port is determined according to the new port after saltus step.
Wherein, before the described old port saltus step simultaneously at least two equipment being detected, also include:
The physical interface position of described old port is stored.
Wherein, the saltus step simultaneously of the old port of described detection at least two equipment includes:
Each equipment that detection is connected with terminal is restarted the most simultaneously;
If at least two equipment being connected with terminal is restarted simultaneously, it is determined that the old port of described at least two equipment is simultaneously
There is saltus step.
Beneficial effect
The device port that the embodiment of the present invention proposes determines device, terminal and method, when at least two equipment being detected
There is saltus step in old port, then by the physical interface position of old port before the physical interface position of port new after saltus step and saltus step simultaneously
Mate;If the physical interface location matches success of old port before the physical interface position of new port and saltus step after saltus step, then
Determine that the new port after saltus step is device port so that equipment carries out data communication by this device port and terminal.By this
The scheme that invention provides, determines, according to the characteristic of physical interface invariant position, the new port that equipment is corresponding after port-hopping, from
And after ensureing port-hopping, can effectively determine the new port that equipment is corresponding so that can be by mating between equipment with terminal
Port carries out data communication, completes to download accordingly, the work such as backup, meanwhile, also improves Consumer's Experience.
Accompanying drawing explanation
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is the hardware architecture diagram realizing each one mobile terminal of embodiment of the present invention;
Fig. 2 determines device schematic diagram for the device port that first embodiment of the invention provides;
The tree-like structure chart in physical interface position before the port-hopping that Fig. 3 provides for first embodiment of the invention;
The terminal that Fig. 4 provides for second embodiment of the invention and external equipment connection diagram;
The device port that Fig. 5 provides for third embodiment of the invention determines method flow diagram.
Detailed description of the invention
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The terminal realizing each embodiment of the present invention is described referring now to accompanying drawing.In follow-up description, use is used for
Represent that the suffix of such as " module " or " unit " of element, only for the explanation of the beneficially present invention, itself does not has specific
Meaning.Therefore, " module " can mixedly use with " unit ".
Terminal can be implemented in a variety of manners.Such as, the terminal described in the present invention can include such as smart phone,
The mobile terminal of notebook computer, PAD (panel computer) etc. and the fixing end of such as numeral TV, desk computer etc.
End.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that, except being used in particular for mobile purpose
Element outside, can also apply to the terminal of fixed type according to the structure of the present embodiment.
Fig. 1 is the hardware architecture diagram realizing each one mobile terminal of embodiment of the present invention.
Mobile terminal 100 includes user input unit 130, output unit 150, memorizer 160, interface unit 170, controls
Device 180 and power subsystem 190 etc..Fig. 1 shows the mobile terminal with various assembly, it should be understood that and not
Realistic execute all assemblies illustrated.Can alternatively implement more or less of assembly.Will be discussed in more detail below mobile terminal
Element.
User input unit 130 can generate key input data to control each of mobile terminal according to the order of user's input
Plant operation.User input unit 130 allows user to input various types of information, and can include keyboard, metal dome, touch
Plate (such as, detection due to touched and cause resistance, pressure, the sensitive component of change of electric capacity etc.), roller, rocking bar etc.
Deng.Especially, when touch pad is superimposed upon on display unit 151 as a layer, touch screen can be formed.
Interface unit 170 is used as at least one external device (ED) and is connected, with mobile terminal 100, the interface that can pass through.Such as,
External device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or nothing
Line FPDP, memory card port, for connect have the port of device of identification module, audio frequency input/output (I/O) end
Mouth, video i/o port, ear port etc..Identification module can be that storage is for verifying that user uses each of mobile terminal 100
Kind of information and subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM) can be included
Etc..It addition, the device (hereinafter referred to as " identifying device ") with identification module can be to take the form of smart card, therefore, know
Other device can be connected with mobile terminal 100 via port or other attachment means.Interface unit 170 may be used for receive from
The input (such as, data message, electric power etc.) of external device (ED) and the input received is transferred in mobile terminal 100
One or more elements or may be used between mobile terminal and external device (ED) transmit data.
It addition, when mobile terminal 100 is connected with external base, interface unit 170 can serve as allowing electricity by it
Power provides the path of mobile terminal 100 from base or can serve as allowing from the various command signals of base input by it
It is transferred to the path of mobile terminal.May serve as identifying that mobile terminal is from various command signals or the electric power of base input
The no signal being accurately fitted within base.Output unit 150 is configured to provide defeated with vision, audio frequency and/or tactile manner
Go out signal (such as, audio signal, video signal, alarm signal, vibration signal etc.).Output unit 150 can include display
Module 151, dio Output Modules 152, alarm modules 153 etc..
Display module 151 may be displayed on the information processed in mobile terminal 100.Such as, it is in electricity when mobile terminal 100
During words call mode, display module 151 can show and call or other (such as, text messaging, multimedia file that communicate
Download etc.) relevant user interface (UI) or graphic user interface (GUI).When mobile terminal 100 is in video calling pattern
Or during image capture mode, display module 151 can show image and/or the image of reception of capture, illustrate video or figure
UI or GUI of picture and correlation function etc..
Memorizer 160 can store the process performed by controller 180 and the software program controlling operation etc., or can
Temporarily to store the data (such as, telephone directory, message, still image, video etc.) that oneself maybe will export through output.And
And, memorizer 160 can with storage about when touch be applied to touch screen time the vibration of various modes of output and audio signal
Data.
Memorizer 160 can include that the storage medium of at least one type, described storage medium include flash memory, hard disk, many
Media card, card-type memorizer (such as, SD or DX memorizer etc.), random access storage device (RAM), static random-access store
Device (SRAM), read only memory (ROM), Electrically Erasable Read Only Memory (EEPROM), programmable read only memory
(PROM), magnetic storage, disk, CD etc..And, mobile terminal 100 can be connected execution memorizer with by network
The network storage device cooperation of the storage function of 160.
Controller 180 generally controls the overall operation of mobile terminal.Such as, controller 180 performs and voice call, data
Control that communication etc. is relevant and process.
Power subsystem 190 receives external power or internal power under the control of controller 180 and provides operation each unit
Suitable electric power needed for part and assembly.
Various embodiment described herein can be to use such as computer software, hardware or its any combination of calculating
Machine computer-readable recording medium is implemented.Implementing for hardware, embodiment described herein can be by using application-specific IC
(ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), scene can
Program gate array (FPGA), processor, controller, microcontroller, microprocessor, be designed to perform function described herein
At least one in electronic unit is implemented, and in some cases, such embodiment can be implemented in controller 180.
Software is implemented, the embodiment of such as process or function can with allow to perform the single of at least one function or operation
Software module is implemented.Software code can be come by the software application (or program) write with any suitable programming language
Implementing, software code can be stored in memorizer 160 and be performed by controller 180.
So far, oneself is through describing mobile terminal according to its function.Below, for the sake of brevity, will describe such as folded form,
Slide type mobile terminal in various types of mobile terminals of board-type, oscillating-type, slide type mobile terminal etc. is as showing
Example.Therefore, the present invention can be applied to any kind of mobile terminal, and is not limited to slide type mobile terminal.
It is described in detail below by way of specific embodiment.
First embodiment
Present embodiments providing a kind of device port and determine device, this device port determines that the application scenarios of device is,
Being simultaneously connected with multiple equipment on one station terminal, if there is the originating port saltus step simultaneously of at least two equipment, then terminal cannot be true
New port after locking equipment which saltus step corresponding.Namely equipment and terminal pass through physical interface during using device port
Connecting, when external equipment is restarted, device port will occur saltus step (such as being become COM2 by COM1 saltus step), causes the terminal cannot
Find the new port that this equipment is corresponding, thus data communication cannot be carried out with equipment, affect the experience of user.Based on before this
Putting, the device port provided by this enforcement determines device, it is possible to determine according to the characteristic that physical interface in terminal is constant
After port-hopping, equipment and the corresponding relation of new port, also determine which the new port that this equipment is corresponding is, thus ensure
Carry out data communication between terminal and equipment, promote with experiencing mutually.
Referring to Fig. 2, Fig. 2 and determine device schematic diagram for the device port that the present embodiment provides, this device port determines dress
Put and include:
Interface position matching module 21, if be used for detecting that the old port of at least two equipment occurs saltus step simultaneously, then will
After saltus step, the physical interface position of the physical interface position port old with before saltus step of new port is mated;
Device port determines module 22, if the thing of old port before the physical interface position of new port and saltus step after the saltus step
The match is successful for reason interface position, it is determined that the new port after saltus step is device port.
Wherein, if the old port that interface position matching module 21 is additionally operable to detect at least two equipment is jumped simultaneously
Become, then the physical interface position of each new port after acquisition saltus step, by physical interface position and the saltus step of new port arbitrary after saltus step
The physical interface position of front each old port is mated successively.
If device port determines that module 22 is additionally operable to after saltus step before the physical interface position of this new port and saltus step wherein one
The physical interface location matches success of Geju City port, it is determined that this new port after saltus step is device port.
Further, this device port determines that device also includes:
Memory module 23, for before the old port saltus step simultaneously at least two equipment being detected, by the thing of old port
Reason interface position stores.
Further, interface position matching module 21 is additionally operable to each equipment of being connected with terminal of detection and weighs the most simultaneously
Open, if at least two equipment being connected with terminal is restarted simultaneously, it is determined that the old port of described at least two equipment occurs simultaneously
Saltus step.
Above-mentioned each functional module perform function can be realized by the fractional hardware in Fig. 1, and in subsequent descriptions with
Various embodiments of the present invention are illustrated by particular hardware, and certainly, the function that each hardware performs also can be realized by above-mentioned functions module.
The function of above-mentioned each functional module is specifically realized by following hardware:
Interface position matching module 21 and device port determine that the function that module 22 performs can be real by controller 180
Existing, detect whether port occurs saltus step by controller 180, when port generation saltus step, determine which the port after saltus step has,
Then the physical interface position of saltus step rear port is obtained, by by each port before the physical interface position of saltus step rear port and saltus step
Physical interface position mate, until the match is successful, then it is assumed that equipment that saltus step front port is corresponding and saltus step rear port pair
The equipment answered is same equipment, and correspondingly, the new port that this equipment is corresponding is the above-mentioned saltus step rear port that the match is successful.
The function that memory module 23 performs can be realized by memorizer 160, and this memorizer 160 can store by controller
180 process performed and the software program controlling operation etc., or can temporarily store what oneself maybe will export through output
Data (such as, physical interface positional information of the physical interface positional information of saltus step front port, saltus step rear port etc.).
Terminal, when being attached with equipment, can be completed by interface unit 170, can be complete by this interface unit 170
Becoming the data communication of terminal and equipment, this interface unit 170 can include the data-interfaces such as USB, memory card interface, external power source
Interface etc..
Specifically, in the case of terminal (hereafter as a example by computer) is connected by physical interface with equipment, when an electricity
When being simultaneously connected with multiple equipment on brain, the physical interface position of equipment is preserved by memorizer 160, if controller 180 is examined
After measuring at least two equipment originating port saltus step in multiple equipment, physical interface position and the saltus step rear port that will preserve
Physical interface position is mated, if the match is successful for the two, then it is assumed that equipment corresponding to saltus step front port and saltus step rear port pair
The equipment answered is same equipment, then the port after saltus step is the new port of this equipment, and computer is continued with equipment by this new port
Continue and carry out data communication.The file needing transmission can be sent extremely by user by user input unit 130 (such as mouse and keyboard)
Equipment completes data communication.Need to understand, physical interface can be USB (Universal Serial Bus, USB (universal serial bus))
Physical interface etc..
More specifically, a computer is provided with at least two physical interface, then this computer can be inserted at least two equipment and carries out
Data are transmitted, and preserve the physical interface position of each equipment to memorizer 160.When controller 180 detects the equipment of insertion
In at least two when simultaneously restarting, the port generation saltus step that aforementioned at least two equipment is corresponding, the port after saltus step is new end
Mouthful, correspondingly, the port before saltus step is old port, and this new port number is all equal to old port number, equipment number.In these feelings
Under condition, controller 180 obtains the physical interface position of all new ports, by corresponding for any one the new end in all new ports
Physical interface position is mated with the physical interface position of had been friends in the past port, if the match is successful, then and this corresponding setting of new port
The standby equipment corresponding with the old port that the match is successful is same equipment, thus can determine that the new port of this equipment is and mates into
The new port of merit.
When terminal is carrying out data backup or simultaneously toward after download file in multiple equipment for multiple equipment simultaneously, Duo Geshe
The standby situation occurring restarting so that multiple device ports occur saltus step simultaneously, it is new that controller 180 occurs after first obtaining saltus step
Port, is then carried out the physical interface position of all of the port before the physical interface position of either port after saltus step and saltus step
Join, when the physical interface location matches success of one of them port before the physical interface position of this port and saltus step after saltus step, then
Determine that this port after saltus step is device port, data communication can be carried out by this device port.Aforementioned " multiple " are
Refer to two or more.
Further, said physical interface position can embody the corresponding relation of physical interface and device port, and the two is one
The mapping relations of one correspondence, by the comparison to the mapping relations table before and after saltus step, i.e. can determine that the new port of equipment, certainly,
These mapping relations are based on same PCI (Peripheral Component Interconnect, Peripheral Component Interconnect standard) interface
Bus.Below by representing physical interface and the mapping relations of equipment interface before and after saltus step respectively with two forms, specifically refer to
Tables 1 and 2.
Physical interface and the mapping table of device port before table 1 saltus step
In table 1, including two physical interface USB1 and USB2 and two device port COM44 and COM53, wherein,
USB1 with COM44 is corresponding, USB2 with COM53 is corresponding.Thus, the physical interface position of physical interface USB1 is:
PCIROOT(0)/PCI(27CC)/USBROOT(0)/USB(1)/Port(COM44);
The physical interface position of physical interface USB2 is:
PCIROOT(0)/PCI(27CC)/USBROOT(0)/USB(2)/Port(COM53)。
Above-mentioned physical interface position can be represented by tree structure, specifically refers to what Fig. 3, Fig. 3 provided for the present embodiment
The tree-like structure chart in physical interface position before port-hopping, can embody physical interface before saltus step intuitively by this tree structure figure
Corresponding relation with device port.Need to understand, the tree-like structure chart in physical interface position and Fig. 3 type after port-hopping, therefore this
It is not repeated.
Physical interface and the mapping table of device port after table 2 saltus step
Physical interface | Device port |
USB1 | COM69 |
USB2 | COM28 |
In table 2, including two physical interface USB1 and USB2 and two device port COM69 and COM28, wherein,
USB1 with COM69 is corresponding, USB2 with COM28 is corresponding.
Owing to an equipment is connected with computer by a USB physical interface, then Tables 1 and 2 all reflects existence two
Individual equipment, correspondingly, computer exists two USB physical interfaces.
For device port COM69, when determining equipment corresponding to this port, by the USB2 of USB1 Yu COM44 of COM69
Compare, find two USB differences, then it is assumed that the equipment that equipment corresponding for COM69 is corresponding with COM44 is distinct device, then
COM69 is not the port of equipment corresponding for COM44;Then the USB1 of USB1 with COM53 of COM69 is compared, find two
Individual USB is identical, then it is assumed that the equipment that equipment corresponding for COM69 is corresponding with COM53 is same equipment, then COM69 is this equipment
New port.
For device port COM28, when determining equipment corresponding to this port, by the USB2 of USB2 Yu COM44 of COM28
Compare, find that two USB are identical, then it is assumed that the equipment that COM28 corresponding device is corresponding with COM44 is same equipment, then
COM28 is the new port of this equipment.After the new port that equipment of determining is corresponding, no longer subsequent port is carried out this coupling.
Before port generation saltus step, first the USB physical interface position of equipment is stored in memorizer by controller 180,
Then the new port occurred after obtaining saltus step.When there is saltus step in multiple ports simultaneously, computer when to equipment sending data without
Method is determined and is sent by which new port, thus cannot complete correspondingly to download or the function such as backup, affects the use body of user
Test.Thus, by above-mentioned way of contrast, the problem that port-hopping can be solved with the characteristic that USB physical interface is constant, thus protect
File can be transferred to corresponding device to promote Consumer's Experience by card computer.
Further, when detecting port and whether saltus step occurring, first controller 180 detects each equipment being connected with terminal
Restarting, if detecting, at least two equipment being connected with terminal is restarted simultaneously, it is determined that described at least two equipment the most simultaneously
Old port there is saltus step simultaneously.After port generation saltus step being detected, complete follow-up according to physical interface location determining device
The step of new port.
The device port provided by the present embodiment determines device, when old port at least two equipment being detected is sent out simultaneously
Raw saltus step, then mate the physical interface position of the physical interface position port old with before saltus step of port new after saltus step;If
The physical interface location matches success of old port before the physical interface position of new port and saltus step after saltus step, it is determined that after saltus step
New port is device port so that equipment carries out data communication by this device port and terminal.The side provided by the present invention
Case, determines, according to the characteristic of physical interface invariant position, the new port that equipment is corresponding after port-hopping, thus ensures that port is jumped
The new port that equipment is corresponding can be effectively determined so that between equipment and terminal, data can be carried out by appropriate ports after change
Communication, completes to download accordingly, the work such as backup, meanwhile, also improves Consumer's Experience.
Second embodiment
Refer to mobile terminal and external equipment connection diagram that Fig. 4, Fig. 4 provide for the present embodiment.This mobile terminal
41 include that the device port in first embodiment determines device, device port are determined to the related description of device, the present embodiment
To no longer be described in detail, specifically refer to first embodiment.Power subsystem 190 in mobile terminal 41 is in the control of controller 180
System is lower to be received external power or internal power and provides the suitable electric power operated needed for each element and assembly, in the case, moves
Device port in dynamic terminal 41 determines that device is by by old port before the physical interface position of port new after saltus step and saltus step
Physical interface position carries out the corresponding relation mating to determine equipment with new port, thus completes the data biography of equipment and terminal room
Defeated.
In Fig. 4, including two external equipments (i.e. equipment) and two USB physical interfaces, respectively USB physical interface 42 He
USB physical interface 43, external equipment 44 and external equipment 45.External equipment 44 is by USB physical interface 42 and mobile terminal 41
Connecting, external equipment 45 is connected with mobile terminal 41 by USB physical interface 43.Determined outside after saltus step by mobile terminal 41
Two ports that portion's equipment 44 is the most corresponding with external equipment 45, then mobile terminal 41 is set with outside by two ports respectively
Data communication is carried out for 44 and external equipment 45.
Need to understand, aforementioned port is device port, can distinguish each external equipment, i.e. port numbers by equipment end slogan
As unique mark of each external equipment, mobile terminal can find the external equipment of correspondence to complete data according to this port numbers
Transmission;Said physical interface is used for connecting mobile terminal and external equipment, is provided with one or more thing the most on mobile terminals
Multiple external equipments are connected on mobile terminal by reason interface.
The mobile terminal that this enforcement provides determines, by device port, the physical bit of new port that device will occur after saltus step
The physical location putting port old with before saltus step mates, it is ensured that can effectively determine the new end that equipment is corresponding after port-hopping
Mouthful so that data communication can be carried out by appropriate ports between equipment and terminal, thus promote the experience of user, keep away
The problem exempting from port-hopping occurs.
3rd embodiment
As it is shown in figure 5, Fig. 5 determines method flow diagram for the device port that the present embodiment provides, what the present embodiment provided sets
Standby port determines that the method device port corresponding with first embodiment determines that device is corresponding, therefore no longer does partial content specifically
Bright, illustrate the relevant portion referring to first embodiment.The method comprises the following steps:
S51, if detecting there is saltus step in the old port of at least two equipment simultaneously, then connect by the physics of port new after saltus step
The physical interface position of mouth position port old with before saltus step is mated.
Specifically, in the case of terminal (hereafter as a example by computer) is connected by physical interface with equipment, when an electricity
When being simultaneously connected with multiple equipment on brain, the physical interface position of equipment is preserved by memorizer 160, if controller 180 is examined
After measuring at least two equipment originating port saltus step in multiple equipment, physical interface position and the saltus step rear port that will preserve
Physical interface position is mated.
More specifically, when at least two during controller 180 detects the equipment of insertion is restarted simultaneously, aforementioned at least two
The port generation saltus step that individual equipment is corresponding, the port after saltus step is new port, and correspondingly, the port before saltus step is old port, should
New port number is all equal to old port number, equipment number.In the case, controller 180 obtains the thing of all new ports
Reason interface position, connects the physics of physical interface position corresponding for any one the new end in all new ports with had been friends in the past port
Mouth position is mated, so that it is determined that go out the new port that equipment is corresponding.
It is that restarting occurs in equipment it may is that terminal is multiple equipment carries out data backup or set toward multiple simultaneously simultaneously
Standby middle download file, then needs to have restarted equipment subsequent operation, aforementioned " multiple " refer to two or two with
On.
S52, if the physical interface location matches success of old port before the physical interface position of new port and saltus step after saltus step,
Then determine that the new port after saltus step is device port.
Specifically, if the physical interface position of the physical interface position port old with after saltus step of new port is not mated after saltus step
Success, then continue the physical interface position of new port and please mate his the physical interface position of old port, until saltus step
The physical interface position consistency of front and back end ports is to belong to same equipment before and after judging saltus step.
Further, said physical interface position can embody the corresponding relation of physical interface and device port, and the two is one
The mapping relations of one correspondence, by the comparison to the mapping relations table before and after saltus step, i.e. can determine that the new port of equipment, certainly,
These mapping relations are based on same pci interface bus.Physical interface and equipment before and after saltus step will be represented respectively below with two forms
The mapping relations of interface, specifically refer to the Tables 1 and 2 in embodiment one.
In Table 1, including two physical interface USB1 and USB2 and two device port COM44 and COM53, wherein,
USB1 with COM44 is corresponding, USB2 with COM53 is corresponding.Thus, the physical interface position of physical interface USB1 is:
PCIROOT(0)/PCI(27CC)/USBROOT(0)/USB(1)/Port(COM44);
The physical interface position of physical interface USB2 is:
PCIROOT(0)/PCI(27CC)/USBROOT(0)/USB(2)/Port(COM53)。
Above-mentioned physical interface position can be represented by tree structure, specifically refers to Fig. 3, by the tree structure in Fig. 3
Figure can embody physical interface and the corresponding relation of device port before saltus step intuitively.Need to understand, physical interface after port-hopping
The tree-like structure chart in position and Fig. 3 type, therefore this is not repeated.
In table 2, including two physical interface USB1 and USB2 and two device port COM69 and COM28, wherein,
USB1 with COM69 is corresponding, USB2 with COM28 is corresponding.
Owing to an equipment is connected with computer by a USB physical interface, then Tables 1 and 2 all reflects existence two
Individual equipment, correspondingly, computer exists two USB physical interfaces.
For device port COM69, when determining equipment corresponding to this port, by the USB2 of USB1 Yu COM44 of COM69
Compare, find two USB differences, then it is assumed that the equipment that equipment corresponding for COM69 is corresponding with COM44 is distinct device, then
COM69 is not the port of equipment corresponding for COM44;Then the USB1 of USB1 with COM53 of COM69 is compared, find two
Individual USB is identical, then it is assumed that the equipment that equipment corresponding for COM69 is corresponding with COM53 is same equipment, then COM69 is this equipment
New port.
For device port COM28, when determining equipment corresponding to this port, by the USB2 of USB2 Yu COM44 of COM28
Compare, find that two USB are identical, then it is assumed that the equipment that COM28 corresponding device is corresponding with COM44 is same equipment, then
COM28 is the new port of this equipment.After the new port that equipment of determining is corresponding, no longer subsequent port is carried out this coupling.
Before port generation saltus step, first the USB physical interface position of equipment is stored in memorizer by controller 180,
Then the new port occurred after obtaining saltus step.When there is saltus step in multiple ports simultaneously, computer when to equipment sending data without
Method is determined and is sent by which new port, thus cannot complete correspondingly to download or the function such as backup, affects the use body of user
Test.Thus, by above-mentioned way of contrast, the problem that port-hopping can be solved with the characteristic that USB physical interface is constant, thus protect
File can be transferred to corresponding device to promote Consumer's Experience by card computer.
Further, when detecting port and whether saltus step occurring, first controller 180 detects each equipment being connected with terminal
Restarting, if detecting, at least two equipment being connected with terminal is restarted simultaneously, it is determined that described at least two equipment the most simultaneously
Old port there is saltus step simultaneously.After port generation saltus step being detected, complete follow-up according to physical interface location determining device
The step of new port.
Method is determined, when old port at least two equipment being detected occurs saltus step, then simultaneously by the said equipment port
The physical interface position of the physical interface position port old with before saltus step of port new after saltus step is mated;If newly holding after saltus step
The physical interface location matches success of old port before the physical interface position of mouth and saltus step, it is determined that the new port after saltus step is for setting
Standby port so that equipment carries out data communication by this device port and terminal, also promotes the experience of user simultaneously.
4th embodiment
The present embodiment is based on the device port that the 3rd embodiment provides determines method, with two external equipments and computer
As a example by the present invention will be described, specific as follows:
Before port-hopping, i.e. can determine that the port of each external equipment when of inserting two external equipments on computers, outward
The port of portion's equipment 1 is COM44, and the port of external equipment 2 is COM53.
Computer obtains the physical interface position of saltus step front port COM44 (external equipment 1):
PCIROOT(0)/PCI(27CC)/USBROOT(0)/USB(1)/Port(COM44);
Computer obtains the physical interface position of saltus step front port COM53 (external equipment 2):
PCIROOT(0)/PCI(27CC)/USBROOT(0)/USB(2)/Port(COM53)。
Then, computer detection is restarted to external equipment 1 and external equipment 2 simultaneously so that port COM44 and port COM53
There is saltus step simultaneously, new port COM28 and COM69 occurs after saltus step.
Computer obtains the physical interface position of saltus step rear port COM28:
PCIROOT(0)/PCI(27CC)/USBROOT(0)/USB(2)/Port(COM28);
Computer obtains the physical interface position of saltus step rear port COM69:
PCIROOT(0)/PCI(27CC)/USBROOT(0)/USB(1)/Port(COM69)。
Finally, for the physical interface position before saltus step and after saltus step, no matter how port changes, the physical interface of equipment
Position does not changes, in the case, by the thing of all of the port before the physical interface position of port each after saltus step and saltus step
Reason interface position mates successively, until the physical interface position before saltus step and the physical interface position consistency after saltus step, then
Think that the two belongs to same external equipment, such that it is able to new port and the corresponding relation of equipment after obtaining saltus step:
New port after equipment 1 port COM44 saltus step is COM69;
New port after equipment 2 port COM53 saltus step is COM28.
Need to understand, the device port that the present embodiment provides determines that mode is that the characteristic according to physical interface invariant position solves
The certainly problem of port-hopping, namely before port generation saltus step, the physical interface position of each equipment is preserved.Once hold
Mouthful there is saltus step, it is possible to obtain the physical interface position of new port after whole saltus step, and one by one with saltus step before the thing of each port
Reason interface position mates, as long as the physical interface position of new port and the physical interface position consistency of old port, then can sentence
It is same equipment both fixed.Said physical interface position is consistent, refer to PCIROOT (0)/PCI (27CC)/USBROOT (0)/
USB (2) or PCIROOT (0)/PCI (27CC)/USBROOT (0)/this part physical position consistency of USB (1), this part can body
Reveal the position of USB physical interface, as long as the position consistency of this part physical interface is just it is believed that belong to same and set before and after saltus step
Standby.This part does not comprise port position, due to port position meeting saltus step, therefore, comprises the physical interface of port position
Before and after position hopping different all the time.
The device port provided by the present embodiment determines method, it is possible to the problem efficiently solving port-hopping, determines
The new port that after bar change, equipment is corresponding, thus complete the data communication of terminal and equipment, promote the experience of user.
It should be noted that in this article, term " includes ", " comprising " or its any other variant are intended to non-row
Comprising of his property, so that include that the process of a series of key element, method, article or device not only include those key elements, and
And also include other key elements being not expressly set out, or also include intrinsic for this process, method, article or device
Key element.In the case of there is no more restriction, statement " including ... " key element limited, it is not excluded that including this
The process of key element, method, article or device there is also other identical element.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive above-described embodiment side
Method can add the mode of required general hardware platform by software and realize, naturally it is also possible to by hardware, but a lot of in the case of
The former is more preferably embodiment.Based on such understanding, prior art is done by technical scheme the most in other words
The part going out contribution can embody with the form of software product, and this computer software product is stored in a storage medium
In (such as ROM/RAM, magnetic disc, CD), including some instructions with so that a station terminal equipment (can be mobile phone, computer, take
Business device, air-conditioner, or the network equipment etc.) perform the method described in each embodiment of the present invention.
Above in conjunction with accompanying drawing, embodiments of the invention are described, but the invention is not limited in above-mentioned concrete
Embodiment, above-mentioned detailed description of the invention is only schematic rather than restrictive, those of ordinary skill in the art
Under the enlightenment of the present invention, in the case of without departing from present inventive concept and scope of the claimed protection, it may also be made that a lot
Form, within these belong to the protection of the present invention.
Claims (10)
1. a device port determines device, it is characterised in that including:
Interface position matching module, if for detecting that the old port of at least two equipment occurs saltus step, then by after saltus step simultaneously
The physical interface position of the physical interface position port old with before saltus step of new port is mated;
Device port determines module, if the physical interface of old port before the physical interface position of new port and saltus step after the saltus step
Location matches success, it is determined that the new port after saltus step is device port.
2. device port as claimed in claim 1 determines device, it is characterised in that if described interface position matching module is used for
Detect that the old port of at least two equipment occurs saltus step, then the physical interface position of each new port after acquisition saltus step simultaneously, will
After saltus step, the physical interface position of the physical interface position of arbitrary new port old port each with before saltus step is mated successively;
If described device port determines module, after saltus step, before the physical interface position of this new port and saltus step, one of them is old
The physical interface location matches success of port, it is determined that this new port after saltus step is device port.
3. device port as claimed in claim 1 determines device, it is characterised in that also include:
Memory module, for before the old port saltus step simultaneously at least two equipment being detected, by the physics of described old port
Interface position stores.
4. the device port as described in any one of claim 1-3 determines device, it is characterised in that described interface position coupling mould
Each equipment that block is connected with terminal for detection is restarted the most simultaneously, if at least two equipment being connected with terminal is restarted simultaneously,
Then determine that the old port of described at least two equipment occurs saltus step simultaneously.
5. a terminal, it is characterised in that include that the device port as described in any one of claim 1-4 determines device;
Described device port determine device determine saltus step after device port;
Described terminal carries out data communication by described device port and equipment.
6. a device port determines method, it is characterised in that including:
If detecting there is saltus step in the old port of at least two equipment simultaneously, then by the physical interface position of port new after saltus step with
Before saltus step, the physical interface position of old port is mated;
If the physical interface location matches success of old port before the physical interface position of new port and saltus step after saltus step, it is determined that jump
New port after change is device port.
7. device port as claimed in claim 6 determines method, it is characterised in that described method includes:
If detecting there is saltus step, then the physical interface position of each new port after acquisition saltus step in the old port of at least two equipment simultaneously
Put;
The physical interface position of the physical interface position old port each with before saltus step of new port arbitrary after saltus step is mated successively;
If the physical interface position of this new port becomes with the physical interface location matches of one of them old port before saltus step after saltus step
Merit, it is determined that this new port after saltus step is device port.
8. device port as claimed in claim 7 determines method, it is characterised in that the physics of new port after described acquisition saltus step
Interface position includes:
Obtain the new port after saltus step;
The physical interface position of new port is determined according to the new port after saltus step.
9. device port as claimed in claim 6 determines method, it is characterised in that at the described at least two equipment that detects
Before the saltus step simultaneously of old port, also include:
The physical interface position of described old port is stored.
10. the device port as described in any one of claim 6-9 determines method, it is characterised in that described detection at least two
The saltus step simultaneously of the old port of equipment includes:
Each equipment that detection is connected with terminal is restarted the most simultaneously;
If at least two equipment being connected with terminal is restarted simultaneously, it is determined that the old port of described at least two equipment occurs simultaneously
Saltus step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610597301.6A CN106201930B (en) | 2016-07-26 | 2016-07-26 | A kind of device port determining device, terminal and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610597301.6A CN106201930B (en) | 2016-07-26 | 2016-07-26 | A kind of device port determining device, terminal and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106201930A true CN106201930A (en) | 2016-12-07 |
CN106201930B CN106201930B (en) | 2019-09-13 |
Family
ID=57496360
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610597301.6A Active CN106201930B (en) | 2016-07-26 | 2016-07-26 | A kind of device port determining device, terminal and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106201930B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108021520A (en) * | 2017-11-30 | 2018-05-11 | 深圳市华德安科技有限公司 | Display methods, device and the computer-readable recording medium of access device title |
CN115277135A (en) * | 2022-07-15 | 2022-11-01 | 中国人民解放军国防科技大学 | Dynamic safety protection method based on tunnel technology and application |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101287219A (en) * | 2008-04-15 | 2008-10-15 | 深圳华为通信技术有限公司 | Method and apparatus for automatic switching port of terminal apparatus, and automatic switching system |
CN101963950A (en) * | 2010-09-30 | 2011-02-02 | 北京飞天诚信科技有限公司 | Method for positioning USB port in connection of device |
-
2016
- 2016-07-26 CN CN201610597301.6A patent/CN106201930B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101287219A (en) * | 2008-04-15 | 2008-10-15 | 深圳华为通信技术有限公司 | Method and apparatus for automatic switching port of terminal apparatus, and automatic switching system |
CN101963950A (en) * | 2010-09-30 | 2011-02-02 | 北京飞天诚信科技有限公司 | Method for positioning USB port in connection of device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108021520A (en) * | 2017-11-30 | 2018-05-11 | 深圳市华德安科技有限公司 | Display methods, device and the computer-readable recording medium of access device title |
CN115277135A (en) * | 2022-07-15 | 2022-11-01 | 中国人民解放军国防科技大学 | Dynamic safety protection method based on tunnel technology and application |
CN115277135B (en) * | 2022-07-15 | 2023-10-27 | 中国人民解放军国防科技大学 | Dynamic safety protection method based on tunnel technology and application |
Also Published As
Publication number | Publication date |
---|---|
CN106201930B (en) | 2019-09-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11295035B2 (en) | Application freezing management method, device and terminal | |
EP3197059B1 (en) | Method for controlling sim card and sd card and electronic device implementing the same | |
US20160157033A1 (en) | Method and apparatus for identifying foreign substances in connectors | |
US9986082B2 (en) | Interface device and method between electronic device and external device using ear jack of the electronic device | |
US10409249B2 (en) | Method for controlling power supply and electronic device implementing the same | |
CN106453802A (en) | Cipher verification method and device, and terminal | |
CN106778295B (en) | File storage method, file display method, file storage device, file display device and terminal | |
CN108052407A (en) | A kind of application crash means of defence, device, equipment and storage medium | |
US10909232B2 (en) | Terminal verification method, terminal device, and computer readable storage medium | |
CN112996020A (en) | Bluetooth-based automatic testing method and device and Bluetooth testing terminal | |
CN112528266A (en) | Visiting registration method and related device | |
CN104065742A (en) | Picking-up person information processing method and device for safe kindergarten picking up | |
KR102538837B1 (en) | Electrnic device for overvoltage prevention | |
CN106201930A (en) | A kind of device port determines device, terminal and method | |
CN107548055B (en) | Multi-region SIM card selection method, system and device and industrial personal computer | |
CN105740719A (en) | Wireless safe USB (Universal Serial Bus) flash disk and implementation method thereof | |
CN112711955A (en) | NFC information transmission method, NFC information transmission device and NFC terminal | |
US20110195750A1 (en) | Application expanding docking apparatus and electrical system thereof | |
US9973869B2 (en) | Electronic device and noise canceling method thereof | |
US20180260549A1 (en) | Contact information display method and device, and information display method and device | |
CN110875895A (en) | Method, system, equipment and vehicle for realizing intelligent terminal software login | |
CN108668236B (en) | Tracking method and device of terminal equipment and terminal equipment | |
US20160360568A1 (en) | SSIC device and link control method for SSIC device | |
CN113535578A (en) | CTS (clear to send) testing method, device and testing equipment | |
CN106204261A (en) | A kind of information processing method, terminal and server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |