CN107977566B - Function triggering method and device and electronic equipment - Google Patents

Function triggering method and device and electronic equipment Download PDF

Info

Publication number
CN107977566B
CN107977566B CN201711204854.1A CN201711204854A CN107977566B CN 107977566 B CN107977566 B CN 107977566B CN 201711204854 A CN201711204854 A CN 201711204854A CN 107977566 B CN107977566 B CN 107977566B
Authority
CN
China
Prior art keywords
application program
information
application
reading
authority
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
CN201711204854.1A
Other languages
Chinese (zh)
Other versions
CN107977566A (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.)
Zhuhai Juntian Electronic Technology Co Ltd
Original Assignee
Zhuhai Juntian Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Juntian Electronic Technology Co Ltd filed Critical Zhuhai Juntian Electronic Technology Co Ltd
Priority to CN201711204854.1A priority Critical patent/CN107977566B/en
Publication of CN107977566A publication Critical patent/CN107977566A/en
Application granted granted Critical
Publication of CN107977566B publication Critical patent/CN107977566B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

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

Abstract

The embodiment of the invention provides a function triggering method, a function triggering device and electronic equipment, wherein the method comprises the following steps: after receiving a trigger instruction aiming at a preset function, a first application program acquires application program information of an installed application program in the electronic equipment; judging whether the self has the authority of reading the installed application program or not based on the acquired application program information, wherein the authority of reading the installed application program is as follows: the electronic equipment is used for limiting whether the application program has the authority of reading the application program information of all the application programs currently installed in the electronic equipment; and when the first application program judges that the first application program has the right of reading the installed application program, executing the operation corresponding to the preset function. The embodiment of the invention is applied to ensure the realization of the preset function and further improve the accuracy of the realization of the preset function.

Description

