CN111046378A - Method and related device for forbidding third-party application program to set process priority - Google Patents

Method and related device for forbidding third-party application program to set process priority Download PDF

Info

Publication number
CN111046378A
CN111046378A CN201911297649.3A CN201911297649A CN111046378A CN 111046378 A CN111046378 A CN 111046378A CN 201911297649 A CN201911297649 A CN 201911297649A CN 111046378 A CN111046378 A CN 111046378A
Authority
CN
China
Prior art keywords
party application
application program
prohibiting
priority setting
process priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911297649.3A
Other languages
Chinese (zh)
Other versions
CN111046378B (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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201911297649.3A priority Critical patent/CN111046378B/en
Publication of CN111046378A publication Critical patent/CN111046378A/en
Application granted granted Critical
Publication of CN111046378B publication Critical patent/CN111046378B/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/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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application discloses a method and a related device for forbidding a third-party application program to set process priority, wherein the method comprises the following steps: when detecting that the priority setting interface is called, determining a third-party application program calling the priority setting interface; acquiring the running state of the third-party application program; and prohibiting the third-party application program from executing process priority setting according to the running state. According to the method and the device, the process priority of the third-party application program is prevented from being set at will, the situation that the third-party application program is blocked in use is avoided, and the system smoothness is improved.

Description

Method and related device for forbidding third-party application program to set process priority
Technical Field
The present application relates to the field of electronic devices, and in particular, to a method and a related apparatus for prohibiting a third-party application from setting a process priority.
Background
In the process that a user uses the electronic equipment, the user hopes that the electronic equipment is smoothly used, the electronic equipment is required to avoid the phenomenon of blocking to influence the use experience of the user, however, at present, the user can have the phenomenon of blocking in the process of using some third-party applications, which is mainly a behavior that the third-party applications have process priorities, and if the process priorities set by the third-party applications are incorrect or have problems in matching with a system, the blocking phenomenon can be caused.
Disclosure of Invention
The embodiment of the application provides a method and a related device for forbidding a third-party application program to set process priority, so that the third-party application program is prevented from randomly setting the process priority, the situation that the third-party application program is blocked in use is avoided, and the system fluency is improved. .
In a first aspect, an embodiment of the present application provides a method for prohibiting a third-party application from setting a process priority, where the method is applied to an electronic device, and the method includes:
when detecting that the priority setting interface is called, determining a third-party application program calling the priority setting interface;
acquiring the running state of the third-party application program;
and prohibiting the third-party application program from executing process priority setting according to the running state.
In a second aspect, an embodiment of the present application provides an apparatus for prohibiting a third-party application from setting a process priority, where the apparatus is applied to an electronic device, and the apparatus includes a processing unit and a communication unit, where:
the processing unit is used for determining a third-party application program for calling the priority setting interface when detecting that the priority setting interface is called; acquiring the running state of the third-party application program through the communication unit; and prohibiting the third-party application program from executing process priority setting according to the running state.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in any method of the first aspect of the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a chip, including: and the processor is used for calling and running the computer program from the memory so that the device provided with the chip executes part or all of the steps described in any method of the first aspect of the embodiment of the application.
In a fifth aspect, this application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program enables a computer to perform some or all of the steps described in any one of the methods of the first aspect of this application.
In a sixth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps as described in any one of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, in the embodiment of the present application, when detecting that the priority setting interface is called, the electronic device determines to call a third-party application of the priority setting interface; acquiring the running state of the third-party application program; and prohibiting the third-party application program from executing process priority setting according to the running state. Therefore, when the electronic equipment detects that the priority setting interface is called, the third-party application program is not immediately prevented from setting the process priority, but the running state of the third-party application program calling the priority interface is judged firstly, and the third-party application program is prohibited from executing the process priority setting according to the running state, so that the accuracy of prohibiting the process priority setting is improved while the third-party application program is prevented from randomly setting the process priority, and the third-party application program is prohibited from executing the process priority setting, so that the situation that the third-party application program is blocked in use can be avoided, and the system smoothness is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for prohibiting a third-party application from setting a process priority according to an embodiment of the present application;
fig. 3 is a flowchart illustrating another method for prohibiting a third-party application from setting a process priority according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a method for prohibiting a third-party application from setting a process priority according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 6 is a block diagram illustrating functional units of an apparatus for prohibiting a third party application from setting a process priority according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic device according to the embodiments of the present application may be an electronic device with communication capability, and the electronic device may include various handheld devices with wireless communication function, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and so on.
As shown in fig. 1, an electronic device 100 according to an embodiment of the present disclosure includes a housing 110, a display screen 120, and a main board 130, where the main board 130 is provided with a front-facing camera 131, a processor 132, a memory 133, a power management chip 134, and the like.
The processor 132 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 133 and calling data stored in the memory 133, thereby performing overall monitoring of the electronic device. Alternatively, processor 132 may include one or more processing units; preferably, the processor 132 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 132. The Processor 132 may be, for example, a Central Processing Unit (CPU), a general purpose Processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor described above may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs and microprocessors, and the like.
The memory 133 may be used to store software programs and modules, and the processor 132 executes various functional applications and data processing of the electronic device by operating the software programs and modules stored in the memory 133. The memory 133 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 133 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. The Memory 133 may be, for example, a Random Access Memory (RAM), a flash Memory, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a register, a hard disk, a removable hard disk, a compact disc Read Only Memory (CD-ROM), or any other form of storage medium known in the art.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for prohibiting a third party application from setting a process priority according to an embodiment of the present application, where the method for prohibiting a third party application from setting a process priority may be applied to the electronic device shown in fig. 1.
As shown in the figure, the method for prohibiting the third-party application program from setting the process priority comprises the following operations.
S201, when detecting that a priority setting interface is called, the electronic equipment determines to call a third-party application program of the priority setting interface;
the priority setting interface is a setPriority () interface, and the third-party application program calling the priority setting interface may be various, for example, a social application program, a video application program, a shopping application program, and the like, which is not limited herein.
The reason why the third-party application program calls the priority setting interface is that the priority needs to be reduced because the third-party application program considers that the current thread is a non-main thread, but the third-party application program is possibly wrong, and therefore whether the third-party application program is prohibited from setting the process priority needs to be determined according to the running state of the third-party application program.
S202, the electronic equipment acquires the running state of the third-party application program;
the running states include a foreground running state and a background running state, wherein the foreground running state refers to the third-party application program which is being operated by the user, namely the third-party application program is displayed on the current display screen.
S203, the electronic equipment prohibits the third-party application program from executing process priority setting according to the running state.
The specific implementation manner of prohibiting, by the electronic device, the third-party application from executing the process priority setting according to the running state may be various, for example, the third-party application may be prohibited from executing the process priority setting when the running state is a foreground running state, or the third-party application may be prohibited from executing the process priority setting when the running state is a background running state and the third-party application is a navigation application, and the like, which is not limited herein.
The specific implementation manner of prohibiting the third-party application from executing the process priority setting may be various, for example, the priority setting of the third-party application may not be executed, or the third-party application may directly return to execute the next program function when the priority setting of the process of the third-party application needs to be prohibited, which is not limited herein.
It can be seen that, in the embodiment of the present application, when detecting that the priority setting interface is called, the electronic device determines to call a third-party application of the priority setting interface; acquiring the running state of the third-party application program; and prohibiting the third-party application program from executing process priority setting according to the running state. Therefore, when the electronic equipment detects that the priority setting interface is called, the third-party application program is not immediately prevented from setting the process priority, but the running state of the third-party application program calling the priority interface is judged firstly, and the third-party application program is prohibited from executing the process priority setting according to the running state, so that the accuracy of prohibiting the process priority setting is improved while the third-party application program is prevented from randomly setting the process priority, and the third-party application program is prohibited from executing the process priority setting, so that the situation that the third-party application program is blocked in use can be avoided, and the system smoothness is improved.
In one possible example, the prohibiting the third-party application from performing process priority setting according to the running status includes:
and when the running state of the third-party application program is foreground running, prohibiting the third-party application program from executing the process priority setting.
When the running state of the third-party application program is background running, the third-party application program can be allowed to execute the process priority setting, and at this time, even if the process priority of the third-party application program set by the third-party application program is low, the user cannot perceive the jamming problem of foreground application.
As can be seen, in this example, when the electronic device detects that the running state of the third-party application is foreground running, the priority of the third-party application is defaulted to be the highest, and the third-party application is prohibited from executing the process priority setting, so that the priority setting of the third-party application is prevented from being too low, and a stuck phenomenon of the third-party application in the using process is prevented from occurring.
In one possible example, the prohibiting the third-party application from performing process priority setting according to the running status includes:
when the running state of the third-party application program is foreground running, detecting whether a running background application program exists or not;
when detecting a background application program which is running, detecting whether the background application program is an application in a first application set;
and when detecting that the background application program is not an application in the first application set, prohibiting the third-party application program from executing the process priority setting.
The applications in the first application set may include navigation applications, music playing applications, and the like, which are not limited herein.
The priority of the application in the first application set is higher than that of the application running in the foreground, when the background application program is detected not to be the application in the first application set, the foreground application is determined to be the highest priority, the third-party application program is forbidden to execute the process priority setting, and setting errors are avoided.
As can be seen, in this example, when detecting that the running state of the third-party application program is foreground running, the electronic device first determines whether there is a higher-priority application in the background, and when there is no higher-priority application in the background, prohibits the third-party application program from executing the process priority setting, thereby improving the rationality for prohibiting the third-party application program from executing the process priority setting.
In this possible example, after detecting whether the background application is an application in the first set of applications, the method further includes:
and when the background application program is detected to be an application in the first application set, prohibiting the third-party application program from executing the process priority setting according to the system resource demand of the third-party application program and the background application program.
The system resources may include Central Processing Unit (CPU) resources, Graphics Processing Unit (GPU) resources, bandwidth resources, and the like.
The specific implementation manner for prohibiting the third-party application from executing the process priority setting according to the system resource demand of the third-party application and the background application may be various, for example, when the amount of bandwidth resources required by the third-party application is greater than or equal to the amount of bandwidth resources required by the background application, the third-party application is prohibited from executing the process priority setting, or when at least two of the amounts of resources including GPU, CPU, and bandwidth required by the third-party application are greater than the amount of resources required by the background application, the third-party application is prohibited from executing the process priority setting, for example, the amount of bandwidth resources required by the third-party application is greater than or equal to the amount of bandwidth resources required by the background application, the amount of bandwidth resources required by the third-party application, and the amount of bandwidth resources required by the background application, And when the amount of the CPU resource required by the third-party application is greater than or equal to the amount of the CPU resource required by the background application and the amount of the GPU resource required by the third-party application is greater than or equal to the amount of the GPU resource required by the background application, the third-party application is prohibited from executing the implementation manners such as the process priority setting, which are not limited herein.
As can be seen, in this example, when the electronic device detects that the background application is a high-priority application, it needs to determine to prohibit the third-party application from executing the process priority setting by comparing the demanded amounts of the system resources of the third-party application and the background application again, which is beneficial to improving the accuracy of prohibiting the third-party application from executing the process priority setting, and can avoid the problem of blocking of foreground and background applications at the same time.
In this possible example, the prohibiting the third party application from performing the process priority setting according to the system resource requirements of the third party application and the background application includes:
when the system resource demand of the third-party application program is greater than or equal to a first preset threshold, prohibiting the third-party application program from executing the process priority setting; or the like, or, alternatively,
and when the system resource demand of the third-party application program is smaller than a first preset threshold value and the system resource demand of the third-party application program is larger than the system resource demand of the background application program, prohibiting the third-party application program from executing the process priority setting.
As can be seen, in this example, when the system resource demand of the third-party application is greater than or equal to the first preset threshold, the electronic device determines the highest priority of the third-party application, or when the system resource demand of the third-party application is smaller than the first preset threshold and larger than the system resource demand of the background application, determines the highest priority of the third-party application in all currently running applications, and further prohibits the third-party application from executing the process priority setting, thereby avoiding too low setting and ensuring the fluency of the third-party application in use.
In one possible example, the prohibiting the third-party application from performing process priority setting according to the running status includes:
when the running state of the third-party application program is background running, detecting whether the third-party application program is an application in a first application set;
and when the third-party application program is detected to be the application in the first application set, prohibiting the third-party application program from executing the process priority setting.
The priority of the applications in the first application set is the highest, and the applications in the first application set may include navigation applications, music playing applications, and the like, which is not limited herein.
As can be seen, in this example, when the running state of the third-party application in the first application set is the background running state and the third-party application calls the priority setting interface, the electronic device prohibits the third-party application from executing the process priority setting, thereby avoiding a process priority error set by the third-party application and avoiding a reduction in the priority of the third-party application from affecting the user experience.
Referring to fig. 3, fig. 3 is a flowchart illustrating another method for prohibiting a third party application from setting a process priority according to an embodiment of the present application, where the method for prohibiting a third party application from setting a process priority may be applied to the electronic device shown in fig. 1.
As shown in the figure, the method for prohibiting the third party application from setting the process priority includes the following operations:
s301, when detecting that the priority setting interface is called, the electronic device determines to call a third-party application program of the priority setting interface.
S302, the electronic equipment acquires the running state of the third-party application program.
S303, when the running state of the third-party application is foreground running, the electronic device prohibits the third-party application from executing process priority setting.
It can be seen that, in the embodiment of the present application, when it is detected that the priority setting interface is called, a third-party application program that calls the priority setting interface is determined; acquiring the running state of the third-party application program; and prohibiting the third-party application program from executing process priority setting according to the running state. Therefore, when the electronic equipment detects that the priority setting interface is called, the third-party application program is not immediately prevented from setting the process priority, but the running state of the third-party application program calling the priority interface is judged firstly, and the third-party application program is prohibited from executing the process priority setting according to the running state, so that the accuracy of prohibiting the process priority setting is improved while the third-party application program is prevented from randomly setting the process priority, and the third-party application program is prohibited from executing the process priority setting, so that the situation that the third-party application program is blocked in use can be avoided, and the system smoothness is improved.
In addition, when the electronic device detects that the third-party application program is the foreground application program, the priority of the default third-party application program is the highest, the third-party application program is forbidden to execute the process priority setting, the priority setting of the third-party application program can be prevented from being too low, and the phenomenon of blocking of the third-party application program in the using process is avoided.
Referring to fig. 4, fig. 4 is a flowchart illustrating another method for prohibiting a third party application from setting a process priority according to an embodiment of the present application, where the method for prohibiting a third party application from setting a process priority may be applied to the electronic device shown in fig. 1.
As shown in the figure, the method for prohibiting the third party application from setting the process priority includes the following operations:
s401, when detecting that the priority setting interface is called, the electronic equipment determines to call a third-party application program of the priority setting interface.
S402, the electronic equipment acquires the running state of the third-party application program.
S403, when the running state of the third-party application is foreground running, the electronic device detects whether there is a running background application.
S404, when detecting the running background application program, the electronic device detects whether the background application program is an application in the first application set.
S405, when the electronic device detects that the background application program is not an application in the first application set, prohibiting the third-party application program from executing process priority setting.
It can be seen that, in the embodiment of the present application, when it is detected that the priority setting interface is called, a third-party application program that calls the priority setting interface is determined; acquiring the running state of the third-party application program; and prohibiting the third-party application program from executing process priority setting according to the running state. Therefore, when the electronic equipment detects that the priority setting interface is called, the third-party application program is not immediately prevented from setting the process priority, but the running state of the third-party application program calling the priority interface is judged firstly, and the third-party application program is prohibited from executing the process priority setting according to the running state, so that the accuracy of prohibiting the process priority setting is improved while the third-party application program is prevented from randomly setting the process priority, and the third-party application program is prohibited from executing the process priority setting, so that the situation that the third-party application program is blocked in use can be avoided, and the system smoothness is improved.
In addition, when the electronic equipment detects that the running state of the third-party application program is foreground running, whether the application with higher priority exists in the background is judged, and when the application with higher priority does not exist in the background, the third-party application program is prohibited from executing the process priority setting, so that the rationality of prohibiting the third-party application program from executing the process priority setting is improved.
Consistent with the embodiments shown in fig. 2, fig. 3, and fig. 4, please refer to fig. 5, fig. 5 is a schematic structural diagram of an electronic device 500 provided in an embodiment of the present application, where the electronic device 500 further includes an application processor 510, a memory 520, a communication interface 530, and one or more programs 521, where the one or more programs 521 are stored in the memory 520 and configured to be executed by the application processor 510, and the one or more programs 521 include instructions for:
when detecting that the priority setting interface is called, determining a third-party application program calling the priority setting interface;
acquiring the running state of the third-party application program;
and prohibiting the third-party application program from executing process priority setting according to the running state.
It can be seen that, in the embodiment of the present application, when detecting that the priority setting interface is called, the electronic device determines to call a third-party application of the priority setting interface; acquiring the running state of the third-party application program; and prohibiting the third-party application program from executing process priority setting according to the running state. Therefore, when the electronic equipment detects that the priority setting interface is called, the third-party application program is not immediately prevented from setting the process priority, but the running state of the third-party application program calling the priority interface is judged firstly, and the third-party application program is prohibited from executing the process priority setting according to the running state, so that the accuracy of prohibiting the process priority setting is improved while the third-party application program is prevented from randomly setting the process priority, and the third-party application program is prohibited from executing the process priority setting, so that the situation that the third-party application program is blocked in use can be avoided, and the system smoothness is improved.
In one possible example, in terms of the setting of the priority for prohibiting the third-party application from executing the process according to the running state, the instructions in the program 521 are specifically configured to: and when the running state of the third-party application program is foreground running, prohibiting the third-party application program from executing the process priority setting.
In one possible example, in terms of the setting of the priority for prohibiting the third-party application from executing the process according to the running state, the instructions in the program 521 are specifically configured to: when the running state of the third-party application program is foreground running, detecting whether a running background application program exists or not; when the running background application program is detected, detecting whether the background application program is an application in the first application set; and when detecting that the background application program is not an application in the first application set, prohibiting the third-party application program from executing the process priority setting.
In this possible example, the program 521 also includes instructions for: after detecting whether the background application program is an application in a first application set or not, prohibiting the third-party application program from executing the process priority setting according to the system resource demand of the third-party application program and the background application program when detecting that the background application program is the application in the first application set.
In this possible example, in terms of prohibiting the third-party application from executing the process priority setting according to the system resource requirements of the third-party application and the background application, the instructions in the program 521 are specifically configured to: when the system resource demand of the third-party application program is greater than or equal to a first preset threshold, prohibiting the third-party application program from executing the process priority setting; or when the system resource demand of the third-party application program is smaller than a first preset threshold and the system resource demand of the third-party application program is larger than the system resource demand of the background application program, prohibiting the third-party application program from executing the process priority setting.
In one possible example, in terms of the setting of the priority for prohibiting the third-party application from executing the process according to the running state, the instructions in the program 521 are specifically configured to: when the running state of the third-party application program is background running, detecting whether the third-party application program is an application in a first application set; and when detecting that the third-party application program is an application in the first application set, prohibiting the third-party application program from executing the process priority setting.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 6 is a block diagram of functional units of an apparatus 600 for prohibiting a third-party application from setting process priority according to an embodiment of the present application. The device 600 for prohibiting the third party application from setting the process priority is applied to the electronic device, and comprises a processing unit 601 and a communication unit 602, wherein the processing unit 601 is configured to execute any step in the above method embodiments, and when data transmission such as sending is performed, the communication unit 602 is optionally invoked to complete the corresponding operation. The details will be described below.
The processing unit 601 is configured to determine, when it is detected that the priority setting interface is called, a third-party application program that calls the priority setting interface; acquiring the running state of the third-party application program through the communication unit 602; and prohibiting the third-party application program from executing process priority setting according to the running state.
It can be seen that, in the embodiment of the present application, when detecting that the priority setting interface is called, the electronic device determines to call a third-party application of the priority setting interface; acquiring the running state of the third-party application program; and prohibiting the third-party application program from executing process priority setting according to the running state. Therefore, when the electronic equipment detects that the priority setting interface is called, the third-party application program is not immediately prevented from setting the process priority, but the running state of the third-party application program calling the priority interface is judged firstly, and the third-party application program is prohibited from executing the process priority setting according to the running state, so that the accuracy of prohibiting the process priority setting is improved while the third-party application program is prevented from randomly setting the process priority, and the third-party application program is prohibited from executing the process priority setting, so that the situation that the third-party application program is blocked in use can be avoided, and the system smoothness is improved.
In a possible example, in terms of the setting of the priority for prohibiting the third-party application from executing the process according to the running status, the processing unit 601 is specifically configured to: and when the running state of the third-party application program is foreground running, prohibiting the third-party application program from executing the process priority setting.
In a possible example, in terms of the setting of the priority for prohibiting the third-party application from executing the process according to the running status, the processing unit 601 is specifically configured to: when the running state of the third-party application program is foreground running, detecting whether a running background application program exists or not; when the running background application program is detected, detecting whether the background application program is an application in the first application set; and when detecting that the background application program is not an application in the first application set, prohibiting the third-party application program from executing the process priority setting.
In this possible example, after the detecting whether the background application is an application in the first set of applications, the processing unit 601 is further configured to: and when the background application program is detected to be an application in the first application set, prohibiting the third-party application program from executing the process priority setting according to the system resource demand of the third-party application program and the background application program.
In this possible example, in terms of prohibiting the third-party application from executing the process priority setting according to the system resource demand of the third-party application and the background application, the processing unit 601 is specifically configured to: when the system resource demand of the third-party application program is greater than or equal to a first preset threshold, prohibiting the third-party application program from executing the process priority setting; or when the system resource demand of the third-party application program is smaller than a first preset threshold and the system resource demand of the third-party application program is larger than the system resource demand of the background application program, prohibiting the third-party application program from executing the process priority setting.
In a possible example, in terms of the setting of the priority for prohibiting the third-party application from executing the process according to the running status, the processing unit 601 is specifically configured to: when the running state of the third-party application program is background running, detecting whether the third-party application program is an application in a first application set; and when detecting that the third-party application program is an application in the first application set, prohibiting the third-party application program from executing the process priority setting.
The apparatus 600 for prohibiting the third party application from setting the process priority may further include a storage unit 603 configured to store program codes and data of the electronic device. The processing unit 601 may be a processor, the communication unit 602 may be a touch display screen or a transceiver, and the storage unit 603 may be a memory.
It can be understood that, since the method embodiment and the apparatus embodiment are different presentation forms of the same technical concept, the content of the method embodiment portion in the present application should be synchronously adapted to the apparatus embodiment portion, and is not described herein again.
Embodiments of the present application further provide a chip, where the chip includes a processor, configured to call and run a computer program from a memory, so that a device in which the chip is installed performs some or all of the steps described in the electronic device in the above method embodiments.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be performed by associated hardware as instructed by a program, which may be stored in a computer-readable memory, which may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for prohibiting a third party application from setting process priority, which is applied to an electronic device, is characterized in that the method comprises the following steps:
when detecting that the priority setting interface is called, determining a third-party application program calling the priority setting interface;
acquiring the running state of the third-party application program;
and prohibiting the third-party application program from executing process priority setting according to the running state.
2. The method of claim 1, wherein said prohibiting the third party application from performing process priority setting based on the operating status comprises:
and when the running state of the third-party application program is foreground running, prohibiting the third-party application program from executing the process priority setting.
3. The method of claim 1, wherein said prohibiting the third party application from performing process priority setting based on the operating status comprises:
when the running state of the third-party application program is foreground running, detecting whether a running background application program exists or not;
when detecting a background application program which is running, detecting whether the background application program is an application in a first application set;
and when detecting that the background application program is not an application in the first application set, prohibiting the third-party application program from executing the process priority setting.
4. The method of claim 3, wherein after detecting whether the background application is an application in the first set of applications, the method further comprises:
and when the background application program is detected to be an application in the first application set, prohibiting the third-party application program from executing the process priority setting according to the system resource demand of the third-party application program and the background application program.
5. The method of claim 4, wherein said prohibiting the third party application from performing the process priority setting based on the system resource requirements of the third party application and the background application comprises:
when the system resource demand of the third-party application program is greater than or equal to a first preset threshold, prohibiting the third-party application program from executing the process priority setting; or the like, or, alternatively,
and when the system resource demand of the third-party application program is smaller than a first preset threshold value and the system resource demand of the third-party application program is larger than the system resource demand of the background application program, prohibiting the third-party application program from executing the process priority setting.
6. The method according to any one of claims 1-5, wherein said prohibiting the third party application from performing process priority setting based on the running status comprises:
when the running state of the third-party application program is background running, detecting whether the third-party application program is an application in a first application set;
and when the third-party application program is detected to be the application in the first application set, prohibiting the third-party application program from executing the process priority setting.
7. An apparatus for prohibiting a third party application from setting a process priority, the apparatus being applied to an electronic device, the apparatus comprising a processing unit and a communication unit, wherein:
the processing unit is used for determining a third-party application program for calling the priority setting interface when detecting that the priority setting interface is called; acquiring the running state of the third-party application program through the communication unit; and prohibiting the third-party application program from executing process priority setting according to the running state.
8. A chip, comprising: a processor for calling and running a computer program from a memory so that a device on which the chip is installed performs the method of any one of claims 1-6.
9. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-6.
10. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-6.
CN201911297649.3A 2019-12-12 2019-12-12 Method and related device for forbidding third-party application program to set process priority Active CN111046378B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911297649.3A CN111046378B (en) 2019-12-12 2019-12-12 Method and related device for forbidding third-party application program to set process priority

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911297649.3A CN111046378B (en) 2019-12-12 2019-12-12 Method and related device for forbidding third-party application program to set process priority

Publications (2)

Publication Number Publication Date
CN111046378A true CN111046378A (en) 2020-04-21
CN111046378B CN111046378B (en) 2022-07-08

Family

ID=70236908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911297649.3A Active CN111046378B (en) 2019-12-12 2019-12-12 Method and related device for forbidding third-party application program to set process priority

Country Status (1)

Country Link
CN (1) CN111046378B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090317005A1 (en) * 2008-06-23 2009-12-24 Mediatek Inc. Method and related apparatuses for decoding multimedia data
CN102073545A (en) * 2011-02-28 2011-05-25 中国人民解放军国防科学技术大学 Process scheduling method and device for preventing screen jam of user interface in operating system
US9069564B1 (en) * 2012-02-14 2015-06-30 Netlogic Microsystems, Inc. Weighted instruction count scheduling
CN105094967A (en) * 2015-06-26 2015-11-25 小米科技有限责任公司 Method and apparatus for operating process
CN105302637A (en) * 2015-10-13 2016-02-03 广东欧珀移动通信有限公司 Restoration method and apparatus for jamming caused by system process runtime exception and mobile terminal
CN106502778A (en) * 2016-10-26 2017-03-15 深圳市金立通信设备有限公司 A kind of terminal and its process scheduling optimization method
CN106681933A (en) * 2016-11-16 2017-05-17 深圳市金立通信设备有限公司 Memory management method and terminal
CN107589994A (en) * 2017-08-16 2018-01-16 深圳市爱培科技术股份有限公司 Method, equipment, system and the storage medium of application process priority management
CN108958860A (en) * 2018-06-06 2018-12-07 Oppo(重庆)智能科技有限公司 screen display state control method and related product
CN109992400A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Resource allocation methods, device, mobile terminal and computer readable storage medium
CN110430598A (en) * 2019-07-08 2019-11-08 新华三技术有限公司成都分公司 The control method and relevant apparatus of service quality QoS

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090317005A1 (en) * 2008-06-23 2009-12-24 Mediatek Inc. Method and related apparatuses for decoding multimedia data
CN102073545A (en) * 2011-02-28 2011-05-25 中国人民解放军国防科学技术大学 Process scheduling method and device for preventing screen jam of user interface in operating system
US9069564B1 (en) * 2012-02-14 2015-06-30 Netlogic Microsystems, Inc. Weighted instruction count scheduling
CN105094967A (en) * 2015-06-26 2015-11-25 小米科技有限责任公司 Method and apparatus for operating process
CN105302637A (en) * 2015-10-13 2016-02-03 广东欧珀移动通信有限公司 Restoration method and apparatus for jamming caused by system process runtime exception and mobile terminal
CN106502778A (en) * 2016-10-26 2017-03-15 深圳市金立通信设备有限公司 A kind of terminal and its process scheduling optimization method
CN106681933A (en) * 2016-11-16 2017-05-17 深圳市金立通信设备有限公司 Memory management method and terminal
CN107589994A (en) * 2017-08-16 2018-01-16 深圳市爱培科技术股份有限公司 Method, equipment, system and the storage medium of application process priority management
CN109992400A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Resource allocation methods, device, mobile terminal and computer readable storage medium
CN108958860A (en) * 2018-06-06 2018-12-07 Oppo(重庆)智能科技有限公司 screen display state control method and related product
CN110430598A (en) * 2019-07-08 2019-11-08 新华三技术有限公司成都分公司 The control method and relevant apparatus of service quality QoS

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LEI SHI等: "Energy-Efficient PON with Sleep-Mode ONU: Progress, Challenges, and Solutions", 《网页在线公开:HTTPS://IEEEXPLORE.IEEE.ORG/STAMP/STAMP.JSP?TP=&ARNUMBER=6172273》 *
柯璘: "一种视频流畅度优先的带宽自适应方法", 《计算机应用与软件》 *

Also Published As

Publication number Publication date
CN111046378B (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN107861816B (en) Resource allocation method and device
CN107635078B (en) Game control method and device
CN110704202B (en) Multimedia recording data sharing method and terminal equipment
US9204027B2 (en) Method for photographing processing and terminal device
EP2869190A1 (en) Method for starting activity of mobile terminal and the mobile terminal
KR20150026786A (en) Electronic device and method for contolling power
EP3544227B1 (en) Power control for a power over ethernet system
CN107832142B (en) Resource allocation method and equipment for application program
CN109582521B (en) Method, device, equipment and medium for testing read-write performance of storage system
CN105260655A (en) Application program starting protection method, device and system
WO2019047708A1 (en) Resource configuration method and related product
WO2019076254A1 (en) Game application control method, and device
CN111046378B (en) Method and related device for forbidding third-party application program to set process priority
CN106682494B (en) Information access method, device and equipment
CN110337112B (en) Terminal access method and device
US20170123615A1 (en) Method and electronic device for prohibiting notifications in application window
CN105022633A (en) Solving method of hotkey conflict and terminal
CN108762996B (en) Touch detection method and device
CN112989323B (en) Process detection method, device, terminal and storage medium
CN112822000B (en) Control method of intelligent LED display screen based on 5g control system and intelligent LED display screen
CN114546171A (en) Data distribution method, data distribution device, storage medium and electronic equipment
CN110427135B (en) Method, device, terminal and storage medium for determining application call
CN108693951B (en) Display content updating method and device
CN107864275B (en) Application setting method and device, mobile terminal and computer readable storage medium
CN105988804B (en) Software transfer method and terminal

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