CN104077130A - Window name processing method and device and electronic device - Google Patents

Window name processing method and device and electronic device Download PDF

Info

Publication number
CN104077130A
CN104077130A CN201410258491.XA CN201410258491A CN104077130A CN 104077130 A CN104077130 A CN 104077130A CN 201410258491 A CN201410258491 A CN 201410258491A CN 104077130 A CN104077130 A CN 104077130A
Authority
CN
China
Prior art keywords
window
string resource
resource
string
title
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
CN201410258491.XA
Other languages
Chinese (zh)
Other versions
CN104077130B (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.)
Beijing Xiaomi Technology Co Ltd
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201410258491.XA priority Critical patent/CN104077130B/en
Publication of CN104077130A publication Critical patent/CN104077130A/en
Application granted granted Critical
Publication of CN104077130B publication Critical patent/CN104077130B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a window name processing method and device and an electronic device and belongs to the field of computers. The window name processing method comprises the steps of confirming a first character string resource referenced as a window name by a target window; detecting whether the length of the first character string resource is larger than a preset threshold value or not; performing truncation processing on the window name of the target window if a detection result is that the length of the first character string resource is larger than the preset threshold value. The truncation processing is performed on the window name of the target window when it is detected that the length of the character string resource referenced as the window name by the target window is larger than the preset threshold value, the problem that excessive processing resources are occupied and accordingly the system performance is reduced and even is corrupted when a character string referenced by the window name in a relevant technology is overlong is solved, and the effects of improving the system performance and safety are achieved.

Description