Function triggering method and device and electronic equipment
Technical Field
The present invention relates to the field of information security technologies, and in particular, to a method and an apparatus for triggering a function, and an electronic device.
Background
When some functions are implemented, the application information of all currently installed applications of the electronic device where the application is located needs to be acquired first, and then, based on the acquired application information, the operation corresponding to the corresponding function is executed. The application information may include: installation package name of the application, activity node information, and the like.
In the prior art, after the application program obtains the application program information of the application program in the electronic device through the specific function, the obtained application program information of the application program is considered as the application program information of all application programs currently installed in the electronic device, and then, the operation corresponding to the corresponding function is executed.
However, it may occur that the electronic device, in order to secure data and user information in the electronic device, may restrict that certain applications cannot acquire application information of all applications currently installed on the electronic device. At this time, the application information of the application obtained by the application using the prior art may not be the application information of all applications currently installed in the electronic device, and there is a risk of error when the corresponding function is continuously executed subsequently.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for determining the permission of reading an installed application program and electronic equipment, so as to improve the accuracy of function implementation. The specific technical scheme is as follows:
in one aspect, an embodiment of the present invention provides a function triggering method, where the method includes:
after receiving a trigger instruction aiming at a preset function, a first application program acquires application program information of an installed application program in the electronic equipment;
judging whether the self has the authority of reading the installed application program or not based on the acquired application program information, wherein the authority of reading the installed application program is as follows: the electronic equipment is used for limiting whether the application program has the authority of reading the application program information of all the application programs currently installed in the electronic equipment;
and when the first application program judges that the first application program has the right of reading the installed application program, executing the operation corresponding to the preset function.
Optionally, the preset function is a residual garbage cleaning function;
the step of executing the operation corresponding to the preset function includes:
acquiring the installation package name of each installed application program from the acquired application program information as the acquired installation package name;
scanning all folders stored in a preset storage area of the electronic equipment, and matching a folder name corresponding to each folder with the acquired installation package name;
and taking the folder with the name not included in the acquired installation package name and the files in the folder as residual garbage to be cleaned.
Optionally, the step of determining whether the self has the authority to read the installed application based on the obtained application information includes:
counting the number of the acquired application program information;
and determining whether the counted number of the application program information is greater than a preset threshold, wherein when the counted number of the application program information is determined to be greater than the preset threshold, the user is judged to have the authority of reading the installed application program.
Optionally, the step of determining whether the self has the authority to read the installed application based on the obtained application information includes:
and traversing the acquired application program information, and determining whether the acquired application program information contains the application program information of the specified application program, wherein when the acquired application program information contains the application program information of the specified application program, the self is judged to have the authority of reading the installed application program.
Optionally, the method further comprises:
and when the first application program judges that the first application program does not have the permission of reading the installed application program, outputting prompt information to prompt a user to start the permission of reading the installed application program aiming at the first application program.
Optionally, after the step of outputting the prompt message, the method further includes:
and after detecting that the user returns the return instruction of the interface where the preset function is located, re-executing the step of acquiring the application information of the installed application in the electronic equipment.
Optionally, the step of acquiring application information of an installed application in the electronic device includes:
the first application program obtains application program information of an installed application program in the electronic device by calling a function packagemanager.
In another aspect, an embodiment of the present invention provides a function triggering apparatus, where the apparatus includes:
the acquisition module is used for acquiring application program information of an installed application program in the electronic equipment after receiving a trigger instruction aiming at a preset function;
the judging module is used for judging whether the self has the authority of reading the installed application program or not based on the acquired application program information, wherein the authority of reading the installed application program is as follows: the electronic equipment is used for limiting whether the application program has the authority of reading the application program information of all the application programs currently installed in the electronic equipment;
and the operation execution module is used for executing the operation corresponding to the preset function when the first application program judges that the first application program has the right of reading the installed application program.
Optionally, the preset function is a residual garbage cleaning function;
the operation execution module is specifically configured to obtain an installation package name of each installed application from the obtained application information, and use the installation package name as an obtained installation package name;
scanning all folders stored in a preset storage area of the electronic equipment, and matching a folder name corresponding to each folder with the acquired installation package name;
and taking the folder with the name not included in the acquired installation package name and the files in the folder as residual garbage to be cleaned.
Optionally, the determining module is specifically configured to count the number of the obtained application information;
and determining whether the counted number of the application program information is greater than a preset threshold, wherein when the counted number of the application program information is determined to be greater than the preset threshold, the user is judged to have the authority of reading the installed application program.
Optionally, the determining module is specifically configured to
And traversing the acquired application program information, and determining whether the acquired application program information contains the application program information of the specified application program, wherein when the acquired application program information contains the application program information of the specified application program, the self is judged to have the authority of reading the installed application program.
Optionally, the apparatus further comprises an output module;
and the output module is used for outputting prompt information when the first application program judges that the first application program does not have the authority of reading the installed application program, so as to prompt a user to start the authority of reading the installed application program aiming at the first application program.
Optionally, the apparatus further comprises a re-triggering module;
and the re-triggering module is used for re-triggering the obtaining module after detecting that the user returns the return instruction of the interface where the preset function is located after the prompt information is output.
Optionally, the obtaining module is specifically configured to
The first application program obtains application program information of an installed application program in the electronic device by calling a function packagemanager.
On the other hand, the embodiment of the invention provides electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
the processor is configured to implement any of the functional triggering method steps provided in the embodiments of the present invention when executing the computer program stored in the memory.
In another aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements any of the steps of the function triggering method provided in the embodiment of the present invention.
In the embodiment of the invention, after receiving a trigger instruction aiming at a preset function, a first application program acquires application program information of an installed application program in electronic equipment; judging whether the self has the authority of reading the installed application program or not based on the acquired application program information, wherein the authority of reading the installed application program is as follows: the electronic equipment is used for limiting whether the application program has the authority of reading the application program information of all the application programs currently installed in the electronic equipment; and when the first application program judges that the first application program has the right of reading the installed application program, executing the operation corresponding to the preset function.
In the embodiment of the invention, after receiving a trigger instruction aiming at the preset function, the first application program judges whether the first application program has the authority of reading and installing the application program or not based on the acquired application program information, and when the first application program has the authority of reading and installing the application program, the first application program can determine that the first application program can read the application program information of all application programs currently installed in the electronic equipment where the first application program is located, at the moment, the operation corresponding to the preset function can be executed, the realization of the preset function is ensured, and the accuracy of the realization of the preset function is further improved. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating a function triggering method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for determining whether a first application has a right to read an installed application according to an embodiment of the present invention;
fig. 3 is another schematic flow chart of a function triggering method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a function triggering device according to an embodiment of the present invention;
fig. 5 is another schematic structural diagram of a function triggering device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a function triggering method, a function triggering device and electronic equipment, and aims to improve the accuracy of function implementation.
As shown in fig. 1, an embodiment of the present invention provides a function triggering method, which may include the following steps:
s101: after receiving a trigger instruction aiming at a preset function, a first application program acquires application program information of an installed application program in the electronic equipment;
the function triggering method provided by the embodiment of the invention can be applied to a first application program, wherein the first application program can be installed in any electronic equipment, and the electronic equipment can comprise a computer, a smart phone and the like. Moreover, the functional software for realizing the function triggering method can be special client software or plug-ins of other safety software.
In one implementation manner, after obtaining a trigger instruction for a preset function, the first application may start to acquire application information of an installed application in the electronic device, where the preset function may be: and based on the application information of all the currently installed applications of the electronic equipment, realizing the functions with corresponding functions. The electronic device is as follows: and a device for installing the first application program.
In one implementation manner, the obtained application information may be stored in a preset information list of the electronic device in a preset order. The preset order may be set according to the order of the installation time of the application program, or the preset order may be set according to the order of the initials of the installation package names of the application program in the alphabet, and the like.
The installed application programs are as follows: the "current" of the application currently installed in the electronic device may refer to: the first application program acquires application program information of an installed application program in the electronic equipment.
S102: judging whether the self has the authority of reading the installed application program or not based on the acquired application program information;
wherein, the permission for reading the installed application program is as follows: the electronic equipment is used for limiting whether the application program has the authority of reading the application program information of all the application programs currently installed in the electronic equipment;
in an implementation manner, in order to better ensure the security of information stored in the electronic device and further ensure the security of information of a user of the electronic device, some manufacturers add a right to read an installed application in an operating system of the electronic device, and at this time, only an application having the right to read the installed application can read application information of all applications currently installed in the electronic device. On the contrary, the application program that does not have the authority to read the installed application program cannot read the application program information of all application programs currently installed in the electronic device. In one implementation, the application program that does not have the authority to read the installed application program may read an application program that has authority to read a part of application programs currently installed in the electronic device.
The electronic device may provide an entry for setting whether the installed application has the authority to read the installed application for each installed application, so that a user may autonomously set which applications have the authority to read the installed applications.
In an implementation manner, when the operating system of the electronic device is an android system, the application information may also be referred to as PackageInfo.
S103: and when the first application program judges that the first application program has the right of reading the installed application program, executing the operation corresponding to the preset function.
In the embodiment of the present invention, when the first application determines that the first application has the authority to read the installed application based on the acquired application information, the first application starts to execute the operation corresponding to the preset function. So as to ensure the normal realization of the preset function and further improve the accuracy of the realization of the preset function.
In the embodiment of the invention, after receiving a trigger instruction aiming at the preset function, the first application program judges whether the first application program has the authority of reading and installing the application program or not based on the acquired application program information, and when the first application program has the authority of reading and installing the application program, the first application program can determine that the first application program can read the application program information of all application programs currently installed in the electronic equipment where the first application program is located, at the moment, the operation corresponding to the preset function can be executed, the realization of the preset function is ensured, and the accuracy of the realization of the preset function is further improved.
The preset functions may be: and based on the application information of all the currently installed applications of the electronic equipment, realizing the functions with corresponding functions. In one implementation, the preset function is a residual garbage cleaning function;
the step of executing the operation corresponding to the preset function may include:
acquiring the installation package name of each installed application program from the acquired application program information as the acquired installation package name;
scanning all folders stored in a preset storage area of the electronic equipment, and matching a folder name corresponding to each folder with an acquired installation package name;
and taking the folder with the name not included in the acquired installation package name and the files in the folder as residual garbage to be cleaned.
Wherein the residual garbage can be: when the electronic equipment installs and uninstalls an application program, the electronic equipment stores folders and files corresponding to the application program. The residual garbage cleaning function can be as follows: clearing the folders and files which are stored in the electronic equipment and meet the preset clearing conditions, wherein the folders and files which meet the preset clearing conditions are as follows: when the electronic equipment installs and uninstalls an application program, the electronic equipment stores folders and files corresponding to the application program.
In an embodiment of the present invention, each of the obtained application information may include: the installation package name of the corresponding installed application. The first application program may obtain, from each obtained application program information, an installation package name of an installed application program corresponding to the first application program.
Subsequently, the first application program may scan each folder stored in the preset storage area of the electronic device, and may execute the following operations for each folder stored in the preset storage area: matching the folder name corresponding to the folder with the acquired installation package name to determine whether the acquired installation package name contains the folder name corresponding to the folder, wherein if yes, the application program corresponding to the folder is installed in the electronic equipment and is not uninstalled, namely the application program corresponding to the folder is installed in the electronic equipment; when the determination result is that the file name of the corresponding folder is not included in the acquired installation package name, and the file in the folder is determined to be residual garbage.
The preset Memory area may be an SD Card (Secure Digital Memory Card) provided in the electronic device, and the SD Card is a Memory Card based on a semiconductor flash Memory process.
It is to be understood that, each folder stored in the preset storage area and the files in the folder are respectively created for the application installed in the corresponding electronic device, and in an implementation manner, the folder name of the folder may be the same as the installation package name of the application corresponding to the folder.
By the embodiment of the invention, the accuracy of determining the permission to read the installed application program can be improved, and the accuracy of realizing the preset function can be further improved. When the preset function is a residual garbage cleaning function, the embodiment of the invention can more accurately determine the residual garbage in the electronic equipment, so that when the determined residual garbage is cleaned, the accuracy of cleaning the residual garbage is improved, the cleaning of information which does not belong to the residual garbage and is useful for a user is avoided, and the user experience is improved.
In an implementation manner, when an operating system of an electronic device is provided with an authority to read an installed application, at this time, an application that does not have the authority to read the installed application may read application information of a part of applications currently installed in the electronic device, and an application that has the authority to read the installed application may read application information of all applications currently installed in the electronic device, that is, when the application has the authority to read the installed application and does not have the authority to read the installed application, the number of the obtained application information may be different. Based on the result, after the first application program acquires the application program information of the installed application program in the electronic device, whether the first application program has the permission to read the installed application program can be determined according to the number of the acquired application program information. Specifically, as shown in fig. 2, the step of determining whether the step has the authority to read the installed application based on the obtained application information may include:
s201: counting the number of the acquired application program information;
s202: and determining whether the counted number of the application program information is greater than a preset threshold, wherein when the counted number of the application program information is determined to be greater than the preset threshold, the user is judged to have the authority of reading the installed application program.
It will be appreciated that different applications may correspond to different application information, and that an application generally corresponds to only one application information. In this step, after the first application program acquires the application program information of the installed application program in the electronic device, the number of the acquired application program information may be counted. After counting the number of the obtained application information, the first application may compare the counted number with a preset threshold, and determine whether the counted number is greater than the preset threshold.
When the first application program determines that the counted number is larger than a preset threshold value, the first application program can directly determine that the first application program has the authority of reading the installed application program; otherwise, when the counted number is determined not to be larger than the preset threshold, it can be directly determined that the application program does not have the authority to read the installed application program. It can be understood that when the first application program has the right to read the installed application program, the number of the obtained application program information is larger than that when the first application program does not have the right to read the installed application program, and whether the first application program has the right to read the installed application program is determined by setting a threshold value, so that the accuracy of whether the application program has the right to read the installed application program is improved.
The preset threshold may be a value determined based on the verification result. In one case, the preset threshold may be 3.
In one case, when the first application determines that the counted number of pieces of application information is not greater than the preset threshold, the first application may determine that the first application does not have the permission to read the installed application, and at this time, the first application may output a prompt message to prompt the user to start the permission to read the installed application with respect to the first application.
In another implementation manner, when the application has the right to read the installed application, the application information of all currently installed applications in the electronic device may be acquired; when the application does not have the right to read the installed application, the application information of part of the currently installed applications in the electronic device may be acquired. When the application program has the authority for reading the installed application program and does not have the authority for reading the installed application program, different application program information exists in the obtained application program information. Based on the foregoing principle, in an implementation manner, the step of determining whether the step has the authority to read the installed application based on the obtained application information may include:
and traversing the acquired application program information, and determining whether the acquired application program information contains the application program information of the specified application program, wherein when the acquired application program information contains the application program information of the specified application program, the self is judged to have the authority of reading the installed application program.
The application information of the specific application may be: the setting by the user of the electronic device may be autonomous, or may be set by the electronic device for the first application based on the currently installed application.
In an implementation manner, as shown in fig. 3, a function triggering method provided in an embodiment of the present invention may include the steps of:
s301: after receiving a trigger instruction aiming at a preset function, a first application program acquires application program information of an installed application program in the electronic equipment;
s302: judging whether the self has the authority of reading the installed application program or not based on the acquired application program information;
wherein, the permission for reading the installed application program is as follows: the electronic equipment is used for limiting whether the application program has the authority of reading the application program information of all the application programs currently installed in the electronic equipment;
s303: when the first application program judges that the first application program has the right of reading the installed application program, executing operation corresponding to the preset function;
here, S301 is the same as S101 shown in fig. 1, S302 is the same as S102 shown in fig. 1, and S303 is the same as S103 shown in fig. 1.
S304: and when the first application program judges that the first application program does not have the permission of reading the installed application program, outputting prompt information to prompt a user to start the permission of reading the installed application program aiming at the first application program.
In the embodiment of the present invention, when the first application program determines that the first application program does not have the authority to read the installed application program, at this time, in order to ensure normal execution of the preset function, the first application program does not continue to execute the operation corresponding to the preset function. However, in order to meet the user requirement, that is, to perform an operation corresponding to a preset function, after determining that the first application does not have the authority to read the installed application, the first application may output a prompt message to prompt the user to start the authority to read the installed application with respect to the first application. In one case, after detecting that the user starts the right to read the installed application program for the first application program, the first application program may directly continue to perform the operation corresponding to the preset function.
The prompt information may be presented in a form of sound, a form of text, a form of interface jump, or the like, and the presentation form of the prompt information is not limited in the embodiments of the present invention.
In one case, when the prompt message is presented in a form of characters, the prompt message may include: prompting the user to start the set route information of the permission of reading the installed application program aiming at the first application program so that the user can operate according to the set route information contained in the prompt so as to realize the permission of starting the permission of reading the installed application program aiming at the first application program.
In another case, when the prompt information is displayed in the interface jump mode, and when the first application program determines that the first application program does not have the authority to read the installed application program, the interface displayed by the electronic device is directly jumped from the interface where the preset function is located to the interface for starting the authority to read the installed application program, so that the user can start the authority to read the installed application program for the first application program.
In one implementation, in order to better secure information in the electronic device, after the step of outputting the prompt information, the method may further include:
and after detecting that the user returns to the return instruction of the interface where the preset function is located, re-executing the step of acquiring the application information of the installed application in the electronic equipment.
In one case, after the prompt information is output, the user may open the permission to read the installed application program for the first application program, and then the user may want to continue to execute the preset function, after detecting that the user returns a return instruction of an interface where the preset function is located, the first application program re-executes the step of obtaining the application program information of the installed application program in the electronic device, and further determines whether the first application program has the permission to read the installed application program, when determining that the first application program has the permission to read the installed application program, executes an operation corresponding to the preset function, and when determining that the first application program does not have the permission to read the installed application program, continues to output the prompt information to prompt the user to open the permission to read the installed application program for the first application program.
In one implementation manner, the step of acquiring, by the first application, application information of an installed application in the electronic device may include:
the first application program obtains application program information of an installed application program in the electronic device by calling a function packagemanager.
In one case, when the operating system of the electronic device is an android system, the first application program may obtain application program information of an installed application program in the electronic device by calling a function, package manager.
When the operating system of the electronic device is an android system, the application information may also be referred to as PackageInfo. In one case, the first application may obtain the PackageInfo of the installed application in the electronic device through the following fields:
Figure BDA0001483466680000121
corresponding to the above method embodiment, an embodiment of the present invention provides a function triggering apparatus, as shown in fig. 4, where the apparatus includes:
the obtaining module 410 is configured to obtain application information of an installed application in the electronic device after receiving a trigger instruction for a preset function;
a determining module 420, configured to determine, based on the obtained application information, whether the application itself has an authority to read the installed application, where the authority to read the installed application is: the electronic equipment is used for limiting whether the application program has the authority of reading the application program information of all the application programs currently installed in the electronic equipment;
an operation executing module 430, configured to execute an operation corresponding to the preset function when the first application determines that the first application has a right to read an installed application.
In the embodiment of the invention, after receiving a trigger instruction aiming at the preset function, the first application program judges whether the first application program has the authority of reading and installing the application program or not based on the acquired application program information, and when the first application program has the authority of reading and installing the application program, the first application program can determine that the first application program can read the application program information of all application programs currently installed in the electronic equipment where the first application program is located, at the moment, the operation corresponding to the preset function can be executed, the realization of the preset function is ensured, and the accuracy of the realization of the preset function is further improved.
In one implementation, the preset function is a residual garbage cleaning function;
the operation executing module 430 is specifically configured to obtain, from the obtained application information, an installation package name of each installed application as an obtained installation package name;
scanning all folders stored in a preset storage area of the electronic equipment, and matching a folder name corresponding to each folder with the acquired installation package name;
and taking the folder with the name not included in the acquired installation package name and the files in the folder as residual garbage to be cleaned.
In an implementation manner, the determining module 420 is specifically configured to count the number of the obtained application information;
and determining whether the counted number of the application program information is greater than a preset threshold, wherein when the counted number of the application program information is determined to be greater than the preset threshold, the user is judged to have the authority of reading the installed application program.
In an implementation manner, the determining module 420 is specifically configured to
And traversing the acquired application program information, and determining whether the acquired application program information contains the application program information of the specified application program, wherein when the acquired application program information contains the application program information of the specified application program, the self is judged to have the authority of reading the installed application program.
In one implementation, as shown in fig. 5, the apparatus may further include an output module 510;
the output module 510 is configured to output a prompt message to prompt a user to open the permission to read the installed application program for the first application program when the first application program determines that the first application program does not have the permission to read the installed application program.
In one implementation, the apparatus may further include a re-triggering module;
and the re-triggering module is used for re-triggering the obtaining module after detecting that the user returns the return instruction of the interface where the preset function is located after the prompt information is output.
In one implementation, the obtaining module is specifically configured to
The first application program acquires application program information of the installed application program in the electronic device by calling a function packagemanager.
Corresponding to the above method embodiment, an electronic device according to an embodiment of the present invention is further provided, as shown in fig. 6, and includes a processor 610, a communication interface 620, a memory 630, and a communication bus 640, where the processor 610, the communication interface 620, and the memory 630 complete communication with each other through the communication bus 640,
a memory 630 for storing computer programs;
the processor 610, configured to execute the computer program stored in the memory 630 to implement any of the above function triggering methods provided by the embodiments of the present invention, includes:
after receiving a trigger instruction aiming at a preset function, a first application program acquires application program information of an installed application program in the electronic equipment;
judging whether the self has the authority of reading the installed application program or not based on the acquired application program information, wherein the authority of reading the installed application program is as follows: the electronic equipment is used for limiting whether the application program has the authority of reading the application program information of all the application programs currently installed in the electronic equipment;
and when the first application program judges that the first application program has the right of reading the installed application program, executing the operation corresponding to the preset function.
In the embodiment of the invention, after receiving a trigger instruction aiming at the preset function, the first application program judges whether the first application program has the authority of reading and installing the application program or not based on the acquired application program information, and when the first application program has the authority of reading and installing the application program, the first application program can determine that the first application program can read the application program information of all application programs currently installed in the electronic equipment where the first application program is located, at the moment, the operation corresponding to the preset function can be executed, the realization of the preset function is ensured, and the accuracy of the realization of the preset function is further improved.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In one implementation, the preset function is a residual garbage cleaning function;
the executing operation corresponding to the preset function includes:
acquiring the installation package name of each installed application program from the acquired application program information as the acquired installation package name;
scanning all folders stored in a preset storage area of the electronic equipment, and matching a folder name corresponding to each folder with the acquired installation package name;
and taking the folder with the name not included in the acquired installation package name and the files in the folder as residual garbage to be cleaned.
In one implementation, the determining whether the self has the authority to read the installed application based on the obtained application information includes:
counting the number of the acquired application program information;
and determining whether the counted number of the application program information is greater than a preset threshold, wherein when the counted number of the application program information is determined to be greater than the preset threshold, the user is judged to have the authority of reading the installed application program.
In one implementation, the determining whether the self has the authority to read the installed application based on the obtained application information includes:
and traversing the acquired application program information, and determining whether the acquired application program information contains the application program information of the specified application program, wherein when the acquired application program information contains the application program information of the specified application program, the self is judged to have the authority of reading the installed application program.
In one implementation, the method further comprises:
and when the first application program judges that the first application program does not have the permission of reading the installed application program, outputting prompt information to prompt a user to start the permission of reading the installed application program aiming at the first application program.
In one implementation, after the outputting the prompt message, the method further includes:
and after detecting that the user returns the return instruction of the interface where the preset function is located, re-executing the application information of the installed application in the electronic equipment.
In one implementation, the acquiring application information of an installed application in an electronic device includes:
the first application program obtains application program information of an installed application program in the electronic device by calling a function packagemanager.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a computer program stored in the computer-readable storage medium, where the computer program, when executed by a processor, implements any of the foregoing function triggering methods provided by the embodiment of the present invention, and the method includes:
after receiving a trigger instruction aiming at a preset function, a first application program acquires application program information of an installed application program in the electronic equipment;
judging whether the self has the authority of reading the installed application program or not based on the acquired application program information, wherein the authority of reading the installed application program is as follows: the electronic equipment is used for limiting whether the application program has the authority of reading the application program information of all the application programs currently installed in the electronic equipment;
and when the first application program judges that the first application program has the right of reading the installed application program, executing the operation corresponding to the preset function.
In the embodiment of the invention, after receiving a trigger instruction aiming at the preset function, the first application program judges whether the first application program has the authority of reading and installing the application program or not based on the acquired application program information, and when the first application program has the authority of reading and installing the application program, the first application program can determine that the first application program can read the application program information of all application programs currently installed in the electronic equipment where the first application program is located, at the moment, the operation corresponding to the preset function can be executed, the realization of the preset function is ensured, and the accuracy of the realization of the preset function is further improved.
In one implementation, the preset function is a residual garbage cleaning function;
the executing operation corresponding to the preset function includes:
acquiring the installation package name of each installed application program from the acquired application program information as the acquired installation package name;
scanning all folders stored in a preset storage area of the electronic equipment, and matching a folder name corresponding to each folder with the acquired installation package name;
and taking the folder with the name not included in the acquired installation package name and the files in the folder as residual garbage to be cleaned.
In one implementation, the determining whether the self has the authority to read the installed application based on the obtained application information includes:
counting the number of the acquired application program information;
and determining whether the counted number of the application program information is greater than a preset threshold, wherein when the counted number of the application program information is determined to be greater than the preset threshold, the user is judged to have the authority of reading the installed application program.
In one implementation, the determining whether the self has the authority to read the installed application based on the obtained application information includes:
and traversing the acquired application program information, and determining whether the acquired application program information contains the application program information of the specified application program, wherein when the acquired application program information contains the application program information of the specified application program, the self is judged to have the authority of reading the installed application program.
In one implementation, the method further comprises:
and when the first application program judges that the first application program does not have the permission of reading the installed application program, outputting prompt information to prompt a user to start the permission of reading the installed application program aiming at the first application program.
In one implementation, after the outputting the prompt message, the method further includes:
and after detecting that the user returns the return instruction of the interface where the preset function is located, re-executing the application information of the installed application in the electronic equipment.
In one implementation, the acquiring application information of an installed application in an electronic device includes:
the first application program obtains application program information of an installed application program in the electronic device by calling a function packagemanager.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (16)

