CN106126217A - A kind of apply the information getting method of window, device and calculating equipment - Google Patents

A kind of apply the information getting method of window, device and calculating equipment Download PDF

Info

Publication number
CN106126217A
CN106126217A CN201610440483.6A CN201610440483A CN106126217A CN 106126217 A CN106126217 A CN 106126217A CN 201610440483 A CN201610440483 A CN 201610440483A CN 106126217 A CN106126217 A CN 106126217A
Authority
CN
China
Prior art keywords
window
application
matching
accuracy rate
attribute
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
CN201610440483.6A
Other languages
Chinese (zh)
Other versions
CN106126217B (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.)
Wuhan Technology Co Ltd
Original Assignee
Wuhan Technology 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 Wuhan Technology Co Ltd filed Critical Wuhan Technology Co Ltd
Priority to CN201610440483.6A priority Critical patent/CN106126217B/en
Publication of CN106126217A publication Critical patent/CN106126217A/en
Application granted granted Critical
Publication of CN106126217B publication Critical patent/CN106126217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/452Remote windowing, e.g. X-Window System, desktop virtualisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses and a kind of apply the information getting method of window, device and calculating equipment, described method is suitable to perform in the calculating equipment running linux system, and the method comprises the following steps: obtain the window attribute of current application window;Judge whether described window attribute includes process ID;If described window attribute includes process ID, then obtain relevant Process Attributes;According to described window attribute and Process Attributes, carrying out with the first corresponding matching files mating to obtain corresponding application ID and matching accuracy rate, described first matching files includes the combination of window attribute and Process Attributes and the matching relationship list of application ID and corresponding matching accuracy rate;Obtain the application ID that matching accuracy rate is the highest;Title and the icon information of its corresponding application window is obtained by the application ID that matching accuracy rate is the highest.

Description

