CN107426414A - It is a kind of that information approach, terminal and computer-readable recording medium are obtained by peripheral hardware - Google Patents
It is a kind of that information approach, terminal and computer-readable recording medium are obtained by peripheral hardware Download PDFInfo
- Publication number
- CN107426414A CN107426414A CN201710448550.3A CN201710448550A CN107426414A CN 107426414 A CN107426414 A CN 107426414A CN 201710448550 A CN201710448550 A CN 201710448550A CN 107426414 A CN107426414 A CN 107426414A
- Authority
- CN
- China
- Prior art keywords
- terminal
- peripheral
- peripheral hardware
- exterior terminal
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72409—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4411—Configuring for operating with peripheral devices; Loading of device drivers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/06—Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
Abstract
Information approach, terminal and computer-readable recording medium are obtained by peripheral hardware the invention discloses one kind, comprised the following steps:The peripheral hardware list information of exterior terminal broadcast is received, peripheral hardware list information includes at least one peripheral hardware that exterior terminal is supported;Receive the target peripheral that user selects from peripheral hardware list information;The request for opening its target peripheral is sent to exterior terminal;The data message sent back from exterior terminal is received, data message includes the data that exterior terminal is got according to request opening target peripheral;Using such scheme, local terminal terminal is allowd to get the data message got by the peripheral hardware by peripheral hardware, the peripheral hardware belongs to exterior terminal, in the case where the performance of peripheral hardware is powerful, the data message that then local terminal terminal is got is high quality, realize on the premise of hardware cost or increase additional hardware structure design change is not increased, realize peripheral hardware it is efficient using and it is effectively shared, improve Consumer's Experience.
Description
Technical field
The present invention relates to field of terminal technology, more specifically to one kind by peripheral hardware obtain information approach, terminal and
Computer-readable recording medium.
Background technology
At present, for some high-performance peripheral hardwares, for the influence for the factor such as cost is high, power consumption is big, inconvenience is equipped on hand-held
Terminal, but this kind of high-performance peripheral hardware is present in the terminals such as personal PC (Personal Computer, personal computer).
For example, lack the sensor of similar light sensation in traditional car-mounted terminal, and now also can be certainly substantially on mobile phone
With this kind of sensor, so as to applied to light sensing scene.In another example it is difficult to carry high performance GPU (Graphics on mobile phone
Processing Unit, graphics processor) chip, and then handset image disposal ability has been had influence on, and on personal PC typically all
There are the GPU chips that performance comparision is strong, if more preferable use can be harvested by the GPU on personal PC for handset image processing
Experience at family.
But push away some outer rhetoric questions of the inconvenience carrying such as city, and handheld terminal currently for continually developing for new peripheral hardware
Inscribe, do not solve method well also, that is, can not realize that the efficient of peripheral resources is shared using with effective.
The content of the invention
It is a kind of by peripheral hardware acquisition information approach, terminal and computer-readable storage it is a primary object of the present invention to propose
Medium, it is intended to solve in the prior art, the problem of terminal can not carry some peripheral hardwares.
In order to solve the above technical problems, the present invention provides one kind obtains information approach by peripheral hardware, obtained and believed by peripheral hardware
Breath method comprises the following steps:
The peripheral hardware list information of exterior terminal broadcast is received, peripheral hardware list information includes at least one of exterior terminal support
Peripheral hardware;
Receive the target peripheral that user selects from peripheral hardware list information;
The request for opening its target peripheral is sent to exterior terminal;
The data message sent back from exterior terminal is received, data message includes exterior terminal and opened according to request outside target
If the data got.
Wherein, before the peripheral hardware list information for receiving exterior terminal broadcast, the method for information is obtained by peripheral hardware also to be included:
Generic device driver is created in local terminal terminal, and creates the first finger daemon;
After receiving the target peripheral that user selects from peripheral hardware list information, the method for information is obtained also by peripheral hardware
Including:
Generic device driver receives the order for establishing local target peripheral node that the first finger daemon issues;
Generic device driver creates the target peripheral driver of corresponding types according to the type of target peripheral, and
The local target peripheral node according to corresponding to creating target peripheral driver;
Target peripheral driver after the request of opening target peripheral of user's transmission is received, into it is outside eventually
End sends the step of request for opening its target peripheral;
The request of its target peripheral is opened to exterior terminal transmission to be included:Sent by the first finger daemon to exterior terminal
Open the request of its target peripheral;
Receiving the data message sent back from exterior terminal includes:
First finger daemon receives the data message that is sent back from exterior terminal, and by data message by local target outside
If node reports upper layer application.
Wherein, generic device driver is created in local terminal terminal, and create the first finger daemon to include:In local terminal terminal
The Realtime Operating System Nucleus layer create generic device driver, and operating system create the first finger daemon.
Wherein, before the peripheral hardware list information of exterior terminal broadcast is received, the method that information is obtained by peripheral hardware is also wrapped
Include:
The second finger daemon is created in exterior terminal;
First finger daemon sends pairing request to the second finger daemon;
In pairing request in the case of, into receive exterior terminal broadcast peripheral hardware list information the step of.
Wherein, receiving the peripheral hardware list information of exterior terminal broadcast includes:
Receive the peripheral hardware list information that exterior terminal is broadcasted by the second finger daemon.
Wherein, receiving the peripheral hardware list information that exterior terminal is broadcasted by the second finger daemon includes:
Open the first idle port of transmission control protocol;
Second finger daemon broadcasts peripheral hardware list information by the first idle port;
Open the second idle port of transmission control protocol;
Local terminal terminal receives peripheral hardware list information by the second idle port.
Wherein, opening the request of its target peripheral to exterior terminal transmission by the first finger daemon includes:
Open the 3rd idle port of transmission control protocol;
By the 3rd idle port and by the first finger daemon asking for its target peripheral of opening is sent to exterior terminal
Ask.
Wherein, the first finger daemon receives the data message sent back from exterior terminal and included:
Open the second idle port of transmission control protocol;
The data message sent back from exterior terminal is received by the second idle port and the first finger daemon.
Further, the present invention provides a kind of terminal, and terminal includes memory and processor;
Processor be used for perform stored in memory by peripheral hardware obtain information programme, to realize following steps:
The peripheral hardware list information of exterior terminal broadcast is received, peripheral hardware list information includes at least one of exterior terminal support
Peripheral hardware;
Receive the target peripheral that user selects from peripheral hardware list information;
The request for opening its target peripheral is sent to exterior terminal;
The data message sent back from exterior terminal is received, data message includes exterior terminal and opened according to request outside target
If the data got.
Further, the present invention provides a kind of computer-readable recording medium, and computer-readable recording medium storage has one
Individual or multiple programs, one or more program can be by one or more computing devices, to realize following steps:
The peripheral hardware list information of exterior terminal broadcast is received, peripheral hardware list information includes at least one of exterior terminal support
Peripheral hardware;
Receive the target peripheral that user selects from peripheral hardware list information;
The request for opening its target peripheral is sent to exterior terminal;
The data message sent back from exterior terminal is received, data message includes exterior terminal and opened according to request outside target
If the data got.
Beneficial effect
Information approach, terminal and computer-readable recording medium are obtained by peripheral hardware the invention provides one kind, this passes through
Peripheral hardware obtains information approach and comprised the following steps:The peripheral hardware list information of exterior terminal broadcast is received, peripheral hardware list information includes
At least one peripheral hardware that exterior terminal is supported;Receive the target peripheral that user selects from peripheral hardware list information;To outside eventually
End sends the request for opening its target peripheral;The data message sent back from exterior terminal is received, data message includes outside whole
The data that end is got according to request opening target peripheral;Using such scheme so that local terminal terminal can be obtained by peripheral hardware
To the data message got by the peripheral hardware, the peripheral hardware belongs to exterior terminal, in the case where the performance of peripheral hardware is powerful, then
The data message that local terminal terminal is got is high quality, realize do not increase hardware cost or increase additional hardware structure set
On the premise of meter changes, realize the efficient of peripheral hardware and utilize and effectively share, improve Consumer's Experience.
Brief description of the drawings
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is the hardware architecture diagram for realizing each optional terminal of embodiment one of the present invention;
Fig. 2 is a kind of flow chart that information approach is obtained by peripheral hardware that first embodiment of the invention provides;
Fig. 3 is the signal that a kind of local terminal terminal that each embodiment of the present invention provides carries out information exchange with exterior terminal
Figure;
Fig. 4 is a kind of schematic diagram for terminal that second embodiment of the invention provides.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Describe to realize the terminal of each embodiment of the present invention referring now to accompanying drawing.In follow-up description, using for
The suffix of such as " module ", " part " or " unit " of element is represented only for being advantageous to the explanation of the present invention, itself is not
There is specific meaning.Therefore, " module " can be used mixedly with " part ".
Terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as mobile phone, flat board
Computer, notebook computer, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable
Media player (Portable Media Player, PMP), guider, wearable device, Intelligent bracelet, pedometer etc. move
Dynamic terminal, and the fixed terminal such as digital TV, desktop computer.
It will be appreciated by those skilled in the art that in addition to being used in particular for moving the element of purpose, according to the present invention's
The construction of embodiment can also apply to the terminal of fixed type.
Referring to Fig. 1, its hardware architecture diagram for each optional terminal of embodiment one of the realization present invention, the end
End 100 can include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103, A/V
(audio/video) input block 104, sensor 105, display unit 106, user input unit 107, interface unit 108, storage
The parts such as device 109, processor 110 and power supply 111.It will be understood by those skilled in the art that the terminal structure shown in Fig. 1
The not restriction of structure paired terminal, terminal can be included than illustrating more or less parts, either combine some parts or
Different part arrangements.
The all parts of terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, the reception and transmission of signal, specifically, by base station
Downlink information receive after, handled to processor 110;In addition, up data are sent to base station.Generally, radio frequency unit 101
Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrate
Frequency unit 101 can also be communicated by radio communication with network and other equipment.Above-mentioned radio communication can use any communication
Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications
System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code
Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division
Multiple Access, WCDMA), TD-SCDMA (Time Division-Synchronous Code
Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division
Duplexing-Long Term Evolution, FDD Long Term Evolution) and TDD-LTE (Time Division
Duplexing-Long Term Evolution, time division duplex Long Term Evolution) etc..
WiFi belongs to short range wireless transmission technology, and terminal can help user's transceiver electronicses postal by WiFi module 102
Part, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.
Audio output unit 103 can be in call signal reception pattern, call mode, logging mode, language in terminal 100
It is receiving or depositing by radio frequency unit 101 or WiFi module 102 when under the isotypes such as sound recognition mode, broadcast reception mode
It is sound that the voice data stored in reservoir 109, which is converted into audio signal and exported,.Moreover, audio output unit 103 may be used also
With the specific function provided to terminal 100 performs, related audio output is (for example, call signal receives sound, message sink sound
Sound etc.).Audio output unit 103 can include loudspeaker, buzzer etc..
A/V input blocks 104 are used to receive audio or video signal.A/V input blocks 104 can include graphics processor
(Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode
Or the static images or the view data of video obtained in image capture mode by image capture apparatus (such as camera) are carried out
Reason.Picture frame after processing may be displayed on display unit 106.Picture frame after the processing of graphics processor 1041 can be deposited
Storage is transmitted in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike
Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042
Quiet down sound (voice data), and can be voice data by such acoustic processing.Audio (voice) data after processing can
To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model.
Microphone 1042 can implement various types of noises and eliminate (or suppression) algorithm to eliminate (or suppression) in reception and send sound
Caused noise or interference during frequency signal.
Terminal 100 also includes at least one sensor 105, such as optical sensor, motion sensor and other sensors.
Specifically, optical sensor includes ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to ambient light
Light and shade adjusts the brightness of display panel 1061, and proximity transducer can close display panel when terminal 100 is moved in one's ear
1061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (generally three axles) and add
The size of speed, size and the direction of gravity are can detect that when static, application (such as the horizontal/vertical screen available for identification mobile phone posture
Switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;As for mobile phone also
Configurable fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, hygrometer, temperature
The other sensors such as meter, infrared ray sensor, will not be repeated here.
Display unit 106 is used for the information for showing the information inputted by user or being supplied to user.Display unit 106 can wrap
Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used
Forms such as (Organic Light-Emitting Diode, OLED) configures display panel 1061.
User input unit 107 can be used for the numeral or character information for receiving input, and produce the user with terminal 100
Set and function control it is relevant key signals input.Specifically, user input unit 107 may include contact panel 1071 and
Other input equipments 1072.Contact panel 1071, also referred to as touch-screen, collect touch operation of the user on or near it
(for example user uses any suitable objects or annex such as finger, stylus on contact panel 1071 or in contact panel 1071
Neighbouring operation), and corresponding attachment means are driven according to formula set in advance.Contact panel 1071 may include touch detection
Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band
The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it
Contact coordinate is converted into, then gives processor 110, and the order sent of reception processing device 110 and can be performed.In addition, can
To realize contact panel 1071 using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves.Except contact panel
1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap
Include but be not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc.
One or more, do not limit herein specifically.
Further, contact panel 1071 can cover display panel 1061, detect thereon when contact panel 1071 or
After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing
The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, contact panel 1071 and display panel
1061 be the part independent as two to realize the input of mobile terminal and output function, but in certain embodiments, can
Input and the output function of terminal are realized so that contact panel 1071 and display panel 1061 is integrated, is not limited herein specifically
It is fixed.
Interface unit 108 is connected the interface that can pass through as at least one external device (ED) with terminal 100.It is for example, outside
Device can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or wireless number
According to port, memory card port, for connecting the port of device with identification module, audio input/output (I/O) port, regarding
Frequency I/O ports, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, data are believed
Breath, electric power etc.) and one or more elements that the input received is transferred in terminal 100 or can be used at end
Data are transmitted between end 100 and external device (ED).
Memory 109 can be used for storage software program and various data.Memory 109 can mainly include storing program area
And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function
Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as
Voice data, phone directory etc.) etc..In addition, memory 109 can include high-speed random access memory, can also include non-easy
The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of terminal 100, utilizes each of various interfaces and the whole terminal 100 of connection
Part, by running or performing the software program and/or module that are stored in memory 109, and call and be stored in memory
Data in 109, the various functions and processing data of terminal 100 are performed, so as to carry out integral monitoring to terminal 100.Processor
110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modem processor,
Wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor mainly handles nothing
Line communicates.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Although Fig. 1 is not shown, terminal 100 can also will not be repeated here including bluetooth module etc..
Based on above-mentioned terminal hardware structure, below by way of specific embodiment, the present invention is described in detail.
First embodiment
Present embodiments provide one kind and information approach is obtained by peripheral hardware, referring to Fig. 2, Fig. 2 is one that the present embodiment provides
Kind obtains the flow chart of information approach by peripheral hardware, should obtain information approach by peripheral hardware and comprise the following steps:
S201:The peripheral hardware list information of exterior terminal broadcast is received, peripheral hardware list information includes exterior terminal and supported extremely
A few peripheral hardware;
The peripheral hardware list information of exterior terminal broadcast is received by local terminal terminal;Peripheral hardware belongs to exterior terminal;Peripheral hardware bag
Camera (camera) peripheral hardware, Input (input equipment) peripheral hardware, GPU peripheral hardwares etc. are included, wherein, Input peripheral hardwares include touch-screen, touched
Template etc..
Optionally, before the peripheral hardware list information that S201 receives exterior terminal broadcast, the side of information is obtained by peripheral hardware
Method also includes:
A generic device driver is created in local terminal terminal, and creates first finger daemon;
Generic device driver can be platform device drives;
Such as local terminal terminal creates platform device bus, equipment and driving, starting up.By platform equipment
Interface is write, is exposed to the first finger daemon.
The generic device driver is responsible for the peripheral hardware in exterior terminal being modeled to local peripheral hardware, can establish one
Platform device driver models, and the read-write interface of platform device drivers is realized, platform equipment is driven
The interface of writing of dynamic program completes following function:Receive the foundation local target peripheral node that local terminal the first finger daemon of terminal issues
Order;And according to specific target peripheral type, create the target peripheral driver of corresponding types, target peripheral driving
The effect of program is local target peripheral node corresponding to establishment;Meanwhile it can also realize and receive the number that the first finger daemon issues
According to and by local target peripheral node reported event.
Wherein, generic device driver is created in local terminal terminal, and create the first finger daemon to include:In local terminal terminal
Kernel (real time operating system) inner nuclear layer create a generic device driver, and operating system create one first
Finger daemon.
Optionally, before the peripheral hardware list information that S201 receives exterior terminal broadcast, the side of information is obtained by peripheral hardware
Method also includes:
The second finger daemon is created in exterior terminal;
First finger daemon sends pairing request to the second finger daemon;
In pairing request in the case of, into S201 receive exterior terminal broadcast peripheral hardware list information the step of.
Wherein, receiving the peripheral hardware list information of exterior terminal broadcast includes:
Receive the peripheral hardware list information that exterior terminal is broadcasted by the second finger daemon.
Namely start second finger daemon in exterior terminal, complete with the pairing of local terminal terminal, and by this
The peripheral hardware list information of exterior terminal is broadcasted by two finger daemons.
Optionally, receiving the peripheral hardware list information that exterior terminal is broadcasted by the second finger daemon includes:
Open TCP (Transmission Control Protocol, transmission control protocol) the first idle port;
Second finger daemon broadcasts peripheral hardware list information by the first idle port;
Open TCP the second idle port;
Local terminal terminal receives peripheral hardware list information by the second idle port.
Wherein, the first idle port, the second idle port are unappropriated port, such as end of the numbering more than 3000
Mouthful, or numbering is in the range of 2000 to 3000 and unappropriated port;Such as first idle port be 3006 ports,
Second idle port is 3008 ports;
First idle port, the second idle port can be same port, for example, can be 3006 ports, or
It is 3008 ports.
S202:Receive the target peripheral that user selects from peripheral hardware list information;
Receive exterior terminal broadcast peripheral hardware list information after, eject the peripheral hardware list information to user, by with
Family selection uses the peripheral resources of exterior terminal;
Such as exterior terminal broadcast peripheral hardware list information include Camera peripheral hardwares, Input peripheral hardwares and GPU peripheral hardwares these three
Peripheral hardware, user have selected Camera peripheral hardwares, then using Camera peripheral hardwares as target peripheral.
Optionally, after the target peripheral that S202 receives that user selects from peripheral hardware list information, obtained by peripheral hardware
The method of breath of winning the confidence also includes:
Generic device driver receives the order for establishing local target peripheral node that the first finger daemon issues;
Generic device driver creates the target peripheral driver of corresponding types according to the type of target peripheral, and
The local target peripheral node according to corresponding to creating target peripheral driver;
Wherein, the effect of generic device driver is the type according to target peripheral, is localling create a corresponding class
The target peripheral driver of type;
Referring to following table, following table is the type of target peripheral and corresponding outside the target of the corresponding types locallyd create
If driver;
The type of target peripheral | Target peripheral driver |
Camera peripheral hardwares | Camera device Drivers |
Input peripheral hardwares | Input device Drivers |
Table 1
Such as user have selected Camera peripheral hardwares, then generic device driver is localling create a Camera peripheral hardwares drive
Dynamic program, such as UVC (USB Video Class, USB video class) device drives, are then created by Camera device Drivers
Local/dev/video* device nodes are built, namely the effect of Camera device Drivers is to create local/dev/video* to set
Slave node;
Such as user have selected Input peripheral hardwares again, then generic device driver is localling create an Input peripheral hardwares drive
Dynamic program, then create local/dev/Input* device nodes, namely Input peripheral hardwares driving journey by Input device Drivers
The effect of sequence is to create local/dev/Input* device nodes.
Target peripheral driver is outside into S203 after the request of opening target peripheral of user's transmission is received
Portion's terminal sends the step of request for opening its target peripheral;
Such as Camera device Drivers enter after the request of opening Camera peripheral hardwares of user's transmission is received
S203 sends the step of opening the request of its Camera peripheral hardware to exterior terminal.
S203:The request for opening its target peripheral is sent to exterior terminal;
Wherein, S203 to exterior terminal send open its target peripheral request include:It is outside by the first finger daemon
Portion's terminal sends the request for opening its target peripheral;
Wherein, opening the request of its target peripheral to exterior terminal transmission by the first finger daemon includes:
Open TCP the 3rd idle port;
By the 3rd idle port and by the first finger daemon asking for its target peripheral of opening is sent to exterior terminal
Ask.
Wherein, the 3rd idle port is unappropriated port, such as port of the numbering more than 3000, or numbering exists
In the range of 2000 to 3000 and unappropriated port;Such as the 3rd idle port be 3007 ports;
First idle port, the 3rd idle port can be same port, for example, can be 3006 ports, or
It is 3007 ports.
S204:The data message sent back from exterior terminal is received, data message includes exterior terminal and opened according to request
The data that target peripheral is got.
For example, the resolution ratio that the camera application program of local terminal terminal takes the photo come is A, the camera applications of exterior terminal
The resolution ratio that program takes the photo come is B, and resolution ratio B is more than resolution ratio A, and user wants the Camera by exterior terminal
Peripheral hardware obtains a photo, and local terminal terminal sends the request for the Camera peripheral hardwares for opening exterior terminal to exterior terminal, outside whole
End opens Camera peripheral hardwares according to the request and obtains a photo, and the photo is sent into local terminal terminal.
Wherein, receiving the data message sent back from exterior terminal includes:
First finger daemon receives the data message that is sent back from exterior terminal, and by data message by local target outside
If node reports upper layer application.
Wherein, the first finger daemon receives the data message sent back from exterior terminal and included:
Open TCP the second idle port;
The data message sent back from exterior terminal is received by the second idle port and the first finger daemon.
First idle port, the 3rd idle port can be same port, for example, can be 3006 ports, or
It is 3007 ports.
In same embodiment, the second idle port, the 3rd idle port are different ports, the second idle port
The transmission of local terminal terminal data is realized, such as realizes the request for being sent to exterior terminal and opening its target peripheral;3rd idle end
The reception of the existing local terminal terminal data of cause for gossip, such as the peripheral hardware list information for receiving exterior terminal broadcast is realized, receive from outside eventually
The data message sent back is held, data message includes the data that exterior terminal is got according to request opening target peripheral.
First finger daemon can realize the peripheral hardware list information for receiving other equipment broadcast, and notify user, to user
The peripheral hardware list information is ejected, the peripheral resources by user's selection using exterior terminal;And transmission can be realized for outside whole
The use request of peripheral hardware is held, including opens, close, asking peripheral data information etc..
Second finger daemon, which can be realized, collects the peripheral resources that this exterior terminal includes, and generates peripheral hardware list information, and
It is broadcasted;Etc. use request of the local terminal terminal to be received for exterior terminal peripheral hardware, including open, close, asking peripheral hardware number
It is believed that breath etc..
In one embodiment, referring to Fig. 3, Fig. 3 is that a kind of local terminal terminal that the present embodiment provides is entered with exterior terminal
The schematic diagram of row information interaction;
In Fig. 3, the first step:Second finger daemon of exterior terminal is broadcasted peripheral hardware list information by TCP3006 ports
The first finger daemon to local terminal terminal;
Second step:First finger daemon of first finger daemon of local terminal terminal by TCP3007 ports to exterior terminal
The right to use of request target peripheral hardware;
3rd step:First finger daemon of local terminal terminal establishes equity to the standard platform driving requests of local terminal terminal
Local target peripheral driver;
4th step:First finger daemon request target of the local target peripheral driver of local terminal terminal to local terminal terminal
Peripheral data information;
5th step:Second finger daemon of first finger daemon of local terminal terminal by TCP3007 ports to exterior terminal
Request target peripheral data information;
6th step:First finger daemon of second finger daemon of exterior terminal by TCP3008 ports to local terminal terminal
Response target peripheral data message;
7th step:First finger daemon of local terminal terminal issues the target peripheral data message of exterior terminal to local target
Device Drivers.
Example is for a specific example below;
For example, there is a Camera peripheral hardware in exterior terminal, and the peripheral hardware is broadcast out by its second finger daemon;
First finger daemon of local terminal terminal receives the broadcast, judges for Camera peripheral hardwares, then to itself
Platform device drivers write the peripheral type, i.e. the peripheral type is Camera peripheral hardwares, platform device drives
Program creates the Camera device Drivers of a local, such as UVC device drives according to the peripheral type.
When user's selection of local terminal terminal uses the Camera peripheral hardwares, the first finger daemon and outside in local terminal terminal
The second finger daemon communication of terminal, i.e., send the request for opening its Camera peripheral hardware, Camera by network to exterior terminal
The data message that peripheral hardware collects passes through first finger daemon by the first finger daemon of the network delivery to local terminal terminal
Operation platform device drivers write interface, report data message by the Camera device Drivers of foundation
The upper layer application of local terminal terminal, realize the shared of equipment room peripheral hardware.
Pass through the implementation of the present embodiment so that local terminal terminal can get the data got by the peripheral hardware by peripheral hardware
Information, the peripheral hardware belong to exterior terminal, and in the case where the performance of peripheral hardware is powerful, then the data that local terminal terminal is got are believed
Breath is high quality, realizes on the premise of hardware cost or the structure design change of increase additional hardware is not increased, realizes
The efficient of peripheral hardware is shared using with effective, improves Consumer's Experience.
Second embodiment
The present embodiment provides a kind of terminal, referring to Fig. 4, a kind of schematic diagram for terminal that Fig. 4 provides for the present embodiment, and the end
End includes memory 109 and processor 110 in Fig. 1;
Processor 110 be used to performing stored in memory 109 information programme is obtained by peripheral hardware, to realize following walk
Suddenly:
The peripheral hardware list information of exterior terminal broadcast is received, peripheral hardware list information includes at least one of exterior terminal support
Peripheral hardware;
The peripheral hardware list information of exterior terminal broadcast is received by local terminal terminal;Peripheral hardware belongs to exterior terminal;Peripheral hardware bag
Camera peripheral hardwares, Input peripheral hardwares, GPU peripheral hardwares etc. are included, wherein, Input peripheral hardwares include touch-screen, touch pad etc..
Optionally, before the peripheral hardware list information of exterior terminal broadcast is received, processor 110 is additionally operable to perform memory
What is stored in 109 obtains information programme by peripheral hardware, to realize following steps:
A generic device driver is created in local terminal terminal, and creates first finger daemon;
Generic device driver can be platform device drives;
Such as local terminal terminal creates platform device bus, equipment and driving, starting up.By platform equipment
Interface is write, is exposed to the first finger daemon.
The generic device driver is responsible for the peripheral hardware in exterior terminal being modeled to local peripheral hardware, can establish one
Platform device driver models, and the read-write interface of platform device drivers is realized, platform equipment is driven
The interface of writing of dynamic program completes following function:Receive the foundation local target peripheral node that local terminal the first finger daemon of terminal issues
Order;And according to specific target peripheral type, create the target peripheral driver of corresponding types, target peripheral driving
The effect of program is local target peripheral node corresponding to establishment;Meanwhile it can also realize and receive the number that the first finger daemon issues
According to and by local target peripheral node reported event.
Wherein, generic device driver is created in local terminal terminal, and create the first finger daemon to include:In local terminal terminal
Kernel inner nuclear layers create a generic device driver, and operating system create first finger daemon.
Optionally, before the peripheral hardware list information of exterior terminal broadcast is received, processor 110 is additionally operable to perform memory
What is stored in 109 obtains information programme by peripheral hardware, to realize following steps:
The second finger daemon is created in exterior terminal;
First finger daemon sends pairing request to the second finger daemon;
In pairing request in the case of, into receive exterior terminal broadcast peripheral hardware list information the step of.
Wherein, receiving the peripheral hardware list information of exterior terminal broadcast includes:
Receive the peripheral hardware list information that exterior terminal is broadcasted by the second finger daemon.
Namely start second finger daemon in exterior terminal, complete with the pairing of local terminal terminal, and by this
The peripheral hardware list information of exterior terminal is broadcasted by two finger daemons.
Optionally, receiving the peripheral hardware list information that exterior terminal is broadcasted by the second finger daemon includes:
Open TCP the first idle port;
Second finger daemon broadcasts peripheral hardware list information by the first idle port;
Open TCP the second idle port;
Local terminal terminal receives peripheral hardware list information by the second idle port.
Wherein, the first idle port, the second idle port are unappropriated port, such as end of the numbering more than 3000
Mouthful, or numbering is in the range of 2000 to 3000 and unappropriated port;Such as first idle port be 3006 ports,
Second idle port is 3008 ports;
First idle port, the second idle port can be same port, for example, can be 3006 ports, or
It is 3008 ports.
Receive the target peripheral that user selects from peripheral hardware list information;
Receive exterior terminal broadcast peripheral hardware list information after, eject the peripheral hardware list information to user, by with
Family selection uses the peripheral resources of exterior terminal;
Such as exterior terminal broadcast peripheral hardware list information include Camera peripheral hardwares, Input peripheral hardwares and GPU peripheral hardwares these three
Peripheral hardware, user have selected Camera peripheral hardwares, then using Camera peripheral hardwares as target peripheral.
Optionally, after the target peripheral that user selects from peripheral hardware list information is received, processor 110 is additionally operable to
What is stored in execution memory 109 obtains information programme by peripheral hardware, to realize following steps:
Generic device driver receives the order for establishing local target peripheral node that the first finger daemon issues;
Generic device driver creates the target peripheral driver of corresponding types according to the type of target peripheral, and
The local target peripheral node according to corresponding to creating target peripheral driver;
Wherein, the effect of generic device driver is the type according to target peripheral, is localling create a corresponding class
The target peripheral driver of type;
Referring to following table, following table is the type of target peripheral and corresponding outside the target of the corresponding types locallyd create
If driver;
The type of target peripheral | Target peripheral driver |
Camera peripheral hardwares | Camera device Drivers |
Input peripheral hardwares | Input device Drivers |
Table 2
Such as user have selected Camera peripheral hardwares, then generic device driver is localling create a Camera peripheral hardwares drive
Dynamic program, such as UVC device drives, local/dev/video* device nodes then are created by Camera device Drivers,
That is the effect of Camera device Drivers is to create local/dev/video* device nodes;
Such as user have selected Input peripheral hardwares again, then generic device driver is localling create an Input peripheral hardwares drive
Dynamic program, then create local/dev/Input* device nodes, namely Input peripheral hardwares driving journey by Input device Drivers
The effect of sequence is to create local/dev/Input* device nodes.
Target peripheral driver after the request of opening target peripheral of user's transmission is received, into it is outside eventually
End sends the step of request for opening its target peripheral;
Such as Camera device Drivers enter after the request of opening Camera peripheral hardwares of user's transmission is received
The step of opening the request of its Camera peripheral hardware is sent to exterior terminal.
The request for opening its target peripheral is sent to exterior terminal;
Wherein, the request of its target peripheral is opened to exterior terminal transmission to be included:It is whole to outside by the first finger daemon
End sends the request for opening its target peripheral;
Wherein, opening the request of its target peripheral to exterior terminal transmission by the first finger daemon includes:
Open TCP the 3rd idle port;
By the 3rd idle port and by the first finger daemon asking for its target peripheral of opening is sent to exterior terminal
Ask.
Wherein, the 3rd idle port is unappropriated port, such as port of the numbering more than 3000, or numbering exists
In the range of 2000 to 3000 and unappropriated port;Such as the 3rd idle port be 3007 ports;
First idle port, the 3rd idle port can be same port, for example, can be 3006 ports, or
It is 3007 ports.
The data message sent back from exterior terminal is received, data message includes exterior terminal and opened according to request outside target
If the data got.
For example, the resolution ratio that the camera application program of local terminal terminal takes the photo come is A, the camera applications of exterior terminal
The resolution ratio that program takes the photo come is B, and resolution ratio B is more than resolution ratio A, and user wants the Camera by exterior terminal
Peripheral hardware obtains a photo, and local terminal terminal sends the request for the Camera peripheral hardwares for opening exterior terminal to exterior terminal, outside whole
End opens Camera peripheral hardwares according to the request and obtains a photo, and the photo is sent into local terminal terminal.
Wherein, receiving the data message sent back from exterior terminal includes:
First finger daemon receives the data message that is sent back from exterior terminal, and by data message by local target outside
If node reports upper layer application.
Wherein, the first finger daemon receives the data message sent back from exterior terminal and included:
Open TCP the second idle port;
The data message sent back from exterior terminal is received by the second idle port and the first finger daemon.
First idle port, the 3rd idle port can be same port, for example, can be 3006 ports, or
It is 3007 ports.
In same embodiment, the second idle port, the 3rd idle port are different ports, the second idle port
The transmission of local terminal terminal data is realized, such as realizes the request for being sent to exterior terminal and opening its target peripheral;3rd idle end
The reception of the existing local terminal terminal data of cause for gossip, such as the peripheral hardware list information for receiving exterior terminal broadcast is realized, receive from outside eventually
The data message sent back is held, data message includes the data that exterior terminal is got according to request opening target peripheral.
First finger daemon can realize the peripheral hardware list information for receiving other equipment broadcast, and notify user, to user
The peripheral hardware list information is ejected, the peripheral resources by user's selection using exterior terminal;And transmission can be realized for outside whole
The use request of peripheral hardware is held, including opens, close, asking peripheral data information etc..
Second finger daemon, which can be realized, collects the peripheral resources that this exterior terminal includes, and generates peripheral hardware list information, and
It is broadcasted;Etc. use request of the local terminal terminal to be received for exterior terminal peripheral hardware, including open, close, asking peripheral hardware number
It is believed that breath etc..
In one embodiment, referring to Fig. 3, Fig. 3 is that a kind of local terminal terminal that the present embodiment provides is entered with exterior terminal
The schematic diagram of row information interaction;
In Fig. 3, the first step:Second finger daemon of exterior terminal is broadcasted peripheral hardware list information by TCP3006 ports
The first finger daemon to local terminal terminal;
Second step:First finger daemon of first finger daemon of local terminal terminal by TCP3007 ports to exterior terminal
The right to use of request target peripheral hardware;
3rd step:First finger daemon of local terminal terminal establishes equity to the standard platform driving requests of local terminal terminal
Local target peripheral driver;
4th step:First finger daemon request target of the local target peripheral driver of local terminal terminal to local terminal terminal
Peripheral data information;
5th step:Second finger daemon of first finger daemon of local terminal terminal by TCP3007 ports to exterior terminal
Request target peripheral data information;
6th step:First finger daemon of second finger daemon of exterior terminal by TCP3008 ports to local terminal terminal
Response target peripheral data message;
7th step:First finger daemon of local terminal terminal issues the target peripheral data message of exterior terminal to local target
Device Drivers.
Example is for a specific example below;
For example, there is a Camera peripheral hardware in exterior terminal, and the peripheral hardware is broadcast out by its second finger daemon;
First finger daemon of local terminal terminal receives the broadcast, judges for Camera peripheral hardwares, then to itself
Platform device drivers write the peripheral type, i.e. the peripheral type is Camera peripheral hardwares, platform device drives
Program creates the Camera device Drivers of a local, such as UVC device drives according to the peripheral type.
When user's selection of local terminal terminal uses the Camera peripheral hardwares, the first finger daemon and outside in local terminal terminal
The second finger daemon communication of terminal, i.e., send the request for opening its Camera peripheral hardware, Camera by network to exterior terminal
The data message that peripheral hardware collects passes through first finger daemon by the first finger daemon of the network delivery to local terminal terminal
Operation platform device drivers write interface, report data message by the Camera device Drivers of foundation
The upper layer application of local terminal terminal, realize the shared of equipment room peripheral hardware.
Pass through the implementation of the present embodiment so that local terminal terminal can get the data got by the peripheral hardware by peripheral hardware
Information, the peripheral hardware belong to exterior terminal, and in the case where the performance of peripheral hardware is powerful, then the data that local terminal terminal is got are believed
Breath is high quality, realizes on the premise of hardware cost or the structure design change of increase additional hardware is not increased, realizes
The efficient of peripheral hardware is shared using with effective, improves Consumer's Experience.
3rd embodiment
The present embodiment provides a kind of computer-readable recording medium, and computer-readable recording medium storage has one or more
Individual program, one or more program can be by one or more computing devices, to realize following steps:
The peripheral hardware list information of exterior terminal broadcast is received, peripheral hardware list information includes at least one of exterior terminal support
Peripheral hardware;
The peripheral hardware list information of exterior terminal broadcast is received by local terminal terminal;Peripheral hardware belongs to exterior terminal;Peripheral hardware bag
Camera peripheral hardwares, Input peripheral hardwares, GPU peripheral hardwares etc. are included, wherein, Input peripheral hardwares include touch-screen, touch pad etc..
Optionally, before the peripheral hardware list information of exterior terminal broadcast is received, one or more program can also be by one
Individual or multiple computing devices, to realize following steps:
A generic device driver is created in local terminal terminal, and creates first finger daemon;
Generic device driver can be platform device drives;
Such as local terminal terminal creates platform device bus, equipment and driving, starting up.By platform equipment
Interface is write, is exposed to the first finger daemon.
The generic device driver is responsible for the peripheral hardware in exterior terminal being modeled to local peripheral hardware, can establish one
Platform device driver models, and the read-write interface of platform device drivers is realized, platform equipment is driven
The interface of writing of dynamic program completes following function:Receive the foundation local target peripheral node that local terminal the first finger daemon of terminal issues
Order;And according to specific target peripheral type, create the target peripheral driver of corresponding types, target peripheral driving
The effect of program is local target peripheral node corresponding to establishment;Meanwhile it can also realize and receive the number that the first finger daemon issues
According to and by local target peripheral node reported event.
Wherein, generic device driver is created in local terminal terminal, and create the first finger daemon to include:In local terminal terminal
Kernel inner nuclear layers create a generic device driver, and operating system create first finger daemon.
Optionally, before the peripheral hardware list information of exterior terminal broadcast is received, one or more program can also be by one
Individual or multiple computing devices, to realize following steps:
The second finger daemon is created in exterior terminal;
First finger daemon sends pairing request to the second finger daemon;
In pairing request in the case of, into receive exterior terminal broadcast peripheral hardware list information the step of.
Wherein, receiving the peripheral hardware list information of exterior terminal broadcast includes:
Receive the peripheral hardware list information that exterior terminal is broadcasted by the second finger daemon.
Namely start second finger daemon in exterior terminal, complete with the pairing of local terminal terminal, and by this
The peripheral hardware list information of exterior terminal is broadcasted by two finger daemons.
Optionally, receiving the peripheral hardware list information that exterior terminal is broadcasted by the second finger daemon includes:
Open TCP the first idle port;
Second finger daemon broadcasts peripheral hardware list information by the first idle port;
Open TCP the second idle port;
Local terminal terminal receives peripheral hardware list information by the second idle port.
Wherein, the first idle port, the second idle port are unappropriated port, such as end of the numbering more than 3000
Mouthful, or numbering is in the range of 2000 to 3000 and unappropriated port;Such as first idle port be 3006 ports,
Second idle port is 3008 ports;
First idle port, the second idle port can be same port, for example, can be 3006 ports, or
It is 3008 ports.
Receive the target peripheral that user selects from peripheral hardware list information;
Receive exterior terminal broadcast peripheral hardware list information after, eject the peripheral hardware list information to user, by with
Family selection uses the peripheral resources of exterior terminal;
Such as exterior terminal broadcast peripheral hardware list information include Camera peripheral hardwares, Input peripheral hardwares and GPU peripheral hardwares these three
Peripheral hardware, user have selected Camera peripheral hardwares, then using Camera peripheral hardwares as target peripheral.
Optionally, after the target peripheral that user selects from peripheral hardware list information is received, one or more journey
Sequence can also be by one or more computing device, to realize following steps:
Generic device driver receives the order for establishing local target peripheral node that the first finger daemon issues;
Generic device driver creates the target peripheral driver of corresponding types according to the type of target peripheral, and
The local target peripheral node according to corresponding to creating target peripheral driver;
Wherein, the effect of generic device driver is the type according to target peripheral, is localling create a corresponding class
The target peripheral driver of type;
Referring to following table, following table is the type of target peripheral and corresponding outside the target of the corresponding types locallyd create
If driver;
The type of target peripheral | Target peripheral driver |
Camera peripheral hardwares | Camera device Drivers |
Input peripheral hardwares | Input device Drivers |
Table 3
Such as user have selected Camera peripheral hardwares, then generic device driver is localling create a Camera peripheral hardwares drive
Dynamic program, such as UVC device drives, local/dev/video* device nodes then are created by Camera device Drivers,
That is the effect of Camera device Drivers is to create local/dev/video* device nodes;
Such as user have selected Input peripheral hardwares again, then generic device driver is localling create an Input peripheral hardwares drive
Dynamic program, then create local/dev/Input* device nodes, namely Input peripheral hardwares driving journey by Input device Drivers
The effect of sequence is to create local/dev/Input* device nodes.
Target peripheral driver after the request of opening target peripheral of user's transmission is received, into it is outside eventually
End sends the step of request for opening its target peripheral;
Such as Camera device Drivers enter after the request of opening Camera peripheral hardwares of user's transmission is received
The step of opening the request of its Camera peripheral hardware is sent to exterior terminal.
The request for opening its target peripheral is sent to exterior terminal;
Wherein, the request of its target peripheral is opened to exterior terminal transmission to be included:It is whole to outside by the first finger daemon
End sends the request for opening its target peripheral;
Wherein, opening the request of its target peripheral to exterior terminal transmission by the first finger daemon includes:
Open TCP the 3rd idle port;
By the 3rd idle port and by the first finger daemon asking for its target peripheral of opening is sent to exterior terminal
Ask.
Wherein, the 3rd idle port is unappropriated port, such as port of the numbering more than 3000, or numbering exists
In the range of 2000 to 3000 and unappropriated port;Such as the 3rd idle port be 3007 ports;
First idle port, the 3rd idle port can be same port, for example, can be 3006 ports, or
It is 3007 ports.
The data message sent back from exterior terminal is received, data message includes exterior terminal and opened according to request outside target
If the data got.
For example, the resolution ratio that the camera application program of local terminal terminal takes the photo come is A, the camera applications of exterior terminal
The resolution ratio that program takes the photo come is B, and resolution ratio B is more than resolution ratio A, and user wants the Camera by exterior terminal
Peripheral hardware obtains a photo, and local terminal terminal sends the request for the Camera peripheral hardwares for opening exterior terminal to exterior terminal, outside whole
End opens Camera peripheral hardwares according to the request and obtains a photo, and the photo is sent into local terminal terminal.
Wherein, receiving the data message sent back from exterior terminal includes:
First finger daemon receives the data message that is sent back from exterior terminal, and by data message by local target outside
If node reports upper layer application.
Wherein, the first finger daemon receives the data message sent back from exterior terminal and included:
Open TCP the second idle port;
The data message sent back from exterior terminal is received by the second idle port and the first finger daemon.
First idle port, the 3rd idle port can be same port, for example, can be 3006 ports, or
It is 3007 ports.
In same embodiment, the second idle port, the 3rd idle port are different ports, the second idle port
The transmission of local terminal terminal data is realized, such as realizes the request for being sent to exterior terminal and opening its target peripheral;3rd idle end
The reception of the existing local terminal terminal data of cause for gossip, such as the peripheral hardware list information for receiving exterior terminal broadcast is realized, receive from outside eventually
The data message sent back is held, data message includes the data that exterior terminal is got according to request opening target peripheral.
First finger daemon can realize the peripheral hardware list information for receiving other equipment broadcast, and notify user, to user
The peripheral hardware list information is ejected, the peripheral resources by user's selection using exterior terminal;And transmission can be realized for outside whole
The use request of peripheral hardware is held, including opens, close, asking peripheral data information etc..
Second finger daemon, which can be realized, collects the peripheral resources that this exterior terminal includes, and generates peripheral hardware list information, and
It is broadcasted;Etc. use request of the local terminal terminal to be received for exterior terminal peripheral hardware, including open, close, asking peripheral hardware number
It is believed that breath etc..
In one embodiment, referring to Fig. 3, Fig. 3 is that a kind of local terminal terminal that the present embodiment provides is entered with exterior terminal
The schematic diagram of row information interaction;
In Fig. 3, the first step:Second finger daemon of exterior terminal is broadcasted peripheral hardware list information by TCP3006 ports
The first finger daemon to local terminal terminal;
Second step:First finger daemon of first finger daemon of local terminal terminal by TCP3007 ports to exterior terminal
The right to use of request target peripheral hardware;
3rd step:First finger daemon of local terminal terminal establishes equity to the standard platform driving requests of local terminal terminal
Local target peripheral driver;
4th step:First finger daemon request target of the local target peripheral driver of local terminal terminal to local terminal terminal
Peripheral data information;
5th step:Second finger daemon of first finger daemon of local terminal terminal by TCP3007 ports to exterior terminal
Request target peripheral data information;
6th step:First finger daemon of second finger daemon of exterior terminal by TCP3008 ports to local terminal terminal
Response target peripheral data message;
7th step:First finger daemon of local terminal terminal issues the target peripheral data message of exterior terminal to local target
Device Drivers.
Example is for a specific example below;
For example, there is a Camera peripheral hardware in exterior terminal, and the peripheral hardware is broadcast out by its second finger daemon;
First finger daemon of local terminal terminal receives the broadcast, judges for Camera peripheral hardwares, then to itself
Platform device drivers write the peripheral type, i.e. the peripheral type is Camera peripheral hardwares, platform device drives
Program creates the Camera device Drivers of a local, such as UVC device drives according to the peripheral type.
When user's selection of local terminal terminal uses the Camera peripheral hardwares, the first finger daemon and outside in local terminal terminal
The second finger daemon communication of terminal, i.e., send the request for opening its Camera peripheral hardware, Camera by network to exterior terminal
The data message that peripheral hardware collects passes through first finger daemon by the first finger daemon of the network delivery to local terminal terminal
Operation platform device drivers write interface, report data message by the Camera device Drivers of foundation
The upper layer application of local terminal terminal, realize the shared of equipment room peripheral hardware.
Pass through the implementation of the present embodiment so that local terminal terminal can get the data got by the peripheral hardware by peripheral hardware
Information, the peripheral hardware belong to exterior terminal, and in the case where the performance of peripheral hardware is powerful, then the data that local terminal terminal is got are believed
Breath is high quality, realizes on the premise of hardware cost or the structure design change of increase additional hardware is not increased, realizes
The efficient of peripheral hardware is shared using with effective, improves Consumer's Experience.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row
His property includes, so that process, method, article or device including a series of elements not only include those key elements, and
And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently
Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this
Other identical element also be present in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words
Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium
In (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, computer, clothes
Be engaged in device, air conditioner, or network equipment etc.) method that performs each embodiment of the present invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair
The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills
Art field, is included within the scope of the present invention.
Claims (10)
1. it is a kind of by peripheral hardware obtain information method, it is characterised in that it is described by peripheral hardware obtain information method include with
Lower step:
The peripheral hardware list information of exterior terminal broadcast is received, the peripheral hardware list information includes the exterior terminal and supported at least
One peripheral hardware;
Receive the target peripheral that user selects from the peripheral hardware list information;
The request for opening its target peripheral is sent to the exterior terminal;
The data message sent back from the exterior terminal is received, the data message includes the exterior terminal asks according to described
Ask and open the data that the target peripheral is got.
2. information approach is obtained by peripheral hardware as claimed in claim 1, it is characterised in that described to receive what exterior terminal was broadcasted
Before peripheral hardware list information, the method that information is obtained by peripheral hardware also includes:
Generic device driver is created in local terminal terminal, and creates the first finger daemon;
It is described that information is obtained by peripheral hardware after the target peripheral for receiving user and being selected from the peripheral hardware list information
Method also include:
The generic device driver receives the order for establishing local target peripheral node that first finger daemon issues;
The generic device driver creates the target peripheral driving journey of corresponding types according to the type of the target peripheral
Sequence, and the local target peripheral node according to corresponding to creating the target peripheral driver;
The target peripheral driver is after the request of the opening target peripheral of user's transmission is received, into described
The step of request for opening its target peripheral being sent to the exterior terminal;
The request that its target peripheral is opened to exterior terminal transmission includes:By first finger daemon to described
Exterior terminal sends the request for opening its target peripheral;
The data message sent back from the exterior terminal that receives includes:
First finger daemon receives the data message sent back from the exterior terminal, and the data message is passed through into institute
State local target peripheral node and report upper layer application.
3. information approach is obtained by peripheral hardware as claimed in claim 2, it is characterised in that described general in the establishment of local terminal terminal
Device driver, and the first finger daemon of establishment includes:Created in the Realtime Operating System Nucleus layer of local terminal terminal described logical
First finger daemon is created with device driver, and in operating system.
4. information approach is obtained by peripheral hardware as claimed in claim 2, it is characterised in that in the reception exterior terminal broadcast
Peripheral hardware list information before, it is described by peripheral hardware obtain information method also include:
The second finger daemon is created in the exterior terminal;
First finger daemon sends pairing request to second finger daemon;
In the pairing request in the case of, into described the step of receiving the peripheral hardware list information that exterior terminal is broadcasted.
5. information approach is obtained by peripheral hardware as claimed in claim 4, it is characterised in that described to receive what exterior terminal was broadcasted
Peripheral hardware list information includes:
Receive the peripheral hardware list information that the exterior terminal is broadcasted by second finger daemon.
6. information approach is obtained by peripheral hardware as claimed in claim 5, it is characterised in that the reception exterior terminal leads to
Crossing the peripheral hardware list information of the second finger daemon broadcast includes:
Open the first idle port of transmission control protocol;
Second finger daemon broadcasts peripheral hardware list information by first idle port;
Open the second idle port of transmission control protocol;
The local terminal terminal receives the peripheral hardware list information by second idle port.
7. information approach is obtained by peripheral hardware as described in any one of claim 2 to 6, it is characterised in that described by described
The request that first finger daemon opens its target peripheral to exterior terminal transmission includes:
Open the 3rd idle port of transmission control protocol;
Opened by the 3rd idle port and by first finger daemon to exterior terminal transmission outside its target
If request.
8. information approach is obtained by peripheral hardware as described in any one of claim 2 to 6, it is characterised in that described first guards
Process, which receives the data message sent back from the exterior terminal, to be included:
Open the second idle port of transmission control protocol;
The data sent back from the exterior terminal are received by second idle port and first finger daemon to believe
Breath.
9. a kind of terminal, it is characterised in that the terminal includes memory and processor;
The processor be used for perform stored in memory by peripheral hardware obtain information programme, to realize following steps:
The peripheral hardware list information of exterior terminal broadcast is received, the peripheral hardware list information includes the exterior terminal and supported at least
One peripheral hardware;
Receive the target peripheral that user selects from the peripheral hardware list information;
The request for opening its target peripheral is sent to the exterior terminal;
The data message sent back from the exterior terminal is received, the data message includes the exterior terminal asks according to described
Ask and open the data that the target peripheral is got.
A kind of 10. computer-readable recording medium, it is characterised in that the computer-readable recording medium storage have one or
Multiple programs, one or more of programs can be by one or more computing devices, to realize following steps:
The peripheral hardware list information of exterior terminal broadcast is received, the peripheral hardware list information includes the exterior terminal and supported at least
One peripheral hardware;
Receive the target peripheral that user selects from the peripheral hardware list information;
The request for opening its target peripheral is sent to the exterior terminal;
The data message sent back from the exterior terminal is received, the data message includes the exterior terminal asks according to described
Ask and open the data that the target peripheral is got.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710448550.3A CN107426414A (en) | 2017-06-14 | 2017-06-14 | It is a kind of that information approach, terminal and computer-readable recording medium are obtained by peripheral hardware |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710448550.3A CN107426414A (en) | 2017-06-14 | 2017-06-14 | It is a kind of that information approach, terminal and computer-readable recording medium are obtained by peripheral hardware |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107426414A true CN107426414A (en) | 2017-12-01 |
Family
ID=60429415
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710448550.3A Pending CN107426414A (en) | 2017-06-14 | 2017-06-14 | It is a kind of that information approach, terminal and computer-readable recording medium are obtained by peripheral hardware |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107426414A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110287036A (en) * | 2019-05-09 | 2019-09-27 | 华为技术有限公司 | A kind of collaborative share methods, devices and systems |
WO2020259286A1 (en) * | 2019-06-24 | 2020-12-30 | 维塔科技(北京)有限公司 | Method and apparatus for obtaining device information, storage medium and electronic device |
WO2023207761A1 (en) * | 2022-04-28 | 2023-11-02 | 华为技术有限公司 | Peripheral control method, and electronic device and system |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1538308A (en) * | 2002-07-01 | 2004-10-20 | 罗技欧洲公司 | Method and system for transfor of data between digital camera and host |
CN1798143A (en) * | 2004-12-28 | 2006-07-05 | 联想(北京)有限公司 | Method and system for transmitting information wirelessly |
CN2906745Y (en) * | 2005-11-14 | 2007-05-30 | 方吐司科技股份有限公司 | Wireless transmission device |
CN102033850A (en) * | 2009-09-29 | 2011-04-27 | 联想(北京)有限公司 | Portable terminal and control method thereof, portable device and control method thereof |
CN102262557A (en) * | 2010-05-25 | 2011-11-30 | 运软网络科技(上海)有限公司 | Method for constructing virtual machine monitor by bus architecture and performance service framework |
US20110302390A1 (en) * | 2010-06-05 | 2011-12-08 | Greg Copeland | SYSTEMS AND METHODS FOR PROCESSING COMMUNICATIONS SIGNALS fUSING PARALLEL PROCESSING |
CN102457769A (en) * | 2010-10-18 | 2012-05-16 | 康佳集团股份有限公司 | Television (TV) device and method for realizing sharing of file resources thereof |
CN103299604A (en) * | 2011-01-19 | 2013-09-11 | Nec卡西欧移动通信株式会社 | Mobile communication device and communication method |
CN103345454A (en) * | 2013-07-05 | 2013-10-09 | 上海斐讯数据通信技术有限公司 | Peripheral device connection method of mobile terminal |
CN103873458A (en) * | 2012-12-13 | 2014-06-18 | 三星电子株式会社 | Device control method for registering device information of peripheral device, and device and system thereof |
CN104113582A (en) * | 2013-04-17 | 2014-10-22 | 佳能株式会社 | Communication Apparatus And Control Method Thereof |
CN104932926A (en) * | 2015-07-09 | 2015-09-23 | 上海联彤网络通讯技术有限公司 | System and method for achieving dynamic matching of equipment and drives in intelligent operation system platform |
CN105933373A (en) * | 2015-02-28 | 2016-09-07 | 联发科技(新加坡)私人有限公司 | Hardware or software service request processing method |
CN106161741A (en) * | 2015-04-01 | 2016-11-23 | 联发科技(新加坡)私人有限公司 | A kind of terminal and function sharing method thereof |
CN106453824A (en) * | 2016-08-31 | 2017-02-22 | 蒋凌锋 | Function extension device of smartphone and use method thereof |
-
2017
- 2017-06-14 CN CN201710448550.3A patent/CN107426414A/en active Pending
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1538308A (en) * | 2002-07-01 | 2004-10-20 | 罗技欧洲公司 | Method and system for transfor of data between digital camera and host |
CN1798143A (en) * | 2004-12-28 | 2006-07-05 | 联想(北京)有限公司 | Method and system for transmitting information wirelessly |
CN2906745Y (en) * | 2005-11-14 | 2007-05-30 | 方吐司科技股份有限公司 | Wireless transmission device |
CN102033850A (en) * | 2009-09-29 | 2011-04-27 | 联想(北京)有限公司 | Portable terminal and control method thereof, portable device and control method thereof |
CN102262557A (en) * | 2010-05-25 | 2011-11-30 | 运软网络科技(上海)有限公司 | Method for constructing virtual machine monitor by bus architecture and performance service framework |
US20110302390A1 (en) * | 2010-06-05 | 2011-12-08 | Greg Copeland | SYSTEMS AND METHODS FOR PROCESSING COMMUNICATIONS SIGNALS fUSING PARALLEL PROCESSING |
CN102457769A (en) * | 2010-10-18 | 2012-05-16 | 康佳集团股份有限公司 | Television (TV) device and method for realizing sharing of file resources thereof |
CN103299604A (en) * | 2011-01-19 | 2013-09-11 | Nec卡西欧移动通信株式会社 | Mobile communication device and communication method |
CN103873458A (en) * | 2012-12-13 | 2014-06-18 | 三星电子株式会社 | Device control method for registering device information of peripheral device, and device and system thereof |
CN104113582A (en) * | 2013-04-17 | 2014-10-22 | 佳能株式会社 | Communication Apparatus And Control Method Thereof |
CN103345454A (en) * | 2013-07-05 | 2013-10-09 | 上海斐讯数据通信技术有限公司 | Peripheral device connection method of mobile terminal |
CN105933373A (en) * | 2015-02-28 | 2016-09-07 | 联发科技(新加坡)私人有限公司 | Hardware or software service request processing method |
CN106161741A (en) * | 2015-04-01 | 2016-11-23 | 联发科技(新加坡)私人有限公司 | A kind of terminal and function sharing method thereof |
CN104932926A (en) * | 2015-07-09 | 2015-09-23 | 上海联彤网络通讯技术有限公司 | System and method for achieving dynamic matching of equipment and drives in intelligent operation system platform |
CN106453824A (en) * | 2016-08-31 | 2017-02-22 | 蒋凌锋 | Function extension device of smartphone and use method thereof |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110287036A (en) * | 2019-05-09 | 2019-09-27 | 华为技术有限公司 | A kind of collaborative share methods, devices and systems |
WO2020259286A1 (en) * | 2019-06-24 | 2020-12-30 | 维塔科技(北京)有限公司 | Method and apparatus for obtaining device information, storage medium and electronic device |
WO2023207761A1 (en) * | 2022-04-28 | 2023-11-02 | 华为技术有限公司 | Peripheral control method, and electronic device and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107786732A (en) | Terminal applies method for pushing, mobile terminal and computer-readable recording medium | |
CN107402694A (en) | Using switching method, equipment and computer-readable recording medium | |
CN107707729A (en) | A kind of terminal go out screen or bright screen method, terminal and computer-readable recording medium | |
CN107633051A (en) | Desktop searching method, mobile terminal and computer-readable recording medium | |
CN107181700A (en) | Control method, mobile terminal and the storage medium of application program for mobile terminal | |
CN107132974A (en) | Terminal freezes screen processing method, terminal and computer-readable recording medium | |
CN107229389A (en) | A kind of method of shared file, equipment and computer-readable recording medium | |
CN107577332A (en) | A kind of power consumption control method, mobile terminal and computer-readable recording medium | |
CN107632757A (en) | A kind of terminal control method, terminal and computer-readable recording medium | |
CN107678829A (en) | A kind of application control method and mobile terminal | |
CN107765941A (en) | A kind of icon display method, terminal and computer-readable recording medium | |
CN107463324A (en) | A kind of image display method, mobile terminal and computer-readable recording medium | |
CN107748640A (en) | One kind puts out screen display methods and mobile terminal | |
CN107704133A (en) | Freeze screen monitoring with solving method, mobile terminal and computer-readable recording medium | |
CN107526493A (en) | A kind of small tool display methods, equipment and computer-readable recording medium | |
CN108008991A (en) | A kind of image processing method, terminal and computer-readable recording medium | |
CN107390856A (en) | A kind of method, mobile terminal and storage medium for reducing mobile terminal power consumption | |
CN107885428A (en) | Terminal split screen starts method, terminal and computer-readable recording medium | |
CN107426414A (en) | It is a kind of that information approach, terminal and computer-readable recording medium are obtained by peripheral hardware | |
CN107888759A (en) | A kind of method, equipment and computer-readable recording medium realized information and sent | |
CN107896339A (en) | A kind of video broadcasting method, terminal and computer-readable recording medium | |
CN107864086A (en) | The quick sharing method of information, mobile terminal and computer-readable recording medium | |
CN107888758A (en) | Screen color method of adjustment, mobile terminal and computer-readable recording medium | |
CN107707755A (en) | Button application method, terminal and computer-readable recording medium | |
CN107589899A (en) | One kind notice display location method of adjustment, terminal and computer-readable recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171201 |
|
RJ01 | Rejection of invention patent application after publication |