1. A method for function triggering, the method comprising:
after receiving a trigger instruction aiming at a preset function, a first application program acquires application program information of an installed application program in the electronic equipment;
judging whether the self has the authority of reading the installed application program or not based on the acquired application program information, wherein the authority of reading the installed application program is as follows: the electronic equipment is used for limiting whether the application program has the authority of reading the application program information of all the application programs currently installed in the electronic equipment;
and when the first application program judges that the first application program has the right of reading the installed application program, executing the operation corresponding to the preset function.
2. The method according to claim 1, wherein the preset function is a residual garbage disposal function;
the step of executing the operation corresponding to the preset function includes:
acquiring the installation package name of each installed application program from the acquired application program information as the acquired installation package name;
scanning all folders stored in a preset storage area of the electronic equipment, and matching a folder name corresponding to each folder with the acquired installation package name;
and taking the folder with the name not included in the acquired installation package name and the files in the folder as residual garbage to be cleaned.
3. The method according to claim 1, wherein the step of determining whether or not the self has the right to read the installed application based on the obtained application information comprises:
counting the number of the acquired application program information;
and determining whether the counted number of the application program information is greater than a preset threshold, wherein when the counted number of the application program information is determined to be greater than the preset threshold, the user is judged to have the authority of reading the installed application program.
4. The method according to claim 1, wherein the step of determining whether or not the self has the right to read the installed application based on the obtained application information comprises:
and traversing the acquired application program information, and determining whether the acquired application program information contains the application program information of the specified application program, wherein when the acquired application program information contains the application program information of the specified application program, the self is judged to have the authority of reading the installed application program.
5. The method of claim 1, further comprising:
and when the first application program judges that the first application program does not have the permission of reading the installed application program, outputting prompt information to prompt a user to start the permission of reading the installed application program aiming at the first application program.
6. The method of claim 5, wherein after the step of outputting a prompt message, the method further comprises:
and after detecting that the user returns the return instruction of the interface where the preset function is located, re-executing the step of acquiring the application information of the installed application in the electronic equipment.
7. The method according to any one of claims 1-6, wherein the step of obtaining application information of the installed application in the electronic device comprises:
the first application program obtains application program information of an installed application program in the electronic device by calling a function packagemanager.
8. A function triggering device, characterized in that the device comprises:
the acquisition module is used for acquiring application program information of an installed application program in the electronic equipment after the first application program receives a trigger instruction aiming at a preset function;
the judging module is used for judging whether the self has the authority of reading the installed application program or not based on the acquired application program information, wherein the authority of reading the installed application program is as follows: the electronic equipment is used for limiting whether the application program has the authority of reading the application program information of all the application programs currently installed in the electronic equipment;
and the operation execution module is used for executing the operation corresponding to the preset function when the first application program judges that the first application program has the right of reading the installed application program.
9. The apparatus according to claim 8, wherein the preset function is a residual garbage disposal function;
the operation execution module is specifically configured to obtain an installation package name of each installed application from the obtained application information, and use the installation package name as an obtained installation package name;
scanning all folders stored in a preset storage area of the electronic equipment, and matching a folder name corresponding to each folder with the acquired installation package name;
and taking the folder with the name not included in the acquired installation package name and the files in the folder as residual garbage to be cleaned.
10. The apparatus according to claim 8, wherein the determining module is specifically configured to count the number of the obtained application information;
and determining whether the counted number of the application program information is greater than a preset threshold, wherein when the counted number of the application program information is determined to be greater than the preset threshold, the user is judged to have the authority of reading the installed application program.
11. The apparatus according to claim 8, wherein the determining module is specifically configured to traverse the obtained application information, and determine whether the obtained application information includes application information of a specific application, wherein when it is determined that the obtained application information includes the application information of the specific application, the determining module determines that the determining module has the authority to read the installed application.
12. The apparatus of claim 8, further comprising an output module;
and the output module is used for outputting prompt information when the first application program judges that the first application program does not have the authority of reading the installed application program, so as to prompt a user to start the authority of reading the installed application program aiming at the first application program.
13. The apparatus of claim 12, further comprising a re-triggering module;
and the re-triggering module is used for re-triggering the obtaining module after detecting that the user returns the return instruction of the interface where the preset function is located after the prompt information is output.
14. The device according to any of claims 8 to 13, wherein the acquisition module is specifically configured to acquire the data from the memory unit
The first application program acquires application program information of the installed application program in the electronic device by calling a function packagemanager.
15. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the functional triggering method steps of any of claims 1-7 when executing the computer program stored in the memory.
16. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method steps of the function triggering method of any one of claims 1 to 7.
CN201711204854.1A 2017-11-27 2017-11-27 Function triggering method and device and electronic equipment Active CN107977566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711204854.1A CN107977566B (en) 2017-11-27 2017-11-27 Function triggering method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711204854.1A CN107977566B (en) 2017-11-27 2017-11-27 Function triggering method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN107977566A CN107977566A (en) 2018-05-01
CN107977566B true CN107977566B (en) 2021-03-19