A kind of apply the information getting method of window, device and calculating equipment
Technical field
The present invention relates to field of computer technology, apply the information getting method of window, device and meter particularly to a kind of Calculation equipment.
Background technology
Along with the development of computer technology, the role that computer plays in work and life is more and more heavier Want.User, when using computer, its desktop system is usually present an important assembly, can be described as dock or panel, Its Main Function is exactly the application window on screen to be abstracted into an icon be positioned over side by side in screen one regularly Side, is common in the position below screen.This icon being abstracted typically has sign current focus window, quick closedown, changes Go out certain window and intuitively have a clear understanding of the function of current application window.
But, specification that the information such as the application icon of window and title is the most unified under linux system or method Obtain.Often there is the problem that accuracy rate is relatively low in existing implementation method, i.e. cannot obtain application window the most in real time The information such as the icon used, and this category information is at present typically by the metamessage description literary composition of a kind of entitled desktop file Part records preservation.
Summary of the invention
To this end, the present invention provides a kind of acquisition of information scheme applying window, to try hard to solve or at least alleviate above The problem existed.
According to an aspect of the present invention, it is provided that a kind of information getting method applying window, be suitable to running Linux system Performing in the calculating equipment of system, first the method comprises the steps:, obtains the window attribute of current application window;Judge window Whether mouth attribute includes process ID;If window attribute includes process ID, then obtain relevant Process Attributes;According to window Attribute and Process Attributes, carry out with the first corresponding matching files mating to obtain corresponding application ID and matching accuracy rate, the One matching files includes the combination of window attribute and Process Attributes and the matching relationship list applying ID and corresponding mates standard Really rate;Obtain the application ID that matching accuracy rate is the highest;Its corresponding application window is obtained by the application ID that matching accuracy rate is the highest Title and icon information.
Alternatively, in the information getting method of application according to the present invention window, window attribute is obtained by the API of X11 Take, including at least one in applicating category, window name, window type, application icon title, process ID.
Alternatively, in the information getting method of application according to the present invention window, Process Attributes is by proc file system System obtains, including application path corresponding to process initiation parameter, process user, process, process environmental variable at least one Kind.
Alternatively, in the information getting method of application according to the present invention window, according to window attribute and Process Attributes, Carry out with corresponding matching files mating and include with the corresponding application ID of acquisition and matching accuracy rate: by window attribute to be matched Pass to adapter with Process Attributes as input parameter, adapter according to the first matching files, input parameter is mated Analyze with output matching result;The matching analysis result according to adapter output obtains corresponding application ID and matching accuracy rate.
Alternatively, in the information getting method of application according to the present invention window, by the highest the answering of matching accuracy rate The title obtaining its corresponding application window with ID includes with icon information: the application ID obtaining matching accuracy rate the highest is corresponding Desktop file;By title and the icon information of its corresponding application window of desktop file acquisition.
Alternatively, in the information getting method of application according to the present invention window, also include by Xorg application window The variation of mouth is monitored, to update current application window.
Alternatively, in the information getting method of application according to the present invention window, also include: if in window attribute not Including process ID, then according to window attribute, carry out with the second corresponding matching files mating with obtain corresponding application ID and Joining accuracy rate, the second matching files includes window attribute and the matching relationship list applying ID and corresponding matching accuracy rate.
According to a further aspect of the invention, it is provided that a kind of information acquisition device applying window, be suitable to reside in operation In the calculating equipment of linux system, this device include the first acquisition module, judge module, the second acquisition module, matching module, 3rd acquisition module and the 4th acquisition module.Wherein, the first acquisition module, be suitable to obtain the window attribute of current application window; Judge module, is suitable to judge whether include process ID in window attribute;Second acquisition module, be suitable to when window attribute include into During journey ID, obtain relevant Process Attributes;Matching module, is suitable to according to window attribute and Process Attributes, with corresponding first Joining file to carry out mating to obtain corresponding application ID and matching accuracy rate, the first matching files includes that window attribute and process belong to Property combination with apply the matching relationship list of ID and corresponding matching accuracy rate;3rd acquisition module, is suitable to obtain coupling The application ID that accuracy rate is the highest;4th acquisition module, is suitable to obtain its corresponding application by the application ID that matching accuracy rate is the highest The title of window and icon information.
Alternatively, in the information acquisition device of application according to the present invention window, window attribute is obtained by the API of X11 Take, including at least one in applicating category, window name, window type, application icon title, process ID.
Alternatively, in the information acquisition device of application according to the present invention window, Process Attributes is by proc file system System obtains, including application path corresponding to process initiation parameter, process user, process, process environmental variable at least one Kind.
Alternatively, in the information acquisition device of application according to the present invention window, matching module is further adapted for: will treat Window attribute and the Process Attributes of coupling pass to adapter, by adapter according to the first matching files to defeated as input parameter Enter parameter and carry out the matching analysis with output matching result;The matching analysis result according to adapter output obtains applies ID accordingly And matching accuracy rate.
Alternatively, in the information acquisition device of application according to the present invention window, the 4th acquisition module is further adapted for: Obtain the desktop file corresponding for application ID that matching accuracy rate is the highest;By its corresponding application window of desktop file acquisition Title and icon information.
Alternatively, in the information acquisition device of application according to the present invention window, also include monitoring module, be suitable to pass through The variation of application window is monitored, to update current application window by Xorg.
Alternatively, in the information acquisition device of application according to the present invention window, matching module is further adapted for when window belongs to When property does not includes process ID, according to window attribute, carry out with the second corresponding matching files mating to obtain corresponding application ID and matching accuracy rate, the second matching files includes the matching relationship list of window attribute and application ID and corresponding mates standard Really rate.
According to a further aspect of the invention, a kind of calculating equipment is also provided for, including application according to the present invention window Information acquisition device.
The technical scheme of the acquisition of information of application according to the present invention window, the window first obtaining current application window belongs to Property and judge the most whether include process ID, if including process ID, obtain relevant Process Attributes, by with corresponding first Matching files carries out coupling and obtains corresponding application ID and matching accuracy rate, therefrom selects the application that matching accuracy rate is the highest ID, thus obtain title and the icon information of the application window of its correspondence.In technique scheme, the first matching files includes window Matching relationship list between mouth attribute and the combination of Process Attributes and application ID, by mating with this list, finally Filter out the application ID corresponding to window attribute and Process Attributes, and obtain, according to matching accuracy rate, the application that matching is the highest ID, and then find the desktop file of correspondence and therefrom obtain icon corresponding to application window and title, there is higher standard Really rate, it is achieved that obtain icon and name information that application window uses the most in real time.
Accompanying drawing explanation
In order to realize above-mentioned and relevant purpose, herein in conjunction with explained below and accompanying drawing, some illustrative side is described Face, these aspects indicate can to put into practice the various modes of principles disclosed herein, and all aspects and equivalence aspect It is intended to fall under in the range of theme required for protection.By reading in conjunction with the accompanying detailed description below, the disclosure above-mentioned And other purpose, feature and advantage will be apparent from.Throughout the disclosure, identical reference generally refers to identical Parts or element.
Fig. 1 shows the schematic diagram of calculating equipment 100 according to an embodiment of the invention;
Fig. 2 shows the flow chart of the information getting method 200 applying window according to an embodiment of the invention;And
Fig. 3 shows the schematic diagram of the information acquisition device 300 of application window according to an embodiment of the invention.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing shows the disclosure Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should be by embodiments set forth here Limited.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure Complete conveys to those skilled in the art.
Fig. 1 is the block diagram of Example Computing Device 100.In basic configuration 102, calculating equipment 100 typically comprises and is System memorizer 106 and one or more processor 104.Memory bus 108 may be used for storing at processor 104 and system Communication between device 106.
Depend on that desired configuration, processor 104 can be any kind of process, include but not limited to: microprocessor (μ P), microcontroller (μ C), digital information processor (DSP) or their any combination.Processor 104 can include such as The cache of one or more rank of on-chip cache 110 and second level cache 112 etc, processor core 114 and depositor 116.The processor core 114 of example can include arithmetic and logical unit (ALU), floating-point unit (FPU), Digital signal processing core (DSP core) or their any combination.The Memory Controller 118 of example can be with processor 104 are used together, or in some implementations, Memory Controller 118 can be an interior section of processor 104.
Depend on that desired configuration, system storage 106 can be any type of memorizeies, include but not limited to: easily The property lost memorizer (such as RAM), nonvolatile memory (such as ROM, flash memory etc.) or their any combination.System stores Device 106 can include operating system 120, one or more application 122 and routine data 124.In some embodiments, Application 122 may be arranged to utilize routine data 124 to operate on an operating system.
Calculating equipment 100 can also include contributing to from various interface equipments (such as, outut device 142, Peripheral Interface 144 with communication equipment 146) to basic configuration 102 via the interface bus 140 communicated of bus/interface controller 130.Example Outut device 142 include Graphics Processing Unit 148 and audio treatment unit 150.They can be configured to contribute to via One or more A/V port 152 communicates with the various external equipments of such as display or speaker etc.Outside example If interface 144 can include serial interface controller 154 and parallel interface controller 156, they can be configured to contribute to Via one or more I/O port 158 and such as input equipment (such as, keyboard, mouse, pen, voice-input device, touch Input equipment) or the external equipment of other peripheral hardwares (such as printer, scanner etc.) etc communicate.The communication of example sets Standby 146 can include network controller 160, and it can be arranged to be easy to via one or more COM1 164 and Individual or multiple other calculate the equipment 162 communication by network communication link.
Network communication link can be an example of communication media.Communication media generally can be presented as at such as carrier wave Or the computer-readable instruction in the modulated data signal of other transmission mechanisms etc, data structure, program module, and can To include any information delivery media." modulated data signal " can be with such signal, in its data set one or many Individual or its change can be carried out in the way of encoding information in the signal.As nonrestrictive example, communication media is permissible Including the wire medium of such as cable network or private line network etc and such as sound, radio frequency (RF), microwave, infrared Or other wireless medium is at interior various wireless mediums (IR).Term computer-readable medium used herein can include depositing Both storage media and communication media.
Calculating equipment 100 can be implemented as a part for small size portable (or mobile) electronic equipment, and these electronics set Standby can be such as cell phone, personal digital assistant (PDA), personal media player equipment, wireless network browsing apparatus, individual People's helmet, application specific equipment or the mixing apparatus of any of the above function can be included.Calculating equipment 100 is all right It is embodied as including the personal computer of desktop computer and notebook computer configuration.In certain embodiments, equipment 100 is calculated It is configured to perform the information getting method of application according to the present invention window.Application 122 includes application according to the present invention window The information acquisition device 300 of mouth.
Fig. 2 shows the flow chart of the information getting method 200 applying window according to an embodiment of the invention.Application The information getting method 200 of window is suitable to perform in calculating equipment (the such as calculating equipment 100 shown in Fig. 1).
As in figure 2 it is shown, method 200 starts from step S210.In step S210, the window obtaining current application window belongs to Property, wherein window attribute is obtained by the API of X11, including applicating category, window name, window type, application icon title, At least one in process ID.In the present embodiment, desktop system there may be multiple window and show on the table simultaneously, Typically to float at uppermost window for focus as current window, can by the API of X11 RootWindow _ NET_CLIENT_LIST attribute obtains, and in window attribute, applicating category, window name, window type, application drawing entitling Claim, process ID is respectively with _ NET_WM_CLASS, _ NET_WM_NAME, _ NET_WM_WINDOW_TYPE, _ NET_WM_ICON_ NAME and _ these parameters of NET_WM_PID represent.
Subsequently, step S220 is entered.In step S220, it is judged that whether window attribute includes process ID.In this enforcement In example, it is judged that whether the window attribute of the current application window got includes _ NET_WM_PID.
In step S230, if window attribute includes process ID, then obtaining relevant Process Attributes, wherein process belongs to Property obtained by proc file system, including application path, the ring of process that process initiation parameter, process user, process are corresponding At least one in the variable of border.In the present embodiment, for most application, when after the application program that brings into operation, When creating window, according to the request of process in application program by X Server by process ID, i.e. _ NET_WM_PID is written to window In mouth attribute, will it get up with current application windows associate.This process is come real generally by the mode of amendment base library Existing, such as the bottom storehouses such as xcb/lib are set up hook, thus each application window is forced setting _ NET_WM_PID, specifically For be through this kind of Dynamic Tracing Technology of ftrace/systemtap, all xcb_create_window of hook, This kind of function that can create window of XCreateWindow and its process, when triggering after this kind of event, by corresponding _ NET_ WM_PID is arranged in the window attribute created out.
In step S240, according to window attribute and Process Attributes, carry out mating to obtain with the first corresponding matching files Take corresponding application ID and matching accuracy rate, pass to as input parameter including using window attribute to be matched and Process Attributes Adapter, is carried out the matching analysis with output matching result according to the first matching files to input parameter by adapter;According to coupling The matching analysis result of device output obtains corresponding application ID and matching accuracy rate.Wherein, the first matching files includes that window belongs to Property and Process Attributes combination with apply the matching relationship list of ID and corresponding matching accuracy rate.In the present embodiment, Joining representation of file is match file, can be considered the file of a pile human configuration, the matching relationship row that this match file includes Table is actually by combining various window attributes and Process Attributes, and the coupling of corresponding application ID and application ID is accurate Rate carries out coupling association, of formation can by search window attribute and Process Attributes obtain its correspondence application ID and Join the matching relationship mapping table of accuracy rate, and the window attribute used in matching accuracy rate and match file and Process Attributes Type is relevant.When creating match file, need according to certain specification, it to be named, by what match file comprised The window attribute of correspondence, Process Attributes reflect in the title of match file.(do not limit as a example by following 6 kinds of match files In these 6 kinds), match_arg.ini, match_icon_name.ini, match_wminstance.ini, match_ Execname.in, match_wmclass.ini and match_wmname.ini represent respectively process initiation parameter match file, Application icon title match file, application example match file, process title match file, applicating category match file and Window name match file.
When the Process Attributes got is process title and process initiation parameter, by process title to be matched and process Start-up parameter passes to adapter as input parameter, and adapter is according to matching files, i.e. the match file process name to input Claim and process initiation parameter is mated.When process name is referred to as gnome-control-center, and process initiation parameter is During overview, the first entitled gnome-control-of lookup process in the matching relationship list in match_arg.ini The classification of center, is the list item of overview further according to this classification lookup process start-up parameter, if finding overview, Then adapter exports application ID corresponding to this list item and matching accuracy rate, wherein according to process initiation parameter match file acquisition The matching accuracy rate of application ID be 90%.Key code is as follows:
In match_arg.ini, the content of corresponding matching relationship list is as follows:
From the foregoing, it will be observed that process name is referred to as gnome-control-center, process initiation parameter is mated by overview Application ID be gnome-control-center, matching accuracy rate is 90%.
If it addition, the judged result of step S220 is not include process ID in window attribute, the most not performing step S230 With step S240, directly according to window attribute, carry out with the second corresponding matching files mating with obtain corresponding application ID and Matching accuracy rate, the second matching files includes that window attribute is accurate with the matching relationship list of application ID and corresponding coupling Rate.Above-mentioned matching process is similar with the matching process of step S240, and parameter the most to be matched only has window attribute, and second Joining file also the most relevant to window attribute, here is omitted.
Subsequently, step S250 is entered.In step s 250, the application ID that matching accuracy rate is the highest is obtained.At the present embodiment In, in above-mentioned steps S240, obtain application ID and the matching accuracy rate of correspondence always according to window name, but this coupling is accurate Therefore rate is 80%, relatively according to lower slightly for the matching accuracy rate of the application ID of process title and process initiation parameter acquiring, Joining the highest application ID of accuracy rate is gnome-control-center.
Finally, in step S260, obtained the title of its corresponding application window by the application ID that matching accuracy rate is the highest And icon information, first obtain the desktop file corresponding for application ID that matching accuracy rate is the highest, then obtained by desktop file Take title and the icon information of its corresponding application window.Actually for desktop file, can by amendment base library such as The application program to controlling such as gtk/qt to increase its application window _ NET_WM_DESKTOP_FILE window attribute, this The matching accuracy rate of one window attribute is higher, and even up to 100%.But the application number of windows providing this window attribute is few, And not all process is all to be controlled by the initiator of desktop environment.In method 200, also include by Xorg application The variation of window is monitored, to update current application window.In the present embodiment, PropertyNotify event is used to supervise Listen RootWindow and each common application window, be correlated with consequently facilitating update it according to the variation of application window generation Attribute.
Fig. 3 shows the schematic diagram of the information acquisition device 300 applying window according to an embodiment of the invention.This dress Put and include: the first acquisition module 310, judge module the 320, second acquisition module 330, matching module the 340, the 3rd acquisition module 350 and the 4th acquisition module 360.This device also include monitor module (not shown), be positioned at the first acquisition module 310 it Before, be suitable to be monitored, the variation of application window to update current application window by Xorg.
First acquisition module 310 is suitable to obtain the window attribute of current application window, and wherein window attribute is by X11's API obtains, including at least one in applicating category, window name, window type, application icon title, process ID.In this reality Executing in example, these 5 kinds of window attributes of applicating category, window name, window type, application icon title, process ID are respectively with _ NET_ WM_CLASS, _ NET_WM_NAME, _ NET_WM_WINDOW_TYPE, _ NET_WM_ICON_NAME and _ NET_WM_PID these Parameter represents.
Judge module 320 is suitable to judge whether include process ID in window attribute.In the present embodiment, it is judged that get Whether the window attribute of current application window includes _ NET_WM_PID.
Second acquisition module 330 is suitable to when window attribute includes process ID, obtains relevant Process Attributes, Qi Zhongjin Journey attribute is obtained by proc file system, including application path corresponding to process initiation parameter, process user, process, process Environmental variable at least one.In the present embodiment, for most application, when after the program of bringing into operation, When creating window, according to the request of process in program by X Server by process ID, i.e. _ NET_WM_PID is written to window and belongs to In property, will it get up with current application windows associate.This process realizes generally by the mode revising base library, Such as the bottom storehouses such as xcb/lib are set up hook, thus each application window is forced setting _ NET_WM_PID.
Matching module 340 is suitable to according to window attribute and Process Attributes, carry out with the first corresponding matching files mating with Obtain corresponding application ID and matching accuracy rate, be further adapted for joining window attribute to be matched and Process Attributes as input Number passes to adapter, adapter according to the first matching files, input parameter is carried out the matching analysis with output matching result; The matching analysis result according to adapter output obtains corresponding application ID and matching accuracy rate.Wherein, the first matching files bag Include the combination of window attribute and Process Attributes and the matching relationship list of application ID and corresponding matching accuracy rate.In this enforcement In example, matching files is expressed as match file, can be considered in the file of a pile human configuration, matching accuracy rate and match file The window attribute used is relevant with the type of Process Attributes.When the Process Attributes got is process title and process initiation parameter Time, process title to be matched and process initiation parameter are passed to adapter as input parameter, adapter is according to coupling literary composition Part, i.e. process title and the process initiation parameter of input are mated by match file.Process name is referred to as gnome-control- Center, process initiation parameter is gnome-control-center by the application ID that overview is mated, matching accuracy rate It is 90%.Matching module 340 is further adapted for when not including process ID in window attribute, according to window attribute, with corresponding second Matching files carries out mating to obtain corresponding application ID and matching accuracy rate, and the second matching files includes window attribute and application The matching relationship list of ID and corresponding matching accuracy rate.
3rd acquisition module 350 is suitable to obtain the application ID that matching accuracy rate is the highest.In the present embodiment, according to process name The matching accuracy rate of the application ID of title and process initiation parameter acquiring is the highest, and the application ID that therefore matching accuracy rate is the highest is gnome-control-center。
4th acquisition module 360 is suitable to be obtained the title of its corresponding application window by the application ID that matching accuracy rate is the highest And icon information, it is further adapted for obtaining the desktop file corresponding for application ID that matching accuracy rate is the highest;Pass through desktop The title of its corresponding application window of file acquisition and icon information.
About the concrete steps of acquisition of information and the embodiment of application window, the most detailed in description based on Fig. 2 Open, here is omitted.
For the application under linux system, the rule that its information such as the application icon of window and title is the most unified Model or method obtain, and existing technical method exists the problem that information accuracy rate is relatively low, it is difficult to obtaining real-time and accurately should The information such as the icon being currently in use with window.The technical scheme of the acquisition of information of application according to the present invention window, by obtaining The most whether window attribute the judgement of current application window include process ID, if including process ID, obtaining relevant process and belonging to Property, obtain corresponding application ID and matching accuracy rate by carrying out coupling with the first corresponding matching files, according to coupling standard The application ID that really rate is the highest obtains title and the icon information of its corresponding application window.In technique scheme, the first coupling File includes the matching relationship list between window attribute and the combination of Process Attributes and application ID, by carrying out with this list Coupling, finally filters out the application ID corresponding to window attribute and Process Attributes, and obtains matching according to matching accuracy rate High application ID, and then find the desktop file of correspondence and therefrom obtain icon corresponding to application window and title, have Higher accuracy rate, has real-time and accuracy at the icon and name information obtaining application window use.
B9. the device as described in B8, wherein said window attribute is obtained by the API of X11, including applicating category, window At least one in title, window type, application icon title, process ID.
B10. the device as described in B8, wherein said Process Attributes is obtained by proc file system, including process initiation Application path corresponding to parameter, process user, process, process environmental variable at least one.
B11. the device as according to any one of B8-10, described matching module is further adapted for:
Window attribute to be matched and Process Attributes are passed to adapter as input parameter, by described adapter according to First matching files carries out the matching analysis with output matching result to input parameter;
The matching analysis result according to adapter output obtains corresponding application ID and matching accuracy rate.
B12. the device as according to any one of B8-10, described 4th acquisition module is further adapted for:
Obtain the desktop file corresponding for application ID that matching accuracy rate is the highest;
By title and the icon information of its corresponding application window of described desktop file acquisition.
B13. the device as according to any one of B8-10, also includes monitoring module, is suitable to by Xorg application window Variation is monitored, to update current application window.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that the enforcement of the present invention Example can be put into practice in the case of not having these details.In some instances, it is not shown specifically known method, knot Structure and technology, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that one or more in order to simplify that the disclosure helping understands in each inventive aspect, exist Above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes In example, figure or descriptions thereof.But, the method for the disclosure should not be construed to reflect an intention that i.e. required guarantor The application claims protected is than the feature more features being expressly recited in each claim.More precisely, as following As claims are reflected, inventive aspect is all features less than single embodiment disclosed above.Therefore, abide by The claims following detailed description of the invention are thus expressly incorporated in this detailed description of the invention, the most each claim itself Independent embodiment as the present invention.
Those skilled in the art are to be understood that the module of the equipment in example disclosed herein or unit or group Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in this example In different one or more equipment.Module in aforementioned exemplary can be combined as a module or be segmented into multiple in addition Submodule.
Those skilled in the art are appreciated that and can carry out the module in the equipment in embodiment adaptively Change and they are arranged in one or more equipment different from this embodiment.Can be the module in embodiment or list Unit or assembly are combined into a module or unit or assembly, and can put them in addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit excludes each other, can use any Combine all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed appoint Where method or all processes of equipment or unit are combined.Unless expressly stated otherwise, this specification (includes adjoint power Profit requires, summary and accompanying drawing) disclosed in each feature can be carried out generation by providing identical, equivalent or the alternative features of similar purpose Replace.
Although additionally, it will be appreciated by those of skill in the art that embodiments more described herein include other embodiments Some feature included by rather than further feature, but the combination of the feature of different embodiment means to be in the present invention's Within the scope of and form different embodiments.Such as, in the following claims, embodiment required for protection appoint One of meaning can mode use in any combination.
Additionally, some in described embodiment be described as at this can be by the processor of computer system or by performing The method of other device enforcement of described function or the combination of method element.Therefore, have for implementing described method or method The processor of the necessary instruction of element is formed for implementing the method or the device of method element.Additionally, device embodiment This described element is the example of following device: this device is for implementing by performed by the element of the purpose in order to implement this invention Function.
As used in this, unless specifically stated so, ordinal number " first ", " second ", " the 3rd " etc. is used Describe plain objects and be merely representative of the different instances relating to similar object, and be not intended to imply that the object being so described must Must have the time upper, spatially, sequence aspect or in any other manner to definite sequence.
Although the embodiment according to limited quantity describes the present invention, but benefits from above description, the art In it is clear for the skilled person that in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that The language that uses in this specification primarily to the readable and purpose of teaching and select rather than in order to explain or limit Determine subject of the present invention and select.Therefore, in the case of without departing from the scope of the appended claims and spirit, for this For the those of ordinary skill of technical field, many modifications and changes will be apparent from.For the scope of the present invention, to this The disclosure that invention is done is illustrative and not restrictive, and it is intended that the scope of the present invention be defined by the claims appended hereto.

