Frequency determination method and device, electronic equipment and storage medium

By obtaining the control information of the camera application, the scheduling service determines the load information and control information of the system, the target frequency determination in the camera application scenario is realized, reducing system power consumption and improving system performance.

CN120508199APending Publication Date: 2025-08-19BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410185892.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-19
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The prior art cannot be applied to complex scenarios in system scheduling, which may increase system power consumption and reduce system performance.

Method used

By acquiring the control information sent by the camera application, the scheduling service obtains the system load information, determines the first frequency and the second frequency based on the load information and control information, and determines the target frequency from it through a frequency selection strategy, and the control system operates at the target frequency.

Benefits of technology

In camera application scenarios, system power consumption is reduced and system performance is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508199A_ABST
    Figure CN120508199A_ABST
Patent Text Reader

Abstract

The invention provides a frequency determination method and device, electronic equipment and a storage medium, and relates to the field of system scheduling. Comprising the following steps: in response to the obtained control information sent by a camera application, a scheduling service firstly obtains the current load information of a system, then determines a first frequency according to the load information, determines a second frequency according to the load information and the control information, then determines a target frequency from the first frequency and the second frequency, and sends the target frequency to the camera application; and finally controlling the system to operate at the target frequency. Therefore, the scheduling service determines the first frequency based on the load information, determines the second frequency based on the load information and the control information, then determines the target frequency from the first frequency and the second frequency through the frequency selection strategy, and controls the system to operate at the target frequency, thereby achieving the determination of the target frequency of the system in a camera application scene. The system power consumption is reduced, and the system performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of system scheduling technology, and in particular to a frequency determination method, device, electronic device, and storage medium. Background Art

[0002] In the field of system scheduling, the target frequency can typically be directly determined by counting the thread scheduling time and status, and then calculating the processor utilization. However, this method of determining the target frequency is not suitable for complex scenarios and may increase system power consumption and reduce system performance. Summary of the Invention

[0003] The present disclosure aims to solve one of the technical problems in the related art at least to a certain extent.

[0004] The first embodiment of the present disclosure provides a method for determining a frequency, including:

[0005] In response to obtaining the control information sent by the camera application, obtaining current load information of the system;

[0006] determining a first frequency according to the load information;

[0007] determining a second frequency according to the load information and the control information;

[0008] determining a target frequency from the first frequency and the second frequency;

[0009] The system is controlled to operate at the target frequency.

[0010] A second embodiment of the present disclosure provides a method for determining a frequency, including:

[0011] Determine the current running status of the camera application;

[0012] Determining first control information according to the operating state, wherein the first control information is used to assist the scheduling service in determining a system operating frequency;

[0013] The first control information is sent to the scheduling service.

[0014] A third embodiment of the present disclosure provides a frequency determination device, including:

[0015] an acquisition module, configured to acquire current load information of the system in response to acquiring control information sent by the camera application;

[0016] A first determining module, configured to determine a first frequency according to the load information;

[0017] A second determining module, configured to determine a second frequency according to the load information and the control information;

[0018] a third determining module, configured to determine a target frequency from the first frequency and the second frequency;

[0019] A control module is used to control the system to operate at the target frequency.

[0020] A fourth embodiment of the present disclosure provides a frequency determination device, including:

[0021] A fourth determining module, configured to determine a current operating state of the camera application;

[0022] a fifth determining module, configured to determine first control information according to the operating state, wherein the first control information is used to assist the scheduling service in determining a system operating frequency;

[0023] A sending module is used to send the first control information to the scheduling service.

[0024] The fifth embodiment of the present disclosure proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the frequency determination method proposed in the first embodiment of the present disclosure is implemented.

[0025] The sixth embodiment of the present disclosure proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the frequency determination method proposed in the first embodiment of the present disclosure.

[0026] The frequency determination method, device, electronic device and storage medium provided by the present disclosure have the following features:

[0027] Beneficial effects:

[0028] In the disclosed embodiment, in response to receiving control information sent by a camera application, the scheduling service first obtains the system's current load information, then determines a first frequency based on the load information, and then determines a second frequency based on the load information and the control information. The scheduling service then determines a target frequency from the first and second frequencies, and finally controls the system to operate at the target frequency. Thus, by determining the first frequency based on the load information, and the second frequency based on the load information and the control information, and then using a frequency selection strategy to determine the target frequency from the first and second frequencies, the scheduling service controls the system to operate at the target frequency, thereby achieving determination of the system's target frequency in camera application scenarios, reducing system power consumption, and improving system performance.

