CN116737338A - Processing method, processing device, processing equipment and storage medium - Google Patents

Processing method, processing device, processing equipment and storage medium Download PDF

Info

Publication number
CN116737338A
CN116737338A CN202310689635.6A CN202310689635A CN116737338A CN 116737338 A CN116737338 A CN 116737338A CN 202310689635 A CN202310689635 A CN 202310689635A CN 116737338 A CN116737338 A CN 116737338A
Authority
CN
China
Prior art keywords
group
processes
running
processor
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.)
Pending
Application number
CN202310689635.6A
Other languages
Chinese (zh)
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202310689635.6A priority Critical patent/CN116737338A/en
Publication of CN116737338A publication Critical patent/CN116737338A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a processing method, a device, equipment and a storage medium, which belong to the technical field of computers, wherein the method can comprise the steps of setting the group of a first process as a first group and setting the group of a second process as a second group under the condition that the electronic equipment is determined to be in a target scene; the first process is a process in a foreground running state and visible to a user, and the second process is a process in the foreground running state and invisible to the user, and the running priority of the processes in the first group is higher than that of the processes in the second group.

Description

Processing method, processing device, processing equipment and storage medium
Technical Field
The application belongs to the technical field of computers, and particularly relates to a processing method, a processing device, processing equipment and a storage medium.
Background
In an operating system of an electronic device, a Control Group (Cgroup) is a mechanism for managing system resources, and processes in the operating system may be divided into different groups to allocate different system resources to each Group, thereby implementing resource management and optimization.
In the related art, grouping of processes may be implemented by a process priority adjustment algorithm (adjust), i.e., priority (ADJ) values of all processes in an operating system are periodically calculated, and the processes are grouped according to the ADJ values. However, in some application start, switch, face or fingerprint unlocking scenarios, the grouping result obtained in the above manner is easy to cause the operating system to be blocked.
Disclosure of Invention
The embodiment of the application aims to provide a processing method, a processing device, processing equipment and a storage medium, which can solve the problem of the blocking of an operating system in the related technology.
In a first aspect, an embodiment of the present application provides a processing method, where the method may include:
setting the group of the first process as a first group and the group of the second process as a second group under the condition that the electronic device is determined to be in the target scene;
the first process is a process in a foreground running state and visible to a user, and the second process is a process in the foreground running state and invisible to the user, and the running priority of the processes in the first group is higher than that of the processes in the second group.
In a second aspect, embodiments of the present application provide a processing apparatus, which may include:
the setting module is used for setting the group of the first process as a first group and setting the group of the second process as a second group under the condition that the electronic equipment is determined to be in the target scene;
the first process is a process in a foreground running state and visible to a user, and the second process is a process in the foreground running state and invisible to the user, and the running priority of the processes in the first group is higher than that of the processes in the second group.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions implementing the steps of the processing method as shown in the first aspect when executed by the processor.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of the processing method as shown in the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a display interface, where the display interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the steps of the processing method as shown in the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executed by at least one processor to implement the steps of the processing method as shown in the first aspect.
In the embodiment of the application, under the condition that the electronic equipment is determined to be in a target scene, the group of the first process is set as a first group, and the group of the second process is set as a second group; the first process is a process in a foreground running state and visible to a user, and the second process is a process in the foreground running state and invisible to the user, and the running priority of the processes in the first group is higher than that of the processes in the second group. Therefore, the situation that the operating system is blocked due to unreasonable process grouping can be avoided, and the running fluency of the operating system is improved.
Drawings
FIG. 1 is a flow chart of a processing method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a processing apparatus according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a schematic hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are obtained by a person skilled in the art based on the embodiments of the present application, fall within the scope of protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or otherwise described herein, and that the objects identified by "first," "second," etc. are generally of a type not limited to the number of objects, for example, the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
In the operating system of an electronic device, especially an Android (Android) operating system, a Cgroup implements more efficient resource management and optimization by dividing each process in the electronic device into different groups and then allocating different system resources to each group.
Cgroup can be used to limit the use of resources such as processors (Central Processing Unit, CPU), memory, network, etc. of an application program (application for short), preventing the application from preempting system resources. The grouping of the Cgroup depends on Android process state management, and if the transmission is blocked or unreasonable in the process state flow, the grouping can be switched too slowly or in error, so that the processes which should run on a large core in the processor cores are limited to low-level processor cores such as small cores.
In the related art, an electronic device currently having an Android operating system generally uses a process priority adjustment algorithm to implement process grouping, that is, according to some fixed rules, all processes in the operating system are periodically scanned and evaluated, and according to the evaluation result, an ADJ value of each process is calculated, and each process is grouped according to the ADJ value. However, in some high-load scenarios such as application starting and switching, face or fingerprint unlocking, the grouping result obtained by the above manner easily causes insufficient computing power of a processor of a foreground task in the high-load scenario, and the situation that an operating system is blocked occurs.
In order to solve the problems in the related art, the processing method provided by the embodiment of the present application is described in detail below with reference to fig. 1 through a specific embodiment and an application scenario thereof.
First, a processing method provided in an embodiment of the present application will be described in detail with reference to fig. 1.
Fig. 1 is a flowchart of a processing method according to an embodiment of the present application.
As shown in fig. 1, the processing method provided by the embodiment of the present application may be applied to an electronic device, and the processing method may include the following steps:
step 110, setting the group of the first process as a first group and the group of the second process as a second group under the condition that the electronic device is determined to be in the target scene; the first process is a process in a foreground running state and visible to a user, and the second process is a process in the foreground running state and invisible to the user, and the running priority of the processes in the first group is higher than that of the processes in the second group.
Therefore, when the electronic equipment is in the target scene, the processes in the foreground running state and visible to the user are divided into the first group with higher priority, and the processes in the foreground running state and invisible to the user are divided into the second group with lower priority than the first group, so that the situation that the operating system is blocked due to unreasonable grouping of the processes in the target scene can be avoided, and the running fluency of the operating system is improved.
The above steps will be described in detail, as follows.
First, referring to step 110, the processes (i.e., the first process, the second process, and the third process) in the embodiment of the present application may be at least one of the following: application program process and system function process.
In the embodiment of the application, the first process is a process in a foreground running state and visible to a user, the second process is a process in the foreground running state and invisible to the user, and the third process is a process in a background running state. The second process in the embodiment of the present application includes at least one of the following: a resident process, a foreground broadcast or service process, a process associated with the first process.
When the process is a process of the application program, the foreground running state and the user visibility in the embodiment of the present application means that an interface (or an icon) of the application program corresponding to the process is visible on the electronic device and the application program is running; when the process is a process of a system function, the foreground running state and the user visibility in the embodiment of the present application means that an interface (or icon) of the system function corresponding to the process is visible on the electronic device and the system function is running. Namely, the foreground running state in the embodiment of the application and the user can see and understand the running state to be the progress of the interface which is interacted with by the user currently, wherein the interface is the interface of an application program or the interface of a system function, such as the progress of the interface of a running game application and the progress of the interface of a browsing webpage.
The foreground running state and invisible to the user means that the interface (or icon) of the application program corresponding to the process is invisible on the current display interface of the electronic device and the application program is running; when the process is a process of a system function, the foreground running state and invisible to the user in the embodiment of the present application means that an interface (or an icon) of the system function corresponding to the process is invisible on a current display interface of the electronic device, and the system function is running, that is, an application program or the system function that is running is understood, and the interface of the application program or the system function is not a process of the current display interface, for example, a process of not displaying a navigation interface but positioning a system in real time, and a process of not displaying a music player of playing audio in real time of an audio playing interface.
The background running state refers to the running state that after the application program or the system function corresponding to the process is closed, the related service can still be slightly run, for example, some software can timely notify the user after the server obtains the user message.
Based on this, in one or more possible embodiments, prior to step 110, the method may include:
receiving an input of a user;
determining, in response to the input, whether the input is a preset input;
and under the condition that the input is determined to be the preset input, determining that the electronic equipment is in the target scene.
The target scene can be input of high-load scenes such as desktop dynamic effect, application starting, camera shooting, face unlocking, fingerprint unlocking, displaying a negative one-screen interface, entering a game application and the like.
It should be noted that, the high load scenario in the embodiment of the present application refers to a scenario in which the value of the statistical information of the sum of the number of processes that are being processed by the processor and waiting for the processing of the processor in a period of time is greater than or equal to a preset threshold, that is, a scenario in which the value of the statistical information of the length of the queue used by the processor is greater than or equal to the preset threshold.
Therefore, the processing method provided by the embodiment of the application can judge whether to group the process corresponding to the real-time input according to the real-time input of the user, so that the aim of accurately and rapidly triggering grouping is fulfilled, the problem of blocking caused by insufficient computing power of a processor of a foreground task in a high-load scene is solved, and the fluency of an operating system is improved.
Additionally, in one or more possible embodiments, the processing method may further comprise, prior to step 110:
step 120, determining whether the partitioning policies of the partitioned first process and second process meet a preset partitioning policy.
For example, if the first input is desktop active, it is determined whether the first process (i.e., desktop) group is a first group, where the first group may be a highest priority (TOP) group, and at this time, it is also necessary to determine whether processes other than the desktop are non-first groups.
If the first input is application start, such as starting application a, it is determined whether the first process (i.e., the process of application a) is the first process group, and at this time, it is also necessary to determine whether the processes other than application a are non-first processes.
If the first input is a camera photograph, it is determined whether the group of the first process (i.e., the camera application process) is the first group, and at this time, it is also necessary to determine whether the processes other than the camera are non-first groups.
If the first input is a face unlock, it is determined whether the first process (i.e., the camera application process) is in a first group, and it is also required to determine whether a second process corresponding to the first process, such as a face interaction setup process (faceui), a system lock process (systemui), or a screen capture process (systemui), is in the first group, and at this time, it is also required to determine whether a process corresponding to an algorithm of the first process and the second process is in the second group, and it is also required to determine whether processes other than the first process and the second process are in other than the first group and the second group.
If the first input is fingerprint unlock, it is determined whether the first process (i.e., system) is in the first group, and it is also necessary to determine whether the process of the algorithm corresponding to the first process is in the second group, and at this time, it is also necessary to determine whether the process other than the camera is in the other groups than the first group and the second group.
If the first input is to display the negative one-screen interface, it is determined whether the first process (i.e. the process displaying the negative one-screen interface) is the first process group, and at this time, it is also required to determine whether the processes other than the process displaying the negative one-screen interface are the second process group.
If the first input is an entry into the game application, it is determined whether the first process (process of the game application) is the first process group, and at this time, it is also necessary to determine whether processes other than the process of the game application are the second process group.
Based on this, this step 10 may specifically include:
and setting the group of the first process as a first group and the group of the second process as a second group according to the preset partitioning strategy under the condition that the electronic device is determined to be in the target scene and the partitioning strategy of the partitioned first process and second process is determined to not meet the preset partitioning strategy.
In addition, the electronic device in the embodiment of the present application further executes a third process, where the third process is a process in a background running state, based on which, after step 110, the processing method may further include:
and adjusting the group of the third processes to be a third group, wherein the running priority of the processes in the second group is higher than that of the processes in the third group.
Wherein the third process may include at least one of: empty process, buffer process, backup process, service process not running beyond preset time length.
Illustratively, the first group in embodiments of the present application may be a highest priority (TOP) group, the second group may be a foreground group, and the third group may be a background group. Wherein the processes in the highest priority (TOP) group may be processes that are in foreground run state and visible to the user. The process in the foreground packet may be a foreground broadcast or service, associated with the first process, in a binding state with the foreground, belonging to a preset resident process. The processes in the background packet may be empty processes, cache processes, backup processes, service processes that have not run for more than a preset period of time, such as service processes that have not been active for more than 30 minutes.
That is, the processing method provided in the embodiment of the present application may set the first process of the interface visible to the user and displayed on the current screen as the TOP packet according to the specific target scene. Other second processes that are not visible but are related to the first process are set as foreground groupings (i.e., processes that are not currently displayed but are displayed in the desktop taskbar and may provide support for the first process). Other unrelated processes are set to background groupings, such as processes that are in background run state and do not involve applications that affect the related display of the first process.
Therefore, whether the input of the user is the preset input can be identified through the steps, under the condition that the preset input is determined, the group of the first process can be recalculated before the running process, the first process which needs the resources and is scheduled most is put into the TOP group, the process of the secondary level is put into the foreground group, and the process which only needs to be executed in the background and is easy to preempt the foreground resources is put into the background group.
It should be noted that, in the embodiment of the present application, the operation priority of the process in the first group is higher than the operation priority of the process in the second group, which may be specifically shown in the following aspect.
In one or more possible embodiments, after step 110, the processing method may further include:
running a first process through a first processor core corresponding to the first group and running a second process through a second processor core corresponding to the second group;
wherein the first processor core and the second processor core satisfy at least one of the following conditions: the number of first processor cores is greater than the number of second processor cores, and the operating frequency of the first processor cores is greater than the operating frequency of the second processor cores.
Illustratively, if the number of first processor cores is 7, the number of second processor cores is 5; if the operating frequency of the first processor core is 50, the operating frequency of the second processor core is 30; if the number of first processor cores is 5 and the operating frequency of each first processor core is 80, the number of second processor cores is 3 and the operating frequency of each second processor core is 50.
In another or more possible embodiments, the processes in the first group and the processes in the second group may run for the same processor core, based on which, after step 110, the processing method may further include:
running, by the third processor core, processes in the first group and processes in the second group;
the running time of the third processor kernel running the process in the first group is longer than the running time of the process in the second group in the same time period.
Illustratively, within 5 minutes, the third processor core may run the processes in the first group for 4 minutes and the third processor core may run the processes in the second group for 1 minute.
Here, since the operation priority of the process in the second group is higher than the operation priority of the process in the third group in the embodiment of the present application, the process in the second group and the process in the third group are applicable to the above steps, and are not described herein.
It should be noted that, in the above description, the operation priority of the process in the first group is higher than the operation priority of the process in the second group, and the operation priority of the process in the second group is higher than the operation priority of the process in the third group in the embodiment of the present application.
Because the chip processor in the electronic device generally includes 8 processor cores, the 8 processor cores respectively correspond to the CPU0-CPU7, and the processor cores can be divided into a large core and a small core according to the operation frequencies of the processor cores, the CPU0-CPU3 with low operation frequency is called a small core, the CPU4-CPU7 with high operation frequency is called a large core, and the time required for one task to operate on the large core is shorter than that required for the task to operate on the small core.
The different effects of the groups in the embodiment of the application are reflected in that the number of the processor cores allowed to run is different, and the allowed time proportion of the same time slice is different, for example, the highest priority grouping and the foreground grouping running task run on the CPU0-CPU7, the background grouping is allowed to run on the small core CPU0-CPU3, and if the highest priority grouping process, the foreground process and the background process simultaneously have the operation on one CPU core, the operation time proportion of the three is 5:4:1 within 10ms, namely, the highest priority grouping process runs on the CPU for 5ms, the foreground process runs for 4ms and the background process runs for 1ms.
It should be noted that, in the embodiment of the present application, the highest priority packet and the foreground packet may not limit the processor cores, i.e. the CPU0-CPU7 may all operate, but the background packet may only operate in the small core, i.e. the bottom layer schedule prioritizes the highest priority packet to operate, and then the foreground packet and finally the background packet.
In addition, after the above-mentioned step 120, the processing method provided by the embodiment of the present application may further include:
and under the condition that the partition strategy of the divided first process and second process meets the preset partition strategy, the first process is operated through the processor kernel corresponding to the first group.
Thus, the adjustment time can be shortened, and the speed of the first process can be increased.
In addition, the processing method provided by the embodiment of the present application may further adjust the group of the first process in the following manner when determining to exit the target scene, which is specifically shown below.
In one or more possible embodiments, after step 110, the processing method provided by the embodiment of the present application may further include:
under the condition that the electronic equipment exits the target scene, calculating a priority value of a first process through a process priority adjustment algorithm;
adjusting the group of the first process according to the priority value of the first process
In another or more possible embodiments, after step 110, the processing method provided in the embodiment of the present application may further include:
and under the condition that the electronic device exits the target scene, adjusting the group of the first process to an initial group, wherein the initial group is determined by the priority value of the first process calculated by the process priority adjustment algorithm.
Therefore, the dynamically adjusted process groups can be restored, the situation that the operating system is blocked due to insufficient computing power of a processor of a foreground task caused by insufficient operation priority of an original process group when the load of the operating system is high can be avoided, meanwhile, the comprehensive configuration of electronic equipment to each process is not changed, and effective resource management of the process is realized.
According to the processing method provided by the embodiment of the application, the execution main body can be a processing device. In the embodiment of the present application, a processing device executes a processing method as an example, and a processing device provided in the embodiment of the present application is described.
Based on the same inventive concept, the application also provides a processing device. This is described in detail with reference to fig. 2.
Fig. 2 is a schematic structural diagram of a processing apparatus according to an embodiment of the present application.
As shown in fig. 2, the processing device 20 may specifically include:
a setting module 201, configured to set a group of a first process to a first group and set a group of a second process to a second group when it is determined that the electronic device is in the target scene;
the first process is a process in a foreground running state and visible to a user, and the second process is a process in the foreground running state and invisible to the user, and the running priority of the processes in the first group is higher than that of the processes in the second group.
The processing device 20 will be described in detail, specifically as follows:
in one or more possible embodiments, the second process includes at least one of: a resident process, a foreground broadcast or service process, a process associated with the first process.
In another or more possible embodiments, the setting module 201 is further configured to, in a case where the electronic device further executes a third process, and the third process is a process in a background running state, adjust a group of the third process to a third group, where an running priority of the process in the second group is higher than an running priority of the process in the third group.
In yet another or more possible embodiments, the processing device 20 in an embodiment of the present application may further include a first operation module; wherein,,
the first running module is used for running a first process through a first processor core corresponding to the first group and running a second process through a second processor core corresponding to the second group;
wherein the first processor core and the second processor core satisfy at least one of the following conditions: the number of first processor cores is greater than the number of second processor cores, and the operating frequency of the first processor cores is greater than the operating frequency of the second processor cores.
In yet another or more possible embodiments, the processing device 20 in an embodiment of the present application may further include a second operation module; wherein,,
the second running module is used for running the processes in the first group and the processes in the second group through the third processor kernel;
the running time of the third processor kernel running the process in the first group is longer than the running time of the process in the second group in the same time period.
In yet another or more possible embodiments, the processing device 20 in an embodiment of the present application may further include a calculation module and an adjustment module; wherein,,
the computing module is used for computing a priority value of the first process through a process priority adjustment algorithm under the condition that the electronic equipment is determined to exit the target scene;
and the adjusting module is used for adjusting the group of the first process according to the priority value of the first process.
The processing device in the embodiment of the application may be an electronic device, or may be a component in an electronic device, for example, an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, the electronic device may be a mobile phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, mobile internet appliance (Mobile Internet Device, MID), augmented reality (augmented reality, AR)/Virtual Reality (VR) device, robot, wearable device, ultra-mobile personal computer, UMPC, netbook or personal digital assistant (personal digital assistant, PDA), etc., but may also be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, and the embodiment of the present application is not limited specifically.
The processing device provided by the embodiment of the application can realize each process realized by the embodiment of the processing method shown in fig. 1, so as to achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
Based on this, the processing device provided in the embodiment of the present application sets the group of the first process as the first group and sets the group of the second process as the second group when it is determined that the electronic device is in the target scene; the first process is a process in a foreground running state and visible to a user, and the second process is a process in the foreground running state and invisible to the user, and the running priority of the processes in the first group is higher than that of the processes in the second group. Therefore, when the electronic equipment is in the target scene, the processes in the foreground running state and visible to the user are divided into the first group with higher priority, and the processes in the foreground running state and invisible to the user are divided into the second group with lower priority than the first group, so that the situation that the operating system is blocked due to unreasonable grouping of the processes in the target scene can be avoided, and the running fluency of the operating system is improved.
Optionally, as shown in fig. 3, the embodiment of the present application further provides an electronic device 30, including a processor 301 and a memory 302, where the memory 302 stores a program or an instruction that can be executed on the processor 301, and the program or the instruction implements each step of the above-mentioned processing method embodiment when executed by the processor 301, and the steps achieve the same technical effects, so that repetition is avoided, and no redundant description is given here.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device.
Fig. 4 is a schematic hardware structure of an electronic device according to an embodiment of the present application.
The electronic device 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, etc.
Those skilled in the art will appreciate that the electronic device 400 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 410 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 4 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
In this embodiment of the present application, the processor 410 is configured to set the group of the first process to the first group and set the group of the second process to the second group when it is determined that the electronic device is in the target scene; the first process is a process in a foreground running state and visible to a user, and the second process is a process in the foreground running state and invisible to the user, and the running priority of the processes in the first group is higher than that of the processes in the second group.
The electronic device 400 is described in detail below, and is specifically as follows:
in one or more possible embodiments, the second process includes at least one of: a resident process, a foreground broadcast or service process, a process associated with the first process.
In another or more possible embodiments, the processor 410 is further configured to, in a case where the electronic device is further executing a third process, the third process is a process in a background running state, adjust a group of the third process to a third group, where an running priority of the process in the second group is higher than an running priority of the process in the third group.
In yet another or more possible embodiments, the processor 410 is further configured to run a first process through a first processor core corresponding to a first group and a second process through a second processor core corresponding to a second group;
wherein the first processor core and the second processor core satisfy at least one of the following conditions: the number of first processor cores is greater than the number of second processor cores, and the operating frequency of the first processor cores is greater than the operating frequency of the second processor cores.
In yet another or more possible embodiments, the processor 410 is further configured to run a process in the first group and a process in the second group through the third processor core;
the running time of the third processor kernel running the process in the first group is longer than the running time of the process in the second group in the same time period.
In yet another or more possible embodiments, the processor 410 is further configured to, in the event that it is determined that the electronic device exits the target scene, calculate, by a process priority adjustment algorithm, a priority value of the first process;
and the adjusting module is used for adjusting the group of the first process according to the priority value of the first process.
It should be appreciated that the input unit 404 may include a graphics processor (Graphics Processing Unit, GPU) 4041 and a microphone 4042, the graphics processor 4041 processing image data of still images or video obtained by an image capture device (e.g., a camera) in a video capture mode or an image capture mode. The display unit 406 may include a display panel, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 407 includes at least one of a touch panel 4071 and other input devices 4072. The touch panel 4071 is also referred to as a touch screen. The touch panel 4071 may include two parts, a touch detection device and a touch display. Other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume display keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
The memory 409 may be used to store software programs and various data, and the memory 409 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 409 may include volatile memory or nonvolatile memory, or the memory 409 may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). Memory 409 in embodiments of the application includes, but is not limited to, these and any other suitable types of memory.
Processor 410 may include one or more processing units; optionally, the processor 410 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, etc., and a modem processor that primarily processes wireless display signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The embodiment of the application also provides a readable storage medium, and the readable storage medium stores a program or an instruction, which when executed by a processor, implements each process of the above processing method embodiment, and can achieve the same technical effects, so that repetition is avoided, and no further description is provided herein.
The processor is a processor in the electronic device in the above embodiment. Among them, the readable storage medium includes computer readable storage medium such as computer readable memory ROM, random access memory RAM, magnetic disk or optical disk, etc.
In addition, the embodiment of the application further provides a chip, the chip comprises a processor and a display interface, the display interface is coupled with the processor, the processor is used for running programs or instructions, the processes of the embodiment of the processing method can be realized, the same technical effects can be achieved, and the repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
Embodiments of the present application provide a computer program product stored in a storage medium, where the program product is executed by at least one processor to implement the respective processes of the above-described processing method embodiments, and achieve the same technical effects, and for avoiding repetition, a detailed description is omitted herein.
It should be noted that, in this document, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in part in the form of a computer software product stored on a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.