Claims (10)

1. apply an information getting method for window, described method to be suitable in the calculating equipment running linux system to perform, The method includes:
Obtain the window attribute of current application window;
Judge whether described window attribute includes process ID;
If described window attribute includes process ID, then obtain relevant Process Attributes;
According to described window attribute and Process Attributes, carry out with the first corresponding matching files mating and apply ID so that acquisition is corresponding And matching accuracy rate, described first matching files includes the combination of window attribute and Process Attributes and the matching relationship row of application ID Table and corresponding matching accuracy rate;
Obtain the application ID that matching accuracy rate is the highest;
Title and the icon information of its corresponding application window is obtained by the application ID that matching accuracy rate is the highest.
2. the method for claim 1, wherein said window attribute is obtained by the API of X11, including applicating category, window At least one in mouth title, window type, application icon title, process ID.
3. the method for claim 1, wherein said Process Attributes is obtained by proc file system, including process initiation Application path corresponding to parameter, process user, process, process environmental variable at least one.
4. the method as according to any one of claim 1-3, according to described window attribute and Process Attributes, with corresponding coupling File carries out mating applies ID and matching accuracy rate to include to obtain accordingly:
Window attribute to be matched and Process Attributes are passed to adapter, by described adapter according to first as input parameter Matching files carries out the matching analysis with output matching result to input parameter;
The matching analysis result according to adapter output obtains corresponding application ID and matching accuracy rate.
5. the method as according to any one of claim 1-3, obtaining its correspondence by the application ID that matching accuracy rate is the highest should Title and icon information with window include:
Obtain the desktop file corresponding for application ID that matching accuracy rate is the highest;
By title and the icon information of its corresponding application window of described desktop file acquisition.
6. the method as according to any one of claim 1-3, also includes being monitored the variation of application window by Xorg, To update current application window.
7. the method for claim 1, also includes:
If described window attribute does not include process ID, then according to described window attribute, enter with the second corresponding matching files Row coupling to obtain corresponding application ID and matching accuracy rate, described second matching files include window attribute and application ID Join relation list and corresponding matching accuracy rate.
8. apply an information acquisition device for window, described device to be suitable to reside in the calculating equipment running linux system, This device includes:
First acquisition module, is suitable to obtain the window attribute of current application window;
Judge module, is suitable to judge whether include process ID in described window attribute;
Second acquisition module, is suitable to when described window attribute includes process ID, obtains relevant Process Attributes;
Matching module, is suitable to, according to described window attribute and Process Attributes, carry out mating to obtain with the first corresponding matching files Taking corresponding application ID and matching accuracy rate, described first matching files includes window attribute and the combination of Process Attributes and application The matching relationship list of ID and corresponding matching accuracy rate;
3rd acquisition module, is suitable to obtain the application ID that matching accuracy rate is the highest;
4th acquisition module, is suitable to be obtained title and the icon of its corresponding application window by the application ID that matching accuracy rate is the highest Information.
9. device as claimed in claim 8, matching module is further adapted for when not including process ID in described window attribute, according to Described window attribute, carries out with the second corresponding matching files mating to obtain corresponding application ID and matching accuracy rate, described Second matching files includes window attribute and the matching relationship list applying ID and corresponding matching accuracy rate.
10. calculate an equipment, including the information acquisition device of the application window as according to any one of claim 8 and 9.
CN201610440483.6A 2016-06-17 2016-06-17 A kind of information acquisition method of application widget, device and calculate equipment Active CN106126217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610440483.6A CN106126217B (en) 2016-06-17 2016-06-17 A kind of information acquisition method of application widget, device and calculate equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610440483.6A CN106126217B (en) 2016-06-17 2016-06-17 A kind of information acquisition method of application widget, device and calculate equipment

