CN101291376B - Method and apparatus for determining equipment object - Google Patents
Method and apparatus for determining equipment object Download PDFInfo
- Publication number
- CN101291376B CN101291376B CN2008101152063A CN200810115206A CN101291376B CN 101291376 B CN101291376 B CN 101291376B CN 2008101152063 A CN2008101152063 A CN 2008101152063A CN 200810115206 A CN200810115206 A CN 200810115206A CN 101291376 B CN101291376 B CN 101291376B
- Authority
- CN
- China
- Prior art keywords
- symbliclink
- friendlyname
- audio frequency
- frequency apparatus
- registration table
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000010586 diagram Methods 0.000 description 4
- 241001269238 Data Species 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention discloses a method and a device for determining a device object. The method comprises the steps of: searching a symbliclink of the device object to be determined in a registry by taking the feature of the device object to be determined which is distinctive to other devices as search criteria, and determining the device object according to the symbliclink. The device comprises a searching unit and a determining unit. The searching unit is used for searching a symbliclink of the device object to be determined in a registry by taking the feature of the device object to be determined which is distinctive to other devices as search criteria and for sending the found symbliclink to the determining unit. The determining unit is used for determining the device object according to the symbliclink sent by the searching unit. The application of the technical proposal disclosed in the embodiment of the present invention can improve the accuracy of the device object determination.
Description
Technical field
The present invention relates to computer realm, relate in particular to a kind of method and apparatus of definite device object.
Background technology
Echo cancellation is to utilize computer recording or transmitting audio data to need a problem of solution badly.When in the computing machine plural audio frequency apparatus being installed, may sending back by another audio frequency apparatus by the speech data that a certain audio frequency apparatus spreads out of, thereby cause echo.For example, first and second dial network telephone, the voice of first passes to second place and the audio amplifier by second play after, if by the microphone collection of second, and reach the first place by the second place, then first will be felt echo.
One of method of eliminating echo is, determines current audio frequency apparatus object of working in the computing machine, and the packet of special audio device object is tackled.Still dial network telephone and be example with first and second, when if second is conversed by microphone and first, play the sound that the first place is transmitted by audio amplifier, then can tackle the sound that second place audio amplifier is play, second place microphone is when gathering speech data, according to the speech data of intercepting, from the speech data that collects, remove the sound that audio amplifier is play, and then eliminate echo.As seen, when adopting this method to eliminate echo, need to determine current audio frequency apparatus object of working.
In a plurality of audio frequency apparatuses of installing in the computing machine, some are arranged is system default work, and usually, behind the computer starting, current audio frequency apparatus of working is the audio frequency apparatus of these acquiescence work.Each is installed to the audio frequency apparatus on the computing machine, can shine upon to obtain a device object in computing machine, also can obtain a plurality of device objects, but can only have one to be system default work in these device objects.
The information that comprises all devices of installing in this computing machine in the equipment manager in the computing machine, these information can be used to determine device object.In the prior art, promptly determine the audio frequency apparatus object that to tackle its speech data, by driver these device objects are handled then by the audio frequency apparatus information in the equipment manager.
The facility information that equipment manager comprised is comparatively coarse to the description of device object, and for example, which device object is these information can not identify is system default work.Therefore, when determining the audio frequency apparatus object with the elimination echo by equipment manager, perhaps need characteristic information according to predetermined audio frequency apparatus object, in the shown various audio frequency apparatus objects of slave unit manager, determine to possess the audio frequency apparatus object of described characteristic information, thereby the audio frequency apparatus object of determining is carried out the speech data interception; Perhaps need various audio frequency apparatus objects shown in the traversal queries equipment manager, each device object is all carried out relevant treatment, to determine to carry out it audio frequency apparatus object of speech data interception.Wherein, the dirigibility of last optional method is relatively poor, can only eliminate the echo that predetermined audio frequency apparatus produces; Back one optional method has increased the complexity that drives.
As everyone knows, resource in the computing machine comprises resource under user's attitude (usermode) and the resource under the kernel mode (kernalmode), wherein, the resource under the kernalmode has higher priority than the resource under the usermode, also requires higher stability.Driver takies is exactly resource under the kernalmode.When using described back one optional method, because driver need all carry out relevant treatment to all shown in equipment manager audio frequency apparatus objects, therefore increase the complicacy of driver, make the stability of driver reduce, and, also reduced the stability of computer system because the kernalmode resource that takies is more.
As seen,, determine that therefore the accuracy of device object is relatively poor, like this, in the time need carrying out relevant treatment, will cause such as above-mentioned deficiency to the device object of determining because the facility information in the equipment manager is detailed inadequately to the description of device object.For example, if plural audio frequency apparatus has been installed in the computing machine or an audio frequency apparatus has plural audio frequency apparatus object, can determine audio frequency apparatus object in this computing machine though then utilize facility information in the equipment manager, but can not determine which is system default work in these audio frequency apparatus objects, therefore, when needs are eliminated echo, perhaps can only eliminate the echo that predetermined audio frequency apparatus produces, perhaps increased the complexity that drives.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of method and apparatus of definite device object, to improve the accuracy of determining device object.
For achieving the above object, technical scheme of the present invention specifically is achieved in that
A kind of method of definite device object, the method comprising the steps of:
The key word directsound that comprises in registration table with the audio frequency apparatus object of system default work is a search condition, the symbol connection identifier symbliclink of the audio frequency apparatus object of search system acquiescence work in registration table determines the audio frequency apparatus object of system default work according to described symbliclink.
A kind of device of definite device object, this device comprises search unit and determining unit; Described search unit comprises friendlyname determination module and symbliclink determination module;
Described friendlyname determination module is used for, and search comprises the friendlyname of the device object of key word directsound in registration table, and the friendlyname that searches is issued described symbliclink determination module; Wherein, described key word directsound is the key word that system stamps for the audio frequency apparatus object of acquiescence work in registration table automatically;
Described symbliclink determination module is used for, and under registration table sound intermediate frequency facility inventory, at each friendlyname that receives, inquires about the key assignments of described friendlyname key, and the symbliclink that comprises in the described key assignments is issued described determining unit;
Described determining unit is used for, and the symbliclink that sends according to described search unit determines device object.
As seen, owing to compare with the facility information in the equipment manager, facility information in the registration table has been done comparatively detailed description to device object, therefore, when in registration table, being different from the miscellaneous equipment Properties of Objects as search condition with device object to be determined, the symbol connection identifier symbliclink of search device object to be determined in registration table when determining device object according to described symbliclink, can improve the accuracy of determining device object.
Description of drawings
Fig. 1 is the method flow diagram that determining of proposing of the inventive method embodiment has the friendlyname of directsound key word;
Fig. 2 is the method flow diagram of inquiring about symbliclink in the key assignments of the friendlyname key that contains the directsound key word that the inventive method embodiment provides;
Fig. 3 is that apparatus of the present invention embodiment provides the structural drawing of the device of locking equipment object really.
Embodiment
The present inventor notices: compare with the facility information in the equipment manager in the computing machine, facility information in the registration table in the computing machine has been done comparatively detailed description to device object, therefore, proposition is different from the miscellaneous equipment Properties of Objects as search condition with device object to be determined in registration table, the symbol connection identifier (symbliclink) of search device object to be determined is determined device object according to described symbliclink in registration table.
For making purpose of the present invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in more detail.
Be example with the audio frequency apparatus object of determining system default work below, the present invention is carried out exemplary illustration.
Each equipment all has identification of the manufacturer friendlyname separately, when in the computing machine that adopts Windows operating system, audio frequency apparatus being installed, in the registration process of installing, system can identify the device object of this equipment as a key with this friendlyname in registration table, can store the symbliclink of described device object in the key assignments of this key, just can find described device object according to this symbliclink, in addition, system also can be the key word that the audio frequency apparatus object of acquiescence work is stamped directsound automatically in registration table.Therefore, as long as the friendlyname key that search contains the directsound key word in registration table finds symbliclink in the key assignments of described key, can determine the audio frequency apparatus object of system default work.
Provide the method for the friendlyname that determines to have the directsound key word below, and in the key assignments of the friendlyname key that contains the directsound key word method of inquiry symbliclink.
Under Windows operating system, DSHOW method commonly used is searched for the friendlyname with directsound key word, specifically, the interface of the CLSID_AudioRendererCategory enumerator of audio frequency apparatus friendlyname is enumerated in acquisition earlier exactly, inquire about among the friendlyname of each audio frequency apparatus object that this enumerator enumerates and whether contain the dierctsound key word, can determine to have the friendlyname of directsound key word, specify this method below in conjunction with Fig. 1.
Fig. 1 is the method flow diagram that determining of proposing of the inventive method embodiment has the friendlyname of directsound key word, and as shown in Figure 1, this method specifically comprises the steps:
By this step, the friendlyname of all audio frequency apparatus objects that can obtain to install in the computing machine (comprising the audio frequency apparatus object of system default work and the audio frequency apparatus object of nonsystematic acquiescence work).
The device object that comprises the directsound key word is the audio frequency apparatus object of system default work.Therefore, by this step, can obtain the audio frequency apparatus object of current system default work in the computing machine.Usually, current audio frequency apparatus object of working is the audio frequency apparatus object of system default work in the computing machine.
Whether step 105 is judged to enumerate and is finished, if, process ends then, otherwise execution in step 106.
By method shown in Figure 1, the friendlyname that can find all to have the audio frequency apparatus object of directsound key word promptly can find all friendlyname of the audio frequency apparatus object of system default work.
After having determined to contain the friendlyname of directsound key word, can the audio frequency apparatus catalogue in registration table under, inquire about the key assignments that each contains the friendlyname key of directsound key word, extract the symbliclink that is comprised in the key assignments.
Under Windows operating system, described audio frequency apparatus catalogue be HKLM SYSTEM currentcontrolset CONTROL deviceclass the 65E8773E-8F56-11D0-A3B9-00A0C9223196} item, and this record be the device object that audio amplifier, earphone etc. are play the audio frequency apparatus of speech datas.
Fig. 2 is the method flow diagram of inquiring about symbliclink in the key assignments of the friendlyname key that contains the directsound key word that the inventive method embodiment provides.
Fig. 2 has adopted recursion method inquiry key assignments, and as shown in Figure 2, this method specifically comprises the steps:
Find symbliclink, this symbliclink can be saved in the storage space of agreement, for example, be saved in the storage space of arranging with driver, like this, driver promptly can read this symbliclink from this agreement storage space, determine device object according to this symbliclink.
By method shown in Figure 2, can in the key assignments of the friendlyname key that contains the directsound key word, inquire the symbliclink of this device object, because the symbliclink according to device object can determine device object, thereby, by the method for Fig. 2, can determine the audio frequency apparatus object of system default work.
Because the audio frequency apparatus object of system default work is the audio frequency apparatus object of working usually, behind the audio frequency apparatus object of having determined system default work, can eliminate echo at this audio frequency apparatus object, its concrete grammar is: tackle the speech data that this audio frequency apparatus object is play, remove the speech data of intercepting from the speech data of gathering.
For example, search the audio frequency apparatus object of system default work by Fig. 1 and Fig. 2 after, first and second dial network telephone, when second is by microphone and first conversation, play the sound that the first place is transmitted by this audio frequency apparatus of audio amplifier of system default work, in this scene, the microphone of second is tackled the speech data that described device object is play, and from the speech data of this microphone collection, remove the speech data of intercepting, and then can eliminate echo, make the imperceptible echo of first.
When adopting method illustrated in figures 1 and 2 to determine the audio frequency apparatus object, installing and during registration according to audio frequency apparatus, the audio frequency apparatus object of system default work can be stamped this characteristic of directsound key word automatically, at first use the DSHOW method to obtain the friendlyname of the audio frequency apparatus object of system default work, then with friendlyname as querying condition, at the Render of deviceclass subitem, be HKLM SYSTEM currentcontrolset CONTROL deviceclass { use the method for recurrence to obtain the symblicLink of audio frequency apparatus object in the 65E8773E-8F56-11D0-A3B9-00A0C9223196} item.Driver can be determined device object according to described symblicLink.
Because the present invention is when determining device object, utilization be facility information in the registration table, and the facility information in the registration table is compared with the facility information in the equipment manager, and is more detailed to the description of device object, thereby can improve the accuracy of determining equipment.
For example, according to the characteristic of audio frequency apparatus when installing and register, when utilizing the facility information of audio frequency apparatus in registration table to determine audio frequency apparatus, not only can determine all the audio frequency apparatus objects in the system, and can determine the audio frequency apparatus object of system default work further, thereby improved the accuracy of definite device object.
When what determine is the audio frequency apparatus object of system default work, but not during all audio frequency apparatus objects, owing to reduced the quantity of device object, therefore can reduce the complexity of driver, and then improves the stability of driver.
When adopting the method inquiry and registration table of recurrence, can make that also the inquiry code is simplified.
More than be example with the audio frequency apparatus object of determining system default work, illustrated that the characteristic of utilizing equipment to be determined to be different from other equipment in registration table determines the method for device object, in the practical application, as long as find out device object to be determined is different from other device objects in registration table characteristic, then no matter whether device object to be determined is the audio frequency apparatus object, all can utilize the present invention to determine device object.
According to the method embodiment that determines device object, provide the device embodiment that determines device object below.
Fig. 3 is that apparatus of the present invention embodiment provides the structural drawing of the device of locking equipment object really, and as shown in Figure 3, this device comprises search unit 301 and determining unit 302.
Search unit 301 is used for, and the characteristic that is different from miscellaneous equipment with equipment to be determined in registration table is a search condition, and the symbol connection identifier symbliclink of search equipment to be determined issues determining unit 302 with the symbliclink that searches in registration table.
Determining unit 302 is used for, and the symbliclink that sends according to search unit 301 determines device object.Search unit 301 can also comprise friendlyname determination module 3011 and symbliclink determination module 3012.
Friendlyname determination module 3011 is used for, and search comprises the friendlyname of the equipment of key word directsound in registration table, and the friendlyname that searches is issued symbliclink determination module 3012.
Symbliclink determination module 3012 is used for, and under registration table sound intermediate frequency facility inventory, at each friendlyname that receives, inquires about the key assignments of described friendlyname key, and the symbliclink that comprises in the described key assignments is issued determining unit 302.
Device shown in Figure 3 can further include echo cancellation unit 303.
Echo cancellation unit 303 is used for, and the interception result according to the speech data that determining unit 302 definite device objects are play removes the speech data of intercepting from the speech data of gathering.
As seen from the above technical solution, the disclosed technical scheme of the embodiment of the invention, being different from the miscellaneous equipment Properties of Objects with device object to be determined in registration table is search condition, the symbol connection identifier symbliclink of search device object to be determined determines device object according to described symbliclink in registration table.Because the device object characteristic in the registration table is more detailed than the device object characteristic in the equipment manager, thereby, the accuracy of determining device object can be improved.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention, all any modifications of being made within the spirit and principles in the present invention, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (9)
1. the method for a definite device object is characterized in that, the method comprising the steps of:
The key word directsound that comprises in registration table with the audio frequency apparatus object of system default work is a search condition, the symbol connection identifier symbliclink of the audio frequency apparatus object of search system acquiescence work in registration table determines the audio frequency apparatus object of system default work according to described symbliclink.
2. the method for claim 1, it is characterized in that, the symbol connection identifier symbliclink of the audio frequency apparatus object of described search system acquiescence work in registration table comprises: search has the identification of the manufacturer friendlyname of the device object of described key word directsound in registration table, determines the symbliclink of the audio frequency apparatus object of system default work according to described friendlyname.
3. method as claimed in claim 2 is characterized in that, the described identification of the manufacturer friendlyname that searches for the device object with described key word directsound in registration table comprises:
Enumerate the friendlyname of audio frequency apparatus object by CLSID_Audio Render Category enumerator, obtain the friendlyname of the device object that comprises key word directsound.
4. as claim 2 or 3 described methods, it is characterized in that, determine that according to described friendlyname the symbliclink of the audio frequency apparatus object of system default work comprises:
Under registration table sound intermediate frequency facility inventory, at each described friendlyname, inquire about the key assignments of described friendlyname key, obtain the symbliclink that comprises in the described key assignments.
5. method as claimed in claim 4, it is characterized in that, described audio frequency apparatus catalogue be in the computing machine registration table HKLM SYSTEM currentcontrolset CONTROL deviceclass { 65E8773E-8F56-11D0-A3B9-00A0C9223196} item.
6. the method for claim 1 is characterized in that, further comprises after the symbol connection identifier symbliclink of the audio frequency apparatus object of described search system acquiescence work in registration table:
The symbliclink that searches is saved to the agreement storage space, so that driver reads described symbliclink to determine device object from described storage space.
7. the method for claim 1 is characterized in that, determines that according to described symbliclink the audio frequency apparatus object of system default work further comprises afterwards:
According to the interception result of the speech data that the device object of determining is play, from the speech data of gathering, remove the speech data of intercepting.
8. the device of a definite device object is characterized in that, this device comprises search unit and determining unit; Described search unit comprises friendlyname determination module and symbliclink determination module;
Described friendlyname determination module is used for, and search comprises the friendlyname of the device object of key word directsound in registration table, and the friendlyname that searches is issued described symbliclink determination module; Wherein, described key word directsound is the key word that system stamps for the audio frequency apparatus object of acquiescence work in registration table automatically;
Described symbliclink determination module is used for, and under registration table sound intermediate frequency facility inventory, at each friendlyname that receives, inquires about the key assignments of described friendlyname key, and the symbliclink that comprises in the described key assignments is issued described determining unit;
Described determining unit is used for, and the symbliclink that sends according to described search unit determines device object.
9. device as claimed in claim 8 is characterized in that described device further comprises the echo cancellation unit;
Described echo cancellation unit is used for, and the interception result according to the speech data that the definite device object of described determining unit is play removes the speech data of intercepting from the speech data of gathering.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008101152063A CN101291376B (en) | 2008-06-18 | 2008-06-18 | Method and apparatus for determining equipment object |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008101152063A CN101291376B (en) | 2008-06-18 | 2008-06-18 | Method and apparatus for determining equipment object |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101291376A CN101291376A (en) | 2008-10-22 |
CN101291376B true CN101291376B (en) | 2011-08-17 |
Family
ID=40035437
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2008101152063A Expired - Fee Related CN101291376B (en) | 2008-06-18 | 2008-06-18 | Method and apparatus for determining equipment object |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101291376B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6684262B1 (en) * | 2000-10-25 | 2004-01-27 | International Business Machines Corporation | Method and system for controlling peripheral device interface behavior using thread registration |
CN101014073A (en) * | 2007-02-13 | 2007-08-08 | 北京中星微电子有限公司 | Method, system and equipment for realizing echo cancellation |
CN101087412A (en) * | 2000-09-27 | 2007-12-12 | 汤姆森特许公司 | Method for optimizing audio and video output states for multimedia devices |
CN101105778A (en) * | 2007-08-20 | 2008-01-16 | 中兴通讯股份有限公司 | Peripheral apparatus access state checking method |
-
2008
- 2008-06-18 CN CN2008101152063A patent/CN101291376B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101087412A (en) * | 2000-09-27 | 2007-12-12 | 汤姆森特许公司 | Method for optimizing audio and video output states for multimedia devices |
US6684262B1 (en) * | 2000-10-25 | 2004-01-27 | International Business Machines Corporation | Method and system for controlling peripheral device interface behavior using thread registration |
CN101014073A (en) * | 2007-02-13 | 2007-08-08 | 北京中星微电子有限公司 | Method, system and equipment for realizing echo cancellation |
CN101105778A (en) * | 2007-08-20 | 2008-01-16 | 中兴通讯股份有限公司 | Peripheral apparatus access state checking method |
Also Published As
Publication number | Publication date |
---|---|
CN101291376A (en) | 2008-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20100130254A1 (en) | Portable communication terminal and program executed by portable communication terminal | |
CN103187053A (en) | Input method and electronic equipment | |
KR101828904B1 (en) | Cloud identification method, device and system for double-card mobile communications device | |
CN102750629B (en) | Schedule association method and device | |
JP2007095059A (en) | Method and system for transmitting query to database | |
CN102891832B (en) | Identify label binding method and system | |
WO2006052541A3 (en) | Methods, systems, and computer-readable mediums for indexing and rapidly searching data records | |
CN102722539A (en) | Query method and device based on voice recognition | |
CN104536647A (en) | Application icon position adjusting method and device | |
CN103685795A (en) | Method and system for aligning data in network voice communication | |
CN106255082A (en) | The recognition methods of a kind of refuse messages and system | |
CN102752433A (en) | Terminal and call record file name generating method | |
CN105704010A (en) | Message display method and apparatus | |
CN102929960A (en) | Self-adaption method and system of theme music | |
CN101459659B (en) | Address resolution protocol packet processing method, communication system and network element | |
CN101291376B (en) | Method and apparatus for determining equipment object | |
CN111601367B (en) | Network connection control method and system based on voiceprint recognition and mobile terminal | |
CN105939402A (en) | MAC table entry obtaining method and device | |
CN106341513A (en) | Call recording file display method, apparatus and terminal | |
CN116628027A (en) | Cross-database query method, apparatus, device, medium and computer program product | |
US20080091719A1 (en) | Audio tags | |
CN103186397A (en) | Data installing method and data installing system | |
CN103514180A (en) | Data providing method and device | |
CN103796042B (en) | resource information pushing method and device | |
TW200605691A (en) | Method to reproduce emotion-information and mobile communication terminal for said method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20110817 Termination date: 20120618 |