Claims (14)

1. A method of processing, comprising:
setting the group of the first process as a first group and the group of the second process as a second group under the condition that the electronic device is determined to be in the target scene;
the first process is a process in a foreground running state and visible to a user, the second process is a process in the foreground running state and invisible to the user, and the running priority of the processes in the first group is higher than that of the processes in the second group.
2. The method of claim 1, wherein the second process comprises at least one of: a resident process, a foreground broadcast or service process, a process associated with the first process.
3. The method of claim 1, wherein the electronic device further runs a third process, the third process being a process in a background running state; the method further comprises the steps of:
and adjusting the group of the third processes into a third group, wherein the operation priority of the processes in the second group is higher than that of the processes in the third group.
4. A method according to any one of claims 1-3, wherein the method further comprises:
running the first process through a first processor core corresponding to the first group and running the second process through a second processor core corresponding to the second group;
wherein the first processor core and the second processor core satisfy at least one of the following conditions: the number of the first processor cores is greater than the number of the second processor cores, and the operating frequency of the first processor cores is greater than the operating frequency of the second processor cores.
5. The method according to claim 1, wherein the method further comprises:
running, by a third processor core, processes in the first group and processes in the second group;
and the running time of the third processor kernel running the processes in the first group is longer than the running time of the processes in the second group in the same time period.
6. The method according to claim 1, wherein the method further comprises:
under the condition that the electronic equipment exits the target scene, calculating a priority value of the first process through a process priority adjustment algorithm;
and adjusting the group of the first process according to the priority value of the first process.
7. A processing apparatus, comprising:
the setting module is used for setting the group of the first process as a first group and setting the group of the second process as a second group under the condition that the electronic equipment is determined to be in the target scene;
the first process is a process in a foreground running state and visible to a user, the second process is a process in the foreground running state and invisible to the user, and the running priority of the processes in the first group is higher than that of the processes in the second group.
8. The apparatus of claim 7, wherein the second process comprises at least one of: a resident process, a foreground broadcast or service process, a process associated with the first process.
9. The apparatus of claim 7, wherein the setting module is further configured to, if the electronic device is further configured to execute a third process, adjust a group of the third process to a third group if the third process is a process in a background running state, wherein an running priority of a process in the second group is higher than an running priority of a process in the third group.
10. The apparatus according to any one of claims 7-9, wherein the processing apparatus further comprises a first run module; wherein,,
the first running module is configured to run the first process through a first processor core corresponding to the first group, and run the second process through a second processor core corresponding to the second group;
wherein the first processor core and the second processor core satisfy at least one of the following conditions: the number of the first processor cores is greater than the number of the second processor cores, and the operating frequency of the first processor cores is greater than the operating frequency of the second processor cores.
11. The apparatus of claim 7, wherein the processing apparatus further comprises a second run module; wherein,,
the second running module is used for running the processes in the first group and the processes in the second group through a third processor kernel;
and the running time of the third processor kernel running the processes in the first group is longer than the running time of the processes in the second group in the same time period.
12. The apparatus of claim 7, wherein the processing means further comprises a calculation module and an adjustment module; wherein,,
the computing module is used for computing the priority value of the first process through a process priority adjustment algorithm under the condition that the electronic equipment is determined to exit the target scene;
the adjusting module is used for adjusting the group of the first process according to the priority value of the first process.
13. An electronic device, comprising: a processor, a memory and a program or instruction stored on the memory and executable on the processor, which program or instruction when executed by the processor performs the steps of the process as claimed in any one of claims 1 to 6.
14. A readable storage medium, characterized in that it stores thereon a program or instructions, which when executed by a processor, implement the steps of the process according to any of claims 1-6.
CN202310689635.6A 2023-06-09 2023-06-09 Processing method, processing device, processing equipment and storage medium Pending CN116737338A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310689635.6A CN116737338A (en) 2023-06-09 2023-06-09 Processing method, processing device, processing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310689635.6A CN116737338A (en) 2023-06-09 2023-06-09 Processing method, processing device, processing equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116737338A true CN116737338A (en) 2023-09-12