Publications (2)

Publication Number Publication Date
CN106126217A true CN106126217A (en) 2016-11-16
CN106126217B CN106126217B (en) 2019-03-15

Family

ID=57470048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610440483.6A Active CN106126217B (en) 2016-06-17 2016-06-17 A kind of information acquisition method of application widget, device and calculate equipment

Country Status (1)

Country Link
CN (1) CN106126217B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124575A (en) * 2019-12-18 2020-05-08 北京数衍科技有限公司 Window operation method and device and server
CN111198735A (en) * 2018-11-20 2020-05-26 深圳市优必选科技有限公司 Layer information acquisition method, layer information acquisition device and terminal equipment
CN111753191A (en) * 2020-06-04 2020-10-09 珠海豹趣科技有限公司 Advertisement popup intercepting method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101504607A (en) * 2009-03-20 2009-08-12 华亚微电子(上海)有限公司 Window state manager and method, window management system and method
CN103617078A (en) * 2013-11-22 2014-03-05 北京奇虎科技有限公司 Method and device for managing active components
US20140298360A1 (en) * 2013-03-29 2014-10-02 Dell Products, Lp System and Method for Matching Drivers to Devices
CN105069372A (en) * 2015-07-27 2015-11-18 武汉华工安鼎信息技术有限责任公司 File monitoring system in Linux environment
US10055862B2 (en) * 2008-10-22 2018-08-21 Google Llc Geocoding personal information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10055862B2 (en) * 2008-10-22 2018-08-21 Google Llc Geocoding personal information
CN101504607A (en) * 2009-03-20 2009-08-12 华亚微电子(上海)有限公司 Window state manager and method, window management system and method
US20140298360A1 (en) * 2013-03-29 2014-10-02 Dell Products, Lp System and Method for Matching Drivers to Devices
CN103617078A (en) * 2013-11-22 2014-03-05 北京奇虎科技有限公司 Method and device for managing active components
CN105069372A (en) * 2015-07-27 2015-11-18 武汉华工安鼎信息技术有限责任公司 File monitoring system in Linux environment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198735A (en) * 2018-11-20 2020-05-26 深圳市优必选科技有限公司 Layer information acquisition method, layer information acquisition device and terminal equipment
CN111124575A (en) * 2019-12-18 2020-05-08 北京数衍科技有限公司 Window operation method and device and server
CN111124575B (en) * 2019-12-18 2023-07-28 北京数衍科技有限公司 Window operation method, device and server
CN111753191A (en) * 2020-06-04 2020-10-09 珠海豹趣科技有限公司 Advertisement popup intercepting method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN106126217B (en) 2019-03-15

