Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
METHOD AND APPARATUS FOR ACQUIRING PAGE DISPLAY SPEED
Document Type and Number:
WIPO Patent Application WO/2015/024456
Kind Code:
A1
Abstract:
Method and apparatus for acquiring display speed of a page of an application. The method includes steps of acquiring log information of the page, filtering the log information to obtain display information of the page, and analyzing the display information to obtain the display speed of the page. The method and apparatus can meet the accuracy requirements without tedious timing process.

Inventors:
YAO CHAOSHENG (CN)
Application Number:
PCT/CN2014/083942
Publication Date:
February 26, 2015
Filing Date:
August 08, 2014
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
TENCENT TECH SHENZHEN CO LTD (CN)
International Classes:
G06F11/34; G06F11/36
Foreign References:
CN102591770A2012-07-18
CN102420712A2012-04-18
CN102662839A2012-09-12
US20130024731A12013-01-24
Attorney, Agent or Firm:
BEIJING EAST IP LTD. (Tower E2 The Towers, Oriental Plaza,No.1 East Chang An Ave.,Dongcheng District, Beijing 8, CN)
Download PDF:
Claims:
What is claimed is:

1. A method for acquiring display speed of a page of an application, comprising: acquiring log information of the page;

filtering the log information to obtain display information of the page, analyzing the display information to obtain the display speed of the page.

2. The method of claim 1, further comprising, before acquiring the log information of the page, removing any cached log information of the application.

3. The method of claim 1, wherein the display information of the page comprises a package name of the application, a class name of the page and a time period required for displaying the page.

4. The method of claim 3, wherein the display speed of the page corresponds to the time period required for displaying the page.

5. The method of claim 3, wherein analyzing the display information comprising: extracting the package name of the application, the class name of the page and the time period required for displaying the page from the display information of the page, using a preset keyword.

6. The method of claim 5, further comprising:

outputting the package name of the application, the class name of the page and the time period required for displaying the page.

7. An apparatus for acquiring display speed of a page of an application, comprising:

acquiring module for acquiring log information of the page;

filtering module for filtering the log information to obtain display information of the page,

analyzing module for analyzing the display information to obtain the display speed of the page.

8. The apparatus of claim 7, wherein, the acquiring module removes any cached log information of the application before acquiring the log information of the page.

9. The apparatus of claim 7, wherein the display information of the page comprises a package name of the application, a class name of the page and a time period required for displaying the page.

10. The apparatus of claim 9, wherein the display speed of the page corresponds to the time period required for displaying the page.

11. The apparatus of claim 9, wherein analyzing the display information comprising:

extracting the package name of the application, the class name of the page and the time period required for displaying the page from the display information of the page, using a preset keyword.

12. The apparatus of claim 11, further comprising:

outputting module for outputting the package name of the application, the class name of the page and the time period required for displaying the page.

13. A computer-readable storage medium comprising program instructions for implementing the method of any of claims 1 to 6.

14. A computing device, comprising

a memory, and

a processor, configured to

acquire log information of a page of an application,

filter the log information to obtain display information of the page, and analyze the display information to obtain display speed of the page.

15. The computing device of claim 14, the processor is further configured to remove any cached log information of the application before acquiring the log information of the page.

16. The computing device of claim 14, wherein the display information of the page comprises a package name of the application, a class name of the page and a time period required for displaying the page.

17. The computing device of claim 16, wherein the display speed of the page corresponds to the time period required for displaying the page.

18. The computing device of claim 16, wherein analyzing the display information comprising:

extracting the package name of the application, the class name of the page and the time period required for displaying the page from the display information of the page, using a preset keyword.

19. The computing device of claim 18, the processor is further configured to output the package name of the application, the class name of the page and the time period required for displaying the page.

Description:
METHOD AND APPARATUS FOR ACQUIRING PAGE DISPLAY

SPEED

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims benefit of priority to Chinese Application No. 201310367076.3, entitled "METHOD AND APPARATUS FOR ACQUIRING PAGE DISPLAY SPEED", filed on August 21, 2013. The aforementioned patent application is hereby incorporated by reference in its entirety.

FIELD OF THE INVENTION

This application relates generally to the test of applications, and more particularly, to a method and apparatus for acquiring page display speed.

BACKGROUND

Conventionally, the display speed for an application page is acquired by timing. The resultant time period represents the display speed for the application page. Currently, the timing methods includes: (1) a manual timing method using a timer which is started when a page is initiated and ended when the page has been loaded so that it can be seen by naked eyes; (2) an image comparison timing method where a timer, under the control of script, is started when a page is initiated and ended when a screenshot of the page matches a preset standard image according to a predetermined criteria, representing the page has been loaded.