Window title disposal route, device and electronic equipment
Technical field
The disclosure relates to computer realm, relates in particular to a kind of window title disposal route, device and electronic equipment.
Background technology
Application program refers to the computer program in order to complete a certain or a few particular tasks and to be developed, and most application program runs on operating system with window scheme.For the ease of user, distinguish different application programs, the window of application program conventionally can the corresponding window title showing separately.
In correlation technique, developer is when building application program, for each window of application program specifies a string resource as the window title of corresponding window.When generating application program installation kit, application code and each string resource of quoting are bundled to installation kit, and send to user side to install.Application program completes and installs after also quilt operation at user side, each string resource that the window of the operating system inquiry application of user side is quoted, and the string resource that is wherein designated as window title is presented to window top.
In realizing process of the present disclosure, find that correlation technique at least exists following problem:
In application program when operation,, be shown as window title by the alphabet string in the string resource of appointment, when the string resource of this appointment is longer, need to consume a large amount of processing resources, thereby cause the system performance even collapse that sharply declines, and affect user's experience.
Summary of the invention
In order to solve in correlation technique when being designated as the string resource of window title when longer, need to consume a large amount of processing resources, thereby the problem that causes system performance sharply to decline and even collapse, disclosure embodiment provides a kind of window title disposal route, device and electronic equipment.Described technical scheme is as follows:
First aspect, provides a kind of window title disposal route, and described method comprises:
Determine the first string resource that is cited as window title by target window;
Whether the length that detects described the first string resource is greater than predetermined threshold;
If testing result is the length of described the first string resource, be greater than described predetermined threshold, the window name of described target window be called to brachymemma and process.
Preferably, when described method is applied to build application program corresponding to described target window, the described window name to described target window is called brachymemma to be processed, and comprising:
Judge whether described the first string resource is also cited as non-window title;
If judgment result is that, described the first string resource is also cited as non-window title, from described the first string resource, extracts the character string of the first designated length, and described the first designated length is less than or equal to described predetermined threshold;
The described character string extracting is stored as to the second string resource;
The resource that is cited as window title by described target window is revised as to described the second string resource by described the first string resource.
Preferably, described method also comprises:
Inquiry is except described target window, and other is cited as described the first string resource each window of window title;
The resource that is cited as window title by described each window is revised as to described the second string resource by described the first string resource.
Preferably, described method also comprises:
If judgment result is that, described the first string resource is not cited as non-window title, described the first string resource is punctured into the second designated length, and described the second designated length is less than or equal to described predetermined threshold.
Preferably, when described method is applied to move application program corresponding to described target window, the described window name to described target window is called brachymemma to be processed, and comprising:
From described the first string resource, extract the character string of the 3rd designated length, described the 3rd designated length is less than or equal to described predetermined threshold;
The window title that is described target window by the described character string display extracting.
Second aspect, provides a kind of window title treating apparatus, and described device comprises:
Determination module, for determining the first string resource that is cited as window title by target window;
Whether first detection module, be greater than predetermined threshold for detection of the length of described the first string resource;
Processing module, if the length that is described the first string resource for the testing result of described first detection module is greater than described predetermined threshold, is called brachymemma to the window name of described target window and processes.
Preferably, described processing module, comprising:
Judging unit, for when building application program corresponding to described target window, judges whether described the first string resource is also cited as non-window title;
The first extraction unit, if described the first string resource that judgment result is that for described judging unit is also cited as non-window title, from described the first string resource, extract the character string of the first designated length, described the first designated length is less than or equal to described predetermined threshold;
Storage unit, is stored as the second string resource for the described character string that described the first extraction unit is extracted;
First revises unit, for the resource that is cited as window title by described target window is revised as to described the second string resource by described the first string resource.
Preferably, described processing module also comprises:
Query unit, for inquiry, except described target window, other is cited as described the first string resource each window of window title;
Second revises unit, for the resource that is cited as window title by described each window is revised as to described the second string resource by described the first string resource.
Preferably, described processing module also comprises:
Brachymemma unit, if be not cited as non-window title for described the first string resource of judgment result is that of described judging unit, is punctured into the second designated length by described the first string resource, and described the second designated length is less than or equal to described predetermined threshold.
Preferably, described processing module, comprising:
The second extraction unit for when application program corresponding to the described target window of operation, extracts the character string of the 3rd designated length from described the first string resource, and described the 3rd designated length is less than or equal to described predetermined threshold;
Display unit, the window title that is described target window for described character string display that described the second extraction unit is extracted.
The third aspect, provides a kind of electronic equipment, and described electronic equipment comprises:
Processor;
For storing the storer of described processor executable;
Wherein, described processor is configured to:
Determine the first string resource that is cited as window title by target window;
Whether the length that detects described the first string resource is greater than predetermined threshold;
If testing result is the length of described the first string resource, be greater than described predetermined threshold, the window name of described target window be called to brachymemma and process.
The technical scheme that disclosure embodiment provides can be brought following beneficial effect:
While being greater than predetermined threshold by the string resource length detecting the window title that is cited as target window, the window name of target window is called to brachymemma to be processed, solve the character string of quoting when window title in correlation technique and taken system performance that too much processing resource causes the even problem of collapse that declines when long, reached the effect that improves system performance.
Should be understood that, it is only exemplary and explanatory that above general description and details are hereinafter described, and can not limit the disclosure.
Accompanying drawing explanation
Accompanying drawing is herein merged in instructions and forms the part of this instructions, shows and meets embodiment of the present disclosure, and be used from and explain principle of the present disclosure with instructions one.
Fig. 1 is according to the process flow diagram of a kind of window title disposal route shown in an exemplary embodiment;
Fig. 2 is according to the process flow diagram of a kind of window title disposal route shown in another exemplary embodiment;
Fig. 3 is according to the process flow diagram of a kind of window title disposal route shown in another exemplary embodiment;
Fig. 4 is the basis process flow diagram of a kind of window title disposal route shown in an exemplary embodiment again;
Fig. 5 is according to the schematic diagram of a kind of window title treating apparatus shown in an exemplary embodiment;
Fig. 6 is according to the schematic diagram of a kind of window title treating apparatus shown in another exemplary embodiment;
Fig. 7 is according to the schematic diagram of a kind of window title treating apparatus shown in another exemplary embodiment;
Fig. 8 is according to the block diagram of a kind of electronic equipment shown in an exemplary embodiment;
Fig. 9 is according to the block diagram of a kind of electronic equipment shown in another exemplary embodiment.
Embodiment
Here will at length to exemplary embodiment, describe, its example shown in the accompanying drawings.When description below relates to accompanying drawing, unless separately there is expression, the same numbers in different accompanying drawings represents same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the disclosure.On the contrary, they are only and equipment as consistent in some aspects that described in detail in appended claims, of the present disclosure and the example of method.
Fig. 1 is according to the process flow diagram of a kind of window title disposal route shown in an exemplary embodiment, and as shown in Figure 1, this window title disposal route can be for the length of the window title of controlling application program.This window title disposal route can comprise the following steps:
In step 102, determine the first string resource that is cited as window title by target window;
In step 104, whether the length that detects this first string resource is greater than predetermined threshold;
In step 106, if the length that testing result is this first string resource is greater than this predetermined threshold, the window name of this target window is called to brachymemma and processes.
In sum, window title disposal route shown in this exemplary embodiment, while being greater than predetermined threshold by the string resource length detecting the window title that is cited as target window, the window name of target window is called to brachymemma to be processed, solve the character string of quoting when window title in correlation technique and taken system performance that too much processing resource causes the even problem of collapse that declines when long, reached the effect that improves system performance.
Scheme shown in exemplary embodiment corresponding to above-mentioned Fig. 1, can be applied to when developer user builds application program, the title of the window of application programs is processed, and also can be applied to when user user runs application, and the title of the window of application programs is processed.The following exemplary embodiment of the disclosure will be described these two kinds of situations respectively.
Fig. 2 is according to the process flow diagram of a kind of window title disposal route shown in another exemplary embodiment, and as shown in Figure 2, this window title disposal route can be applied to the length of the window title of controlling application program when developer user builds application program.This window title disposal route can comprise the following steps:
In step 202, when application program corresponding to establishing target window, determine the first string resource that is cited as window title by target window;
The application development of take in Android system (Android) is example, developer uses SDK (Software Development Kit, while SDK (Software Development Kit)) building application program in developer's equipment (such as the PC of this SDK is installed), for each window of this application program is specified each self-corresponding string resource quoting as window title.
After application builds completes, before being packaged into installation kit, developer can enable window title processing capacity in SDK development interface, and this function can be the function that in SDK, source life has, the function that also can add by specific plug-in unit is installed.Such as, developer chooses the application program having built, click the window Name check button in development interface, SDK quotes code according to the window title of this application program and determines the first string resource that is cited as window title by the target window in this application program.
In step 204, whether the length that detects this first string resource is greater than predetermined threshold;
Whether SDK determines after the first string resource, obtains the length of the first string resource, and the length of this first string resource and predetermined threshold are compared, long to detect the title of this target window.
Such as, SDK determines after the first string resource, whether the length that detects this first string resource is greater than 256 bits, if so, illustrates that the title of this target window is long, enters the processing that step 206 is carried out next step.
Wherein, this predetermined threshold can be the fixed value setting in advance, and also can threshold value be set voluntarily by developer user.Such as, the SDK with window title processing capacity can provide threshold value setting interface, and developer user can arrange this predetermined threshold in this threshold value setting interface.
In step 206, if the length that testing result is this first string resource is greater than this predetermined threshold, judge whether this first string resource is also cited as non-window title, if so, enter step 208, otherwise, enter step 210;
In the performance history of application program, same string resource can be applied by different objects.Such as, a string resource is cited as window title by different windows; Or a string resource is cited as window title by a window, is cited as content text by another page.For above-mentioned two kinds of situations, need according to different strategies, to process respectively, specifically ask for an interview step 208 and step 210.
In step 208, from this first string resource, extract the character string of the first designated length, this character string extracting is stored as to the second string resource, the resource that is cited as window title by this target window is revised as to this second string resource by this first string resource;
Wherein, this first designated length is less than or equal to this predetermined threshold.
If this first string resource is also non-window title by other object reference, from this first character string, extract the character string of the first designated length, the character string extracting is stored as to new string resource, and this new string resource is appointed as to the window title of this target window.Wherein, the length of this new string resource can not be greater than predetermined threshold.
Such as, take this predetermined threshold as 256 bits, it is example that this first designated length equals this predetermined threshold.When this first string resource is also cited as non-window title, if by this first string resource brachymemma, can affect quoting of non-window title.Therefore, when SDK judges the first string resource and is also cited as non-window title, the character of front 256 bits in this first string resource can be extracted and be stored as the second string resource, and quoting of the window title of target window is revised as and quoted this second string resource.
In step 210, this first string resource is punctured into the second designated length.
Wherein, this second designated length is less than or equal to this predetermined threshold.
If this first string resource is only cited as window title, do not need the adduction relationship of modifying target window, the direct brachymemma of the first string resource can be controlled to the length of window title.
Such as, take this predetermined threshold as 256 bits, it is example that this first designated length equals this predetermined threshold.When this first string resource is only cited as non-window title, can be directly by this first string resource brachymemma, when SDK judges the first string resource and is only cited as non-window title, can not change the quoting of window title of target window, but retain front 256 bits in this first string resource, and by other bit amputation.
In sum, window title disposal route shown in this exemplary embodiment, by when application program corresponding to establishing target window, the string resource length that is cited as the window title of target window if detect is greater than predetermined threshold, the window title of this target window is quoted to newly-generated string resource, or, to being cited as the string resource of the window title of target window, do brachymemma processing, solve the character string of quoting when window title in correlation technique and taken system performance that too much processing resource causes the even problem of collapse that declines when long, reach the effect that improves system performance.
Fig. 3 is according to the process flow diagram of a kind of window title disposal route shown in another exemplary embodiment, and as shown in Figure 3, this window title disposal route can be applied to the length of the window title of controlling application program when developer user builds application program.This window title disposal route can comprise the following steps:
In step 302, when application program corresponding to establishing target window, determine the first string resource that is cited as window title by target window;
The application development of take in Android system (Android) is example, developer uses SDK (Software Development Kit, while SDK (Software Development Kit)) building application program in developer's equipment (such as the PC of this SDK is installed), for each window of this application program is specified each self-corresponding string resource quoting as window title.
After application builds completes, before being packaged into installation kit, developer can enable window title processing capacity in SDK development interface, and this function can be the function that in SDK, source life has, the function that also can add by specific plug-in unit is installed.Such as, developer chooses the application program having built, click the window Name check button in development interface, SDK quotes code according to the window title of this application program and determines the first string resource that is cited as window title by the target window in this application program.
In step 304, whether the length that detects this first string resource is greater than predetermined threshold;
Whether SDK determines after the first string resource, obtains the length of the first string resource, and the length of this first string resource and predetermined threshold are compared, long to detect the title of this target window.
Such as, SDK determines after the first string resource, whether the length that detects this first string resource is greater than 256 bits, if so, illustrates that the title of this target window is long, enters the processing that step 306 is carried out next step.
Wherein, this predetermined threshold can be the fixed value setting in advance, and also can threshold value be set voluntarily by developer user.Such as, the SDK with window title processing capacity can provide threshold value setting interface, and developer user can arrange this predetermined threshold in this threshold value setting interface.
In step 306, if the length that testing result is this first string resource is greater than this predetermined threshold, judge whether this first string resource is also cited as non-window title, if so, enter step 308, otherwise, enter step 312;
In the performance history of application program, same string resource can be applied by different objects.Such as, a string resource is cited as window title by different windows; Or a string resource is cited as window title by a window, is cited as content text by another page.For above-mentioned two kinds of situations, need according to different strategies, to process respectively, specifically ask for an interview step 308 and step 312.
In step 308, from this first string resource, extract the character string of the first designated length, this character string extracting is stored as to the second string resource, the resource that is cited as window title by this target window is revised as to this second string resource by this first string resource;
Wherein, this first designated length is less than or equal to this predetermined threshold.
If this first string resource is also non-window title by other object reference, from this first character string, extract the character string of the first designated length, the character string extracting is stored as to new string resource, and this new string resource is appointed as to the window title of this target window.Wherein, the length of this new string resource can not be greater than predetermined threshold.
Such as, take this predetermined threshold as 256 bits, it is example that this first designated length equals this predetermined threshold.When this first string resource is also cited as non-window title, if by this first string resource brachymemma, can affect quoting of non-window title.Therefore, when SDK judges the first string resource and is also cited as non-window title, the character of front 256 bits in this first string resource can be extracted and be stored as the second string resource, and quoting of the window title of target window is revised as and quoted this second string resource.
In step 310, inquiry is except this target window, and other is cited as this first string resource each window of window title, and the resource that is cited as window title by this each window is revised as to this second string resource by this first string resource;
Wherein, a string resource can be cited as window title by a plurality of windows, SDK extracts the character string of the first designated length from this first string resource, after this character string extracting is stored as to the second string resource, can also inquire about other window that the first string resource is cited as to window title, and quoting of the window title of other window inquiring is revised as and quoted this newly-generated second string resource.Do not need to quoting the window title of other window of same string resource, to process separately again, improved treatment effeciency.
In step 312, this first string resource is punctured into the second designated length.
Wherein, this second designated length is less than or equal to this predetermined threshold.
If this first string resource is only cited as window title, do not need the adduction relationship of modifying target window, the direct brachymemma of the first string resource can be controlled to the length of window title.
Such as, take this predetermined threshold as 256 bits, it is example that this first designated length equals this predetermined threshold.When this first string resource is only cited as non-window title, can be directly by this first string resource brachymemma, when SDK judges the first string resource and is only cited as non-window title, can not change the quoting of window title of target window, but retain front 256 bits in this first string resource, and by other bit amputation.
In sum, window title disposal route shown in this exemplary embodiment, by when application program corresponding to establishing target window, the string resource length that is cited as the window title of target window if detect is greater than predetermined threshold, the window title of this target window is quoted to newly-generated string resource, or, to being cited as the string resource of the window title of target window, do brachymemma processing, solve the character string of quoting when window title in correlation technique and taken system performance that too much processing resource causes the even problem of collapse that declines when long, reach the effect that improves system performance.
In addition, window title disposal route shown in this exemplary embodiment, by extract the character string of the first designated length from this first string resource, this character string extracting is stored as after the second string resource, inquiry is except target window, other is cited as this first string resource each window of window title, and the resource that is cited as window title by this each window is revised as to this second string resource by this first string resource, do not need to quoting the window title of other window of same string resource, to process separately again, reach the effect that improves treatment effeciency.
Fig. 4 is the basis process flow diagram of a kind of window title disposal route shown in an exemplary embodiment again, as shown in Figure 4, this window title disposal route can be applied to the length of the window title of controlling application program when user's equipment runs application, and this user's equipment can be the electronic equipments such as smart mobile phone, panel computer, E-book reader and intelligent television.This window title disposal route can comprise the following steps:
In step 402, when application program corresponding to operational objective window, determine the first string resource that is cited as window title by target window;
The operation Android system smart mobile phone of take is example, user user moves an application program when opening the window of this application program in smart mobile phone, and the system backstage of smart mobile phone is quoted code according to the window title of this application program and determined the first string resource that is cited as window title by this window.
In step 404, whether the length that detects this first string resource is greater than predetermined threshold;
Whether system backstage is determined after the first string resource, obtains the length of the first string resource, and the length of this first string resource and predetermined threshold are compared, long to detect the title of this window.
Such as, system backstage, determine after the first string resource, whether the length that detects this first string resource is greater than 256 bits, if so, illustrates that the title of this window is long, according to step 406, processes.
Wherein, this predetermined threshold can be the fixed value setting in advance, and also can threshold value be set voluntarily by user user.Such as, having system arranges interface threshold value setting option can be provided, developer user clicks this option and enters threshold value setting interface, and this predetermined threshold is set in this page, the length upper limit that can window title such as, user user is set to 128 bits, 64 bits or 32 compare top grade.
In step 406, if the length that testing result is this first string resource is greater than this predetermined threshold, from this first string resource, extract the character string of the 3rd designated length, and the window title that is this target window by this character string display extracting.
Wherein, the 3rd designated length is less than or equal to this predetermined threshold.
Such as, take this predetermined threshold as 256 bits, the 3rd designated length is also that 256 bits are example, if system backstage detects the length of this first string resource, is greater than 256 bits, the character of front 256 bits of this first string resource is extracted and be shown as corresponding window title.If system backstage detects the length of this first string resource and is not more than 256 bits, all characters in this first string resource are shown as to corresponding window title.
Wherein, in the method that this exemplary embodiment provides, whether the length that this first string resource can also be detected in system backstage is greater than the 4th designated length, and the 4th designated length is greater than this predetermined threshold; If the length that testing result is this first string resource is greater than the 4th designated length, system backstage is to user's display reminding information, and this information is used for pointing out user's current application program to have security risk.
Take Android system as example, and in Android system, a DoS (Denial of Service, denial of service) leak is: when the window title of application program is when long (surpassing 380,000 bytes), system can be collapsed and restart when showing this application window.This leak can be utilized by rogue program, affects the normal operation of system.The method that this exemplary embodiment provides, when detecting, the window title of an application program is long, and when surpassing 1W bit, can point out this application program of user may be rogue program, avoids rogue program to utilize DoS leak, improves the security of system.
In sum, window title disposal route shown in this exemplary embodiment, by when application program corresponding to operational objective window, the string resource length that is cited as the window title of target window if detect is greater than predetermined threshold, from this string resource, extract partial character string and be shown as window title, solve the character string of quoting when window title in correlation technique and taken system performance that too much processing resource causes the even problem of collapse that declines when long, reached the effect that improves system performance.
In addition, window title disposal route shown in this exemplary embodiment, whether the length that detects this first string resource is greater than the 4th designated length, if the length that testing result is this first string resource is greater than the 4th designated length, system backstage is to user's display reminding information, the application program that window title is long is carried out to safety instruction, avoid DoS leak to be utilized by rogue program, reach the effect that improves security of system.
Fig. 5 is according to the schematic diagram of a kind of window title treating apparatus shown in an exemplary embodiment, and as shown in Figure 5, this window title treating apparatus can be for the length of the window title of controlling application program.This window title treating apparatus can comprise: determination module 501, first detection module 502 and processing module 503;
Described determination module 501 is set to the first string resource that is cited as window title by target window for determining;
Described first detection module 502 is set to whether be greater than predetermined threshold for detection of the length of described the first string resource;
If it is that the length of described the first string resource is greater than described predetermined threshold that described processing module 503 is set to testing result for described first detection module 502, the window name of described target window is called to brachymemma and processes.
In sum, window title treating apparatus shown in this exemplary embodiment, while being greater than predetermined threshold by the string resource length detecting the window title that is cited as target window, the window name of target window is called to brachymemma to be processed, solve the character string of quoting when window title in correlation technique and taken system performance that too much processing resource causes the even problem of collapse that declines when long, reached the effect that improves system performance.
Fig. 6 is according to the schematic diagram of a kind of window title treating apparatus shown in another exemplary embodiment, and as shown in Figure 6, this window title treating apparatus can be for carrying out as shown in Figure 1, Figure 2 or the method for Fig. 3 shown in arbitrary.This window title treating apparatus can be in developer's equipment, and this developer's equipment can be PC etc.This window title treating apparatus can comprise: determination module 601, first detection module 602 and processing module 603;
Described determination module 601 is set to the first string resource that is cited as window title by target window for determining;
Described first detection module 602 is set to whether be greater than predetermined threshold for detection of the length of described the first string resource;
If it is that the length of described the first string resource is greater than described predetermined threshold that described processing module 603 is set to testing result for described first detection module 602, the window name of described target window is called to brachymemma and processes.
Described processing module 603, comprising: judging unit 603a, the first extraction unit 603b, storage unit 603c and first revise unit 603d;
Described judging unit 603a is arranged in use in while building application program corresponding to described target window, judges whether described the first string resource is also cited as non-window title;
If described the first extraction unit 603b is set to also be cited as non-window title for described the first string resource of judgment result is that of described judging unit 603a, from described the first string resource, extract the character string of the first designated length, described the first designated length is less than or equal to described predetermined threshold;
The described character string that described storage unit 603c is set to for described the first extraction unit 603b is extracted is stored as the second string resource;
Described first revises unit 603d is set to for the resource that is cited as window title by described target window is revised as to described the second string resource by described the first string resource.
Described processing module 603 also comprises: query unit 603e and second revises unit 603f;
Described query unit 603e is set to for inquiry except described target window, and other is cited as described the first string resource each window of window title;
Described second revises unit 603f is set to for the resource that is cited as window title by described each window is revised as to described the second string resource by described the first string resource.
Described processing module 603 also comprises: brachymemma unit 603g;
If described brachymemma unit 603g is set to not be cited as non-window title for described the first string resource of judgment result is that of described judging unit 603a, described the first string resource is punctured into the second designated length, described the second designated length is less than or equal to described predetermined threshold.
In sum, window title treating apparatus shown in this exemplary embodiment, by when application program corresponding to establishing target window, the string resource length that is cited as the window title of target window if detect is greater than predetermined threshold, the window title of this target window is quoted to newly-generated string resource, or, to being cited as the string resource of the window title of target window, do brachymemma processing, solve the character string of quoting when window title in correlation technique and taken system performance that too much processing resource causes the even problem of collapse that declines when long, reach the effect that improves system performance.
In addition, window title treating apparatus shown in this exemplary embodiment, by extract the character string of the first designated length from this first string resource, this character string extracting is stored as after the second string resource, inquiry is except target window, other is cited as this first string resource each window of window title, and the resource that is cited as window title by this each window is revised as to this second string resource by this first string resource, do not need to quoting the window title of other window of same string resource, to process separately again, reach the effect that improves treatment effeciency.
Fig. 7 is according to the schematic diagram of a kind of window title treating apparatus shown in another exemplary embodiment, and as shown in Figure 7, this window title treating apparatus can be for carrying out the method as shown in Fig. 1 or Fig. 4.This window title treating apparatus can be in user's equipment, and this user's equipment can be the electronic equipments such as smart mobile phone, panel computer, E-book reader and intelligent television.This window title treating apparatus can comprise: determination module 701, first detection module 702 and processing module 703;
Described determination module 701 is set to the first string resource that is cited as window title by target window for determining;
Described first detection module 702 is set to whether be greater than predetermined threshold for detection of the length of described the first string resource;
If it is that the length of described the first string resource is greater than described predetermined threshold that described processing module 703 is set to testing result for described first detection module 702, the window name of described target window is called to brachymemma and processes.
Described processing module 703, comprising: the second extraction unit 703a and display unit 703b;
When described the second extraction unit 703a is arranged in use in application program corresponding to the described target window of operation, extract the character string of the 3rd designated length from described the first string resource, described the 3rd designated length is less than or equal to described predetermined threshold;
Described display unit 703b is set to the window title that the described character string display for described the second extraction unit 703a is extracted is described target window.
Described device, also comprises: the second detection module 704 and reminding module 705.
Whether the length that described the second detection module 704 is set to detect this first string resource is greater than the 4th designated length, and the 4th designated length is greater than this predetermined threshold;
If described reminding module 705 is set to the length that the testing result of described the second detection module 704 is this first string resource and is greater than the 4th designated length, system backstage is to user's display reminding information, and this information is used for pointing out user's current application program to have security risk.
In sum, window title treating apparatus shown in this exemplary embodiment, by when application program corresponding to operational objective window, the string resource length that is cited as the window title of target window if detect is greater than predetermined threshold, from this string resource, extract partial character string and be shown as window title, solve the character string of quoting when window title in correlation technique and taken system performance that too much processing resource causes the even problem of collapse that declines when long, reached the effect that improves system performance.
In addition, window title treating apparatus shown in this exemplary embodiment, whether the length that detects this first string resource is greater than the 4th designated length, if the length that testing result is this first string resource is greater than the 4th designated length, system backstage is to user's display reminding information, the application program that window title is long is carried out to safety instruction, avoid DoS leak to be utilized by rogue program, reach the effect that improves security of system.
Fig. 8 is according to the block diagram of a kind of electronic equipment shown in an exemplary embodiment.This electronic equipment 800 can because of configuration or performance is different produces larger difference, can comprise one or more central processing units (central processing units, CPU) 822 (for example, one or more processors) and storer 832, the storage medium 830 (for example one or more mass memory units) of one or more storage application programs 842 or data 844.Wherein, storer 832 and storage medium 830 can be of short duration storage or storage lastingly.The program that is stored in storage medium 830 can comprise one or more modules (diagram does not mark), each module can comprise a series of command operatings in electronic equipment, this series of command operating can for realize as shown in Figure 1, Figure 2 or Fig. 3 arbitrary shown in all or part of step of method.Further, central processing unit 822 can be set to communicate by letter with storage medium 830, carries out a series of command operatings in storage medium 830 on electronic equipment device 800.
Electronic equipment 800 can also comprise one or more power supplys 826, one or more wired or wireless network interfaces 850, one or more IO interface 858, one or more keyboards 856, and/or, one or more operating systems 841, Windows ServerTM for example, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc.
Fig. 9 is according to the block diagram of a kind of electronic equipment 900 shown in another exemplary embodiment.For example, electronic equipment 900 can be mobile phone, computing machine, digital broadcast terminal, information receiving and transmitting equipment, game console, flat-panel devices, Medical Devices, body-building equipment, personal digital assistant etc.
With reference to Fig. 9, electronic equipment 900 can comprise following one or more assembly: processing components 902, storer 904, power supply module 906, multimedia groupware 908, audio-frequency assembly 910, the interface 912 of I/O (I/O), sensor module 914, and communications component 916.
Processing components 902 is controlled the integrated operation of electronic equipment 900 conventionally, such as with demonstration, call, data communication, the operation that camera operation and record operation are associated.Processing components 902 can comprise that one or more processors 920 carry out instruction, to complete all or part of step of above-mentioned method.In addition, processing components 902 can comprise one or more modules, is convenient to mutual between processing components 902 and other assemblies.For example, processing components 902 can comprise multi-media module, to facilitate mutual between multimedia groupware 908 and processing components 902.
Storer 904 is configured to store various types of data to be supported in the operation of electronic equipment 900.The example of these data comprises for any application program of operation on electronic equipment 900 or the instruction of method, contact data, telephone book data, message, picture, video etc.Storer 904 can be realized by the volatibility of any type or non-volatile memory device or their combination, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), ROM (read-only memory) (ROM), magnetic store, flash memory, disk or CD.In storer 904, also store one or more modules, these one or more modules are configured to be carried out by these one or more processors 920, to complete all or part of step of method shown in above-mentioned Fig. 1 or Fig. 4.
The various assemblies that power supply module 906 is electronic equipment 900 provide electric power.Power supply module 906 can comprise power-supply management system, one or more power supplys, and other and the assembly that generates, manages and distribute electric power to be associated for electronic equipment 900.
Multimedia groupware 908 is included in the screen that an output interface is provided between described electronic equipment 900 and user.In certain embodiments, screen can comprise liquid crystal display (LCD) and touch panel (TP).If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user.Touch panel comprises that one or more touch sensors are with the gesture on sensing touch, slip and touch panel.Described touch sensor is the border of sensing touch or sliding action not only, but also detects duration and the pressure relevant to described touch or slide.In certain embodiments, multimedia groupware 908 comprises a front-facing camera and/or post-positioned pick-up head.When electronic equipment 900 is in operator scheme, during as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom ability.
Audio-frequency assembly 910 is configured to output and/or input audio signal.For example, audio-frequency assembly 910 comprises a microphone (MIC), and when electronic equipment 900 is in operator scheme, during as call model, logging mode and speech recognition mode, microphone is configured to receive external audio signal.The sound signal receiving can be further stored in storer 904 or be sent via communications component 916.In certain embodiments, audio-frequency assembly 910 also comprises a loudspeaker, for output audio signal.
I/O interface 912 is for providing interface between processing components 902 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc.These buttons can include but not limited to: home button, volume button, start button and locking press button.
Sensor module 914 comprises one or more sensors, is used to electronic equipment 900 that the state estimation of various aspects is provided.For example, sensor module 914 can detect the opening/closing state of electronic equipment 900, the relative positioning of assembly, for example described assembly is display and the keypad of electronic equipment 900, the position of an assembly of all right detected electrons equipment 900 of sensor module 914 or electronic equipment 900 changes, the existence that user contacts with electronic equipment 900 or do not have the temperature variation of electronic equipment 900 orientation or acceleration/deceleration and electronic equipment 900.Sensor module 914 can comprise proximity transducer, be configured to without any physical contact time detect near the existence of object.Sensor module 914 can also comprise optical sensor, as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensor module 914 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 916 is configured to be convenient to the communication of wired or wireless mode between electronic equipment 900 and other equipment.Electronic equipment 900 can access the wireless network based on communication standard, as WiFi, and 2G or 3G, or their combination.In one exemplary embodiment, communications component 916 receives broadcast singal or the broadcast related information from external broadcasting management system via broadcast channel.In one exemplary embodiment, described communications component 916 also comprises near-field communication (NFC) module, to promote junction service.For example, can be based on radio-frequency (RF) identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, electronic equipment 900 can be realized by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD) (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components, for carrying out said method.
In the exemplary embodiment, also provide a kind of non-provisional computer-readable recording medium that comprises instruction, for example, comprised the storer 904 of instruction, above-mentioned instruction can have been carried out said method by the processor 920 of electronic equipment 900.For example, this non-provisional computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage equipment etc.
Those skilled in the art, considering instructions and putting into practice after disclosure herein, will easily expect other embodiment of the present disclosure.The application is intended to contain any modification of the present disclosure, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present disclosure and comprised undocumented common practise or the conventional techniques means in the art of the disclosure.Instructions and embodiment are only regarded as exemplary, and true scope of the present disclosure and spirit are pointed out by claim.
Should be understood that, the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various modifications and change not departing from its scope.The scope of the present disclosure is only limited by appended claim.

Claims (11)

1. a window title disposal route, is characterized in that, described method comprises:
Determine the first string resource that is cited as window title by target window;
Whether the length that detects described the first string resource is greater than predetermined threshold;
If testing result is the length of described the first string resource, be greater than described predetermined threshold, the window name of described target window be called to brachymemma and process.
2. method according to claim 1, is characterized in that, when described method is applied to build application program corresponding to described target window;
The described window name to described target window is called brachymemma to be processed, and comprising:
Judge whether described the first string resource is also cited as non-window title;
If judgment result is that, described the first string resource is also cited as non-window title, from described the first string resource, extracts the character string of the first designated length, and described the first designated length is less than or equal to described predetermined threshold;
The described character string extracting is stored as to the second string resource;
The resource that is cited as window title by described target window is revised as to described the second string resource by described the first string resource.
3. method according to claim 2, is characterized in that, described method also comprises:
Inquiry is except described target window, and other is cited as described the first string resource each window of window title;
The resource that is cited as window title by described each window is revised as to described the second string resource by described the first string resource.
4. method according to claim 2, is characterized in that, described method also comprises:
If judgment result is that, described the first string resource is not cited as non-window title, described the first string resource is punctured into the second designated length, and described the second designated length is less than or equal to described predetermined threshold.
5. method according to claim 1, is characterized in that, when described method is applied to move application program corresponding to described target window;
The described window name to described target window is called brachymemma to be processed, and comprising:
From described the first string resource, extract the character string of the 3rd designated length, described the 3rd designated length is less than or equal to described predetermined threshold;
The window title that is described target window by the described character string display extracting.
6. a window title treating apparatus, is characterized in that, described device comprises:
Determination module, for determining the first string resource that is cited as window title by target window;
Whether first detection module, be greater than predetermined threshold for detection of the length of described the first string resource;
Processing module, if the length that is described the first string resource for the testing result of described first detection module is greater than described predetermined threshold, is called brachymemma to the window name of described target window and processes.
7. device according to claim 6, is characterized in that, described processing module, comprising:
Judging unit, for when building application program corresponding to described target window, judges whether described the first string resource is also cited as non-window title;
The first extraction unit, if described the first string resource that judgment result is that for described judging unit is also cited as non-window title, from described the first string resource, extract the character string of the first designated length, described the first designated length is less than or equal to described predetermined threshold;
Storage unit, is stored as the second string resource for the described character string that described the first extraction unit is extracted;
First revises unit, for the resource that is cited as window title by described target window is revised as to described the second string resource by described the first string resource.
8. device according to claim 7, is characterized in that, described processing module also comprises:
Query unit, for inquiry, except described target window, other is cited as described the first string resource each window of window title;
Second revises unit, for the resource that is cited as window title by described each window is revised as to described the second string resource by described the first string resource.
9. device according to claim 7, is characterized in that, described processing module also comprises:
Brachymemma unit, if be not cited as non-window title for described the first string resource of judgment result is that of described judging unit, is punctured into the second designated length by described the first string resource, and described the second designated length is less than or equal to described predetermined threshold.
10. device according to claim 6, is characterized in that, described processing module, comprising:
The second extraction unit for when application program corresponding to the described target window of operation, extracts the character string of the 3rd designated length from described the first string resource, and described the 3rd designated length is less than or equal to described predetermined threshold;
Display unit, the window title that is described target window for described character string display that described the second extraction unit is extracted.
11. 1 kinds of electronic equipments, is characterized in that, described electronic equipment comprises:
Processor;
For storing the storer of described processor executable;
Wherein, described processor is configured to:
Determine the first string resource that is cited as window title by target window;
Whether the length that detects described the first string resource is greater than predetermined threshold;
If testing result is the length of described the first string resource, be greater than described predetermined threshold, the window name of described target window be called to brachymemma and process.
CN201410258491.XA 2014-06-11 2014-06-11 Window name processing method, device and electronic equipment Active CN104077130B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410258491.XA CN104077130B (en) 2014-06-11 2014-06-11 Window name processing method, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410258491.XA CN104077130B (en) 2014-06-11 2014-06-11 Window name processing method, device and electronic equipment

Publications (2)

Publication Number Publication Date
CN104077130A true CN104077130A (en) 2014-10-01
CN104077130B CN104077130B (en) 2017-12-29

Family

ID=51598402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410258491.XA Active CN104077130B (en) 2014-06-11 2014-06-11 Window name processing method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN104077130B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951186A (en) * 2015-06-12 2015-09-30 联想(北京)有限公司 Information processing method and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7134125B2 (en) * 2003-02-07 2006-11-07 Intel Corporation Method for firmware to provide seamless regulation of system resources and extend additional configuration methods for system resource management
CN102110081A (en) * 2011-02-25 2011-06-29 凌阳成芯科技(成都)有限公司 File name display processing method and device
CN102708774A (en) * 2012-04-19 2012-10-03 广东威创视讯科技股份有限公司 Display method of character strings and system thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7134125B2 (en) * 2003-02-07 2006-11-07 Intel Corporation Method for firmware to provide seamless regulation of system resources and extend additional configuration methods for system resource management
CN102110081A (en) * 2011-02-25 2011-06-29 凌阳成芯科技(成都)有限公司 File name display processing method and device
CN102708774A (en) * 2012-04-19 2012-10-03 广东威创视讯科技股份有限公司 Display method of character strings and system thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
金罗军等: "《OOP Pascal高级图形用户界面编程指南和技巧》", 31 December 1993 *
陈会安: "《Android SDK程序设计与开发范例》", 31 January 2013 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951186A (en) * 2015-06-12 2015-09-30 联想(北京)有限公司 Information processing method and electronic equipment
CN104951186B (en) * 2015-06-12 2019-07-26 联想(北京)有限公司 A kind of information processing method and electronic equipment

Also Published As

Publication number Publication date
CN104077130B (en) 2017-12-29

Similar Documents

Publication Publication Date Title
CN104105169B (en) From method and the device of the WLAN (wireless local area network) that is dynamically connected
CN104050035A (en) Processing method and device for application program
CN104484200A (en) Method and device for updating firmware
CN105407098A (en) Identity verification method and device
CN104008635A (en) Equipment control method and device
CN104486451B (en) Application program recommends method and device
CN105224195A (en) Terminal operation method and device
CN104238912A (en) Application control method and application control device
CN104615655A (en) Information recommendation method and device
CN104298547A (en) Terminal setting method and device
CN107870674B (en) Program starting method and mobile terminal
CN104035979A (en) Object recommendation method and related device
CN104361021B (en) Method for identifying web page coding and device
CN104766005A (en) Management method and device for application software access authority
CN105160320A (en) Fingerprint identification method and apparatus, and mobile terminal
CN104156284A (en) File backup method and device
CN105512545A (en) Access authority management method and device
CN105335062A (en) Information editing operation processing method and apparatus
CN105550035A (en) Background process control method and device
CN104615663A (en) File sorting method and device and terminal
CN104809744A (en) Method and device for processing pictures
CN105095366A (en) Method and device for processing character messages
CN105263126A (en) Method, device and system for short message verification
CN104571709A (en) Mobile terminal and processing method of virtual keys
CN105550213A (en) Picture browsing method and device

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