Family

ID=62011790

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711204854.1A Active CN107977566B (en) 2017-11-27 2017-11-27 Function triggering method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN107977566B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790961A (en) * 2011-05-20 2012-11-21 腾讯科技(深圳)有限公司 Update method of application program, mobile terminal and server
CN103116545A (en) * 2013-02-04 2013-05-22 青岛海信传媒网络技术有限公司 Intelligent terminal upgrade detection method and system
CN103176828A (en) * 2013-03-29 2013-06-26 北京奇虎科技有限公司 Method and device of deleting application program residual files
CN103577750A (en) * 2013-11-15 2014-02-12 北京奇虎科技有限公司 Privacy authority management method and device
CN103942043A (en) * 2014-03-17 2014-07-23 可牛网络技术(北京)有限公司 Method and device for managing mobile terminal desktop icons
CN104156414A (en) * 2014-07-30 2014-11-19 珠海市君天电子科技有限公司 Terminal, device and method for clearing junk files
CN104239784A (en) * 2014-09-09 2014-12-24 北京奇虎科技有限公司 Method for detecting applications installed in system, and client
CN105224356A (en) * 2015-08-28 2016-01-06 北京金山安全软件有限公司 Directory clearing method and device and mobile terminal
CN105278925A (en) * 2014-06-05 2016-01-27 腾讯科技(深圳)有限公司 Method and device for refuse cleaning of uninstalled software
CN105389263A (en) * 2015-12-24 2016-03-09 北京奇虎科技有限公司 Method, system and equipment for monitoring application software permissions
CN106156664A (en) * 2016-07-26 2016-11-23 北京奇虎科技有限公司 User interface anti-peeping method, system, application program and the terminal of application program
CN106294839A (en) * 2016-08-20 2017-01-04 北京云艾科技有限公司 A kind of link jump method and device
CN106557525A (en) * 2015-09-30 2017-04-05 北京金山安全软件有限公司 Method and device for cleaning application program residual file and electronic equipment
CN106649588A (en) * 2016-11-15 2017-05-10 北京奇虎科技有限公司 Way, device, system of obtaining installed Apps list
CN106708566A (en) * 2016-11-30 2017-05-24 武汉斗鱼网络科技有限公司 Method for judgment of installation of application programs and judgment system
CN107343103A (en) * 2017-07-13 2017-11-10 北京元心科技有限公司 Control method and control device of application permission and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8615751B2 (en) * 2007-02-28 2013-12-24 Oracle International Corporation Seeding product information

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790961A (en) * 2011-05-20 2012-11-21 腾讯科技(深圳)有限公司 Update method of application program, mobile terminal and server
CN103116545A (en) * 2013-02-04 2013-05-22 青岛海信传媒网络技术有限公司 Intelligent terminal upgrade detection method and system
CN103176828A (en) * 2013-03-29 2013-06-26 北京奇虎科技有限公司 Method and device of deleting application program residual files
CN103577750A (en) * 2013-11-15 2014-02-12 北京奇虎科技有限公司 Privacy authority management method and device
CN103942043A (en) * 2014-03-17 2014-07-23 可牛网络技术(北京)有限公司 Method and device for managing mobile terminal desktop icons
CN105278925A (en) * 2014-06-05 2016-01-27 腾讯科技(深圳)有限公司 Method and device for refuse cleaning of uninstalled software
CN104156414A (en) * 2014-07-30 2014-11-19 珠海市君天电子科技有限公司 Terminal, device and method for clearing junk files
CN104239784A (en) * 2014-09-09 2014-12-24 北京奇虎科技有限公司 Method for detecting applications installed in system, and client
CN105224356A (en) * 2015-08-28 2016-01-06 北京金山安全软件有限公司 Directory clearing method and device and mobile terminal
CN106557525A (en) * 2015-09-30 2017-04-05 北京金山安全软件有限公司 Method and device for cleaning application program residual file and electronic equipment
CN105389263A (en) * 2015-12-24 2016-03-09 北京奇虎科技有限公司 Method, system and equipment for monitoring application software permissions
CN106156664A (en) * 2016-07-26 2016-11-23 北京奇虎科技有限公司 User interface anti-peeping method, system, application program and the terminal of application program
CN106294839A (en) * 2016-08-20 2017-01-04 北京云艾科技有限公司 A kind of link jump method and device
CN106649588A (en) * 2016-11-15 2017-05-10 北京奇虎科技有限公司 Way, device, system of obtaining installed Apps list
CN106708566A (en) * 2016-11-30 2017-05-24 武汉斗鱼网络科技有限公司 Method for judgment of installation of application programs and judgment system
CN107343103A (en) * 2017-07-13 2017-11-10 北京元心科技有限公司 Control method and control device of application permission and mobile terminal