However, since the page display speed of the application is generally in the order of millisecond, the first manual timing method can't meet the accuracy requirements for the display speed acquisition. The second timing method is complicated and the cost is high. Meanwhile, as the screenshot of the page is continuously compared and adjusted, complicated script is required.

SUMMARY OF THE INVENTION

Thereby, it is desirable to provide a method and apparatus for acquiring the display speed for an application page, which can meet the accuracy requirements and/or avoid tedious timing process.

According to an aspect, a method is provided for acquiring display speed of a page of an application, comprising: acquiring log information of the page;

filtering the log information to obtain display information of the page, analyzing the display information to obtain the display speed of the page.

According to another aspect, an apparatus is provided for acquiring a display speed of a page of an application, comprising:

acquiring module for acquiring log information of the page;

filtering module for filtering the log information to obtain display information of the page,

analyzing module for analyzing the display information to obtain the display speed of the page.

According to yet another aspect, a computer-readable storage medium is provided, comprising program instructions therein to implement the method for acquiring display speed of an application page.

According to yet another aspect, a computing device is provided, comprising a memory, and

a processor, configured to

acquire log information of a page of an application,

filter the log information to obtain display information of the page, and analyze the display information to obtain display speed of the page. The method and apparatus for acquiring the display speed of application pages can meet the accuracy requirements without tedious timing process.

DESCRIPTION OF THE DRAWINGS

In the drawings, like reference characters generally refer to the same parts throughout the different views. In the following description, various embodiments of the present disclosure are described with reference to the following drawings, in which:

Figure 1 is a block diagram of the structure of a computing device according to an exemplary embodiment,

Figure 2 is a flow chart of the method for acquiring the display speed of a page according to an exemplary embodiment,

Figure 3 illustrates the page display information of the application according to an exemplary embodiment,

Figure 4 illustrates the output page display speed of the application according to an exemplary embodiment, and

Figure 5 is a block diagram of an apparatus for acquiring the display speed of a page according to an exemplary embodiment. DETAILED DESCRIPTION

In order to make the objects, technical solutions and advantages of the disclosure more apparent, the disclosure will be further illustrated in details in connection with accompanying figures and embodiments hereinafter. It should be appreciated that the detailed embodiments described herein are only used to explain the disclosure but not to limit the disclosure.

Figure 1 shows a block diagram of the structure of a computing device according to an exemplary embodiment. The example of the computing device 1 includes, but is not limited to a desktop computer, a portable computer, smart phones, tablet computers. As shown in figure 1, the computing device may include a memory 11, a processor 12, a memory controller 13, an input/output interface 14, a communication module 15, an input unit 16 and a display unit 17. These components communicate with each other through one or more communication bus or signal lines.

It should be noted that, the structure shown in figure 1 is illustrative, and it does not mean any limitation to the structure of the computing device. For example, the computing device 1 of figure 1 may also include more or fewer components, or have a different configuration. The components shown in figure 1 may be embodied in hardware, software, or combination thereof.

Memory 11 may store software programs and various data and provides data stored therein to the processor 12 during execution of the software program. The software programs, for example, may include operating systems, applications, device drivers, and software modules including program code and/or representing computer-executable process steps. The software modules can incorporate program instructions/modules to implement the method and apparatus for acquiring the page display speed according to embodiments disclosed herein.

The processor 12 loads and runs the software programs stored in the memory 11 to perform various functions and data processing, e.g., implementing the method for acquiring the page display speed according to embodiments disclosed herein.

Memory 11 may include random access memory (RAM), read only memory (ROM) and the like. The memory 11 may also include, for example, EPROM, EEPROM, flash memory or other nonvolatile memory. The processor 12 and other components can access the memory 11 under control of the memory controller 13.

In some embodiments, the memory is not provided in the computing device. For example, the memory may be a remote memory with respect to the computing device. The remote memory can be connected to the computing device via a network. Examples of the network include, but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

The input/output interface 14 couples various input/output devices to the processor 12 and the memory 11. The input/output interface can include, for example communication interfaces for communication modules, input interfaces for input units and display interfaces for display units, and so on.