[0029] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The above and / or additional aspects and advantages of the present disclosure will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0031] Figure 1 A flowchart of a method for determining a frequency provided by an embodiment of the present disclosure;

[0032] Figure 2 A flowchart of a frequency determination method provided by another embodiment of the present disclosure;

[0033] Figure 3 A flowchart of a method for determining frequency provided in an embodiment of the present disclosure;

[0034] Figure 4 A flowchart of a frequency determination method provided by another embodiment of the present disclosure;

[0035] Figure 5 A flowchart of a frequency determination method provided by another embodiment of the present disclosure;

[0036] Figure 6 A flowchart of a frequency determination method provided by another embodiment of the present disclosure;

[0037] Figure 7 A flowchart of a frequency determination method provided by another embodiment of the present disclosure;

[0038] Figure 8 A flowchart of a frequency determination method provided by another embodiment of the present disclosure;

[0039] Figure 9 A schematic structural diagram of a frequency determination device provided by another embodiment of the present disclosure;

[0040] Figure 10 A schematic structural diagram of a frequency determination device provided by another embodiment of the present disclosure;

[0041] Figure 11 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0042] The following describes in detail embodiments of the present disclosure, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0043] The following describes a method, apparatus, electronic device, and storage medium for determining frequency according to embodiments of the present disclosure with reference to the accompanying drawings.

[0044] Figure 1 A flowchart of a frequency determination method provided by an embodiment of the present disclosure is provided.

[0045] The embodiment of the present disclosure takes the frequency determination method configured in a frequency determination device as an example for illustration. The frequency determination device can be applied to any electronic device so that the electronic device can perform the frequency determination function.

[0046] like Figure 1 As shown, the method for determining the frequency may include the following steps:

[0047] Step 101: In response to obtaining control information sent by a camera application, obtain current load information of the system.

[0048] Among them, the control information can be information that determines the system operating frequency for the auxiliary scheduling service.

[0049] In the present disclosure, when a user opens a camera application, the scheduler may receive control information sent from the camera application.

[0050] In some embodiments, the control information may include at least one of the following: first information for requesting application or release of system resources; the current frame variance of the camera application; algorithm information matching the current shooting mode of the camera application; and second information for controlling the running status of the scheduling service, which is not limited in this disclosure.

[0051] The first information may be active performance control information of the camera application. For example, the first information obtained by the scheduling service may be computing power information of an algorithm sent to the scheduling service before the camera application calls the algorithm, and the like. This disclosure does not limit this.

[0052] It should be noted that the first information can be determined based on the pre-configured association between the camera application scenario and the first information. The first information may be the same or different for different camera application scenarios, and this disclosure does not limit this.

[0053] In the present disclosure, when the scheduling service adjusts system resources based on the first information, compared with system-wide scheduling, it can reduce system delays, determine the system's target frequency more quickly, improve the system's response speed, and enable the system to exit the high-frequency state more quickly, thereby reducing power consumption.

[0054] The frame variance can be used to determine whether the current system performance meets the frame rate of the current target video stream. For example, the frame variance can include the average frame rate of the system over the past N frames, the frame loss interval, and the frame loss count, etc., where N can be any preset positive integer and is not limited in this disclosure.

[0055] The shooting mode may be any shooting mode of any application scenario of the camera application. For example, the current shooting mode of the camera application may be a photo mode, or a video mode, etc., which is not limited in this disclosure.

[0056] The algorithm information that matches the current shooting mode of the camera application can be any information that identifies the preset algorithm that matches the shooting mode. For example, the algorithm information can be the algorithm name, etc., which is not limited in this disclosure.

[0057] It should be noted that the algorithm information matching the current shooting mode of the camera application may include algorithm type, delay constraint, performance requirement level, etc., which is not limited in this disclosure.

[0058] The delay constraint may be any pre-configured delay threshold that can be used to detect system delays. The performance requirement level may be any system performance parameter corresponding to different camera application scenarios, which is not limited in this disclosure.

[0059] In the present disclosure, the algorithm information that matches the current shooting mode of the camera application can be paired with the first information. For example, when the control information includes the algorithm information, the control information can also include the first information corresponding to the algorithm information. This disclosure does not limit this.

[0060] It should be noted that when the control information includes the first information, the control information may include algorithm information that matches the current shooting mode of the camera application, or may not include algorithm information that matches the current shooting mode of the camera application. This disclosure does not limit this.

