CN107526683B - Method and device for detecting functional redundancy of application program and storage medium - Google Patents

Method and device for detecting functional redundancy of application program and storage medium Download PDF

Info

Publication number
CN107526683B
CN107526683B CN201710731726.6A CN201710731726A CN107526683B CN 107526683 B CN107526683 B CN 107526683B CN 201710731726 A CN201710731726 A CN 201710731726A CN 107526683 B CN107526683 B CN 107526683B
Authority
CN
China
Prior art keywords
interactive interface
interface components
application program
application
redundancy
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.)
Active
Application number
CN201710731726.6A
Other languages
Chinese (zh)
Other versions
CN107526683A (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 Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710731726.6A priority Critical patent/CN107526683B/en
Publication of CN107526683A publication Critical patent/CN107526683A/en
Application granted granted Critical
Publication of CN107526683B publication Critical patent/CN107526683B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3616Software analysis for verifying properties of programs using software metrics

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a method, a device and a storage medium for detecting functional redundancy of an application program, wherein the method comprises the following steps: acquiring an interactive interface component list of an application program by analyzing a program list file in the application program; and determining whether the functions of the application program have high redundancy according to the quantity information of the interactive interface components in the interactive interface component list. The redundancy of the application program function can be automatically detected, so that the complexity of detecting the redundancy of the application program function is reduced, and the detection efficiency is improved.

Description

Method and device for detecting functional redundancy of application program and storage medium
Technical Field
The present disclosure relates to the field of application development, and in particular, to a method and an apparatus for detecting functional redundancy of an application, and a storage medium.
Background
With the wide use of the Android system, the development of the application program is simplified more and more, and the functions of the application program are increased more and more. In the process of program development and test, the problem of functional interface redundancy of part of application programs occurs, and further the running speed and stability of the application programs are influenced. Thus, application "slimming" is a subject that every developer must face. In the related art, a developer or a tester generally tries an application by manually reading codes and repeatedly performing the operation, and then combs up the function of the application by drawing an application architecture diagram step by step, and determines the redundancy of the function of the application program according to the function.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a method and an apparatus for detecting functional redundancy of an application, and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for detecting application function redundancy, including:
acquiring an interactive interface component list of an application program by analyzing a program list file in the application program;
and determining whether the functions of the application program have high redundancy according to the quantity information of the interactive interface components in the interactive interface component list.
Optionally, the quantity information includes: the determining whether the function of the application program has high redundancy according to the number information of the interactive interface components in the interactive interface component list comprises the following steps:
determining whether the functions of the application have high redundancy according to the total number; alternatively, the first and second electrodes may be,
determining whether the functions of the application program have high redundancy according to the number of the similar interactive interface components; alternatively, the first and second electrodes may be,
and determining whether the functions of the application program have high redundancy according to the total number and the number of the similar interactive interface components.
Optionally, the determining whether the function of the application program has high redundancy according to the total number includes:
counting all the interactive interface components in the interactive interface component list to obtain the total number;
and when the total number is greater than or equal to a first preset number, determining that the functions of the application programs have high redundancy.
Optionally, the determining whether the function of the application has high redundancy according to the number of the similar interactive interface components includes:
acquiring the number of similar interactive interface components in the interactive interface component list, wherein the similar interactive interface components comprise interactive interface components with name similarity larger than preset similarity;
and when the number of the similar interactive interface components is larger than or equal to a second preset number, determining that the functions of the application program have high redundancy.
Optionally, the determining whether the function of the application has high redundancy according to the number of all the interactive interface components and the number of the similar interactive interface components includes:
counting all the interactive interface components in the interactive interface component list to obtain the total number;
acquiring the number of similar interactive interface components in the interactive interface component list, wherein the similar interactive interface components comprise interactive interface components with name similarity larger than preset similarity;
and when the total number is greater than or equal to a first preset number and the number of the similar interactive interface components is greater than or equal to a second preset number, determining that the functions of the application program have high redundancy.
Optionally, the obtaining the interactive interface component list of the application program by analyzing the program manifest file in the application program includes:
acquiring a program list file in the application program;
extracting the interactive interface components registered in the program manifest file;
and generating an interactive interface component list according to the extracted interactive interface components.
Optionally, the method further includes:
when the function of the application program is determined to have high redundancy, outputting a high redundancy reminder.
Optionally, the application program is an application program running in an Android system, the program manifest file is a manifest file, and the interactive interface component is an Activity component.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for detecting application redundancy, including:
the component analysis module is configured to obtain an interactive interface component list of an application program by analyzing a program list file in the application program;
and the redundancy determining module is configured to determine whether the functions of the application program have high redundancy according to the quantity information of the interactive interface components in the interactive interface component list.
Optionally, the quantity information includes: the redundancy determination module is configured to:
determining whether the functions of the application have high redundancy according to the total number; alternatively, the first and second electrodes may be,
determining whether the functions of the application program have high redundancy according to the number of the similar interactive interface components; alternatively, the first and second electrodes may be,
and determining whether the functions of the application program have high redundancy according to the total number and the number of the similar interactive interface components.
Optionally, the redundancy determining module includes:
the quantity counting submodule is configured to count all the interactive interface components in the interactive interface component list to obtain the total quantity;
a redundancy determination sub-module configured to determine that the function of the application has high redundancy when the total number is greater than or equal to a first preset number.
Optionally, the redundancy determining module includes:
the similarity counting submodule is configured to acquire the number of similar interactive interface components in the interactive interface component list, wherein the similar interactive interface components comprise interactive interface components with name similarity larger than preset similarity;
a redundancy determination sub-module configured to determine that the function of the application has high redundancy when the number of similar interactive interface components is greater than or equal to a second preset number.
Optionally, the redundancy determining module includes:
the quantity counting submodule is configured to count all the interactive interface components in the interactive interface component list to obtain the total quantity;
the similarity counting submodule is configured to acquire the number of similar interactive interface components in the interactive interface component list, wherein the similar interactive interface components comprise interactive interface components with name similarity larger than preset similarity;
the redundancy determining submodule is configured to determine that the function of the application program has high redundancy when the total number is greater than or equal to a first preset number and the number of the similar interactive interface components is greater than or equal to a second preset number.
Optionally, the component parsing module includes:
the list acquisition sub-module is configured to acquire a program list file in the application program;
the component extraction submodule is configured to extract the interactive interface components registered in the program manifest file;
and the list generation submodule is configured to generate an interactive interface component list according to the extracted interactive interface components.
Optionally, the apparatus further comprises:
a reminder module configured to output a high redundancy reminder when the functionality of the application is determined to have high redundancy.
Optionally, the application program is an application program running in an Android system, the program manifest file is a manifest file, and the interactive interface component is an Activity component.
According to a third aspect of the embodiments of the present disclosure, there is provided an apparatus for detecting application function redundancy, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: acquiring an interactive interface component list of an application program by analyzing a program list file in the application program; and determining whether the functions of the application program have high redundancy according to the quantity information of the interactive interface components in the interactive interface component list.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the method for detecting application program functional redundancy provided by the first aspect of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the technical scheme provided by the embodiment of the disclosure, an interactive interface component list of an application program is acquired by analyzing a program list file in the application program; and determining whether the functions of the application program have high redundancy according to the quantity information of the interactive interface components in the interactive interface component list. Therefore, the redundancy of the application program function can be determined by detecting the interface redundancy of the application program through statistics and analysis of the data of the application program interactive interface component, so that a mechanism for automatically detecting the redundancy of the application program function can be provided, and compared with a scheme for manually detecting the redundancy of the application program function in the prior art, the complexity for detecting the redundancy of the application program function can be reduced, and the detection efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a method for detecting application functional redundancy in accordance with an exemplary embodiment.
Fig. 2 is a flowchart illustrating a method for detecting functional redundancy of an application according to the embodiment shown in fig. 1.
Fig. 3 is a flowchart illustrating an interface component list acquisition method according to the embodiment shown in fig. 1.
FIG. 4 is a flow diagram illustrating another method for detecting application functional redundancy in accordance with an exemplary embodiment.
Fig. 5 is a block diagram illustrating an apparatus for detecting functional redundancy of an application according to an exemplary embodiment.
FIG. 6 is a block diagram illustrating a redundancy determination module according to the embodiment shown in FIG. 5.
FIG. 7 is a block diagram of another redundancy determination module shown in accordance with the embodiment shown in FIG. 5.
FIG. 8 is a block diagram of yet another redundancy determination module shown in accordance with the embodiment shown in FIG. 5.
FIG. 9 is a block diagram illustrating a component resolution module according to the embodiment shown in FIG. 5.
Fig. 10 is a block diagram illustrating another apparatus for detecting functional redundancy of an application according to an example embodiment.
FIG. 11 is a block diagram illustrating an apparatus for detection of application functional redundancy in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Before describing the method for detecting the functional redundancy of the application program provided by the present disclosure, an application scenario related to the present disclosure is first described, where the application scenario may include a terminal. The terminal may be a terminal supporting an Android system or capable of setting an Android virtual environment for a developer to write, run or test programs, and may be, for example, a desktop computer, a portable computer, a smart phone, a tablet computer, and the like.
Fig. 1 is a flowchart illustrating a method for detecting application function redundancy, according to an exemplary embodiment, where the method for detecting application function redundancy is used in the terminal as shown in fig. 1, and includes the following steps.
In step 101, a program manifest file in an application program is parsed, and an interactive interface component list of the application program is obtained.
Illustratively, the application may be an application running in the Android system. In this step 101, before starting the parsing, it is first necessary to determine whether the application has already been installed. For example, whether the application is installed in the Android system may be determined by a package name of the application installation package. For example, after downloading the APK (Android package) of the application, the package name of the application APK may be obtained by using a Google native command line Tool AAPT (Android Packaging Tool), and when the application needs to be analyzed, first, whether the package name corresponding to the disabled program already exists in the installation directory of the current Android system is detected, and then, whether the application is installed is determined.
The program manifest file is a manifest file, the manifest file is an android manifest file in an app/manifest directory, the interactive interface component is an Activity component, and the interactive interface component list may be a list including an Activity component name and a reference address.
In step 102, it is determined whether the function of the application program has high redundancy according to the quantity information of the interactive interface components in the interactive interface component list.
Wherein the quantity information may include: a total number of interactive interface components and/or a number of similar interactive interface components in the list of interactive interface components. Whether the redundancy of the function of the application program is too high can be confirmed by at least one of the preset quantity threshold values. This is because different interactive interfaces usually correspond to different functions in an application program, and therefore, whether the redundancy of the functions of the application program is too high can be confirmed by the number of interactive interface components.
To sum up, in the method for detecting functional redundancy of an application program provided by the embodiment of the present disclosure, an interactive interface component list of the application program is obtained by analyzing a program manifest file in the application program; and determining whether the functions of the application program have high redundancy according to the quantity information of the interactive interface components in the interactive interface component list. The interface redundancy of the application program can be obtained by counting and analyzing the Activity component data of the application program in the Android system, so that the redundancy of the application program function can be determined by detecting the interface redundancy of the application program, a mechanism for automatically detecting the redundancy of the application program function can be provided, the complexity of detecting the redundancy of the application program function can be reduced, and the detection efficiency can be improved.
Fig. 2 is a flowchart illustrating a method for detecting functional redundancy of an application according to the embodiment shown in fig. 1, and as shown in fig. 2, the step 102 may include any one of the following steps 1021 and 1023.
In step 1021, it is determined whether the application's functionality has high redundancy based on the total number.
Illustratively, this step 1021 may comprise:
first, all the interactive interface components in the interactive interface component list are counted to obtain the total number.
Secondly, when the total number is larger than or equal to a first preset number, determining that the function of the application program has high redundancy.
In step 1022, it is determined whether the application has high redundancy in functionality based on the number of similar interactive interface components.
Illustratively, this step 1022 may include:
firstly, the number of similar interactive interface components existing in the interactive interface component list is obtained, and the similar interactive interface components comprise interactive interface components with name similarity larger than preset similarity.
Secondly, when the number of the similar interactive interface components is larger than or equal to a second preset number, determining that the function of the application program has high redundancy.
And detecting the similarity of the text of the Activity component names in the Activity component list by combining the subsequence with one or more of algorithms such as a substring, a string editing distance, vector similarity, SimHash and the like. The similarity may be expressed in the form of a maximum subsequence, a hamming distance, a cosine distance, a euclidean distance, a probability distribution distance (K-L distance), or the like. And counting the number of Activity components with the similarity greater than the preset similarity, and taking the number as an evaluation standard for the functional redundancy of the application program.
In step 1023, it is determined whether the function of the application has high redundancy according to the total number and the number of similar interactive interface components.
For example, the functional redundancy of the application program may also be determined by combining the above steps 1021 and 1022, in this case, the step 1023 may include:
firstly, counting all interactive interface components in the interactive interface component list to obtain the total number; and acquiring the number of similar interactive interface components in the interactive interface component list, wherein the similar interactive interface components comprise interactive interface components with name similarity larger than preset similarity.
Secondly, when the total number is larger than or equal to a first preset number and the number of the similar interactive interface components is larger than or equal to a second preset number, determining that the functions of the application program have high redundancy.
Fig. 3 is a flowchart of an interface component list obtaining method according to the embodiment shown in fig. 1, where, as shown in fig. 3, the parsing of the program manifest file in the application program to obtain the interactive interface component list of the application program in step 101 may include the following steps.
In step 1011, a program manifest file in the application program is acquired.
In step 1012, the interactive interface components registered in the program manifest file are extracted.
In step 1013, a list of interactive interface components is generated according to the extracted interactive interface components.
For example, in an Android system, Activity components may be registered in a manifest file, and when an Activity component is searched and grabbed, an Activity component xml file needs to be acquired first, and then the Activity component registered in the Activity component xml file is further extracted.
Fig. 4 is a flowchart illustrating another method for detecting functional redundancy of an application according to an exemplary embodiment, where the method for detecting functional redundancy of an application may further include the following steps, as shown in fig. 4.
In step 103, when the function of the application program is determined to have high redundancy, a high redundancy reminder is output.
The method can be used in writing and testing of the application program, and when the function of the application program is determined to have high redundancy, a program developer can be reminded by outputting a prompt bar or a warning mark in combination with a platform for writing and testing the program. And further, the name and the position of the Activity component with high redundancy can be clarified in a visual output mode.
To sum up, the method for detecting the functional redundancy of the application program provided by the embodiment of the present disclosure can determine whether the application program to be analyzed is installed; when the application program is determined to be installed, acquiring an interactive interface component list of the application program by analyzing a program list file in the application program; and determining whether the functions of the application program have high redundancy according to the quantity information of the interactive interface components in the interactive interface component list. The interface redundancy of the application program can be obtained by counting and analyzing the number and the similarity of Activity components of the application program in the Android system, so that the redundancy of the application program function can be determined by detecting the interface redundancy of the application program, a mechanism for automatically detecting the redundancy of the application program function can be provided, the complexity of detecting the redundancy of the application program function can be reduced, and the detection efficiency can be improved.
FIG. 5 is a block diagram illustrating an apparatus for detecting functional redundancy of an application according to an example embodiment. Referring to fig. 5, the apparatus includes a component parsing module 510 and a redundancy determining module 520.
The component parsing module 510 is configured to obtain an interactive interface component list of an application program by parsing a program manifest file in the application program;
the redundancy determining module 520 is configured to determine whether the function of the application has high redundancy according to the number information of the interactive interface components in the interactive interface component list.
Optionally, the quantity information includes: the total number of interactive interface components and/or the number of similar interactive interface components in the list of interactive interface components, the redundancy determination module 520 is configured to:
determining whether the functions of the application program have high redundancy according to the total number; alternatively, the first and second electrodes may be,
determining whether the functions of the application program have high redundancy according to the number of the similar interactive interface components; alternatively, the first and second electrodes may be,
and determining whether the functions of the application program have high redundancy according to the total number and the number of the similar interactive interface components.
Alternatively, fig. 6 is a block diagram of a redundancy determining module according to the embodiment shown in fig. 5, referring to fig. 6, the redundancy determining module 520 includes:
the quantity counting submodule 521 is configured to count all the interactive interface components in the interactive interface component list to obtain the total quantity;
a redundancy determining sub-module 522 configured to determine that the function of the application has high redundancy when the total number is greater than or equal to a first preset number.
Alternatively, in another implementation, fig. 7 is a block diagram of another redundancy determining module shown according to the embodiment shown in fig. 5, referring to fig. 7, the redundancy determining module 520 includes:
a similarity statistic submodule 523 configured to obtain the number of similar interactive interface components existing in the interactive interface component list, where the similar interactive interface components include interactive interface components whose name similarity is greater than a preset similarity;
the redundancy determining sub-module 522 is configured to determine that the function of the application has high redundancy when the number of the similar interactive interface components is greater than or equal to a second preset number.
Alternatively, in yet another implementation, fig. 8 is a block diagram of another redundancy determining module shown according to the embodiment shown in fig. 5, and referring to fig. 8, the redundancy determining module 520 includes:
the quantity counting submodule 521 is configured to count all the interactive interface components in the interactive interface component list to obtain the total quantity;
a similarity statistic submodule 523 configured to obtain the number of similar interactive interface components existing in the interactive interface component list, where the similar interactive interface components include interactive interface components whose name similarity is greater than a preset similarity;
the redundancy determining sub-module 522 is configured to determine that the function of the application has high redundancy when the total number is greater than or equal to a first preset number and the number of similar interactive interface components is greater than or equal to a second preset number.
Alternatively, fig. 9 is a block diagram of a component parsing module according to the embodiment shown in fig. 5, and referring to fig. 9, the component parsing module 510 includes:
a list obtaining sub-module 511 configured to obtain a program list file in the application program;
a component extracting sub-module 512 configured to extract the interactive interface component registered in the program manifest file;
and a list generating sub-module 513 configured to generate a list of the interactive interface components according to the extracted interactive interface components.
Alternatively, fig. 10 is a block diagram illustrating another apparatus for detecting functional redundancy of an application according to an exemplary embodiment, and referring to fig. 10, the apparatus 500 further includes:
a reminder module 530 configured to output a high redundancy reminder when the functionality of the application is determined to have high redundancy.
Optionally, the application program is an application program running in an Android system, the program manifest file is a manifest file, and the interactive interface component is an Activity component.
To sum up, the device for detecting functional redundancy of an application provided in the embodiment of the present disclosure can determine whether an application that needs to be analyzed is installed; when the application program is determined to be installed, acquiring an interactive interface component list of the application program by analyzing a program list file in the application program; and determining whether the functions of the application program have high redundancy according to the quantity information of the interactive interface components in the interactive interface component list. The interface redundancy of the application program can be obtained by counting and analyzing the number and the similarity of Activity components of the application program in the Android system, so that the redundancy of the application program function can be determined by detecting the interface redundancy of the application program, a mechanism for automatically detecting the redundancy of the application program function can be provided, the complexity of detecting the redundancy of the application program function can be reduced, and the detection efficiency can be improved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The present disclosure also provides a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the method for detecting application program functional redundancy provided by the present disclosure.
FIG. 11 is a block diagram illustrating an apparatus 1100 for detection of application functional redundancy, according to an example embodiment. For example, the apparatus 1100 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 11, apparatus 1100 may include one or more of the following components: a processing component 1102, a memory 1104, a power component 1106, a multimedia component 1108, an audio component 1110, an input/output (I/O) interface 1112, a sensor component 1114, and a communication component 1116.
The processing component 1102 generally controls the overall operation of the device 1100, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to perform all or a portion of the steps of the method for detecting application functional redundancy described above. Further, the processing component 1102 may include one or more modules that facilitate interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate interaction between the multimedia component 1108 and the processing component 1102.
The memory 1104 is configured to store various types of data to support operations at the apparatus 1100. Examples of such data include instructions for any application or method operating on device 1100, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1104 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 1106 provide power to the various components of device 1100. The power components 1106 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the apparatus 1100.
The multimedia component 1108 includes a screen that provides an output interface between the device 1100 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 1100 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1110 is configured to output and/or input audio signals. For example, the audio component 1110 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 1100 is in operating modes, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 1104 or transmitted via the communication component 1116. In some embodiments, the audio assembly 1110 further includes a speaker for outputting audio signals.
The I/O interface 1112 provides an interface between the processing component 1102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1114 includes one or more sensors for providing various aspects of state assessment for the apparatus 1100. For example, the sensor assembly 1114 may detect an open/closed state of the apparatus 1100, the relative positioning of components, such as a display and keypad of the apparatus 1100, the sensor assembly 1114 may also detect a change in position of the apparatus 1100 or a component of the apparatus 1100, the presence or absence of user contact with the apparatus 1100, orientation or acceleration/deceleration of the apparatus 1100, and a change in temperature of the apparatus 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1114 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1116 is configured to facilitate wired or wireless communication between the apparatus 1100 and other devices. The apparatus 1100 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1116 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 1100 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described method for detecting redundancy of application program functions.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 1104 comprising instructions, executable by the processor 1120 of the apparatus 1100 to perform the method for detecting application functionality redundancy described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. A method for detecting functional redundancy of an application, the method comprising:
acquiring an interactive interface component list of an application program by analyzing a program list file in the application program;
determining whether the functions of the application program have high redundancy according to the quantity information of the interactive interface components in the interactive interface component list;
the quantity information includes: the determining whether the function of the application program has high redundancy according to the number information of the interactive interface components in the interactive interface component list comprises the following steps:
determining whether the functions of the application have high redundancy according to the total number; alternatively, the first and second electrodes may be,
determining whether the functions of the application program have high redundancy according to the number of the similar interactive interface components; alternatively, the first and second electrodes may be,
determining whether the functions of the application program have high redundancy according to the total number and the number of the similar interactive interface components;
the determining whether the functions of the application have high redundancy according to the total number comprises:
counting all the interactive interface components in the interactive interface component list to obtain the total number;
and when the total number is greater than or equal to a first preset number, determining that the functions of the application programs have high redundancy.
2. The method of claim 1, wherein determining whether the function of the application has high redundancy according to the number of similar interactive interface components comprises:
acquiring the number of similar interactive interface components in the interactive interface component list, wherein the similar interactive interface components comprise interactive interface components with name similarity larger than preset similarity;
and when the number of the similar interactive interface components is larger than or equal to a second preset number, determining that the functions of the application program have high redundancy.
3. The method of claim 1, wherein determining whether the function of the application has high redundancy according to the total number and the number of similar interactive interface components comprises:
counting all the interactive interface components in the interactive interface component list to obtain the total number;
acquiring the number of similar interactive interface components in the interactive interface component list, wherein the similar interactive interface components comprise interactive interface components with name similarity larger than preset similarity;
and when the total number is greater than or equal to a first preset number and the number of the similar interactive interface components is greater than or equal to a second preset number, determining that the functions of the application program have high redundancy.
4. The method of claim 1, wherein the obtaining the list of the interactive interface components of the application by parsing the program manifest file in the application comprises:
acquiring a program list file in the application program;
extracting the interactive interface components registered in the program manifest file;
and generating an interactive interface component list according to the extracted interactive interface components.
5. The method of claim 1, further comprising:
when the function of the application program is determined to have high redundancy, outputting a high redundancy reminder.
6. The method according to any one of claims 1-5, wherein the application is an application running in the Android system, the program manifest file is a manifest file, and the interactive interface component is an Activity component.
7. An apparatus for detecting functional redundancy of an application, the apparatus comprising:
the component analysis module is configured to obtain an interactive interface component list of an application program by analyzing a program list file in the application program;
the redundancy determining module is configured to determine whether the functions of the application program have high redundancy according to the quantity information of the interactive interface components in the interactive interface component list;
the quantity information includes: the redundancy determination module is configured to:
determining whether the functions of the application have high redundancy according to the total number; alternatively, the first and second electrodes may be,
determining whether the functions of the application program have high redundancy according to the number of the similar interactive interface components; alternatively, the first and second electrodes may be,
determining whether the functions of the application program have high redundancy according to the total number and the number of the similar interactive interface components;
the redundancy determination module includes:
the quantity counting submodule is configured to count all the interactive interface components in the interactive interface component list to obtain the total quantity;
a redundancy determination sub-module configured to determine that the function of the application has high redundancy when the total number is greater than or equal to a first preset number.
8. The apparatus of claim 7, wherein the redundancy determination module comprises:
the similarity counting submodule is configured to acquire the number of similar interactive interface components in the interactive interface component list, wherein the similar interactive interface components comprise interactive interface components with name similarity larger than preset similarity;
a redundancy determination sub-module configured to determine that the function of the application has high redundancy when the number of similar interactive interface components is greater than or equal to a second preset number.
9. The apparatus of claim 7, wherein the redundancy determination module comprises:
the quantity counting submodule is configured to count all the interactive interface components in the interactive interface component list to obtain the total quantity;
the similarity counting submodule is configured to acquire the number of similar interactive interface components in the interactive interface component list, wherein the similar interactive interface components comprise interactive interface components with name similarity larger than preset similarity;
the redundancy determining submodule is configured to determine that the function of the application program has high redundancy when the total number is greater than or equal to a first preset number and the number of the similar interactive interface components is greater than or equal to a second preset number.
10. The apparatus of claim 7, wherein the component parsing module comprises:
the list acquisition sub-module is configured to acquire a program list file in the application program;
the component extraction submodule is configured to extract the interactive interface components registered in the program manifest file;
and the list generation submodule is configured to generate an interactive interface component list according to the extracted interactive interface components.
11. The apparatus of claim 7, further comprising:
a reminder module configured to output a high redundancy reminder when the functionality of the application is determined to have high redundancy.
12. The apparatus according to any one of claims 7-11, wherein the application is an application running in the Android system, the program manifest file is a manifest file, and the interactive interface component is an Activity component.
13. An apparatus for detecting functional redundancy of an application, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring an interactive interface component list of an application program by analyzing a program list file in the application program;
determining whether the functions of the application program have high redundancy according to the quantity information of the interactive interface components in the interactive interface component list;
the quantity information includes: the determining whether the function of the application program has high redundancy according to the number information of the interactive interface components in the interactive interface component list comprises the following steps:
determining whether the functions of the application have high redundancy according to the total number; alternatively, the first and second electrodes may be,
determining whether the functions of the application program have high redundancy according to the number of the similar interactive interface components; alternatively, the first and second electrodes may be,
determining whether the functions of the application program have high redundancy according to the total number and the number of the similar interactive interface components;
the determining whether the functions of the application have high redundancy according to the total number comprises:
counting all the interactive interface components in the interactive interface component list to obtain the total number;
and when the total number is greater than or equal to a first preset number, determining that the functions of the application programs have high redundancy.
14. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor, implement the steps of the method of any one of claims 1 to 6.
CN201710731726.6A 2017-08-23 2017-08-23 Method and device for detecting functional redundancy of application program and storage medium Active CN107526683B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710731726.6A CN107526683B (en) 2017-08-23 2017-08-23 Method and device for detecting functional redundancy of application program and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710731726.6A CN107526683B (en) 2017-08-23 2017-08-23 Method and device for detecting functional redundancy of application program and storage medium

Publications (2)

Publication Number Publication Date
CN107526683A CN107526683A (en) 2017-12-29
CN107526683B true CN107526683B (en) 2020-06-19

Family

ID=60682079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710731726.6A Active CN107526683B (en) 2017-08-23 2017-08-23 Method and device for detecting functional redundancy of application program and storage medium

Country Status (1)

Country Link
CN (1) CN107526683B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684005B (en) * 2018-12-11 2021-08-24 浙江口碑网络技术有限公司 Method and device for determining similarity of components in graphical interface

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1994009433A3 (en) * 1992-10-22 1994-05-26 A system for operating application software in a safety critical environment
JP2001312419A (en) * 2000-02-22 2001-11-09 Fujitsu Ltd Software overlap degree evaluating device and recording medium with recorded software overlap degree evaluating program
CN106227327A (en) * 2015-12-31 2016-12-14 深圳超多维光电子有限公司 A kind of display converting method, device and terminal unit
CN106502719A (en) * 2016-09-23 2017-03-15 北京小米移动软件有限公司 The method and device of the component of management application program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1994009433A3 (en) * 1992-10-22 1994-05-26 A system for operating application software in a safety critical environment
JP2001312419A (en) * 2000-02-22 2001-11-09 Fujitsu Ltd Software overlap degree evaluating device and recording medium with recorded software overlap degree evaluating program
CN106227327A (en) * 2015-12-31 2016-12-14 深圳超多维光电子有限公司 A kind of display converting method, device and terminal unit
CN106502719A (en) * 2016-09-23 2017-03-15 北京小米移动软件有限公司 The method and device of the component of management application program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于SilkTest和XML的通用高效的用户界面测试方法";何浩等;《计算机应用》;20130101;第33卷(第1期);正文第258-261页 *

Also Published As

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

Similar Documents

Publication Publication Date Title
US10452890B2 (en) Fingerprint template input method, device and medium
CN105845124B (en) Audio processing method and device
EP3300407A1 (en) Method and device for processing verification code
EP3076646A1 (en) Methods and devices for labeling a number
US10083346B2 (en) Method and apparatus for providing contact card
CN106354504B (en) Message display method and device
CN110610090A (en) Information processing method and device, and storage medium
CN111666015A (en) Suspension short message display method and device
CN106331328B (en) Information prompting method and device
CN116069612A (en) Abnormality positioning method and device and electronic equipment
CN110213062B (en) Method and device for processing message
CN109842688B (en) Content recommendation method and device, electronic equipment and storage medium
CN110738267B (en) Image classification method, device, electronic equipment and storage medium
EP3211564A1 (en) Method and device for verifying a fingerprint
EP3211556A1 (en) Method and device for verifying fingerprint
CN107526683B (en) Method and device for detecting functional redundancy of application program and storage medium
CN107580142B (en) Method and device for executing processing
CN112667852B (en) Video-based searching method and device, electronic equipment and storage medium
CN108108356B (en) Character translation method, device and equipment
CN106446827B (en) Iris recognition function detection method and device
CN110941670B (en) Mark state detection method, device, equipment and storage medium
CN107193622B (en) Code compiling processing method and device and terminal
CN106484261B (en) Information acquisition method and device, information transmission method and device, and terminal
CN110084065B (en) Data desensitization method and device
CN111401048B (en) Intention identification method and device

Legal Events

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