The communication module 15 may communicate with the communication network or other devices. For example, the communication module 15 may include a network card 151 and/or a Radio Frequency (RF) module 152. The network card 151 is a interface for physical connection and electrical signal match between computing devices and transmission medium to create a local area network which can be connected to the Internet to communicate with various networks such as local area network (LAN), metropolitan area network (MAN), or wide area network. The network card 151 may include a variety of conventional circuit elements for performing the functions described above, such as a processor and a memory (including ROM and RAM) and the like. The RF module 152 may receive and transmit electromagnetic waves and convert electrical signals to electromagnetic waves or vice versa, to communicate with communication networks or other communication devices. The RF module 152 may include a variety of conventional circuit elements for performing these functions, e.g., an antenna, RF transceiver, a digital signal processor, an encryption/decryption chip , a subscriber identity module (SIM) card , a memory and so on. The RF module 152 may communicate with a variety of networks such as the Internet, intranets, wireless networks or communicate with other devices through a wireless network. The wireless network can include cellular phone network, wireless LAN or wireless MAN. These wireless networks can employ a variety of communication standards, protocols or technologies, including, but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), wideband code division multiple access (W-CDMA), Code division access (CDMA), time division multiple access (TDMA), Wireless Fidelity (WiFi), (such as IEEE 802.11a, IEEE 802.11b, IEEE802.11g and/or IEEE 802.11η), Voice over internet protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), protocols for email, instant messaging and/or short message, as well as any other suitable communication protocols.

The input unit 16 may receive inputs. The user can input characters and/or control commands, via the input unit 16. According to an exemplary embodiment, the input unit 16 may include keys 161 and/or a touch surface 162 .The keys 161 may include, for example character keys for inputting characters, and control keys for receiving control commands. Examples of the control keys may include a "returning to main screen" key, a power "on/off key, a camera key, and so on. The touch surface 162 may receive touch operations by the user, through a finger, a stylus or any other suitable objects on or near the touch surface 162. The touch surface 162 may include, for example, a touch detection device and a touch control device. The touch detection device may detect positions where touching happens and generate corresponding touch signals. The touch controller receives the touch signals from the touch detection device, and calculates the coordinate of the touching positions according to the touch signal. Then the touch controller sends the coordinate information to the processor 12. Meanwhile, the touch controller receives commands from the processor 12. Further, the touch surface 162 may be resistive, capacitive or infrared; alternatively the touch surface 162 may be a surface acoustic wave touch surface. In addition or alternatively, the input unit 16 may include other input devices, including, but not limited to, keyboards, trackballs, mice, or joysticks and the like.

The display unit 17 may display the information input by the user, the information provided to the user and/or a variety of graphical user interfaces. The graphical user interfaces may include graphics, text, icons, video, and any combination thereof. In one example, the display unit 17 includes a display 171. The display 171 may be for example a liquid crystal display (LCD), an organic light emitting diode (OLED) display, an Electro-Phoretic Display (EPD) and the like. Alternatively, the touch surface 162 may be integrated with the display panel 171.

Referring to Figure 2, an exemplary embodiment provides a method executable by the computing device 1, to acquire the display speed of a page of an application running in the computing device. The method comprises:

S I : acquiring log information of the page;

S2: filtering the log information to obtain display information of the page; and S3: analyzing the display information to obtain the display speed of the page. According to the method, the display speed of the page can be obtained by analyzing the display information of the page so that tedious timing process can be avoided and the accuracy requirements can be met.

According to an exemplary embodiment, the applications may include game programs, video programs, call programs and so on. The applications can also include programs for word processing, information retrieval, media player, network communications, information management, drawing, image capture, spreadsheets and so on. The application may have one or more activity components. Each component can correspond to a page of the application. For example, the applications may have, for example, a main menu page, a dial page or a setting page. These pages can usually include one or more user interfaces for interacting with the user. For example, a user can enter a phone number on the dial page of the call program to start dialing task, and the user can also choice a camera button on the image capturing main menu page, to start image capturing tasks. Generally, when a user starts an application, an activity of the application is usually initiated simultaneously. The activity component which is active can trigger another activity component, resulting the change of the displayed application page. Whenever an activity component is initiated, the previous activity component is deactivated. The page display speed corresponds to the time period from initiating the activity component until the page corresponding to the activity component is displayed on the display unit (for example, the display surface). The shorter the time period is, the faster the page is displayed.

In addition to the application, the computing device may also is stalled with an operating system, for example, Windows Phone, Symbian, iOS, Android, Windows, Linux , etc.

According to an exemplary embodiment, during the application being running, log information of the application is recorded in a system log file. The log information of the application may indicate the status of the application. For example, the log information may include startup time, shutdown time, error, error-related information of the application, etc. The system log file can be output.

Taking the android system as an example, for example, the system log file can be retrieved and output via a command-line tool "logcat". The page log information of the application is included in the system log file. The page log information includes log information associated with the components of the application, such as the class name of the components, and the time period required for displaying the page of each component.

Computing devices with Android system usually are equipped with Android SDK (Software Development Kit), which is a core software development kit dedicated to Android application development. The applications page log information can be acquired from the system log file via "adb logcat -s ActivityManager" command. It should be noted that, before using the "adb logcat -s ActivityManager" command to acquire the applications page log information, "adb logcat -c" command can be used to remove any cached log information of the application, so that, at step S I, only the page log information corresponding to the currently displayed page of the application is acquired. Of course, if not removing the cached log information of the application, at step SI, the acquired page log information would include possibly both page log information corresponding to the currently displayed page and page log information corresponding to previously displayed page.