[0061] The second information may be any event information such as start, shut down, pause, resume, etc. that can control the running state of the scheduling service, and this disclosure does not limit this.

[0062] In the present disclosure, after obtaining the control information sent by the camera application, the scheduling service may first register a callback function, then apply for memory space based on the first information, and then obtain the current load information of the system.

[0063] Step 102: Determine a first frequency according to the load information.

[0064] The first frequency may be a system frequency generated based on a system frequency scheduler.

[0065] In the present disclosure, the scheduling service may determine the first frequency based on a pre-configured mapping relationship between load information and the first frequency, or may also determine the first frequency based on a preset algorithm and load information, which is not limited in the present disclosure.

[0066] Step 103: Determine a second frequency according to the load information and the control information.

[0067] The second frequency may be a frequency generated by a scheduling service.

[0068] In the present disclosure, the scheduling service can determine the second frequency based on a pre-configured mapping relationship between load information and control information and the second frequency, or can also determine the second frequency based on a preset algorithm and load information and control information. The present disclosure does not limit this.

[0069] In the present disclosure, when determining the second frequency, the scheduling service may first generate an impact factor for correcting the frequency based on the load information and the control information, and then multiply the impact factor by the first frequency to obtain the second frequency.

[0070] Step 104: Determine a target frequency from the first frequency and the second frequency.

[0071] The target frequency is the final frequency at which the system operates.

[0072] In the present disclosure, after determining the first frequency and the second frequency, the scheduling service may determine the target frequency based on a preset frequency selection strategy, which is not limited in the present disclosure.

[0073] In some possible implementation forms, the scheduling service may determine the target frequency from the first frequency and the second frequency according to the first frequency selection policy in the control information.

[0074] In the present disclosure, when the control information sent by the camera application to the scheduling service includes the first frequency selection policy, the scheduling service may determine the target frequency from the first frequency and the second frequency based on the first frequency selection policy.

[0075] In some possible implementations, the scheduling service may further determine a target frequency from the first frequency and the second frequency according to a preset second frequency selection strategy.

[0076] In the present disclosure, when the control information does not include the first frequency selection strategy, the scheduling service can determine the target frequency from the first frequency and the second frequency based on the preset second frequency selection strategy.

[0077] It should be noted that when the control information includes the first frequency selection strategy, the scheduling service can also determine the target frequency from the first frequency and the second frequency based on the first frequency selection strategy or the second frequency selection strategy according to system performance requirements. This disclosure does not limit this.

[0078] Step 105: The control system operates at the target frequency.

[0079] In the present disclosure, after determining the target frequency, the scheduling service can control the system to operate at the target frequency.

[0080] In the disclosed embodiment, in response to receiving control information sent by a camera application, the scheduling service first obtains the system's current load information, then determines a first frequency based on the load information, and then determines a second frequency based on the load information and the control information. The scheduling service then determines a target frequency from the first and second frequencies, and finally controls the system to operate at the target frequency. Thus, by determining the first frequency based on the load information, and the second frequency based on the load information and the control information, and then using a frequency selection strategy to determine the target frequency from the first and second frequencies, the scheduling service controls the system to operate at the target frequency, thereby achieving determination of the system's target frequency in camera application scenarios, reducing system power consumption, and improving system performance.

[0081] Figure 2 A flow chart of a method for determining a frequency provided by an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the method for determining the frequency may include the following steps:

[0082] Step 201 : In response to obtaining control information sent by a camera application, a processor state sampling service is started to read system operating parameters from a performance monitoring register of the system.

[0083] In the present disclosure, after obtaining the control information sent by the camera application, the scheduling service can start the processor state sampling service and read the system operating parameters from the system's performance monitoring register. This disclosure does not limit this.

[0084] It should be noted that when the control information includes event information that can control the operating state of the processor state sampling service, the processor state sampling service may determine whether to trigger reading of the system's operating parameters based on the event information. For example, when the event information included in the control information is a start event, the processor state sampling service may trigger reading of the system's operating parameters; when the event information included in the control information is a pause event, the processor state sampling service may pause reading of the system's operating parameters; when the event information included in the control information is a resume event, the processor state sampling service may resume reading of the system's operating parameters; when the event information included in the control information is a shutdown event, the processor state sampling service may stop reading of the system's operating parameters, and so on. This disclosure is not limited to this.

[0085] It should be noted that the processor state sampling service may also read the system's operating parameters from the system's performance monitoring registers based on a preset period, which is not limited in this disclosure.