Also Published As

Publication number Publication date
CN107977566A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
CN109409050B (en) Protection system including machine learning snapshot evaluation
CN110866258B (en) Rapid vulnerability positioning method, electronic device and storage medium
CN109388485B (en) Processing method, device and equipment of task execution thread and storage medium
CN107590016B (en) Power-down restarting identification method and device
CN109558145B (en) Installation package volume optimization method and device for android application
CN111615688A (en) Assertion verification code binding method and device
CN108470126B (en) Data processing method, device and storage medium
CN111694704B (en) Debug information output method, device, electronic equipment and storage medium
CN109271323B (en) Page element processing method and device, test equipment and storage medium
CN111125721A (en) Control method for process starting, computer equipment and readable storage medium
CN110704311A (en) Application program testing method and device, electronic equipment and readable storage medium
CN107547285B (en) Configuration information storage method and device
CN109472135B (en) Method, device and storage medium for detecting process injection
CN107977566B (en) Function triggering method and device and electronic equipment
CN111966630B (en) File type detection method, device, equipment and medium
US9880813B2 (en) RTE code generating method and apparatus performing the same
CN112433872A (en) Interface request timeout reminding method, system and storage medium
CN110888799A (en) Software testing method and device
CN110633196A (en) Automatic use case execution method and device of application program
CN111639341B (en) Malicious program detection method and device, electronic equipment and storage medium
CN111666020B (en) Method and device for switching document pages, electronic equipment and storage medium
CN109582586B (en) Application program advanced networking test method, device, server and storage medium
CN108845845B (en) Shortcut key creation method and device, electronic equipment and storage medium
CN109815083B (en) Application crash monitoring method and device, electronic equipment and medium
CN113553578A (en) Log printing response method and device, electronic equipment and storage medium

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