After acquiring the page log information of the application, at step S2, the findstr

"Displayed" command can be used to filter the log information to obtain display information of the page. The page display information includes information related to the display of the page, such as the time period required for displaying the page. In combination with the command for acquiring the page log information of the application, the following command can be used to perform steps SI and S2, to obtain the page display information in the page log information:

adb logcat -c && adb logcat -s ActivityManager I findstr "Displayed"

Instead of the above command for performing step S 1 and step S2, a packaged program can be used to perform steps S 1 to step S2. Especially for mobile terminals (such as smart phones, tablet computers), the packaged program is particularly advantageous. For example, the packaged program may include the following design using JAVA language:

mLogcatProc = Runtime. getRuntime().exec(new String[]

{ "logcat", "ActivityManagenI *:S" })

Figure 3 shows the page display information of the application obtained by the above command adb logcat -c && adb logcat -s ActivityManager I findstr "Displayed". As shown in figure 3, the page display information of the application comprises the package name of the application, i.e. "activity com. example. Logowner", the class name of the active activity component, i.e. "GetlogActivity" and the time period required for displaying the page, "317ms". The display speed of the page is associated with the time period required for displaying the page.

In step S3, the page display information is analyzed to obtain the display speed of the page. In step S3, a preset keyword may be used to extract the package name of the application, the class name of the page and the time period required for displaying the page from the page display information. Typically, the page display information of the application based on the Android system has the same format. For example, referring to Figure 3, the package name of the application is located between "Displayed" and "/" , the class name of the page is located between "/" and ": ", the time period required for displaying the page is located between ": " and "ms". Accordingly , the preset keyword may include "Displayed", "/", ": " and "ms". In step S3, the package name of the application, the class name of the page and the time period required for displaying the page may be extracted from the content preceding or following the keyword. The package name of the application, the class name of the page and the time period required for displaying the page may be output through the display unit 17 to show the display speed of the page to the user, as shown in Figure 4.

In an exemplary embodiment, the JAVA code for implementing step S 1 and step S2 is as follows:

mLogcatProc = Runtime.getRuntime().exec(new String[]

{ "logcat","ActivityManager:I *:S" });

reader = new BufferedReader(new

InputStreamReader(mLogcatProc.getlnputStreamO))

The JAVA code for extracting the package name of the application in step S3 is as follows:

int pkgindexl = line.indexOf("Displayed") ;

String newline = line.substring(pkgindexl);

int pkgindex2 = newline.indexOf("/");

String pkg = newline. substring(9,pkgindex2)

The JAVA code for extracting the class name of the page is as follows:

String newline2 = newline. substring(pkgindex2);

int Activity Index = newline2.indexOf(":");

String ActivityName = newline2.substring(l, Activity Index)

The JAVA code for extracting the time period required for displaying the page is as follows: String time = newline2.substring(newline2.indexOf("+")+l,

newline2.indexOf("ms")).

Referring to Figure 5, an exemplary embodiment also provides an apparatus 100 for acquiring the page display speed of an application which comprises an acquiring module 101, a filtering module 102 and an analyzing module 103.

The acquiring module 101 may acquire the page log information of the application and before acquiring the log information, remove any information associated with the log of the application in a cache.

The filtering module 102 may filter the log information to obtain display information of the page. The display information of the page comprises a package name of the application, a class name of the page and a time period required for displaying the page. The display speed of the page is associated with the time period required for displaying the page.

The analyzing module 103 may analyze the display information to obtain the display speed of the page. The package name of the application, the class name of the page and the time period required for displaying the page may be extracted from the display information of the page, using preset keywords. The package name of the application, the class name of the page and the time period required for displaying the page may be presented on the display unit.

The method and apparatus for acquiring the display speed of application pages can meet the accuracy requirements without tedious timing process.

Further, embodiments of the disclosure also provide a computer-readable storage medium for storing therein computer-executable instructions. Computer readable storage media, as used herein, refers to physical or tangible storage (as opposed to signals) and includes without limitation volatile and non-volatile, removable and non-removable media implemented in any method or technology for the tangible storage of information such as computer-readable instructions, data structures, program modules or other data. Computer readable storage media includes, but is not limited to, RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other physical or material medium which can be used to tangibly store the desired information or data or instructions and which can be accessed by a computer or processor. The above described embodiments are merely preferred embodiments of the disclosure, but not intended to limit the disclosure. Any modifications, equivalent alternations and improvements that are made within the spirit and scope of the disclosure should be included in the protection scope of the disclosure.