[0086] In some possible implementations, the system operating parameters may include at least one of the following: pressure stagnation information PSI, processor pipeline operating status, data received from the camera application framework layer FWK, memory bandwidth, memory latency, thread scheduling latency, thread running and / or idle time, which is not limited in this disclosure.

[0087] PSI is the abbreviation of Pressure Stall Information (PSI).

[0088] Among them, FWK is the abbreviation of the camera application framework layer (Framework).

[0089] It should be noted that the data received from the camera application framework layer FWK may be configuration parameters and control information of the application scenario of the camera application, etc., which is not limited in this disclosure.

[0090] It should be noted that after reading the operating parameters of the system, the processor state sampling service can store the operating parameters in a preset data structure, which is not limited in this disclosure.

[0091] Step 202: Determine the current load information of the system according to the operating parameters of the system.

[0092] In the present disclosure, after the processor state sampling service stores the read system operating parameters in a data structure, the scheduling service can process the stored system operating parameters to obtain data that can be called for load tracking. The load tracking data can then be processed by a preset load correction algorithm to determine the current load information of the system and store it in a preset data structure. The present disclosure does not limit this.

[0093] Step 203: Determine a first frequency according to the load information.

[0094] Step 204: Determine a second frequency according to the load information and the control information.

[0095] Step 205: Determine a target frequency from the first frequency and the second frequency.

[0096] In step 206 , the control system operates at the target frequency.

[0097] The specific implementation of steps 203 to 206 can refer to the detailed description of other embodiments of the present disclosure and will not be repeated here.

[0098] The following combination Figure 3 , the frequency determination method provided by the embodiment of the present disclosure is described. Figure 3 A flowchart of a frequency determination method provided in an embodiment of the present disclosure.

[0099] like Figure 3 As shown, when the camera application is launched, the camera application framework layer sends control information to the scheduling service. This information may include first information for requesting or releasing system resources; the camera application's current frame variance; information about the algorithm that matches the camera application's current shooting mode; and second information for controlling the scheduling service's operating status. Upon receiving the control information, the scheduling service may first perform initialization actions, such as registering a callback function, allocating memory space, configuring a high-precision timer, starting the processor sampling service, and starting the load tracking service. The load correction service then corrects the load tracking data based on a preset load correction algorithm, obtains system load information, and stores it in a preset data structure. Based on the corrected load information and the received control information, the scheduling service generates an impact factor for frequency correction. The system frequency regulator then calculates a first frequency based on a preset mapping between load information and frequency. The scheduling service then multiplies the impact factor by the first frequency to obtain a second frequency generated by the scheduling service. Finally, based on a frequency selection strategy, a target frequency is determined from the first and second frequencies, serving as the final operating frequency for the system. This frequency, for example, serves as the target frequency for the dynamic voltage and frequency scaling (DVFS) system of the memory subsystem or the target frequency of the processor.

[0100] Among them, the processor sampling service can be triggered by external events or periodically read the system's operating parameters from the system's performance monitoring registers, store the operating parameters in a preset data structure, and then process the stored operating parameters to obtain data that can be used by the load tracking service.

[0101] The load tracking service may also include DVFS operating parameters, such as bandwidth prediction and delay constraint prediction.

[0102] The load correction service may also obtain the system's thread migration information through the load tracking service, make corrections, and feed the corrected thread migration information back to the system.

[0103] In the disclosed embodiment, in response to receiving control information sent by a camera application, the scheduling service first initiates a processor state sampling service to read the system's operating parameters from the system's performance monitoring registers, then determines the system's current load information based on the system's operating parameters, then determines a first frequency based on the load information, and then determines a second frequency based on the load information and the control information, and finally determines a target frequency from the first and second frequencies, and controls the system to operate at the target frequency. Thus, by initiating the processor state sampling service, reading the system's operating parameters, and determining the system's load information based on the system's operating parameters, then determining a first frequency based on the load information, and then determining a second frequency based on the load information and the control information, and finally determining a target frequency from the first and second frequencies, and finally controls the system to operate at the target frequency, thereby improving system performance and improving the efficiency of determining the system's target frequency in camera application scenarios.

[0104] Figure 4 A flow chart of a method for determining a frequency provided by an embodiment of the present disclosure is shown as follows: Figure 4 As shown, the method for determining the frequency may include the following steps:

[0105] Step 401: In response to obtaining the control information sent by the camera application, obtain the current load information of the system.