Similar Documents

Publication Publication Date Title
US12047340B2 (en) System for managing an instructure with security
CN108833458B (en) Application recommendation method, device, medium and equipment
CN107924679A (en) Delayed binding during inputting understanding processing in response selects
CN107004008A (en) Recognized using the associated documents of the automation inquiry to different data storage locations
US9276991B2 (en) Method and apparatus for providing a dynamic tool menu based upon a document
WO2022048513A1 (en) Search display method and apparatus, and electronic device
CN112870724B (en) Resource management method and device, storage medium and electronic equipment
US10050910B2 (en) Application of neural nets to determine the probability of an event being causal
CN110244899A (en) Electronic contract on-line processing method, Online Processing System and terminal
US20180336081A1 (en) System and methods for decomposing events from managed infrastructures that includes a feedback signalizer functor
CN113742366B (en) Data processing method, device, computer equipment and storage medium
CN107765853A (en) Using method for closing, device, storage medium and electronic equipment
CN112150280A (en) Federal learning method and device for improving matching efficiency, electronic device and medium
CN106126217A (en) A kind of apply the information getting method of window, device and calculating equipment
CN110134591A (en) A kind of software method for testing pressure and system, electronic equipment
CN107256224B (en) A kind of generation method of the element structure of knowledge, searching method, apparatus and system
US10700920B2 (en) System and methods for decomposing events from managed infrastructures that includes a floating point unit
CN111651989A (en) Named entity recognition method and device, storage medium and electronic device
WO2017074808A1 (en) Single unified ranker
CN117057935A (en) Data processing method, device, equipment and storage medium based on field design
CN113485600A (en) Singing list sharing method and device and electronic equipment
CN105117333A (en) Method and system for management of test cases
CN113591934A (en) Method, device and equipment for arranging business analysis model and storage medium
CN108052506A (en) Natural language processing method, apparatus, storage medium and electronic equipment
US11159364B2 (en) System in communication with a managed infrastructure

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
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20161116

Assignee: Tongxin Software Technology Co.,Ltd.

Assignor: WUHAN DEEPIN TECHNOLOGY Co.,Ltd.

Contract record no.: X2021980010212

Denomination of invention: An information acquisition method, device and computing device of application window

Granted publication date: 20190315

License type: Common License

Record date: 20210929