Family

ID=87912811

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310689635.6A Pending CN116737338A (en) 2023-06-09 2023-06-09 Processing method, processing device, processing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116737338A (en)

Similar Documents

Publication Publication Date Title
US10152359B2 (en) Load balancing method for multicore mobile terminal
CN110300328B (en) Video playing control method and device and readable storage medium
US20110249668A1 (en) Opportunistic Multitasking
US9448840B2 (en) Controlling runtime execution from a host to conserve resources
KR20140030226A (en) Global composition system
CN111124668B (en) Memory release method, memory release device, storage medium and terminal
US10055388B2 (en) Declarative style rules for default touch behaviors
US9383908B2 (en) Independent hit testing
CN115357389A (en) Memory management method and device and electronic equipment
WO2024160154A1 (en) Cpu scheduling method and apparatus, electronic device, and readable storage medium
WO2024160136A1 (en) Task scheduling method and apparatus, and electronic device
CN109358927B (en) Application program display method and device and terminal equipment
CN116661964A (en) Task processing method and device and electronic equipment
CN116302558A (en) Thread scheduling method and device and electronic equipment
CN116737338A (en) Processing method, processing device, processing equipment and storage medium
CN108351888B (en) Generating deferrable data streams
CN116601602A (en) Preloading applications transparently to users
CN113032290A (en) Flash memory configuration method and device, electronic equipment and storage medium
CN116360953A (en) Task processing method and device and electronic equipment
US9424081B2 (en) Managing callback operations in emulated environments
CN116795538A (en) Compiling process management method and device and electronic equipment
CN116860412A (en) Thread scheduling method and device and electronic equipment
CN115994032A (en) Cache management method, device, electronic equipment and medium
CN116541151A (en) Thread scheduling method, device, electronic equipment and medium
CN115640132A (en) Task resource allocation method and device and electronic equipment

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