[0106] Step 402: Determine a first frequency according to the load information.

[0107] Step 403: Determine a second frequency according to the load information and the control information.

[0108] Step 404: Determine a target frequency from the first frequency and the second frequency.

[0109] Step 405: The control system operates at the target frequency.

[0110] The specific implementation of steps 401 to 405 can refer to the detailed description of other embodiments of the present disclosure and will not be repeated here.

[0111] Step 406 : In response to receiving the exit instruction information sent by the camera application, release the resources occupied by the scheduling service.

[0112] It should be noted that the exit instruction information may be indicated by a separate instruction information, or may be indicated by a second information, etc., and this disclosure does not limit this.

[0113] In the present disclosure, after receiving the exit instruction information sent by the camera application, the scheduling service can terminate its operation and release the occupied resources.

[0114] In the disclosed embodiment, in response to receiving control information sent by the camera application, the scheduling service first obtains the current system load information, then determines a first frequency based on the load information, and determines a second frequency based on the load information and the control information. It then determines a target frequency from the first and second frequencies, controls the system to operate at the target frequency, and finally, in response to receiving an exit instruction from the camera application, releases the resources occupied by the scheduling service. Thus, after determining the target frequency and controlling the system to operate at the target frequency, the scheduling service releases the occupied resources upon receiving the exit instruction from the camera application, thereby reducing system power consumption and improving resource utilization.

[0115] Figure 5 A flow chart of a method for determining a frequency provided by an embodiment of the present disclosure is shown as follows: Figure 5 As shown, the method for determining the frequency may include the following steps:

[0116] Step 501: In response to obtaining control information sent by the camera application, obtain current load information of the system.

[0117] Step 502: Determine a first frequency according to load information.

[0118] Step 503: Determine a second frequency according to the load information and the control information.

[0119] Step 504: Determine a target frequency from the first frequency and the second frequency.

[0120] Step 505: The control system operates at the target frequency.

[0121] The specific implementation of steps 501 to 505 can refer to the detailed description of other embodiments of the present disclosure and will not be repeated here.

[0122] Step 506 : In response to determining that the camera application exits, release the resources occupied by the scheduling service.

[0123] In the present disclosure, after the scheduling service controls the system to run at the target frequency, when it is determined that the camera application exits, the calling service can stop running and release the occupied resources.

[0124] In the disclosed embodiment, in response to receiving control information sent by a camera application, the scheduling service first obtains the current system load information, then determines a first frequency based on the load information, and then determines a second frequency based on the load information and the control information. The scheduling service then determines a target frequency from the first and second frequencies, controls the system to operate at the target frequency, and finally, in response to determining that the camera application has exited, releases the resources occupied by the scheduling service. Thus, after determining the target frequency and controlling the system to operate at the target frequency, the scheduling service releases the occupied resources when determining that the camera application has exited, thereby reducing system power consumption and improving resource utilization.

[0125] Figure 6 A flow chart of a method for determining a frequency provided by an embodiment of the present disclosure is shown as follows: Figure 6 As shown, the method for determining the frequency may include the following steps:

[0126] Step 601: Determine the current running status of the camera application.

[0127] It should be noted that the current running state of the camera application can be any running state. For example, the current running state of the camera application can be the starting state, or it can also be the shooting running state, or it can also be the paused state, or it can also be the closed state, etc., which is not limited in this disclosure.

[0128] Step 602: Determine first control information according to the operating state, wherein the first control information is used to assist the scheduling service in determining the system operating frequency.

[0129] It should be noted that, depending on the current running state of the camera application, the determined first control information may be different or the same, and this disclosure does not limit this.

[0130] In some possible implementations, the camera application may determine the first control information according to a currently selected shooting mode when the running state is the startup state.

[0131] In the present disclosure, when the running state of the camera application is the startup state, the camera application can determine the system resources that need to be applied for, the algorithm information matching the shooting mode, and the startup scheduling service based on the shooting mode that is currently selected. At this time, the determined first control information may include first information for applying for system resources, algorithm information matching the shooting mode that is currently selected, and second information for controlling the startup of the scheduling service, etc. This disclosure does not limit this.

[0132] In some possible implementation forms, the camera application may further determine the first control information according to the current shooting mode and the frame variance in the shooting mode when the running state is the shooting running state.

[0133] It should be noted that the frame variance in the shooting mode can be obtained by sampling and counting the system frame rate after the camera application runs in the current shooting mode for a period of time, and the present disclosure does not limit this.

