CN105320616A - External device control method and device - Google Patents

External device control method and device Download PDF

Info

Publication number
CN105320616A
CN105320616A CN201410289089.8A CN201410289089A CN105320616A CN 105320616 A CN105320616 A CN 105320616A CN 201410289089 A CN201410289089 A CN 201410289089A CN 105320616 A CN105320616 A CN 105320616A
Authority
CN
China
Prior art keywords
client
external unit
identify label
list
terminal device
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
Application number
CN201410289089.8A
Other languages
Chinese (zh)
Other versions
CN105320616B (en
Inventor
李杨
郭晛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410289089.8A priority Critical patent/CN105320616B/en
Publication of CN105320616A publication Critical patent/CN105320616A/en
Application granted granted Critical
Publication of CN105320616B publication Critical patent/CN105320616B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention provides an external device control method which comprises the steps that when access of external devices is detected, a terminal device obtains identity labels of the external devices through a client; whether a device list contains information matched with the identity labels or not is judged, wherein the device list contains information of the identity labels of all the external devices controlled and supported by the client; when the device list contains information matched with the identity labels, the external devices are controlled to execute corresponding operations through the client. In addition, the invention further provides an external device control device. According to the external device control method and device, the external devices are automatically controlled, and the control efficiency of the external devices can be improved.

Description

External device control method and device
Technical field
The present invention relates to computer technology, particularly relate to a kind of external device control method and device.
Background technology
Along with the development of computer hardware technology, increasing external unit is developed and is widely used.But in existing external device control method, after an external unit is access in terminal device, also need user in terminal device, carry out manual configuration could control to start this terminal device, such as: when user is when using wireless network card, first USB (the UniversalSerialBus this wireless network card being inserted into terminal device is needed, USB (universal serial bus)) interface, and then by calling relevant configuration program in the operating system of terminal device, corresponding configuration is made to network, this wireless network card could be started.What kind of and in whole layoutprocedure, user needs the operation carrying out multiple step, and often also need the help by instructions just can know to need to carry out operation.Therefore, existing external device control method complex operation, shortage control efficiency.
Summary of the invention
In view of this, the invention provides a kind of external device control method and device, achieve the Automated condtrol to external unit, the efficiency controlling external unit can be improved.
A kind of external device control method that the embodiment of the present invention provides, comprising: when having detected that external unit accesses, terminal device obtains the identify label of described external unit by client; Whether comprise the information matched with described identify label in checkout equipment list, in described list of devices, comprise the information of the identify label of all external units that described client support controls; When comprising the information matched with described identify label in described list of devices, controlling described external unit by described client and performing corresponding operation.
A kind of external device controller that the embodiment of the present invention provides, runs on terminal device, comprising: acquisition module, for when having detected that external unit accesses, is obtained the identify label of described external unit by client; Detection module, for whether comprising the information that the described identify label that obtains with described acquisition module matches in checkout equipment list, comprises the information of the identify label of all external units that described client support controls in described list of devices; Control module, during for the information comprising and match with described identify label being detected in described list of devices when described detection module, controls described external unit by described client and performs corresponding operation.
The said external apparatus control method that the embodiment of the present invention provides and device, by when having detected that external unit accesses, terminal device obtains the identify label of this external unit by client, and detect the information whether comprising this identify label in preset list of devices, when comprising the information of this identify label in this list of devices, control this external unit by this client and perform corresponding operation, corresponding operation is performed because terminal device controls this external unit by client automatically when outside equipment access, because this simplify the artificial control operation to external unit, achieve the Automated condtrol to external unit, thus the efficiency controlling external unit can be improved.
For above and other object of the present invention, feature and advantage can be become apparent, preferred embodiment cited below particularly, and coordinate institute's accompanying drawings, be described in detail below.
Accompanying drawing explanation
Fig. 1 shows a kind of structured flowchart of terminal device;
The applied environment figure of the external device control method that Fig. 2 provides for first embodiment of the invention;
The process flow diagram of the external device control method that Fig. 3 provides for first embodiment of the invention;
The applied environment figure of the external device control method that Fig. 4 provides for second embodiment of the invention;
The process flow diagram of the external device control method that Fig. 5 provides for second embodiment of the invention;
The process flow diagram of the external device control method that Fig. 6 provides for third embodiment of the invention;
The structural representation of the external device controller that Fig. 7 provides for fourth embodiment of the invention;
Fig. 8 is the storage environment schematic diagram of the device of Fig. 7;
The structural representation of the external device controller that Fig. 9 provides for fifth embodiment of the invention.
Embodiment
For further setting forth the present invention for the technological means that realizes predetermined goal of the invention and take and effect, below in conjunction with accompanying drawing and preferred embodiment, to according to the specific embodiment of the present invention, structure, feature and effect thereof, be described in detail as follows.
The external device control method that the embodiment of the present invention provides can be applicable to realize the control to external unit in terminal device, terminal device can comprise smart mobile phone, panel computer, E-book reader, MP3 player (MovingPictureExpertsGroupAudioLayerIII, dynamic image expert compression standard audio frequency aspect 3), MP4 (MovingPictureExpertsGroupAudioLayerIV, dynamic image expert compression standard audio frequency aspect 4) player, pocket computer on knee, desktop computer computing machine, vehicle-mounted computer, all-in-one, intelligent TV set, Set Top Box etc.
External unit, is called for short peripheral hardware, is peripheral equipment again, is can be energized and the nonessential hardware device of the normal terminal device run.They can independent or semi-independent work and do not rely on terminal device, usually can expand or improve function or the performance of the terminal device accessed.External unit can comprise: input-output device and part memory device.Such as: USB device or the portable equipment such as keyboard, mouse, scanner, camera, display, printer, CD drive, UPS uninterrupted power source and other flash disk, memory card card reader, DPF, MP3/MP4 player, portable hard drive, wireless network card, router.
Fig. 1 shows a kind of structured flowchart of terminal device.As shown in Figure 1, terminal device 100 comprises storer 102, memory controller 104, one or more (only illustrating one in figure) processor 106, Peripheral Interface 108, radio-frequency module 110, locating module 112, photographing module 114, audio-frequency module 116, screen 118 and key-press module 120.These assemblies are by one or more communication bus/signal wire 122 communication mutually.
Be appreciated that the structure shown in Fig. 1 is only signal, terminal device 100 also can comprise than assembly more or less shown in Fig. 1, or has the configuration different from shown in Fig. 1.Each assembly shown in Fig. 1 can adopt hardware, software or its combination to realize.
Storer 102 can be used for storing software program and module, as the external device control method in the embodiment of the present invention and programmed instruction/module corresponding to device, processor 102 is by running the software program and module that are stored in storer 104, thus perform the application of various function and data processing, namely realize above-mentioned external device control method.
Storer 102 can comprise high speed random access memory, also can comprise nonvolatile memory, as one or more magnetic storage device, flash memory or other non-volatile solid state memories.In some instances, storer 102 can comprise the storer relative to the long-range setting of processor 106 further, and these remote memories can be connected to terminal device 100 by network.The example of above-mentioned network includes but not limited to internet, intranet, LAN (Local Area Network), mobile radio communication and combination thereof.Processor 106 and other possible assemblies can carry out the access of storer 102 under the control of memory controller 104.
Various softwares in processor 106 run memory 102, instruction are to perform the various function of terminal device 100 and to carry out data processing.
Peripheral Interface 108 is for being coupled to CPU and storer 102 by various external unit.
In certain embodiments, memory controller 104, processor 106 and Peripheral Interface 108 can realize in one single chip.In some other example, they can respectively by independently chip realization.
Radio-frequency module 110, for receiving and sending electromagnetic wave, realizes the mutual conversion of electromagnetic wave and electric signal, thus carries out communication with communication network or other equipment.Radio-frequency module 110 can comprise the various existing circuit component for performing these functions, such as, and antenna, radio-frequency (RF) transceiver, digital signal processor, encrypt/decrypt chip, subscriber identity module (SIM) card, storer etc.Radio-frequency module 110 can with various network as internet, intranet, wireless network carry out communication or carry out communication by wireless network and other equipment.Above-mentioned wireless network can comprise cellular telephone networks, WLAN (wireless local area network) or Metropolitan Area Network (MAN).Above-mentioned wireless network can use various communication standard, agreement and technology, include, but are not limited to global system for mobile communications (GlobalSystemforMobileCommunication, GSM), enhancement mode mobile communication technology (EnhancedDataGSMEnvironment, EDGE), Wideband CDMA Technology (widebandcodedivisionmultipleaccess, W-CDMA), CDMA (Code Division Multiple Access) (Codedivisionaccess, CDMA), tdma (timedivisionmultipleaccess, TDMA), bluetooth, adopting wireless fidelity technology (Wireless, Fidelity, WiFi) (as IEEE-USA standard IEEE 802.11a, IEEE802.11b, IEEE802.11g and/or IEEE802.11n), the networking telephone (Voiceoverinternetprotocol, VoIP), worldwide interoperability for microwave access (WorldwideInteroperabilityforMicrowaveAccess, Wi-Max), other are for mail, the agreement of instant messaging and short message, and any other suitable communications protocol, even can comprise those current agreements be developed not yet.
Locating module 112 is for obtaining the current location of terminal device 100.The example of locating module 112 includes but not limited to Global Positioning System (GPS) (GPS), location technology based on WLAN (wireless local area network) or mobile radio communication.
Photographing module 114 is for taking pictures or video.Photo or the video of shooting can be stored in storer 102, and send by radio-frequency module 110.
Audio-frequency module 116 provides audio interface to user, and it can comprise one or more microphone, one or more loudspeaker and voicefrequency circuit.Voicefrequency circuit receives voice data from Peripheral Interface 108, voice data is converted to telecommunications breath, and telecommunications breath is transferred to loudspeaker.Telecommunications breath is changed the sound wave can heard into people's ear by loudspeaker.Voicefrequency circuit also from microphone receive telecommunications breath, convert electrical signals to voice data, and by data transmission in network telephony to Peripheral Interface 108 to be further processed.Voice data can obtain from storer 102 or by radio-frequency module 110.In addition, voice data also can be stored in storer 102 or by radio-frequency module 110 and send.In some instances, audio-frequency module 116 also can comprise an earphone and broadcast hole, for providing audio interface to earphone or other equipment.
Screen 118 provides an output interface between terminal device 100 and user, and export to user's display video, the content of these video frequency output can comprise word, figure, video and combination in any thereof.Some Output rusults correspond to some user interface object.Understandable, screen 118 can also provide one to export and inputting interface between terminal device 100 and user simultaneously.Particularly, except exporting to user's display video, screen 118 also receives the input of user, and the gesture operation such as click, slip of such as user, so that response is made in the input of user interface object to these users.The technology detecting user's input can be based on resistance-type, condenser type or other touch control detection technology possible arbitrarily.The instantiation of screen 118 display unit includes, but are not limited to liquid crystal display or light emitting polymer displays.
Key-press module 120 provides user to carry out the interface inputted to terminal device 100 equally, and user can perform different functions by pressing different buttons to make terminal device 100.
First embodiment
Fig. 2 is the applied environment figure of the external device control method that first embodiment of the invention provides.As shown in Figure 2, external unit 200 by data transmission interface (being also Peripheral Interface 108) access terminal equipment 100 access terminal equipment 100 on terminal device 100, and carries out data interaction with terminal device 100.
This data transmission interface can comprise: USB interface, serial communication interface, parallel communication interface, PS/2 interface, VGA (VideoGraphicsArray, i.e. Video Graphics Array) interface, HDMI (HighDefinitionMultimedia, high-definition multimedia) interface etc.
In the present embodiment, terminal device 100 can use Windows operating system.Windows operating system is the operating system with message-driven, windows messaging provides the means of carrying out communication between application program and Windows system, it is the notice that Windows operating system sends to application program, for telling that application program there occurs certain event, such as: user click mouse, change window size, the operation such as the key pressed on lower keyboard all can make Windows send a message to application program.Application program responds user operation by processing messages.
Have a system message queue in Windows, for the window application that each is performing, system sets up message queue, i.e. an application queue for it, is used for depositing the message of the various windows that this program may create.Be called the code of message loop containing one section in application program, be used for from message queue, retrieve these message and they are distributed in corresponding window function, application program obtains the message in message queue by message loop, know the operation of user to computing machine, and then carry out the process to message.
The process flow diagram of the external device control method that Fig. 3 provides for first embodiment of the invention.As shown in Figure 3, the external device control method of the present embodiment comprises the following steps:
Step S11, when having detected that external unit accesses, terminal device has obtained the identify label of this external unit by client;
In the present embodiment, in terminal device 100, preset client can be run, can be controlled the external unit 200 of access by this client.This client can comprise: instant communication client, news client, administrative client etc.Terminal device 100 can according to user be arranged on each start time start and run this client, or start according to the instruction of the enabled instruction of user's triggering and run this client after powering.
Particularly, terminal device 100 is when having detected that external unit 200 accesses, generation system message (such as: WM_DEVICECHANGE, be used to indicate a kind of windows messaging that the hardware device be connected with computing machine there occurs change) and put into the message queue of client, this system message may be used for notifying that this client has external unit to access.
This client, when retrieving this system message by message loop in message queue, enumerates the facility information of all hardware equipment in current system, can comprise the identify label of all hardware equipment in current system in this facility information; Then, the facility information of all hardware equipment in the current system enumerated and the historical record of access device are contrasted, determine the external unit 200 of new access, obtain the identify label of external unit 200.The facility information that external unit 200 accesses the hardware device of all normal operations in front system is comprised in the historical record of this access device.The historical record of this access device can by this client when having the data transmission interface of external unit access terminal equipment 100 and normally run at every turn, or when having external unit to be extracted from this data transmission interface, automatic record.
The identify label of external unit 200, is the identifying information being used for this external unit 200 and other external units being carried out distinguishing carried in external unit 200, has uniqueness.In the present embodiment, the identify label of external unit 200 can comprise: the numbering (VendorID, VID) of the manufacturer of external unit 200 and the production code member (ProductID, PID) of manufacturer inside.
After the identify label obtaining external unit 200, in other embodiments, whether terminal device 100 is also by having installed the driver of external unit 200 in this client detection system; If do not install, then download this driver by this client from server and install.
Whether step S12, comprise the information matched with this identify label in checkout equipment list;
Comprise the information of the identify label of all external units that the client support in terminal device 100 controls in list of devices, in the present embodiment, this list of devices can be obtained from server by client by terminal device 100.This client can start at every turn and at the beginning of running, download up-to-date list of devices and store from server.
Particularly, terminal device 100 is mated with the information stored in list of devices by the identify label of client by the external unit 200 of acquisition, to detect in this list of devices the information whether comprising and match with the identify label of external unit 200, namely detect this client whether controlled to external unit 200.
Step S13, when comprising the information matched with this identify label in this list of devices, controlling this external unit by this client and performing corresponding operation.
When comprising the information matched with the identify label of external unit 200 in this list of devices, that is external unit 200 is controlled concerning the client in terminal device 100, so terminal device 100 controls external unit 200 by this client and performs corresponding operation, such as: performed the executable program in external unit 200 by this client control external unit 200, control external unit 200 and open corresponding function, control external unit 200 calling program and open file in external unit 200 etc.Particularly, the client in terminal device 100 can obtain corresponding code logic according to the identify label of external unit 200, and performs, and makes external unit 200 perform corresponding operation.Wherein, this code logic can be included in list of devices, sends to client by server.This code logic may be used for all kinds of input actions of analog subscriber, as: user clicks the action of certain control knob in the user interface of client by mouse or finger, knocks the action etc. of certain button on keyboard.Like this, performed all kinds of input actions of corresponding code logic analog subscriber when detecting that external unit accesses by client, external unit is made to perform corresponding operation, break the convention that use windows messaging traditional in prior art carrys out Trigger Function logic, achieve namely action (also hardware change event) that user is inserted external unit is converted into trigger software function " message " as the action of user's button click, thus make the control of external unit more intelligent, more convenient.
The external device control method that the embodiment of the present invention provides, by when having detected that external unit accesses, terminal device obtains the identify label of this external unit by client, and detect the information whether comprising this identify label in preset list of devices, when comprising the information of this identify label in this list of devices, control this external unit by this client and perform corresponding operation, corresponding operation is performed because terminal device controls this external unit by client automatically when outside equipment access, because this simplify the artificial control operation to external unit, achieve the Automated condtrol to external unit, thus the efficiency controlling external unit can be improved.
Second embodiment
The applied environment figure of the external device control method that Fig. 4 provides for second embodiment of the invention.As shown in Figure 4, terminal device 100 and server 300 are positioned among wired or wireless network, and by this wired or wireless network, terminal device 100 and server 200 carry out data interaction.External unit 200 by data transmission interface (being also Peripheral Interface 108) access terminal equipment 100 access terminal equipment 100 on terminal device 100, and carries out data interaction with terminal device 100.
This data transmission interface can comprise: USB interface, serial communication interface, parallel communication interface, PS/2 interface, USB interface, HDMI etc.
In the present embodiment, terminal device 100 can use Windows operating system.Windows operating system is the operating system with message-driven, windows messaging provides the means of carrying out communication between application program and Windows system, it is the notice that Windows operating system sends to application program, for telling that application program there occurs certain event, such as: user click mouse, change window size, the operation such as the key pressed on lower keyboard all can make Windows send a message to application program.Application program responds user operation by processing messages.
Have a system message queue in Windows, for the window application that each is performing, system sets up message queue, i.e. an application queue for it, is used for depositing the message of the various windows that this program may create.Be called the code of message loop containing one section in application program, be used for from message queue, retrieve these message and they are distributed in corresponding window function, application program obtains the message in message queue by message loop, know the operation of user to computing machine, and then carry out the process to message.
The process flow diagram of the external device control method that Fig. 5 provides for second embodiment of the invention.As shown in Figure 5, the external device control method of the present embodiment comprises the following steps:
Step S21, starts and running client, by this client from the list of server download equipment in terminal device.
In the present embodiment, in terminal device 100, preset client can be run, can be controlled the external unit 200 of access by this client.This client can comprise: instant communication client, news client, administrative client etc.Terminal device 100 can according to user be arranged on each start time start and run this client, or start according to the instruction of the enabled instruction of user's triggering and run this client after powering.This client in startup and normal run after, to the download request of server 300 transmitting apparatus list, the list of devices that reception server 300 returns according to this list of devices download request.
Information and information of all external units code logic one to one with this respectively of the identify label of all external units that this client support controls can be comprised in this list of devices.This code logic may be used for all kinds of input actions of analog subscriber, as: user clicks the action of certain control knob in the user interface of client by mouse or finger, knocks the action etc. of certain button on keyboard.
The identify label of external unit is the identifying information being used for this external unit and other external units being carried out distinguishing carried in external unit, has uniqueness.In the present embodiment, the identify label of external unit 200 can comprise: VID and PID of external unit 200.
In other embodiments, this list of devices also when terminal device 100 being detected by accessing server by customer end 300, can be pushed to terminal device 100 by server 300.Or, when detecting that this list of devices has renewal, the content of renewal is pushed to terminal device 100.Initiatively list of devices is pushed to terminal 100 by server 300, and this list of devices of real-time update, eliminate user manually to update the equipment the operation of list, and can avoid occurring not upgrading in time list of devices and the problem that cannot control external unit 200 because of user, therefore can improve the convenience and efficiency that control external unit.
Step S22, when having detected that external unit accesses, this terminal device generation system message has also put into the message queue of this client, and this system message is used for notifying that this client has external unit to access;
Particularly, Windows system is when detecting that external unit 200 inserts the event of the data transmission interface of terminal device 100, a WM_DEVICECHANGE message is sent to the client running on terminal device 100, and put it in the message queue of this client, so that this client is when retrieving this WM_DEVICECHANGE message, perform corresponding operation.
Understandable, in other operating systems (such as: Android, iOS, Linux etc.), terminal device 100 also in conjunction with the principle of work of other operating systems, can realize this step.
Step S23, this client, when this system message being detected, enumerates the facility information of all hardware equipment in current system, comprises the identify label of this all hardware equipment in this facility information;
Client in terminal device 100 obtains the message in message queue by message loop, when retrieving WM_DEVICECHANGE message in message queue, confirm have external unit 200 to access, and this WM_DEVICECHANGE message is processed, enumerate the facility information of all hardware equipment in current system, the identify label of all hardware equipment in current system in this facility information, can be comprised.
Step S24, the historical record of this facility information and access device contrasts by this client, determines this external unit, obtains the identify label of this external unit;
The facility information of all hardware equipment in the current system enumerated and the historical record of access device contrast by the client in terminal device 100, determine the external unit 200 of new access, obtain the identify label of external unit 200.The facility information that external unit 200 accesses the hardware device of all normal operations in front system is comprised in the historical record of this access device.The historical record of this access device can by this client when having the data transmission interface of external unit access terminal equipment 100 and normally run at every turn, or when having external unit to be extracted from this data transmission interface, automatic record.
Whether step S25, by having installed the driver of this external unit in this client detection system;
Particularly, whether terminal device 100, by the identify label of this client according to external unit 200, has installed the driver of external unit 200 in detection system.
If do not install, then perform step S26: download this driver by this client from this server and install;
When the driver not installing external unit 200 being detected in system, terminal device 100 sends the request of downloading this driver by user end to server 300, this driver that reception server 300 returns also is installed.Due to when detecting that external unit 200 accesses, just asking to download driver to server 300, can ensure that driver is up-to-date version like this, and the security risk of user can be reduced, thus the efficiency of peripheral equipment control can be improved.
If install, then perform step S27;
Whether step S27, comprise the information matched with this identify label in checkout equipment list;
The identify label of the external unit 200 of acquisition is mated with the information stored in the list of devices obtained from server 300 by client by terminal device 100, to detect in this list of devices the information whether comprising and match with the identify label of external unit 200, namely detect this client whether controlled to external unit 200.
Step S28, when comprising the information matched with this identify label in this list of devices, obtaining corresponding code logic by this client according to this identify label, and performing, and makes this external unit perform corresponding operation.
When comprising the information matched with the identify label of external unit 200 in this list of devices, that is external unit 200 is controlled concerning the client in terminal device 100, so terminal device 100 obtains the code logic corresponding with external unit 200 stored in this list of devices according to the identify label of external unit 200 by this client, and perform, make external unit 200 perform corresponding operation.This code logic is used for all kinds of input actions of analog subscriber.
Like this, when external unit 200 access terminal equipment 100 being detected, by all kinds of input actions of the code logic analog subscriber of client executing external unit 200 correspondence, as: user clicks the action of certain control knob in the user interface of client by mouse or finger, knock the action etc. of certain button on keyboard, external unit 200 is made to perform corresponding operation, break the convention that use windows messaging traditional in prior art carrys out Trigger Function logic, achieve namely action (also hardware change event) that user is inserted external unit is converted into trigger software function " message " as the action of user's button click, thus make the control of external unit more intelligent, more convenient.
The external device control method that the embodiment of the present invention provides, by when having detected that external unit accesses, terminal device obtains the identify label of this external unit by client, and detect the information whether comprising this identify label in preset list of devices, when comprising the information of this identify label in this list of devices, control this external unit by this client and perform corresponding operation, corresponding operation is performed because terminal device controls this external unit by client automatically when outside equipment access, because this simplify the artificial control operation to external unit, achieve the Automated condtrol to external unit, thus the efficiency controlling external unit can be improved.
3rd embodiment
The process flow diagram of the external device control method that Fig. 6 provides for third embodiment of the invention.In the present embodiment by for external unit 200 for having the situation of the wireless router of hotspot function, and be described from the angle of client, this wireless router is by USB interface access terminal equipment 100.
In the present embodiment, the client in terminal device 100 can be instant communication client, comprising: download module, message loop module and logic execution module.Wherein, download module can be used for from the list of server download equipment and driver; Message loop module is used in message queue searches for hardware device change event message; Processing module can be used for, when message loop module searches hardware device change event message in message queue, changing event message process this hardware device; Code logic execution module can be used for receiving the command messages that this processing module sends according to result, performs corresponding code logic according to this command messages.
As shown in Figure 6, the external device control method of the present embodiment comprises the following steps:
Step S31, start and running client in terminal device, this client is from the list of server download equipment;
Particularly, after client starts in terminal device 100, the download module in this client is according to presetting rule, and to the download request of server 300 transmitting apparatus list, reception server 300 is according to this download request Returning equipment list and store.Can comprise the information of the identify label (VID and PID) of all external units that this client support controls in this list of devices, the concrete structure of this list of devices can be as shown in table 1 below.
Table 1
Upper table 1 is that understandable, list of devices also can be defined by other similar agreements with the list of devices of XML definition, as: JOSN.
Step S32, obtains hardware device and changes event message;
Particularly, terminal device 100, when detecting that wireless router accesses, sends a WM_DEVICECHANGE message to the client running on terminal device 100, and puts it in the message queue of this client.Message loop module in this client, by the message in searching message queue, obtains the WM_DEVICECHANGE message (also namely hardware device changes event message) in message queue, defines hardware device change event and occurs.
Step S33, enumerates the facility information of all hardware equipment in current system, is contrasted by the historical record of this facility information and access device, determines the wireless router of new access, obtains the identify label of this wireless router;
Particularly, message loop module in client is when getting the WM_DEVICECHANGE message in message queue, to the processing module transmission processing command messages in this client, this processing module is processed to this WM_DEVICECHANGE message according to this processing command message.Particularly, first this processing module enumerates the facility information of all hardware equipment in current system, can comprise the identify label of all hardware equipment in current system in this facility information; Then, the facility information of all hardware equipment in the current system enumerated and the historical record of access device are contrasted, determine the wireless router of new access, obtain the identify label (VID and PID) of this wireless router.The facility information of the hardware device of all normal operations in the front system of this wireless router access is comprised in the historical record of this access device.
Whether step S34, installed the driver of this wireless router in detection system;
Particularly, whether the processing module in client, according to the identify label of wireless router, has installed the driver of the wireless router of new access in the system of sense terminals equipment 100.
If do not install, then perform step S35: download this driver from this server and install;
Particularly, if do not install the driver of this wireless router in system, processing module then in client sends download command message to the download module in this client, makes this download module download the driver of this wireless router according to this download command message from server 300 and install.
Like this, only having when when detecting that wireless router accesses, just asking to download driver to server 300, can ensure that driver is up-to-date version like this, and the security risk of user can be reduced.
If install, then perform step S36;
Step S36, judges whether to find this wireless router in this list of devices;
Particularly, the value of VID that the list of devices (table 1) that the value of VID of wireless router of the new access obtained and the value of PID and above-mentioned XML define by the processing module in client is middle to be stored and the value of PID are mated, to judge whether to find this wireless router in this list of devices, if the two matches, then can judge to have found this wireless router in this list of devices.
If so, then step S37 is performed: perform corresponding code logic.
Particularly, processing module in client is when judging to have found this wireless router in this list of devices, send command messages to the code logic execution module in this client, make this code logic execution module perform code logic corresponding to this wireless router.This code logic can be preset in terminal device 100, opened the action of the control knob of wireless router by mouse or the finger control clicked in the user interface of this client for analog subscriber, executable file in this wireless router is performed, can network Connection Sharing in opening terminal apparatus 100 by performing this executable file, and this wireless router be configured such that the hotspot of the bandwidth of the network with this network Share interlinkage and start.
If not, then step S32 is performed.
The external device control method that the embodiment of the present invention provides, by when having detected that external unit accesses, terminal device obtains the identify label of this external unit by client, and detect the information whether comprising this identify label in preset list of devices, when comprising the information of this identify label in this list of devices, control this external unit by this client and perform corresponding operation, corresponding operation is performed because terminal device controls this external unit by client automatically when outside equipment access, because this simplify the artificial control operation to external unit, achieve the Automated condtrol to external unit, thus the efficiency controlling external unit can be improved.
4th embodiment
The structural representation of the external device controller that Fig. 7 provides for fourth embodiment of the invention.The external device controller that the present embodiment provides can run in the terminal device 100 shown in Fig. 2, realizes the external device control method in above-described embodiment.As shown in Figure 7, external device controller 40 comprises: acquisition module 41, detection module 42 and control module 43.
Wherein, acquisition module 41, for when having detected that external unit accesses, has obtained the identify label of this external unit by client;
Detection module 42, for whether comprising the information that this identify label of obtaining with acquisition module 41 matches in checkout equipment list, comprises the information of the identify label of all external units that this client support controls in this list of devices;
Control module 43, when comprising for detecting in this list of devices when detection module 42 information matched with this identify label, controlling this external unit by this client and performing corresponding operation.
Each module can be by software code realization above, and now, above-mentioned each module can be stored in storer 102, as shown in Figure 8.Each module can be realized by hardware device such as integrated circuit (IC) chip equally above.
The present embodiment, to the detailed process of each Implement of Function Module of external device controller 40 function separately, refers to the particular content of above-mentioned Fig. 1 to middle description embodiment illustrated in fig. 6, repeats no more herein.
The external device controller that the embodiment of the present invention provides, by when having detected that external unit accesses, the identify label of this external unit is obtained by client, and detect the information whether comprising this identify label in preset list of devices, when comprising the information of this identify label in this list of devices, control this external unit by this client and perform corresponding operation, corresponding operation is performed because terminal device controls this external unit by client automatically when outside equipment access, because this simplify the artificial control operation to external unit, achieve the Automated condtrol to external unit, thus the efficiency controlling external unit can be improved.
5th embodiment
The structural representation of the external device controller that Fig. 9 provides for fifth embodiment of the invention.The external device controller that the present embodiment provides can run in the terminal device 100 shown in Fig. 2, realizes the external device control method in above-described embodiment.As shown in Figure 9, external device controller 50 comprises: acquisition module 51, detection module 52, control module 53, startup module 54 and download module 55.
Wherein, acquisition module 51, for when having detected that external unit accesses, has obtained the identify label of this external unit by client;
Detection module 52, for whether comprising the information that this identify label of obtaining with acquisition module 51 matches in checkout equipment list, comprises the information of the identify label of all external units that this client support controls in this list of devices;
Control module 53, when comprising for detecting in this list of devices when detection module 52 information matched with this identify label, controlling this external unit by this client and performing corresponding operation;
Start module 54, for starting in this terminal device and running this client;
Download module 55, for downloading this list of devices by this client from server.
Preferably, this acquisition module 51, also for when having detected that external unit accesses, generation system message also puts into the message queue of this client, this system message is used for notifying that this client has external unit to access, this client is when this system message being detected, enumerate the facility information of all hardware equipment in current system, the identify label of this all hardware equipment is comprised in this facility information, the historical record of this facility information and access device contrasts by this client, determine this external unit, obtain the identify label of this external unit.
Preferably, this detection module 52, also for the driver by whether having installed this external unit in this client detection system;
This download module 55, if also for detection module 52 testing result for not install, then download this driver by this client from this server and install.
Preferably, the information of all external units code logic one to one with this respectively is also comprised in this list of devices.
Preferably, this control module 53, also for obtaining corresponding code logic by this client according to this identify label, and performs, and makes this external unit perform corresponding operation.
Preferably, this identify label comprises: the numbering of the manufacturer of this external unit and the production code member of manufacturer inside.
The present embodiment, to the detailed process of each Implement of Function Module of external device controller 50 function separately, refers to the particular content of above-mentioned Fig. 1 to middle description embodiment illustrated in fig. 6, repeats no more herein.
The external device controller that the embodiment of the present invention provides, by when having detected that external unit accesses, the identify label of this external unit is obtained by client, and detect the information whether comprising this identify label in preset list of devices, when comprising the information of this identify label in this list of devices, control this external unit by this client and perform corresponding operation, corresponding operation is performed because terminal device controls this external unit by client automatically when outside equipment access, because this simplify the artificial control operation to external unit, achieve the Automated condtrol to external unit, thus the efficiency controlling external unit can be improved.
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.For device class embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or device and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or device.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the device comprising key element and also there is other identical element.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
Above, it is only preferred embodiment of the present invention, not any pro forma restriction is done to the present invention, although the present invention discloses as above with preferred embodiment, but and be not used to limit the present invention, any those skilled in the art, do not departing within the scope of technical solution of the present invention, make a little change when the technology contents of above-mentioned announcement can be utilized or be modified to the Equivalent embodiments of equivalent variations, in every case be do not depart from technical solution of the present invention content, according to any simple modification that technical spirit of the present invention is done above embodiment, equivalent variations and modification, all still belong in the scope of technical solution of the present invention.

Claims (14)

1. an external device control method, is characterized in that, comprising:
When having detected that external unit accesses, terminal device has obtained the identify label of described external unit by client;
Whether comprise the information matched with described identify label in checkout equipment list, in described list of devices, comprise the information of the identify label of all external units that described client support controls;
When comprising the information matched with described identify label in described list of devices, controlling described external unit by described client and performing corresponding operation.
2. method according to claim 1, is characterized in that, described when having detected that external unit accesses, and terminal device also comprises before obtaining the identify label of described external unit by client:
Start in described terminal device and run described client, downloading described list of devices by described client from server.
3. method according to claim 1, is characterized in that, described when having detected that external unit accesses, and the identify label that terminal device obtains described external unit by client comprises:
When having detected that external unit accesses, described terminal device generation system message has also put into the message queue of described client, and described system message is used for notifying that described client has external unit to access;
Described client, when described system message being detected, enumerates the facility information of all hardware equipment in current system, comprises the identify label of described all hardware equipment in described facility information;
The historical record of described facility information and access device contrasts by described client, determines described external unit, obtains the identify label of described external unit.
4. method according to claim 1, is characterized in that, described terminal device also comprises after obtaining the identify label of described external unit by client:
By whether having installed the driver of described external unit in described client detection system;
If do not install, then download described driver by described client from described server and install.
5. method according to claim 1, is characterized in that, also comprise in described list of devices respectively with the information of described all external units code logic one to one.
6. the method according to any one of claim 1 to 5, is characterized in that, the described operation controlling the execution of described external unit corresponding by described client comprises:
Obtain corresponding code logic by described client according to described identify label, and perform, make described external unit perform corresponding operation.
7. the method according to any one of claim 1 to 5, is characterized in that, described identify label comprises: the numbering of the manufacturer of described external unit and the production code member of manufacturer inside.
8. an external device controller, runs on terminal device, it is characterized in that, comprising:
Acquisition module, for when having detected that external unit accesses, has obtained the identify label of described external unit by client;
Detection module, for whether comprising the information that the described identify label that obtains with described acquisition module matches in checkout equipment list, comprises the information of the identify label of all external units that described client support controls in described list of devices;
Control module, during for the information comprising and match with described identify label being detected in described list of devices when described detection module, controls described external unit by described client and performs corresponding operation.
9. device according to claim 8, is characterized in that, described device also comprises:
Start module, for starting in described terminal device and running described client;
Download module, for downloading described list of devices by described client from server.
10. device according to claim 8, is characterized in that,
Described acquisition module, also for when having detected that external unit accesses, generation system message also puts into the message queue of described client, described system message is used for notifying that described client has external unit to access, described client is when described system message being detected, enumerate the facility information of all hardware equipment in current system, the identify label of described all hardware equipment is comprised in described facility information, the historical record of described facility information and access device contrasts by described client, determine described external unit, obtain the identify label of described external unit.
11. devices according to claim 8, is characterized in that,
Described detection module, also for the driver by whether having installed described external unit in described client detection system;
Described download module, if also for described detection module testing result for not install, then download described driver by described client from described server and install.
12. devices according to claim 8, is characterized in that, also comprise in described list of devices respectively with the information of described all external units code logic one to one.
Device described in any one of 13. according to Claim 8 to 12, is characterized in that,
Described control module, also for obtaining corresponding code logic by described client according to described identify label, and performs, and makes described external unit perform corresponding operation.
Device described in any one of 14. according to Claim 8 to 12, is characterized in that, described identify label comprises: the numbering of the manufacturer of described external unit and the production code member of manufacturer inside.
CN201410289089.8A 2014-06-24 2014-06-24 External device control method and device Active CN105320616B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410289089.8A CN105320616B (en) 2014-06-24 2014-06-24 External device control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410289089.8A CN105320616B (en) 2014-06-24 2014-06-24 External device control method and device

Publications (2)

Publication Number Publication Date
CN105320616A true CN105320616A (en) 2016-02-10
CN105320616B CN105320616B (en) 2019-06-28

Family

ID=55248027

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410289089.8A Active CN105320616B (en) 2014-06-24 2014-06-24 External device control method and device

Country Status (1)

Country Link
CN (1) CN105320616B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850309A (en) * 2017-02-28 2017-06-13 深圳知路科技有限公司 A kind of internet-of-things terminal resource management and the method for port mapping
CN107181727A (en) * 2016-03-11 2017-09-19 咪咕音乐有限公司 A kind of control method and device of external equipment
CN107330298A (en) * 2017-07-25 2017-11-07 南京清科信息科技有限公司 Portable mobile diagnosis and treatment terminal, diagnosis and therapy system and its operating method for it
WO2018058623A1 (en) * 2016-09-30 2018-04-05 杭州来布科技有限公司 Support, device, system and method for standardized peripheral module of mobile terminal
CN109683715A (en) * 2018-12-29 2019-04-26 北京诺亦腾科技有限公司 A kind of VR apparatus control method, device and computer readable storage medium
CN111506893A (en) * 2020-04-08 2020-08-07 深信服科技股份有限公司 External equipment management method and device, electronic equipment and storage medium
CN114372017A (en) * 2022-01-04 2022-04-19 中国大恒(集团)有限公司北京图像视觉技术分公司 Enumeration method without influencing normal work of CXP (capacity-definition protocol) equipment
CN115834751A (en) * 2022-11-09 2023-03-21 惠州市德赛西威智能交通技术研究院有限公司 Detection method, detection system and storage medium for mobile phone interconnection equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957725A (en) * 2009-07-13 2011-01-26 联想(北京)有限公司 Method for managing external equipment of computer
CN102542649A (en) * 2012-03-11 2012-07-04 李凯 Method for controlling locking system by mobile equipment
CN102663842A (en) * 2012-04-09 2012-09-12 李凯 Method for mobile device to control multiple external devices
CN102999251A (en) * 2012-10-31 2013-03-27 东莞宇龙通信科技有限公司 Terminal and equipment connection management method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957725A (en) * 2009-07-13 2011-01-26 联想(北京)有限公司 Method for managing external equipment of computer
CN102542649A (en) * 2012-03-11 2012-07-04 李凯 Method for controlling locking system by mobile equipment
CN102663842A (en) * 2012-04-09 2012-09-12 李凯 Method for mobile device to control multiple external devices
CN102999251A (en) * 2012-10-31 2013-03-27 东莞宇龙通信科技有限公司 Terminal and equipment connection management method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107181727A (en) * 2016-03-11 2017-09-19 咪咕音乐有限公司 A kind of control method and device of external equipment
WO2018058623A1 (en) * 2016-09-30 2018-04-05 杭州来布科技有限公司 Support, device, system and method for standardized peripheral module of mobile terminal
CN106850309A (en) * 2017-02-28 2017-06-13 深圳知路科技有限公司 A kind of internet-of-things terminal resource management and the method for port mapping
CN107330298A (en) * 2017-07-25 2017-11-07 南京清科信息科技有限公司 Portable mobile diagnosis and treatment terminal, diagnosis and therapy system and its operating method for it
CN109683715A (en) * 2018-12-29 2019-04-26 北京诺亦腾科技有限公司 A kind of VR apparatus control method, device and computer readable storage medium
CN109683715B (en) * 2018-12-29 2020-12-18 北京诺亦腾科技有限公司 VR equipment control method and device and computer readable storage medium
CN111506893A (en) * 2020-04-08 2020-08-07 深信服科技股份有限公司 External equipment management method and device, electronic equipment and storage medium
CN114372017A (en) * 2022-01-04 2022-04-19 中国大恒(集团)有限公司北京图像视觉技术分公司 Enumeration method without influencing normal work of CXP (capacity-definition protocol) equipment
CN114372017B (en) * 2022-01-04 2023-12-12 中国大恒(集团)有限公司北京图像视觉技术分公司 Enumeration method without affecting normal operation of CXP equipment
CN115834751A (en) * 2022-11-09 2023-03-21 惠州市德赛西威智能交通技术研究院有限公司 Detection method, detection system and storage medium for mobile phone interconnection equipment

Also Published As

Publication number Publication date
CN105320616B (en) 2019-06-28

Similar Documents

Publication Publication Date Title
US11985374B2 (en) Method of controlling the sharing of videos and electronic device adapted thereto
CN105320616A (en) External device control method and device
CN108476060B (en) Method for establishing classic Bluetooth connection between dual-mode Bluetooth devices and dual-mode Bluetooth device
US20200366516A1 (en) Electronic device and method for registering smart home device in smart home system
US10165391B2 (en) Companion application for activity cooperation
US20170235435A1 (en) Electronic device and method of application data display therefor
US20150333971A1 (en) Method and device for managing processes of application program
KR102107132B1 (en) Access point connection method of electronic apparatus and electronic appparatus thereof
US20210232447A1 (en) Method for managing multiple operating systems in a terminal
CN104092723B (en) Document down loading method, Apparatus and system
CN104394263A (en) Accessing point list displaying method and device
CN105094861A (en) Webpage application program loading method, device and system
US20190080120A1 (en) Unlocking methods and related products
KR20200140555A (en) Electronic device for switching between a dual standby mode and a single standby mode and method for the same
CN110832888A (en) Method for automatically switching SIM (subscriber identity Module) cards and electronic device
EP2869604B1 (en) Method, apparatus and device for processing a mobile terminal resource
CN103916468A (en) System upgrading method, terminal, server and upgrading system
KR102161443B1 (en) Discovering and controlling method and apparatus of controllee in a smart home system
CN105095253A (en) Webpage display method and webpage display device
CN106095423B (en) Method, terminal and server for providing browsing service
CN104579665A (en) Authentication method and device
CN106162612A (en) Control the method and device of Root authority
CN104468706A (en) Audio file transmission method and device
CN110582079B (en) Bluetooth connection setting method and device, computer readable storage medium and terminal
WO2019084783A1 (en) Service scheduling method and apparatus, computer device, and computer readable storage medium

Legal Events

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