CN106095592B - Foreground application program scene synchronization method, device and system - Google Patents

Foreground application program scene synchronization method, device and system Download PDF

Info

Publication number
CN106095592B
CN106095592B CN201610380741.6A CN201610380741A CN106095592B CN 106095592 B CN106095592 B CN 106095592B CN 201610380741 A CN201610380741 A CN 201610380741A CN 106095592 B CN106095592 B CN 106095592B
Authority
CN
China
Prior art keywords
foreground application
scene
application program
processor configuration
operating system
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.)
Expired - Fee Related
Application number
CN201610380741.6A
Other languages
Chinese (zh)
Other versions
CN106095592A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610380741.6A priority Critical patent/CN106095592B/en
Publication of CN106095592A publication Critical patent/CN106095592A/en
Priority to PCT/CN2017/086449 priority patent/WO2017206854A1/en
Application granted granted Critical
Publication of CN106095592B publication Critical patent/CN106095592B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • 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/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • 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
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Power Sources (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a foreground application scene synchronization method, a device and a system. The kernel space of the operating system receives the process name and the process number of the foreground application program running in the user space of the operating system, searches the scene matched with the process name of the foreground application program according to the corresponding relation between the scene and the process name of the foreground application program, acquires the processor configuration strategy matched with the searched scene, and executes the processor configuration strategy to match the running requirement of the foreground application program, so that the configuration of the processor can be accurately matched with the running requirement of the foreground application program, the system performance is optimized, and the power consumption is reduced.

Description

Foreground application program scene synchronization method, device and system
Technical Field
The invention relates to the technical field of computers, in particular to a foreground application scene synchronization method, device and system.
Background
In the currently prevailing operating systems, software is generally divided into two types of runtime spaces: kernel space (kernel) and user space (user space). The kernel space is mainly used for executing various core functions (clock, task scheduling, frequency modulation and voltage regulation, interrupt response and the like) of the operating system, and various application programs are mainly operated in the user space.
In many human-computer interaction scenes, the kernel space of the foreground application program is unknown, so that the running requirements of the foreground application program cannot be accurately matched when the processor is configured, and the problems of slow program reaction, blockage and the like and overhigh power consumption are caused.
Disclosure of Invention
The embodiment of the invention provides a foreground application scene synchronization method, a device and a system, so that the configuration of a processor is accurately matched with the operation requirement of a foreground application.
In one aspect, a foreground application scene synchronization processing method is provided, where the method includes:
receiving a process name and a process number of a foreground application program running in a user space of an operating system, wherein the process number is used for indicating that the process of the foreground application program is a process currently running in the user space;
searching a scene matched with the process name of the foreground application program according to the corresponding relation between the scene and the process name of the foreground application program;
acquiring a processor configuration strategy matched with the searched scene;
and executing the processor configuration strategy to match the operation requirement of the foreground application program.
Preferably, the processor configuration policy includes: at least one of a frequency of the central processing unit CPU and/or the graphics processing unit GPU, a number of cores, and a core scheduling policy.
Preferably, the method further comprises:
classifying scenes of the plurality of foreground applications;
and storing the corresponding relation between the scenes and the process names of the foreground application programs, wherein each scene corresponds to at least one process name of the foreground application program.
Preferably, the obtaining of the processor configuration policy matched with the found scene includes:
and acquiring a processor configuration strategy matched with the searched scene and the type of the currently used processor.
In another aspect, a foreground application scene synchronization method is provided, where the method includes:
acquiring a process name and a process number of a foreground application program running in a user space of an operating system, wherein the process number is used for indicating that the process of the foreground application program is a process currently running in the user space;
and sending the process name and the process number of the foreground application program to a kernel space of the operating system.
In another aspect, a foreground application scene synchronous processing device is provided, where the foreground application scene synchronous processing device is located in a kernel space of an operating system, and the foreground application scene synchronous processing device includes a receiving module, a searching module, an obtaining module, and an executing module;
the receiving module is configured to receive a process name and a process number of a foreground application running in a user space of the operating system, where the process number is used to indicate that a process of the foreground application is a process currently running in the user space;
the search module is used for searching a scene matched with the process name of the foreground application program according to the corresponding relation between the scene and the process name of the foreground application program;
the acquisition module is used for acquiring a processor configuration strategy matched with the searched scene;
the execution module is used for executing the processor configuration strategy so as to match the operation requirement of the foreground application program.
Preferably, the processor configuration policy includes: at least one of a frequency of the central processing unit CPU and/or the graphics processing unit GPU, a number of cores, and a core scheduling policy.
Preferably, the apparatus further comprises: the device comprises a classification module and a storage module;
the classification module is used for classifying scenes of a plurality of foreground application programs;
the storage module is used for storing the corresponding relation between the scenes and the process names of the foreground application programs, wherein each scene corresponds to the process name of at least one foreground application program.
In another aspect, a foreground application scene synchronization apparatus is provided, where the apparatus is located in a user space of an operating system, and the apparatus includes an obtaining module and a sending module;
the acquisition module is used for acquiring a process name and a process number of a foreground application program running in a user space of an operating system, wherein the process number is used for indicating that the process of the foreground application program is a process currently running in the user space;
and the sending module is used for sending the process name and the process number of the foreground application program to the kernel space of the operating system.
In another aspect, a foreground application scene synchronization system is provided, which includes the foreground application scene synchronization processing apparatus and the foreground application scene synchronization apparatus.
In another aspect, a foreground application scene synchronization processing apparatus is provided, where the apparatus includes: an input device, a memory, and a processor;
the memory is used for storing instructions and data, and the data comprises a corresponding relation between a scene and a process name of a foreground application program;
the input device is used for receiving a process name and a process number of a foreground application program running in a user space of an operating system, wherein the process number is used for indicating that the process of the foreground application program is a process currently running in the user space;
the processor is to execute the instructions to implement:
searching a scene matched with the process name of the foreground application program according to the corresponding relation between the scene and the process name of the foreground application program;
acquiring a processor configuration strategy matched with the searched scene;
and executing the processor configuration strategy to match the operation requirement of the foreground application program.
Preferably, the processor configuration policy includes: at least one of a frequency of the central processing unit CPU and/or the graphics processing unit GPU, a number of cores, and a core scheduling policy.
Preferably, the processor is further configured to:
classifying scenes of the plurality of foreground applications;
and storing the corresponding relation between the scenes and the process names of the foreground application programs, wherein each scene corresponds to at least one process name of the foreground application program.
Preferably, the processor is specifically configured to:
and acquiring a processor configuration strategy matched with the searched scene and the type of the currently used processor.
In another aspect, a foreground application scene synchronization apparatus is provided, where the apparatus includes: an output device, a memory, and a processor;
the memory is used for storing instructions and data, and the data comprises process names and process numbers of a plurality of foreground application programs;
the processor is to execute the instructions to implement:
acquiring a process name and a process number of a foreground application program running in a user space of the operating system, wherein the process number is used for indicating that the process of the foreground application program is a process currently running in the user space;
and the output device is used for sending the process name and the process number of the foreground application program to a kernel space of an operating system.
By implementing the foreground application scene synchronization method, device and system provided by the embodiment of the invention, the kernel space of the operating system receives the process name and the process number of the foreground application running in the user space of the operating system, searches the scene matched with the process name of the foreground application according to the corresponding relation between the scene and the process name of the foreground application, acquires the processor configuration strategy matched with the searched scene, and executes the processor configuration strategy to match the running requirement of the foreground application, so that the configuration of the processor can be accurately matched with the running requirement of the foreground application, the system performance is optimized, and the power consumption is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is an interaction flow diagram of a foreground application scene synchronization method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a foreground application scene synchronization processing method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a foreground application scene synchronization system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a foreground application scene synchronization processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a foreground application scene synchronization processing device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a foreground application scene synchronization device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is an interaction flow diagram of a foreground application scene synchronization method provided in an embodiment of the present invention, where an operating system related to this embodiment includes a kernel space and a user space, and the method relates to interaction between the kernel space and the user space, and the method includes the following steps:
s101, a user space of an operating system acquires a process name and a process number of a foreground application program running in the user space, wherein the process number is used for indicating that the process of the foreground application program is a process currently running in the user space.
In this embodiment, the foreground application is relative to the background application, where the foreground application and the background application refer to applications running in the system, but the foreground application currently displayed to the user and operable by the user is the background application, and the background application runs in the background of the system.
When a user starts a new foreground application, the foreground application will obtain a unique process name and process number in the user space. The process number is used for indicating that the process of the foreground application program is a process currently running in the user space.
And S102, the user space sends the process name and the process number of the foreground application program to the kernel space of the operating system, and the kernel space of the operating system receives the process name and the process number of the foreground application program running in the user space of the operating system.
And the user space packages the acquired process name and the process number of the foreground application program into a data packet and sends the data packet to the kernel space through an interface provided by the kernel space. The kernel space receives a process name and a process number of a foreground application running in the user space.
S103, the kernel space searches a scene matched with the process name of the foreground application program according to the corresponding relation between the scene and the process name of the foreground application program.
After receiving the data packet transmitted by the user space, the kernel space firstly analyzes the process name and the process number of the foreground application program. The process number is used for ensuring that the process is not changed, and then the database is searched according to the process name to obtain the scene which the foreground application program should be adapted to. The database stores the corresponding relation between a plurality of groups of scenes and the process names of the foreground application programs, and one scene can correspond to a plurality of foreground application programs.
And S104, the kernel space acquires a processor configuration strategy matched with the searched scene.
The processor configuration policy includes: at least one of a frequency, a number of cores, and a core scheduling policy of a Central Processing Unit (CPU) and/or a Graphics Processing Unit (GPU). Different scenarios have different processor configuration strategies because different scenarios have different processor requirements, for example, some scenarios require fast processing frequency, and the corresponding number of cores is relatively large.
For different scenes, the kernel space also stores a plurality of groups of matching relations between the scenes and the processor configuration strategy.
S105, the kernel space executes the processor configuration strategy to match the operation requirement of the foreground application program.
After determining a scene corresponding to a foreground application program in a user space and a processor configuration policy corresponding to the scene, the kernel space executes the processor configuration policy to match the operation requirement of the foreground application program.
According to the scheme for synchronizing the foreground and background running software scenes between the user space and the kernel of the operating system, the process name and the process number of each process switched to the foreground application program can be accurately sent to the kernel of the operating system, and a decision module responded by the kernel can be guaranteed to make a correct strategy. After the kernel of the operating system is calculated through the information transmitted by the user space, the current scene can be calculated, and different frequency testing and kernel scheduling strategies can be configured according to different scenes.
According to the foreground application scene synchronization and synchronization processing method provided by the embodiment of the invention, the kernel space of the operating system receives the process name and the process number of the foreground application running in the user space of the operating system, searches the scene matched with the process name of the foreground application according to the corresponding relation between the scene and the process name of the foreground application, acquires the processor configuration strategy matched with the searched scene, executes the processor configuration strategy to match the running requirement of the foreground application, can enable the configuration of the processor to be accurately matched with the running requirement of the foreground application, optimizes the system performance and reduces the power consumption.
Fig. 2 is a schematic flowchart of a foreground application scene synchronization processing method provided in an embodiment of the present invention, where the method includes the following steps:
s201, classifying scenes of a plurality of foreground application programs.
The present embodiment classifies the scenes of the foreground application into the following categories (but not limited to the following categories):
SCENE _ NORMAL COMMON SCENE _ NORMAL SCENE
SCENE _ MUSIC MUSIC SCENE
SCENE _ CAMERA photographing SCENE
SCENE _ BROWSER BROWSER SCENE
SCENE _ LIGHT _ GAME lightweight GAME SCENE
SCENE _ HEAVY _ GAME heavyweight GAME scenario
SCENE _ BENCHMARK test software scenario
SCENE _ VIDEO VIDEO SCENE
SCENE _ LISTVIEW List attempt scenarios
SCENE _ Gallery GALLERY
SCENE _ NAVIGATION navigational scenario
SCENE _ EBOOK e-book SCENE
SCENE _ LAUNCHER initiator scenario
SCENE _ BOOT Start scenario
SCENE _ IO input output scenario
And finding a scene matched with each foreground application program.
S202, storing the corresponding relation between the scenes and the process names of the foreground application programs, wherein each scene corresponds to at least one process name of the foreground application program.
The corresponding relation between a plurality of sets of scenes and the process names of the foreground application programs is stored in the kernel space, and one scene can correspond to a plurality of foreground application programs.
S203, receiving a process name and a process number of a foreground application program running in a user space of an operating system, wherein the process number is used for indicating that the process of the foreground application program is a process currently running in the user space.
And the user space packages the acquired process name and the process number of the foreground application program into a data packet and sends the data packet to the kernel space through an interface provided by the kernel space. The kernel space receives a process name and a process number of a foreground application running in the user space.
And S204, searching a scene matched with the process name of the foreground application program according to the corresponding relation between the scene and the process name of the foreground application program.
Because the corresponding relation between a plurality of groups of scenes and the process names of the foreground application programs is stored in the kernel space, the matched scenes can be found according to the process names of the foreground application programs.
S205, obtaining a processor configuration strategy matched with the searched scene and the type of the currently used processor.
For example, for a music scene and a navigation scene, the music scene is only to call music in a storage device or play music cached from a server, the frequency requirement of a CPU in the processor is relatively low, the number of cores can also be configured according to a common configuration, the navigation scene requires relatively high real-time performance, the map loading requires relatively high frequency requirement of the CPU, the frequency requirement of the GPU is also relatively high, and therefore more cores need to be run to meet the running requirement.
Of course, the processor configuration policy may also match the type of processor currently in use.
S206, executing the processor configuration strategy to match the operation requirement of the foreground application program.
After determining a scene corresponding to a foreground application program in a user space and a processor configuration policy corresponding to the scene, the kernel space executes the processor configuration policy to match the operation requirement of the foreground application program.
According to the foreground application scene synchronous processing method provided by the embodiment of the invention, the kernel space of the operating system receives the process name and the process number of the foreground application running in the user space of the operating system, searches the scene matched with the process name of the foreground application according to the corresponding relation between the scene and the process name of the foreground application, obtains the processor configuration strategy matched with the searched scene, and executes the processor configuration strategy to match the running requirement of the foreground application, so that the configuration of the processor can be accurately matched with the running requirement of the foreground application, the system performance is optimized, and the power consumption is reduced.
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 invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. 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 by the invention.
Fig. 3 is a schematic structural diagram of a foreground application scene synchronization system according to an embodiment of the present invention, where an operating system according to this embodiment includes a kernel space and a user space, and the system 1000 includes the foreground application scene synchronization apparatus 100, and the foreground application scene synchronization processing apparatus 200 shown in fig. 3 or the foreground application scene synchronization processing apparatus 300 shown in fig. 4; the scene synchronization apparatus 100 further includes an obtaining module 11 and a sending module 12, and the scene synchronization processing apparatus 200 includes a receiving module 21, a searching module 22, an obtaining module 23, and an executing module 24.
Specifically, in the scene synchronization apparatus 100:
an obtaining module 11, configured to obtain a process name and a process number of a foreground application running in the user space, where the process number is used to indicate that a process of the foreground application is a process currently running in the user space.
In this embodiment, the foreground application is relative to the background application, where the foreground application and the background application refer to applications running in the system, but the foreground application currently displayed to the user and operable by the user is the background application, and the background application runs in the background of the system.
When a user starts a new foreground application, the foreground application will obtain a unique process name and process number in the user space. The process number is used for indicating that the process of the foreground application program is a process currently running in the user space.
A sending module 12, configured to send the process name and the process number of the foreground application to a kernel space of the operating system.
And the user space packages the acquired process name and the process number of the foreground application program into a data packet and sends the data packet to the kernel space through an interface provided by the kernel space. The kernel space receives a process name and a process number of a foreground application running in the user space.
Specifically, in the scene synchronization processing apparatus 200:
the receiving module 21 is configured to receive a process name and a process number of a foreground application running in a user space of an operating system.
And the user space packages the acquired process name and the process number of the foreground application program into a data packet and sends the data packet to the kernel space through an interface provided by the kernel space. The kernel space receives a process name and a process number of a foreground application running in the user space.
And the searching module 22 is configured to search a scene matched with the process name of the foreground application according to the corresponding relationship between the scene and the process name of the foreground application.
After receiving the data packet transmitted by the user space, the kernel space firstly analyzes the process name and the process number of the foreground application program. The process number is used for ensuring that the process is not changed, and then the database is searched according to the process name to obtain the scene which the foreground application program should be adapted to. The database stores the corresponding relation between a plurality of groups of scenes and the process names of the foreground application programs, and one scene can correspond to a plurality of foreground application programs.
And an obtaining module 23, configured to obtain a processor configuration policy matched with the found scene.
The processor configuration policy includes: a frequency of central processors and/or graphics processors, a number of cores, and a core scheduling policy. Different scenarios have different processor configuration strategies because different scenarios have different processor requirements, for example, some scenarios require fast processing frequency, and the corresponding number of cores is relatively large.
For different scenes, the kernel space also stores a plurality of groups of matching relations between the scenes and the processor configuration strategy.
And the execution module 24 is used for executing the processor configuration strategy so as to match the operation requirement of the foreground application program.
After determining a scene corresponding to a foreground application program in a user space and a processor configuration policy corresponding to the scene, the kernel space executes the processor configuration policy to match the operation requirement of the foreground application program.
According to the scheme for synchronizing the foreground and background running software scenes between the user space and the kernel of the operating system, the process name and the process number of each process switched to the foreground application program can be accurately sent to the kernel of the operating system, and a decision module responded by the kernel can be guaranteed to make a correct strategy. After the kernel of the operating system is calculated through the information transmitted by the user space, the current scene can be calculated, and different frequency testing and kernel scheduling strategies can be configured according to different scenes.
According to the foreground application scene synchronization system provided by the embodiment of the invention, the kernel space of the operating system receives the process name and the process number of the foreground application running in the user space of the operating system, searches the scene matched with the process name of the foreground application according to the corresponding relation between the scene and the process name of the foreground application, acquires the processor configuration strategy matched with the searched scene, and executes the processor configuration strategy to match the running requirement of the foreground application, so that the configuration of the processor can be accurately matched with the running requirement of the foreground application, the system performance is optimized, and the power consumption is reduced.
Fig. 4 is a schematic structural diagram of a foreground application scene synchronization processing apparatus provided in an embodiment of the present invention, where the apparatus 300 includes: the system comprises a classification module 31, a storage module 32, a receiving module 33, a searching module 34, an obtaining module 35 and an executing module 36; specifically, the method comprises the following steps:
a classification module 31, configured to classify scenes of multiple foreground applications.
The present embodiment classifies the scenes of the foreground application into the following categories (but not limited to the following categories):
SCENE _ NORMAL COMMON SCENE _ NORMAL SCENE
SCENE _ MUSIC MUSIC SCENE
SCENE _ CAMERA photographing SCENE
SCENE _ BROWSER BROWSER SCENE
SCENE _ LIGHT _ GAME lightweight GAME SCENE
SCENE _ HEAVY _ GAME heavyweight GAME scenario
SCENE _ BENCHMARK test software scenario
SCENE _ VIDEO VIDEO SCENE
SCENE _ LISTVIEW List attempt scenarios
SCENE _ Gallery GALLERY
SCENE _ NAVIGATION navigational scenario
SCENE _ EBOOK e-book SCENE
SCENE _ LAUNCHER initiator scenario
SCENE _ BOOT Start scenario
SCENE _ IO input output scenario
And finding a scene matched with each foreground application program.
The storage module 32 is configured to store a correspondence between scenes and process names of foreground applications, where each scene corresponds to a process name of at least one foreground application.
The corresponding relation between a plurality of sets of scenes and the process names of the foreground application programs is stored in the kernel space, and one scene can correspond to a plurality of foreground application programs.
The receiving module 33 is configured to receive a process name and a process number of a foreground application running in a user space of an operating system, where the process number is used to indicate that a process of the foreground application is a process currently running in the user space.
And the user space packages the acquired process name and the process number of the foreground application program into a data packet and sends the data packet to the kernel space through an interface provided by the kernel space. The kernel space receives a process name and a process number of a foreground application running in the user space.
And the searching module 34 is configured to search a scene matched with the process name of the foreground application according to the corresponding relationship between the scene and the process name of the foreground application.
Because the corresponding relation between a plurality of groups of scenes and the process names of the foreground application programs is stored in the kernel space, the matched scenes can be found according to the process names of the foreground application programs.
An obtaining module 35, configured to obtain a processor configuration policy that matches the found scene and the type of the currently used processor.
For example, for a music scene and a navigation scene, the music scene is only to call music in a storage device or play music cached from a server, the frequency requirement of a CPU in the processor is relatively low, the number of cores can also be configured according to a common configuration, the navigation scene requires relatively high real-time performance, the map loading requires relatively high frequency requirement of the CPU, the frequency requirement of the GPU is also relatively high, and therefore more cores need to be run to meet the running requirement.
Of course, the processor configuration policy may also match the type of processor currently in use.
An execution module 36, configured to execute the processor configuration policy to match the operating requirements of the foreground application.
After determining a scene corresponding to a foreground application program in a user space and a processor configuration policy corresponding to the scene, the kernel space executes the processor configuration policy to match the operation requirement of the foreground application program.
According to the foreground application scene synchronous processing device provided by the embodiment of the invention, the kernel space of the operating system receives the process name and the process number of the foreground application running in the user space of the operating system, searches the scene matched with the process name of the foreground application according to the corresponding relation between the scene and the process name of the foreground application, acquires the processor configuration strategy matched with the searched scene, and executes the processor configuration strategy to match the running requirement of the foreground application, so that the configuration of the processor can be accurately matched with the running requirement of the foreground application, the system performance is optimized, and the power consumption is reduced.
Fig. 5 is a schematic structural diagram of a foreground application scene synchronization processing device according to an embodiment of the present invention, where the device 400 includes: an input device 41, a memory 42, and a processor 43;
the memory 42 is used for storing instructions and data, wherein the data comprises the corresponding relation between the scene and the process name of the foreground application program;
the input device 41 is configured to receive a process name and a process number of a foreground application running in a user space of an operating system, where the process number is used to indicate that a process of the foreground application is a process currently running in the user space;
the processor 43 is configured to execute the instructions to implement:
searching a scene matched with the process name of the foreground application program according to the corresponding relation between the scene and the process name of the foreground application program;
acquiring a processor configuration strategy matched with the searched scene;
and executing the processor configuration strategy to match the operation requirement of the foreground application program.
Preferably, the processor configuration policy includes: at least one of a frequency of the central processing unit CPU and/or the graphics processing unit GPU, a number of cores, and a core scheduling policy.
Preferably, the processor 43 is further configured to:
classifying scenes of the plurality of foreground applications;
and storing the corresponding relation between the scenes and the process names of the foreground application programs, wherein each scene corresponds to at least one process name of the foreground application program.
Preferably, the processor 43 is specifically configured to:
and acquiring a processor configuration strategy matched with the searched scene and the type of the currently used processor.
According to the foreground application scene synchronous processing device provided by the embodiment of the invention, the kernel space of the operating system receives the process name and the process number of the foreground application running in the user space of the operating system, searches the scene matched with the process name of the foreground application according to the corresponding relation between the scene and the process name of the foreground application, acquires the processor configuration strategy matched with the searched scene, and executes the processor configuration strategy to match the running requirement of the foreground application, so that the configuration of the processor can be accurately matched with the running requirement of the foreground application, the system performance is optimized, and the power consumption is reduced.
Fig. 6 is a schematic structural diagram of a foreground application scene synchronization device provided in an embodiment of the present invention, where the device 500 includes: an output device 51, a memory 52, and a processor 53;
the memory 52 is used for storing instructions and data, wherein the data comprises process names and process numbers of a plurality of foreground application programs;
the processor 53 is configured to execute the instructions to:
acquiring a process name and a process number of a foreground application program running in a user space of the operating system, wherein the process number is used for indicating that the process of the foreground application program is a process currently running in the user space;
and the output device is used for sending the process name and the process number of the foreground application program to a kernel space of an operating system.
According to the foreground application scene synchronization device provided by the embodiment of the invention, the user space of the operating system sends the process name and the process number of the foreground application running in the user space to the kernel space, after the kernel space receives the process name and the process number of the foreground application running in the user space of the operating system, the kernel space searches for a scene matched with the process name of the foreground application according to the corresponding relationship between the scene and the process name of the foreground application, acquires a processor configuration strategy matched with the searched scene, and executes the processor configuration strategy to match the operation requirement of the foreground application, so that the configuration of the processor can be accurately matched with the operation requirement of the foreground application, the performance of the system is optimized, and the power consumption is reduced.
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, the program includes some or all of the steps of any one of the service process monitoring methods described in the above method embodiments.
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.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by hardware, firmware, or a combination thereof. When implemented in software, the functions described above may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. Taking this as an example but not limiting: the computer-readable medium may include Random Access Memory (RAM), Read-Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-on Memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Furthermore, the method is simple. Any connection is properly termed a computer-readable medium. For example, if software is transmitted from a website, a server, or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, the fiber optic cable, the twisted pair, the DSL, or the wireless technologies such as infrared, radio, and microwave are included in the fixation of the medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy Disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
In short, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A foreground application program scene synchronous processing method is applied to a kernel space of an operating system, and comprises the following steps:
receiving a process name and a process number of a foreground application program running in a user space of an operating system, wherein the process number is used for indicating that the process of the foreground application program is a process currently running in the user space;
searching a scene matched with the process name of the foreground application program according to the corresponding relation between the scene and the process name of the foreground application program;
acquiring a processor configuration strategy matched with the searched scene;
executing the processor configuration policy to match the operating requirements of the foreground application;
wherein,
the obtaining of the processor configuration policy matched with the found scene includes:
acquiring different processor configuration strategies aiming at different scenes corresponding to the foreground application program;
wherein the obtaining of the processor configuration policy matched with the found scene includes:
acquiring a processor configuration strategy matched with the searched scene and the type of the currently used processor; the processor configuration policy includes: at least one of a frequency of the central processing unit CPU and/or the graphics processing unit GPU, a number of cores, and a core scheduling policy.
2. The method of claim 1, wherein the method further comprises:
classifying scenes of the plurality of foreground applications;
and storing the corresponding relation between the scenes and the process names of the foreground application programs, wherein each scene corresponds to at least one process name of the foreground application program.
3. A foreground application scene synchronization method is applied to a user space of an operating system, and comprises the following steps:
acquiring a process name and a process number of a foreground application program running in a user space of an operating system, wherein the process number is used for indicating that the process of the foreground application program is a process currently running in the user space;
sending the process name and the process number of the foreground application program to a kernel space of the operating system so as to enable the kernel space of the operating system to search a scene matched with the process name of the foreground application program, obtain a processor configuration strategy matched with the searched scene and the type of a currently used processor and execute the processor configuration strategy; wherein the processor configuration policy comprises: at least one of a frequency of the central processing unit CPU and/or the graphics processing unit GPU, a number of cores, and a core scheduling policy.
4. A foreground application scene synchronous processing device is characterized in that the device is located in a kernel space of an operating system and comprises a receiving module, a searching module, an obtaining module and an executing module;
the receiving module is configured to receive a process name and a process number of a foreground application running in a user space of the operating system, where the process number is used to indicate that a process of the foreground application is a process currently running in the user space;
the search module is used for searching a scene matched with the process name of the foreground application program according to the corresponding relation between the scene and the process name of the foreground application program;
the acquisition module is used for acquiring a processor configuration strategy matched with the searched scene;
the execution module is used for executing the processor configuration strategy so as to match the operation requirement of the foreground application program;
the obtaining module is specifically configured to obtain different processor configuration policies for different scenes corresponding to the foreground application;
the obtaining module is further specifically configured to obtain a processor configuration policy that matches the found scene and the type of the currently used processor; the processor configuration policy includes: at least one of a frequency of the central processing unit CPU and/or the graphics processing unit GPU, a number of cores, and a core scheduling policy.
5. The apparatus of claim 4, wherein the apparatus further comprises: the device comprises a classification module and a storage module;
the classification module is used for classifying scenes of a plurality of foreground application programs;
the storage module is used for storing the corresponding relation between the scenes and the process names of the foreground application programs, wherein each scene corresponds to the process name of at least one foreground application program.
6. A foreground application scene synchronization device is characterized in that the device is located in a user space of an operating system and comprises an acquisition module and a sending module;
the acquisition module is used for acquiring a process name and a process number of a foreground application program running in a user space of an operating system, wherein the process number is used for indicating that the process of the foreground application program is a process currently running in the user space;
the sending module is configured to send the process name and the process number of the foreground application to a kernel space of the operating system, so that the kernel space of the operating system searches for a scene matched with the process name of the foreground application, obtains a processor configuration policy matched with the found scene and a type of a currently used processor, and executes the processor configuration policy; wherein the processor configuration policy comprises: at least one of a frequency of the central processing unit CPU and/or the graphics processing unit GPU, a number of cores, and a core scheduling policy.
7. A foreground application scene synchronization system, comprising the foreground application scene synchronization processing apparatus of any one of claims 4 to 5 and the foreground application scene synchronization apparatus of claim 6.
CN201610380741.6A 2016-05-31 2016-05-31 Foreground application program scene synchronization method, device and system Expired - Fee Related CN106095592B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610380741.6A CN106095592B (en) 2016-05-31 2016-05-31 Foreground application program scene synchronization method, device and system
PCT/CN2017/086449 WO2017206854A1 (en) 2016-05-31 2017-05-27 Method, device and system for synchronizing foreground application with scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610380741.6A CN106095592B (en) 2016-05-31 2016-05-31 Foreground application program scene synchronization method, device and system

Publications (2)

Publication Number Publication Date
CN106095592A CN106095592A (en) 2016-11-09
CN106095592B true CN106095592B (en) 2021-08-24

Family

ID=57230951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610380741.6A Expired - Fee Related CN106095592B (en) 2016-05-31 2016-05-31 Foreground application program scene synchronization method, device and system

Country Status (2)

Country Link
CN (1) CN106095592B (en)
WO (1) WO2017206854A1 (en)

Families Citing this family (43)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095592B (en) * 2016-05-31 2021-08-24 Oppo广东移动通信有限公司 Foreground application program scene synchronization method, device and system
CN106896900B (en) * 2017-03-10 2020-07-31 Oppo广东移动通信有限公司 Display control method and device of mobile terminal and mobile terminal
CN107479970B (en) * 2017-07-31 2022-09-09 Oppo广东移动通信有限公司 Resource allocation method and related product
US11182210B2 (en) 2017-07-31 2021-11-23 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for resource allocation and terminal device
WO2019024800A1 (en) 2017-07-31 2019-02-07 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for resource allocation and terminal device
CN107479972A (en) * 2017-07-31 2017-12-15 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107483725A (en) 2017-07-31 2017-12-15 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107517306B (en) * 2017-07-31 2020-07-10 Oppo广东移动通信有限公司 Resource allocation method and related product
CN107450988B (en) * 2017-07-31 2019-12-27 Oppo广东移动通信有限公司 Resource allocation method and related product
CN107528977B (en) * 2017-08-31 2020-07-07 Oppo广东移动通信有限公司 Resource allocation method and related product
CN107577533B (en) * 2017-08-31 2020-12-15 Oppo广东移动通信有限公司 Resource allocation method and related product
CN107613107A (en) * 2017-08-31 2018-01-19 广东欧珀移动通信有限公司 Resource allocation method and related product
CN107547746B (en) * 2017-08-31 2020-09-04 Oppo广东移动通信有限公司 Resource allocation method and related product
CN107515787A (en) * 2017-08-31 2017-12-26 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107547744A (en) * 2017-08-31 2018-01-05 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107547745B (en) * 2017-08-31 2020-07-17 Oppo广东移动通信有限公司 Resource allocation method and related product
CN107528976B (en) 2017-08-31 2020-03-24 Oppo广东移动通信有限公司 Resource allocation method and related product
CN107577532B (en) * 2017-08-31 2019-10-29 Oppo广东移动通信有限公司 Resource allocation method and Related product
CN107577536A (en) * 2017-08-31 2018-01-12 广东欧珀移动通信有限公司 Optimizing application method and Related product
CN107621981A (en) * 2017-09-06 2018-01-23 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107577537A (en) * 2017-09-06 2018-01-12 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107832142B (en) * 2017-10-11 2020-06-09 Oppo广东移动通信有限公司 Resource allocation method and equipment for application program
CN107832148A (en) * 2017-10-30 2018-03-23 广东欧珀移动通信有限公司 Performance optimization method and equipment
CN107861603A (en) * 2017-10-31 2018-03-30 广东欧珀移动通信有限公司 Power consumption control method and equipment
CN107861816B (en) 2017-10-31 2022-10-28 Oppo广东移动通信有限公司 Resource allocation method and device
CN107797868B (en) * 2017-10-31 2020-09-25 Oppo广东移动通信有限公司 Resource adjusting method and device
CN107894920A (en) * 2017-11-09 2018-04-10 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107995357A (en) * 2017-11-15 2018-05-04 广东欧珀移动通信有限公司 Resource allocation method and device
CN107783803B (en) * 2017-11-21 2021-04-06 Oppo广东移动通信有限公司 System optimization method and device of intelligent terminal, storage medium and intelligent terminal
CN108037999A (en) 2017-12-06 2018-05-15 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN109947497B (en) 2017-12-20 2021-06-08 Oppo广东移动通信有限公司 Application program preloading method and device, storage medium and mobile terminal
CN109992399B (en) * 2017-12-29 2021-04-23 Oppo广东移动通信有限公司 Resource management method, resource management device, mobile terminal and computer-readable storage medium
CN109032793B (en) * 2018-07-11 2021-03-16 Oppo广东移动通信有限公司 Resource allocation method, device, terminal and storage medium
CN109522131A (en) * 2018-11-26 2019-03-26 Oppo广东移动通信有限公司 Resource allocation method, device and equipment
CN109558165B (en) * 2018-11-29 2022-07-08 广州市百果园信息技术有限公司 Configuration optimization method, device, equipment and storage medium
CN109474751A (en) * 2018-12-26 2019-03-15 深圳先进技术研究院 Energy consumption management method, system and the mobile terminal of mobile terminal
CN110187818B (en) * 2019-04-09 2020-12-29 Oppo广东移动通信有限公司 Method and device for improving performance of assembly, terminal and storage medium
CN111651263B (en) * 2020-02-12 2023-10-13 北京小米移动软件有限公司 Resource processing method and device of mobile terminal, computer equipment and storage medium
CN115599513B (en) * 2022-04-07 2023-11-03 荣耀终端有限公司 Resource scheduling method and electronic equipment
CN114840270A (en) * 2022-05-09 2022-08-02 珠海全志科技股份有限公司 System bus bandwidth adjusting method, computer device and computer readable storage medium
CN117112191B (en) * 2022-05-16 2024-08-09 荣耀终端有限公司 Information processing method and electronic device
CN115185442B (en) * 2022-07-07 2024-06-04 广东明创软件科技有限公司 Operation parameter control method, processor, terminal and storage medium
CN115904863B (en) * 2022-10-26 2023-11-07 荣耀终端有限公司 PC scene recognition method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179647A (en) * 2006-12-22 2008-05-14 腾讯科技(深圳)有限公司 Method, device and system of displaying program interface on television
WO2014161332A1 (en) * 2013-09-09 2014-10-09 中兴通讯股份有限公司 Method and device for controlling temperature of terminal, and terminal
CN104156215A (en) * 2014-08-14 2014-11-19 北京奇虎科技有限公司 Method and device for obtaining application program information on basis of mobile operating system
CN105260138A (en) * 2015-09-30 2016-01-20 福州瑞芯微电子股份有限公司 Read/write control system and method
CN105320563A (en) * 2015-12-07 2016-02-10 浪潮(北京)电子信息产业有限公司 Process scheduling and optimization method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100517180C (en) * 2007-06-01 2009-07-22 惠州市Tcl电脑科技有限责任公司 Intelligent power source management method and system
FR2969776B1 (en) * 2010-12-23 2013-01-11 Thales Sa METHOD FOR MANAGING THE ENERGY CONSUMPTION OF AN APPLICATION EXECUTABLE IN DIFFERENT ENVIRONMENTS AND SOFTWARE ARCHITECTURE USING SUCH A METHOD
US9223631B2 (en) * 2011-03-17 2015-12-29 Apple Inc. Performing an operation using multiple services
CN103984538B (en) * 2014-03-27 2017-04-26 华为技术有限公司 Application scenario identification method, power consumption management method, devices and terminal equipment
CN104461741B (en) * 2014-12-15 2017-05-24 北京奇虎科技有限公司 Graphics device interface based computing device optimizing method and device
CN104536822B (en) * 2014-12-31 2018-03-23 中科创达软件股份有限公司 A kind of process scheduling optimization method, process perform method and relevant apparatus
CN105094285B (en) * 2015-07-31 2018-09-11 北京金山安全软件有限公司 Power-saving processing method and device for application program
CN106095592B (en) * 2016-05-31 2021-08-24 Oppo广东移动通信有限公司 Foreground application program scene synchronization method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179647A (en) * 2006-12-22 2008-05-14 腾讯科技(深圳)有限公司 Method, device and system of displaying program interface on television
WO2014161332A1 (en) * 2013-09-09 2014-10-09 中兴通讯股份有限公司 Method and device for controlling temperature of terminal, and terminal
CN104156215A (en) * 2014-08-14 2014-11-19 北京奇虎科技有限公司 Method and device for obtaining application program information on basis of mobile operating system
CN105260138A (en) * 2015-09-30 2016-01-20 福州瑞芯微电子股份有限公司 Read/write control system and method
CN105320563A (en) * 2015-12-07 2016-02-10 浪潮(北京)电子信息产业有限公司 Process scheduling and optimization method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A prototype Learning Framework Using EMD:Application to Complex Scenes Analysis;Elisa,Ricci 等;《IEEE transactions on pattern analysis and machine intelligence》;20150910;第513-526页 *
多处理器混合关键性系统中的划分调度策略;谷传才 等;《软件学报》;20140408;第284-297页 *

Also Published As

Publication number Publication date
WO2017206854A1 (en) 2017-12-07
CN106095592A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN106095592B (en) Foreground application program scene synchronization method, device and system
US20200142860A1 (en) Caseless file lookup in a distributed file system
US8745362B2 (en) Operating system aware branch predictor using a dynamically reconfigurable branch history table
CN110391938B (en) Method and apparatus for deploying services
CN106708443B (en) Data reading and writing method and device
CN104077191A (en) Method and device used for managing memory resources
CN106874281B (en) Method and device for realizing database read-write separation
JP2015118609A (en) Method for searching tree using instruction for performing operation on data in predetermined multiple bit widths, computer for searching tree using instruction, and computer program therefor
WO2018040270A1 (en) Method and device for loading linux-system elf file in windows system
JP2023036774A (en) Access control method of shared memory, access control device of shared memory, electronic apparatus, and autonomous vehicle
CN111737564A (en) Information query method, device, equipment and medium
CN104903865B (en) Virtual machine VM images are applied to the method and system of computer system
EP3642740A1 (en) Method and system for emergency data destruction
US10757190B2 (en) Method, device and computer program product for scheduling multi-cloud system
CN110569218A (en) offline modification method and device for EXT file system and storage medium
US11687356B2 (en) Techniques for concurrently supporting virtual NUMA and CPU/memory hot-add in a virtual machine
CN113127430B (en) Mirror image information processing method, mirror image information processing device, computer readable medium and electronic equipment
CN107480269B (en) Object display method and system, medium and computing equipment
CN113836154A (en) Database switching method and device
US11366613B2 (en) Method and apparatus for writing data
CN108337317A (en) Method and device for processing route request
CN112835967B (en) Data processing method, device, equipment and medium based on distributed storage system
CN113885969A (en) Embedded device, embedded software loading method and storage medium
CN109902067B (en) File processing method and device, storage medium and computer equipment
US20110093834A1 (en) Using infeasible nodes to select branching variables

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210824

CF01 Termination of patent right due to non-payment of annual fee