[0134] In the present disclosure, when the running state of the camera application is the shooting running state, in order to improve the camera performance and enhance the user experience, the camera application can determine the frame variance in the shooting mode after running for a period of time, and feed it back to the scheduling module, so that the scheduling module can adjust the frequency of the system in real time. At this time, the determined first control information may include the frame variance of the camera application in the current shooting mode, algorithm information matching the current shooting mode, second information for controlling the running state of the scheduling service, etc., and the present disclosure does not limit this.

[0135] Step 603: Send the first control information to the scheduling service.

[0136] In the present disclosure, after determining the first control information, the camera application may send the first control information to the scheduling service.

[0137] In the disclosed embodiment, the camera application first determines the current operating state, then determines first control information based on the operating state, and then sends the first control information to the scheduling service. Thus, the camera application determines the control information based on the current operating state and sends it to the scheduling service, thereby providing a condition for determining the target frequency of the system in the camera application scenario and improving the user experience.

[0138] Figure 7 A flow chart of a method for determining a frequency provided by an embodiment of the present disclosure is shown as follows: Figure 7 As shown, the method for determining the frequency may include the following steps:

[0139] Step 701: Determine the current running status of the camera application.

[0140] The specific implementation of step 701 can refer to the detailed description of other embodiments of the present disclosure and will not be repeated here.

[0141] Step 702: In response to the camera application being in a paused state, send a pause indication message to the scheduling service.

[0142] It should be noted that the pause indication information can be indicated through a separate indication information, or can also be indicated through a second information, etc., and this disclosure does not limit this.

[0143] In the present disclosure, when the camera application is currently in a pause state, the camera application may send pause indication information to the scheduling service to instruct the scheduling service to suspend operation.

[0144] In the disclosed embodiment, the current running state of the camera application is first determined, and in response to the camera application being in a paused state, the camera application sends a pause indication message to the scheduling service. Thus, when the camera application is in a paused state, the camera application sends the pause indication message to the scheduling service, thereby providing conditions for improving system performance.

[0145] Figure 8 A flow chart of a method for determining a frequency provided by an embodiment of the present disclosure is shown as follows: Figure 8 As shown, the method for determining the frequency may include the following steps:

[0146] Step 801: Determine the current running status of the camera application.

[0147] The specific implementation of step 801 can refer to the detailed description of other embodiments of the present disclosure and will not be repeated here.

[0148] Step 802: In response to receiving the camera application exit instruction, send exit instruction information to the scheduling service.

[0149] In the present disclosure, when receiving a camera application exit instruction, the camera application may send a separate exit instruction message to the scheduling service for instruction, or may send an exit instruction message to the scheduling service through a second message, etc., which is not limited in the present disclosure.

[0150] In the disclosed embodiment, the current operating state of the camera application is first determined, and in response to receiving a camera application exit instruction, an exit instruction is sent to the scheduling service. Thus, upon receiving the camera application exit instruction, the camera application sends the exit instruction to the scheduling service, thereby providing conditions for reducing system power consumption.

[0151] In order to implement the above embodiment, the present disclosure further proposes a frequency determination device.

[0152] Figure 9 A schematic diagram of the structure of a frequency determination device provided in an embodiment of the present disclosure.

[0153] like Figure 9 As shown, the frequency determination device 900 may include: an acquisition module 901 , a first determination module 902 , a second determination module 903 , a third determination module 904 , and a control module 905 .

[0154] An acquisition module 901 is configured to acquire current load information of the system in response to acquiring control information sent by the camera application;

[0155] A first determining module 902 is configured to determine a first frequency according to load information;

[0156] A second determining module 903 is configured to determine a second frequency according to the load information and the control information;

[0157] A third determining module 904 is configured to determine a target frequency from the first frequency and the second frequency;

[0158] The control module 905 is used to control the system to operate at a target frequency.

[0159] Optionally, the control information includes at least one of the following:

[0160] First information for requesting to apply for or release system resources;

[0161] The camera applies the current frame variance;

[0162] Algorithm information matching the current shooting mode of the camera application;

[0163] The second information is used to control the running state of the scheduling service.

[0164] Optionally, the acquisition module 901 is further configured to:

[0165] Start the processor status sampling service to read the system's operating parameters from the system's performance monitoring registers;

[0166] Determine the current load information of the system based on the system's operating parameters.

[0167] Optionally, the operating parameters of the system include at least one of the following:

[0168] Pressure stagnation information PSI, processor pipeline operation status, data received from the camera application framework layer FWK, memory bandwidth, memory latency, thread scheduling latency, thread running and / or idle time.

[0169] Optionally, the third determining module 904 is further configured to:

[0170] Determine the target frequency from the first frequency and the second frequency according to the first frequency selection strategy in the control information; or

[0171] According to a preset second frequency selection strategy, a target frequency is determined from the first frequency and the second frequency.

[0172] Optionally, it also includes:

[0173] A first releasing module (not shown in the figure) is configured to release the resources occupied by the scheduling service in response to receiving the exit instruction information sent by the camera application; or

[0174] The second releasing module (not shown in the figure) is configured to release the resources occupied by the scheduling service in response to determining that the camera application has exited.

[0175] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments and will not be repeated here.

[0176] In the frequency determination device of the disclosed embodiment, in response to receiving control information sent by a camera application, the scheduling service first obtains the current load information of the system, then determines a first frequency based on the load information, and then determines a second frequency based on the load information and the control information. The target frequency is then determined from the first and second frequencies, and the system is finally controlled to operate at the target frequency. Thus, by determining the first frequency based on the load information, and the second frequency based on the load information and the control information, and then determining the target frequency from the first and second frequencies through a frequency selection strategy, the scheduling service controls the system to operate at the target frequency, thereby achieving determination of the system's target frequency in camera application scenarios, reducing system power consumption, and improving system performance.

[0177] In order to implement the above embodiment, the present disclosure further proposes a frequency determination device.

[0178] Figure 10 A schematic diagram of the structure of a frequency determination device provided in an embodiment of the present disclosure.

[0179] like Figure 10 As shown, the frequency determination device 1000 may include: a fourth determination module 1001 , a fifth determination module 1002 , and a sending module 1003 .

[0180] The fourth determining module 1001 is used to determine the current running state of the camera application;

[0181] A fifth determining module 1002 is configured to determine first control information based on the operating state, wherein the first control information is used to assist the scheduling service in determining the system operating frequency;

[0182] The sending module 1003 is configured to send the first control information to the scheduling service.

[0183] Optionally, the fifth determining module 1002 is further configured to:

[0184] In the case where the running state is the startup state, determining the first control information according to the shooting mode currently selected; or

[0185] When the running state is the shooting running state, the first control information is determined according to the current shooting mode and the frame variance in the shooting mode.

[0186] Optionally, the control information includes at least one of the following:

[0187] First information for requesting to apply for or release system resources;

[0188] The camera applies the current frame variance;

[0189] Algorithm information matching the current shooting mode of the camera application;

[0190] The second information is used to control the running state of the scheduling service.

[0191] Optionally, the sending module 1003 is further configured to:

[0192] In response to the camera application being in a paused state, sending a pause indication message to the scheduling service; or,

[0193] In response to receiving the camera application exit instruction, an exit instruction message is sent to the scheduling service.

[0194] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments and will not be repeated here.

[0195] In the frequency determination device of the disclosed embodiment, the camera application first determines the current operating state, then determines first control information based on the operating state, and then sends the first control information to the scheduling service. Thus, the camera application determines the control information based on the current operating state and sends it to the scheduling service, thereby providing conditions for determining the system's target frequency in the camera application scenario and improving the user experience.

[0196] In order to implement the above embodiments, the present disclosure further proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the frequency determination method proposed in the above embodiments of the present disclosure is implemented.

[0197] In order to implement the above embodiments, the present disclosure further proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the frequency determination method proposed in the above embodiments of the present disclosure is implemented.

[0198] Figure 11 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Figure 11 The electronic device 12 shown is only an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.

[0199] like Figure 11As shown, electronic device 12 is implemented as a general-purpose computing device. Components of electronic device 12 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and a bus 18 that connects various system components (including system memory 28 and processing unit 16).

[0200] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of such architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnection (PCI) bus.

[0201] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0202] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 40 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be configured to read and write non-removable, non-volatile magnetic media ( Figure 11 Not shown, often called a "hard drive"). Although Figure 11Although not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a Compact Disc Read Only Memory (hereinafter referred to as: CD-ROM), a Digital Video Disc Read Only Memory (hereinafter referred to as: DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present disclosure.

[0203] A program / utility 50 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 42 generally implement the functions and / or methods of the embodiments described herein.

[0204] The electronic device 12 can also communicate with one or more external devices 14 (e.g., a keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and / or any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). This communication can occur via an input / output (I / O) interface 22. Furthermore, the electronic device 12 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that, although not shown, other hardware and / or software modules can be used in conjunction with the electronic device 12, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0205] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the above embodiments.

[0206] In the technical solution disclosed herein, in response to receiving control information sent by a camera application, the scheduling service first obtains the system's current load information. It then determines a first frequency based on the load information, and a second frequency based on the load information and the control information. It then determines a target frequency from the first and second frequencies, and finally controls the system to operate at the target frequency. Thus, by determining the first frequency based on the load information, and the second frequency based on the load information and the control information, and then using a frequency selection strategy to determine the target frequency from the first and second frequencies, the scheduling service controls the system to operate at the target frequency. This achieves the determination of the system's target frequency in camera application scenarios, reduces system power consumption, and improves system performance.

[0207] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and features of different embodiments or examples, unless they are mutually inconsistent.

[0208] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0209] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.

[0210] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and a portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.

[0211] It should be understood that various parts of the present disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0212] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0213] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.

[0214] The storage medium mentioned above may be a read-only memory, a magnetic disk, or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. A person of ordinary skill in the art may make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.

Claims

1. A method for determining frequency, characterized in that: The method comprises: In response to obtaining the control information sent by the camera application, obtaining current load information of the system; determining a first frequency according to the load information; determining a second frequency according to the load information and the control information; determining a target frequency from the first frequency and the second frequency; The system is controlled to operate at the target frequency.

2. The method according to claim 1, wherein The control information includes at least one of the following: First information for requesting to apply for or release system resources; The camera applies the current frame variance; Algorithm information matching the current shooting mode of the camera application; Second information used to control the running state of the scheduling service.

3. The method according to claim 1, wherein The obtaining of the current load information of the system includes: Starting a processor state sampling service to read operating parameters of the system from a performance monitoring register of the system; The current load information of the system is determined according to the operating parameters of the system.

4. The method according to claim 3, wherein The operating parameters of the system include at least one of the following: Pressure stagnation information PS I, processor pipeline operation status, data received from the camera application framework layer FWK, memory bandwidth, memory latency, thread scheduling latency, thread running and / or idle time.

5. The method according to claim 1, wherein The determining of a target frequency from the first frequency and the second frequency includes: determining a target frequency from the first frequency and the second frequency according to the first frequency selection strategy in the control information; or According to a preset second frequency selection strategy, a target frequency is determined from the first frequency and the second frequency.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: In response to receiving the exit instruction information sent by the camera application, releasing the resources occupied by the scheduling service; or, In response to determining that the camera application exits, resources occupied by the scheduling service are released.

7. A method for determining frequency, characterized in that: The method comprises: Determine the current running status of the camera application; Determining first control information according to the operating state, wherein the first control information is used to assist the scheduling service in determining a system operating frequency; The first control information is sent to the scheduling service.

8. The method according to claim 7, wherein The determining the first control information according to the operating state includes: In the case where the running state is the startup state, determining the first control information according to the shooting mode currently selected; or When the operating state is a shooting operating state, the first control information is determined according to the current shooting mode and the frame variance in the shooting mode.

9. The method according to claim 7 or 8, wherein The control information includes at least one of the following: First information for requesting to apply for or release system resources; The camera applies the current frame variance; Algorithm information matching the current shooting mode of the camera application; Second information used to control the running state of the scheduling service.

10. The method according to claim 7 or 8, characterized in that The method further comprises: In response to the camera application being in a paused state, sending a pause indication message to the scheduling service; or, In response to receiving the camera application exit instruction, an exit instruction message is sent to the scheduling service.

11. A frequency determination device, characterized in that: The device comprises: an acquisition module, configured to acquire current load information of the system in response to acquiring control information sent by the camera application; A first determining module, configured to determine a first frequency according to the load information; A second determining module, configured to determine a second frequency according to the load information and the control information; a third determining module, configured to determine a target frequency from the first frequency and the second frequency; A control module is used to control the system to operate at the target frequency.

12. A frequency determination device, characterized in that: The device comprises: A fourth determining module, configured to determine a current operating state of the camera application; a fifth determining module, configured to determine first control information according to the operating state, wherein the first control information is used to assist the scheduling service in determining a system operating frequency; A sending module is used to send the first control information to the scheduling service.

13. An electronic device, characterized in that: The system comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for determining the frequency according to any one of claims 1 to 10 is implemented.

14. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the frequency determination method according to any one of claims 1 to 10 is implemented.