Frequency limiting control method and electronic device

By using frequency limiting control methods to dynamically adjust the CPU frequency of electronic devices, the problem of increased power consumption and performance loss caused by the use of video processing algorithms in the gallery business was solved, thus improving both power consumption and performance.

CN120669841BActive Publication Date: 2026-08-04HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-03-11
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

When electronic devices invoke video processing algorithms in gallery services, it leads to increased power consumption and performance loss, which existing technologies have not been able to effectively solve.

Method used

A frequency limiting control method is provided, which dynamically adjusts the CPU frequency of electronic devices by acquiring frequency limiting trigger scenarios, determines the frequency limiting operation mode according to the frequency limiting trigger scenarios, and controls the electronic devices to operate under the frequency limiting conditions, thereby reducing power consumption and heat generation.

Benefits of technology

It effectively reduces the power consumption and heat generation of electronic devices, improves performance and stability, and avoids performance loss or resource waste caused by excessively high or low frequencies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120669841B_ABST
    Figure CN120669841B_ABST
Patent Text Reader

Abstract

The application discloses a frequency limiting control method and electronic equipment, and belongs to the technical field of electronic equipment. The frequency limiting control method is applied to the electronic equipment and includes the following steps: acquiring a frequency limiting trigger scenario of the electronic equipment; in the case where it is determined that the electronic equipment meets a frequency limiting condition according to the frequency limiting trigger scenario, determining a frequency limiting operation mode of the electronic equipment according to the frequency limiting trigger scenario; and controlling the electronic equipment to operate based on the frequency limiting operation mode. In the case where the electronic equipment meets the frequency limiting condition, the frequency limiting operation mode of the electronic equipment is determined according to the frequency limiting trigger scenario, so that the frequency limiting control can be performed on the electronic equipment according to the frequency limiting operation mode required by the equipment, the power consumption and heat generation are reduced, and the performance and stability of the electronic equipment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic equipment technology, and in particular to a frequency limiting control method and electronic equipment. Background Technology

[0002] Video is one of the main mediums for people to obtain information and enjoy entertainment in daily life. With the improvement of client hardware performance and the continuous advancement of artificial intelligence technology, the demand for quickly generating videos through electronic devices is increasing day by day.

[0003] Currently, in the process of electronic devices calling video processing algorithms to analyze photos and videos in the gallery business, continuous calls will lead to increased power consumption and performance loss of electronic devices. Summary of the Invention

[0004] This application provides a frequency limiting control method and an electronic device. The frequency limiting control method can flexibly adjust the CPU frequency of the electronic device according to its actual frequency limiting requirements, reducing power consumption and heat generation, and avoiding performance loss or resource waste caused by excessively high or low frequencies. The technical solution is as follows:

[0005] The first aspect of this application provides a frequency limiting control method applied to electronic devices, comprising:

[0006] Obtain the frequency limiting trigger scenarios of electronic devices;

[0007] If the frequency limiting conditions are met based on the frequency limiting trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the frequency limiting trigger scenario.

[0008] The electronic device is controlled to operate based on the frequency-limited operation mode.

[0009] The frequency limiting control method provided in this application can be applied to various scenarios where electronic devices need to operate with frequency limits. For example, in scenarios where electronic devices call image processing algorithms (such as the algorithms involved in the "Smart Filmmaking" skill option, which integrates image search and video creation functions) to perform image analysis and video generation, the CPU frequency of the electronic device will be dynamically adjusted if the frequency limiting conditions are met, so as to reduce power consumption and heat generation.

[0010] In this implementation, frequency limiting trigger scenarios can be divided into foreground trigger scenarios and background trigger scenarios. The frequency limiting trigger scenario determines whether the electronic device meets the frequency limiting conditions. If the frequency limiting conditions are met, the frequency limiting operation mode of the electronic device is then determined based on the frequency limiting trigger scenario. This allows for determining whether frequency limiting control is needed for the electronic device based on its current operating state, thereby reducing power consumption and heat generation, and improving the performance and stability of the electronic device.

[0011] According to the first aspect, or any implementation of the first aspect above, the method further includes: in response to the electronic device's call to the image processing algorithm, triggering the detection of a frequency limiting trigger scenario of the electronic device.

[0012] In this implementation, the frequency limiting trigger scenario of the electronic device can be dynamically triggered based on whether the electronic device calls the image processing algorithm.

[0013] While the electronic device is running, it monitors for any calls to image processing algorithms, such as opening the camera, browsing photos, or editing images. If a call to an image processing algorithm is detected, or if the image processing algorithm is being used by the electronic device, the current operating state of the electronic device is determined to decide whether frequency limiting is necessary.

[0014] According to the first aspect, or any implementation of the first aspect above, the method further includes:

[0015] While the electronic device is charging, in response to detecting that the device temperature of the electronic device is lower than a first temperature, the foreground call operation of the electronic device to the image processing algorithm is monitored.

[0016] When the electronic device is not charging, in response to detecting that the device temperature of the electronic device is lower than the first temperature and the battery power of the electronic device is greater than the first power, the foreground call operation of the electronic device to the image processing algorithm is monitored.

[0017] In this implementation, while the electronic device is running, the system determines whether to monitor foreground operations of the image processing algorithm by the electronic device based on whether the device is charging, its temperature, and battery level. Foreground operations refer to the electronic device running image processing algorithms on the user-visible interface, such as taking photos, browsing photos, and editing images.

[0018] According to the first aspect, or any implementation of the first aspect above, the method further includes:

[0019] During the restricted call period of the electronic device, in response to detecting that the battery level of the electronic device is greater than the second battery level and the device temperature is less than the fourth temperature when the screen is off and charging, the background call operation of the electronic device to the image processing algorithm is monitored, wherein the second battery level is greater than the first battery level;

[0020] During the unrestricted call period of the electronic device, in response to detecting that the electronic device is charging with the screen off, the background call operation of the electronic device to the image processing algorithm is monitored.

[0021] In this implementation, the decision to monitor background operations of the image processing algorithm by the electronic device is based on the restricted and unrestricted call periods of the electronic device, as well as the battery level and temperature of the electronic device. The restricted call period can be the nighttime hours of each day, for example, the period from 1:00 AM to 5:00 AM; the unrestricted call period can be the daytime hours of each day, for example, the period outside of 1:00 AM to 5:00 AM. It should be understood that the above example is only for illustrating this implementation method and for ease of understanding, but actual application scenarios are not limited to this.

[0022] For example, background image processing algorithm calls refer to the operation of an electronic device running image processing algorithms on an interface that is not visible to the user, such as background updates, background recognition, background compression, etc.

[0023] According to the first aspect, or any implementation of the first aspect above, determining that the electronic device meets the frequency limiting condition based on the frequency limiting trigger scenario includes:

[0024] When the frequency limiting trigger scenario is a foreground trigger scenario, in response to detecting that the device temperature of the electronic device is greater than the second temperature, it is determined that the electronic device meets the frequency limiting condition;

[0025] When the frequency limiting trigger scenario is a background trigger scenario, in response to detecting that the battery power of the electronic device decreases when the screen is off and charging, it is determined that the electronic device meets the frequency limiting condition.

[0026] In one example, frequency limiting triggering scenarios can be divided into foreground triggering scenarios and background triggering scenarios. Foreground triggering scenarios refer to situations where the electronic device is in a user-operated state, such as browsing the web, playing games, or watching videos. Background triggering scenarios refer to situations where the electronic device is in a non-user-operated state, such as locking the screen, charging, or running applications in the background.

[0027] Based on different triggering scenarios and frequency limiting conditions, the processor frequency of electronic devices is dynamically adjusted to protect the security and performance of electronic devices and improve the user experience of using electronic devices to call image processing algorithms to process images or generate videos.

[0028] According to the first aspect, or any implementation of the first aspect above, determining the frequency-limiting operation mode of the electronic device based on the frequency-limiting trigger scenario includes:

[0029] When the frequency limiting trigger scenario is a foreground trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the device temperature of the electronic device;

[0030] When the frequency limiting trigger scenario is a background trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the number of times the battery power of the electronic device decreases during the monitoring period of the screen-off charging.

[0031] According to the first aspect, or any implementation of the first aspect above, the frequency-limited operation mode of the electronic device includes:

[0032] The duration of each call to the image processing algorithm by the electronic device, and the sleep duration after each call to the image processing algorithm.

[0033] According to the first aspect, or any implementation of the first aspect above, determining the frequency-limited operation mode of the electronic device based on the device temperature of the electronic device includes:

[0034] In response to detecting that the device temperature of the electronic device is greater than a second temperature and less than a third temperature, a first frequency-limiting operation mode of the electronic device is determined. The first frequency-limiting operation mode is that the electronic device sleeps for a first duration after each first duration of the image processing algorithm is called.

[0035] In response to detecting that the device temperature of the electronic device is greater than the third temperature and less than the first temperature, a second frequency-limiting operation mode of the electronic device is determined. The second frequency-limiting operation mode is that the electronic device sleeps for a second duration after each first duration of the image processing algorithm is invoked by the electronic device.

[0036] Wherein, the second duration is greater than the first duration, the second temperature is less than the third temperature, and the third temperature is less than the first temperature.

[0037] According to the first aspect, or any implementation of the first aspect above, the method further includes:

[0038] When the electronic device is controlled to operate based on the first frequency-limited operation mode, the device temperature of the electronic device is re-detected;

[0039] If the device temperature of the electronic device decreases and the total duration of operation of the electronic device based on the first frequency limiting operation mode is greater than the fourth duration, the frequency limiting operation control of the electronic device will be released.

[0040] According to the first aspect, or any implementation of the first aspect above, the method further includes:

[0041] When the electronic device is controlled to operate based on the second frequency-limited operation mode, the device temperature of the electronic device is re-detected;

[0042] If the device temperature of the electronic device is lower than the first temperature, and the total duration of operation of the electronic device based on the first frequency limiting mode is greater than the fourth duration, the frequency limiting mode of the electronic device shall be redefined.

[0043] If the device temperature of the electronic device is higher than the first temperature, the electronic device shall stop calling the image processing algorithm.

[0044] According to the first aspect, or any implementation of the first aspect above, the method further includes:

[0045] In response to the detection that the device temperature of the electronic device is greater than the first temperature, the invocation of the image processing algorithm is stopped.

[0046] According to the first aspect, or any implementation of the first aspect above, determining the frequency-limiting operation mode of the electronic device based on the number of times the battery power decreases during the monitoring period of screen-off charging includes:

[0047] When the number of times the battery power drops reaches the first count, it is determined that after each first duration of calling the image processing algorithm, the electronic device will sleep for a third duration, wherein the third duration is shorter than the first duration.

[0048] When the number of times the battery power decreases reaches the second count, the electronic device shall enter a sleep state for a first duration after each invocation of the image processing algorithm.

[0049] When the battery power decreases for the third time, it is determined that the electronic device will go into sleep mode for a fourth time after each time the image processing algorithm is invoked, wherein the fourth time is longer than the first time.

[0050] When the number of times the battery power decreases reaches the fourth time, it is determined that after each first time the image processing algorithm is invoked, the electronic device will sleep for a second time, wherein the second time is longer than the fourth time.

[0051] Wherein, the second number is greater than the first number, the third number is greater than the second number, and the fourth number is greater than the third number.

[0052] According to the first aspect, or any implementation of the first aspect above, the method further includes:

[0053] In response to the electronic device's stop calling of the image processing algorithm, the frequency limiting control of the electronic device is released.

[0054] A second aspect of this application provides a frequency-limiting operation device applied to electronic equipment, comprising:

[0055] The acquisition unit is used to acquire the frequency-limiting trigger scenario of the electronic device;

[0056] The determining unit is configured to determine the frequency-limiting operation mode of the electronic device based on the frequency-limiting trigger scenario, provided that the electronic device meets the frequency-limiting conditions based on the frequency-limiting trigger scenario.

[0057] The control unit is used to control the electronic device to operate based on the frequency-limited operation mode.

[0058] The second aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the second aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.

[0059] Thirdly, an electronic device is provided, including a module / unit for performing the first aspect or any of the methods in the first aspect.

[0060] Fourthly, an electronic device is provided, including one or more processors and a memory;

[0061] The memory is coupled to one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the first aspect or any of the methods in the first aspect.

[0062] Fifthly, a chip system is provided, the chip system being applied to an electronic device, the chip system including one or more processors, the processors being configured to invoke computer instructions to cause the electronic device to perform the first aspect or any of the methods in the first aspect.

[0063] In a sixth aspect, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the first aspect or any one of the methods in the first aspect.

[0064] In a seventh aspect, a computer program product is provided, the computer program product comprising: computer program code, which, when executed by an electronic device, causes the electronic device to perform the first aspect or any one of the methods in the first aspect.

[0065] This application provides a frequency limiting control method applied to an electronic device, which acquires the frequency limiting trigger scenario of the electronic device; when it is determined that the electronic device meets the frequency limiting conditions according to the frequency limiting trigger scenario, the frequency limiting operation mode of the electronic device is determined according to the frequency limiting trigger scenario; and the electronic device is controlled to operate based on the frequency limiting operation mode.

[0066] In this frequency limiting control method, the frequency limiting trigger scenarios can be divided into foreground trigger scenarios and background trigger scenarios. The frequency limiting trigger scenario determines whether the electronic device meets the frequency limiting conditions. If the frequency limiting conditions are met, the frequency limiting operation mode of the electronic device is then determined based on the frequency limiting trigger scenario. This allows for determining whether frequency limiting control is needed for the electronic device based on its current operating state, thereby reducing power consumption and heat generation, and improving the performance and stability of the electronic device.

[0067] Since the electronic device includes the frequency limiting control method described above, it possesses at least all the beneficial effects of the frequency limiting control method, which will not be elaborated further here. Attached Figure Description

[0068] Figure 1 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application;

[0069] Figure 2 A software structure block diagram of the electronic device 100 provided in the embodiments of this application;

[0070] Figure 3a This is a schematic diagram of an optional intelligent film-making scenario provided in an embodiment of this application;

[0071] Figure 3b This application provides a schematic diagram illustrating the process of an electronic device calling an image processing algorithm.

[0072] Figure 4 This illustration shows a process for determining frequency limiting conditions and frequency limiting operation mode based on a frequency limiting trigger scenario according to an embodiment of this application;

[0073] Figure 5 This illustration shows a process for determining the frequency-limiting operation mode in a foreground-triggered scenario according to an embodiment of this application.

[0074] Figure 6 This illustration shows a process for determining the frequency-limiting operation mode in a background-triggered scenario according to an embodiment of this application.

[0075] Figure 7 This illustration shows a schematic diagram of the frequency-limited operation process of an electronic device in a foreground-triggered scenario according to an embodiment of this application;

[0076] Figure 8This illustration shows a schematic diagram of another electronic device operating with frequency limiting in a foreground-triggered scenario, according to an embodiment of this application.

[0077] Figure 9 This illustration shows a schematic diagram of the frequency-limiting operation process of an electronic device in a background-triggered scenario according to an embodiment of this application;

[0078] Figure 10 This illustration shows a schematic diagram of another electronic device operating with frequency limiting in a background trigger scenario, according to an embodiment of this application. Detailed Implementation

[0079] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0080] It should be understood that "multiple" as mentioned in this application refers to two or more. In the description of this application, unless otherwise stated, " / " means "or", for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone.

[0081] Furthermore, to facilitate a clear description of the technical solutions of this application, terms such as "first" and "second" are used to distinguish identical or similar items with substantially the same function and effect. The terms "first" and "second," etc., in the specification and claims of the embodiments of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.

[0082] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0083] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.

[0084] First, some terms used in the embodiments of this application will be explained to facilitate understanding by those skilled in the art.

[0085] RateLimiter refers to limiting the frequency of requests to a certain resource or interface. It can be understood as distributing permits at a specified rate. When a request comes in, the thread will block until it obtains an available permit. After using these permits, no release operation is required.

[0086] Contrastive Language-Image Pre-training (CLIP) is an effective and scalable multimodal pre-training method or model that learns from natural language supervision. It is implemented in parallel based on images and text, and constructs the training target by calculating the similarity between the feature vectors of the two branches.

[0087] The Basic Input Output System (BIOS) is an industry-standard firmware interface for compatible systems.

[0088] The above is a brief introduction to the terms used in the embodiments of this application, and will not be repeated below.

[0089] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of the electronic device 100 provided in an embodiment of this application. Optionally, the electronic device 100 can be referred to as a terminal or a terminal device. The specific product form of the electronic device 100 can be a smart terminal, such as a mobile phone, tablet computer, wearable device, augmented reality / virtual reality device, laptop computer, in-vehicle device, personal digital assistant (PDA), or other electronic devices with frequency limiting operation function. Specifically, the functional modules involved in this application can be deployed on the DSP chip of the relevant device, specifically as the application program or software therein. A frequency limiting control method function can be implemented through software installation or upgrade, and through hardware calls and cooperation.

[0090] It should be understood that, Figure 1 The electronic device 100 shown is only one example of an electronic device, and the electronic device 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. Figure 1 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0091] Electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. Among them, sensor module 180 may include pressure sensor, gyroscope sensor, accelerometer sensor, temperature sensor, motion sensor, barometric pressure sensor, magnetic sensor, distance sensor, proximity sensor, fingerprint sensor, touch sensor, ambient light sensor, bone conduction sensor, etc.

[0092] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, memory, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0093] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0094] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory.

[0095] USB interface 130 is an interface that conforms to the USB standard specification, specifically it can be a Mini USB interface, Micro USB interface, USB Type C interface, etc.

[0096] The charging management module 140 receives charging input from a charger, which can be a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 can also power the electronic device via the power management module 141. The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and powers the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc.

[0097] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.

[0098] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0099] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.

[0100] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.

[0101] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0102] Electronic device 100 implements display functions through a GPU, display screen 194, and application processor. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0103] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0104] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0105] The ISP is used to process data fed back from the camera. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's image sensor. The light signal is converted into an electrical signal, and the image sensor transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye.

[0106] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard formats such as RGB and YUV. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0107] The camera 193 can be located at the edge of the electronic device, and can be an under-display camera or a pop-up camera. The camera 193 may include a rear-facing camera, or a rear-facing camera. This application embodiment does not limit the specific location and shape of the camera 193. The electronic device 100 may include one or more cameras with different focal lengths, such as telephoto cameras, wide-angle cameras, ultra-wide-angle cameras, or panoramic cameras.

[0108] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions.

[0109] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121, such as enabling the electronic device 100 to implement the frequency limiting control method in this embodiment. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.). Furthermore, the internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0110] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170 and application processor.

[0111] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0112] A touch sensor, also known as a "touch panel," can be located on the display screen 194. The touch sensor and display screen 194 together form a touchscreen, also called a "touch screen." The touch sensor detects touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194.

[0113] A pressure sensor is used to sense pressure signals and can convert these signals into electrical signals. In some embodiments, the pressure sensor may be located on the display screen 194. The electronic device 100 may also calculate the position of a touch based on the detection signal from the pressure sensor.

[0114] A gyroscope sensor can be used to determine the motion attitude of an electronic device 100. In some embodiments, the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor.

[0115] An accelerometer can detect the magnitude of acceleration of an electronic device 100 in various directions (typically three axes). When the electronic device 100 is stationary, the accelerometer can detect the magnitude and direction of gravity. Accelerometers can also be used to identify the posture of electronic devices, and are applied in applications such as screen orientation switching and pedometers.

[0116] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0117] The software system of electronic device 100 will be described next. The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to illustrate the software structure of electronic device 100.

[0118] like Figure 2 The software architecture diagram of the illustrative electronic device 100 illustrates a layered architecture that divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime, the system layer, and the kernel layer.

[0119] The application layer can include a series of application packages, such as Figure 2 As shown, the application package may include applications such as gallery, authoring assistant, quick app engine, and light editing services.

[0120] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer, including various components and services to support Android development. The application framework layer includes some predefined functions. For example... Figure 2 As shown, the application framework layer may include a window manager, content provider, notification manager, resource manager, search engine, learning memory library, and visual image module, etc.

[0121] It should be noted that the images processed by the image processing algorithms involved in the embodiments of this application can be captured by an electronic device, downloaded by an electronic device from a server, or received by an electronic device from other electronic devices. The embodiments of this application do not limit this.

[0122] The window manager is used to manage windowed applications. It can retrieve screen size, determine if a status bar is present, lock the screen, and capture screenshots, among other things.

[0123] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, and more.

[0124] File Explorer can provide applications with various resources, such as localized strings, icons, images, layout files, video files, and so on.

[0125] The visual image module includes visual controls, such as controls for displaying text and controls for displaying images. The visual image module can be used to build the application's display interface, which can consist of one or more views, such as a view displaying SMS notification icons, a view displaying text, and a view displaying images. The phone manager is used to provide communication functions for the electronic device 100, such as managing call status (including call connection, call termination, etc.).

[0126] The notification manager allows applications to display notifications in the status bar. These notifications can be used to convey informational messages and can disappear automatically after a short pause, requiring no user interaction. Examples include notifications of download completion and message alerts. Notifications can also appear as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include text messages in the status bar, sound alerts, vibrations, and flashing indicator lights.

[0127] The system libraries and Android Runtime are used for various tasks. System libraries can include multiple functional modules, such as the surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), and 2D graphics engines (e.g., SGL). The surface manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media libraries support playback and recording of various common audio and video formats, as well as still image files. The media libraries support various audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The 3D graphics processing libraries are used for 3D graphics drawing, image rendering, compositing, and layer processing. The 2D graphics engine is the drawing engine for 2D graphics.

[0128] The Android runtime consists of the core libraries and the virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core libraries comprise two parts: one part contains the functionalities that Java calls, and the other part consists of the Android core libraries. The application layer and application framework layer run in the virtual machine, which executes the Java files of the application layer and application framework layer into binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0129] Understandable Figure 2 The components included in the system framework layer, system library, and runtime layer shown do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than shown, or combine some components, or split some components, or have different component arrangements.

[0130] The kernel layer is the layer between the hardware and the aforementioned software layers. The kernel layer contains at least display drivers, camera drivers, and sensor drivers. Hardware may include devices such as cameras, displays, microphones, processors, and memory.

[0131] This application provides a frequency limiting control method applicable to electronic devices. The method includes: acquiring a frequency limiting trigger scenario for the electronic device; determining a frequency limiting operation mode for the electronic device based on the frequency limiting trigger scenario if the electronic device meets the frequency limiting conditions; and controlling the electronic device to operate based on the frequency limiting operation mode.

[0132] For example, electronic devices may include mobile phones, tablets, smartwatches, laptops, virtual and physical fusion devices, super mobile personal computers, smart TVs, smart screens, high-definition TVs, smart speakers, smart projectors, etc.

[0133] Obtaining the frequency limiting trigger scenario of an electronic device involves determining the current operating state of the device to ascertain whether frequency limiting is necessary. In one example, the frequency limiting trigger scenario can be divided into foreground trigger scenario and background trigger scenario.

[0134] In this implementation, the foreground trigger scenario refers to the electronic device being in a user-operated state, such as browsing web pages, playing games, or watching videos.

[0135] In this implementation, background triggering scenarios refer to situations where the electronic device is in a non-user-operated state, such as charging while the screen is locked, running applications in the background, or calling algorithms in the background.

[0136] If the frequency limiting conditions of the electronic device are met based on the frequency limiting trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the frequency limiting trigger scenario. That is, according to different frequency limiting trigger scenarios, appropriate upper and lower limits of CPU frequency, algorithm call duration and sleep duration, as well as the rate and strategy for adjusting frequency are selected.

[0137] After determining the frequency-limiting operation mode of the electronic device, control the electronic device to operate based on the frequency-limiting operation mode. For example, by setting the algorithm call duration and sleep duration, modifying the power management settings or basic input / output system BIOS settings, the algorithm call duration and sleep duration of the electronic device, or the CPU frequency of the electronic device, can be changed within a set range to achieve the purpose of frequency limiting.

[0138] By flexibly adjusting the CPU frequency according to the actual frequency limiting requirements of electronic devices, performance loss or resource waste caused by excessively high or low frequencies can be avoided. This can reduce the power consumption and heat generation of electronic devices, extend their lifespan and battery life, and improve their reliability and security. It can also improve the user experience of electronic devices, reducing issues such as lag, noise, and overheating, and enhancing their response speed and operating efficiency.

[0139] In one example, the frequency-limiting trigger scenario for the electronic device can be dynamically triggered based on whether the electronic device invokes an image processing algorithm.

[0140] For example, the image processing algorithm can be an algorithm used to process, analyze, and understand images, as covered by the "Smart Production" skill option, such as image analysis, image generation, video segmentation, CLIP, video image segmentation, face recognition, image compression, and other algorithms.

[0141] For example, while the electronic device is running, it monitors for any calls to image processing algorithms, such as opening the gallery, browsing photos, or editing images. Upon detecting a call to the image processing algorithm (initiation of the call) and during the process of calling the algorithm, it determines the current operating status of the electronic device, such as temperature, battery level, load, and applications, to determine whether frequency limiting is necessary.

[0142] Once it is determined that the electronic device meets the frequency limiting conditions, the CPU frequency can be flexibly adjusted according to the actual frequency limiting requirements of the electronic device to reduce power consumption and heat generation, thereby improving the performance and stability of the electronic device. For example, appropriate CPU frequency rates and strategies can be selected based on different frequency limiting triggering scenarios.

[0143] To maintain the normal operation of electronic devices without them using image processing algorithms, and to ensure their functionality and reliability without frequency throttling. To avoid unnecessary frequency throttling, thereby improving the operating efficiency and user experience of electronic devices.

[0144] The frequency limiting control method provided in this application can be applied to various scenarios where electronic devices need to operate with frequency limiting, such as when an electronic device calls an image processing algorithm (e.g., ...). Figure 3a The intelligent video production scenario involves video analysis algorithms, video segmentation algorithms, CLIP algorithms, etc. This intelligent video production scenario can be used for image search and video creation. In the intelligent video production scenario for image analysis and video generation, when it is determined that the electronic device meets the frequency limiting conditions, the CPU frequency of the electronic device, the algorithm call duration and sleep duration are dynamically adjusted to reduce the power consumption and heat generation of the electronic device and improve the performance and stability of the electronic device.

[0145] The following is combined Figure 3a , Figures 3b to 10 The application scenarios and processes of the frequency limiting control method for electronic devices according to embodiments of this application are illustrated.

[0146] It should be noted that the frequency limiting control method provided in this application example can be executed before the electronic device realizes the smart film scene, and then the task of searching for images or creating videos in the smart film scene is executed to achieve the effect of frequency limiting control of the electronic device. Alternatively, the frequency limiting control method provided in this application example can be executed in real time during the process of executing the task of searching for images or creating videos in the smart film scene.

[0147] Figure 3a This is a schematic diagram of an optional intelligent video production scene. Taking the generation of a video in an intelligent video production scene as an example, such as... Figure 3a As shown, the implementation process of an optional intelligent integrated scene includes:

[0148] S101, the voice assistant detected the user's voice "Hello, yoyo".

[0149] In this embodiment of the application, when the electronic device displays any interface, the user says the wake word "Hello, yoyo" for the voice assistant application. "Hello, yoyo" is an example of a wake word for a voice assistant application; in practical applications, other wake words may also be used.

[0150] S102, the voice assistant determines that the detected voice information is a wake word and displays the voice assistant window.

[0151] In this embodiment, after detecting a user's voice, the voice assistant can determine whether the current user's voice is the voice assistant's wake-up word through semantic analysis and other recognition methods. If it is the voice assistant's wake-up word, the voice assistant window is displayed.

[0152] S103, the voice assistant detected the user's voice message "birthday wishes".

[0153] S104: The voice assistant receives a confirmation command for the person based on the user's voice message "birthday wishes".

[0154] In this embodiment, the voice assistant includes multiple commands, such as a person confirmation command, a material selection command, and a video generation command. Each command corresponds to multiple keywords. The voice assistant can determine which command a given voice message corresponds to based on the keywords detected in the voice information. Examples of keywords for the person confirmation command include "birthday," "growth," and "child."

[0155] S105, the voice assistant sends a person confirmation request to the service management framework.

[0156] S106. After receiving the person confirmation request, the service management framework sends the person confirmation request to the media processing platform.

[0157] S107, after receiving a person confirmation request, the media processing platform creates AigcManager.

[0158] In this embodiment, AigcManager is responsible for automatically generating videos based on media materials stored in the electronic device. Therefore, AigcManager includes multiple corresponding modules, such as a person identification module, a material collection module, a video generation module, and a video saving module. The media processing platform calls different module interfaces in AigcManager to implement different functions according to different instructions or requests.

[0159] As the module interface corresponding to the person confirmation request, the media processing platform calls the getallpersonTaginfos interface in AigcManager to obtain the person information.

[0160] S108, the media processing platform calls the getallpersonTaginfos interface in AigcManager to obtain person information.

[0161] In this embodiment of the application, the media materials stored in the electronic device have been pre-processed to obtain multiple lists of people as person information. In practical applications, each person in the list of people includes a person image and a person tag.

[0162] S109, the media processing platform sends person information (e.g., may include person images and person tags) to the service management framework.

[0163] S110: After receiving the person information, the service management framework sends the person information to the voice assistant.

[0164] S111: After receiving the person's information, the voice assistant displays the person's information in the voice assistant window.

[0165] S112, the user clicks on "Jimmy" in the displayed character information.

[0166] S113, after the voice assistant receives the click operation on "Jimmy" in the person information, it sends a confirmation command to the service management framework. The confirmation command carries the person tag corresponding to "Jimmy" selected by the user.

[0167] S114. After receiving the confirmation instruction, the service management framework sends a confirmation instruction to the media processing platform.

[0168] S115. After receiving the confirmation instruction, the media processing platform calls the interface of the material collection module in AigcManager to collect media materials related to the person tags in the confirmation instruction.

[0169] The media processing platform can search for media materials tagged with "Jimmy" from the gallery application. These media materials can be in the form of images or videos.

[0170] S116. After collecting media materials tagged with "Jimmy", the media processing platform sends the media materials to the service management framework.

[0171] S117, after receiving the media materials, the service management framework sends the media materials to the voice assistant.

[0172] S118: After receiving media materials, the voice assistant displays the received media materials in the voice assistant window.

[0173] In practical applications, these media materials can be presented in the form of photo albums.

[0174] S119, the voice assistant detected the user's voice message "Generate video".

[0175] In the S120, the voice assistant receives video generation instructions based on voice information.

[0176] The video generation command can carry the first keyword "birthday", which allows the light editing service to add birthday-related effects, music, etc. to the video.

[0177] S121, the voice assistant sends a video generation command to the service management framework.

[0178] S122, after receiving the video generation instruction, the service management framework sends the video generation instruction to the media processing platform.

[0179] S123, after receiving the video generation instruction, the media processing platform sends the pre-collected media materials to the light editing service.

[0180] S124, the light editing service generates video information based on the media materials after receiving them. The video information includes a video JSON file, a video cover, and a VIP material usage identifier.

[0181] During the generation of the video JSON file, effects, music, filters, etc., may be added to the original media materials. These effects, music, and filters can be free or paid materials. If paid effects, music, or filters are used when generating the video JSON file, the VIP material usage identifier is "1"; if no paid effects, music, or filters are used, the VIP material usage identifier is "0". Of course, "0" and "1" are just examples; in actual applications, other identifiers can be set to distinguish them.

[0182] In practical applications, video information can also include the video's file descriptor to distinguish different videos. This video can serve as an example of the first video.

[0183] S125, the light editing service sends video information to the media processing platform.

[0184] S126 After receiving the video information, the media processing platform sends the video information to the service management framework.

[0185] S127, After receiving the video information, the service management framework sends the video information to the voice assistant.

[0186] S128. After receiving the video information, the voice assistant displays the text "A video for your child has been generated" in the voice assistant window, along with the video cover, save control, and share control.

[0187] In practical applications, a prompt message can also be displayed when the VIP material usage indicator is "1" to inform the user that the generated video used VIP materials. The content displayed in the voice assistant window can be found in [reference needed]. Figure 4 As shown.

[0188] The above examples illustrate that the media processing platform and light editing service can generate videos. These services can not only provide video generation functionality to voice assistants, but also to other applications.

[0189] As mentioned earlier, users can click the save or share control to save the video generated by the voice assistant to their electronic device.

[0190] Figure 3b This application provides a schematic diagram illustrating the process of an electronic device calling an image processing algorithm, as shown in the embodiments below. Figure 3b As shown, in the implementation of this example, in the smart video production scenario where electronic devices call image processing algorithms to perform image analysis and video generation, taking the face detection algorithm as an example, the algorithm running process first initializes the face detection algorithm, the face detection algorithm requests the database to read the data used by the algorithm, and after reading the data from the database and caching it in batches, the algorithm running process initializes the algorithm, and the algorithm calling module initializes the service call.

[0191] The algorithm execution process determines the stopping condition to decide whether to stop initialization. It then repeatedly retrieves cached data from the database to call the algorithm to calculate or process that cached data. The algorithm call module performs image processing, and the image processing results are then displayed. After releasing the algorithm, the database is refreshed or updated based on the processing results. Finally, the algorithm execution process is redirected back to the main process from the face detection algorithm.

[0192] In one achievable example, while the electronic device is running, the decision to monitor foreground calls to image processing algorithms is made based on whether the device is charging, its temperature, and battery level. Foreground calls to image processing algorithms refer to operations performed by the electronic device on the user-visible interface, such as taking photos, browsing photos, and editing images.

[0193] While the electronic device is charging, in response to detecting that the device temperature is below a first temperature (e.g., 46°C), the system monitors foreground calls to image processing algorithms. Because the device temperature is below the first temperature (e.g., 46°C), the electronic device is prohibited from calling the image processing algorithm in either the foreground or background. In other words, image processing algorithms are only allowed when the electronic device temperature is low, and the system only detects whether the user is using the image processing algorithm function at this temperature.

[0194] When the electronic device is not charging, in response to detecting that the device temperature is below a first temperature (e.g., 46°C) and the battery level is above a first charge level (e.g., 35%, 50%), the system monitors foreground calls to image processing algorithms by the electronic device. Because the device temperature is below the first temperature (e.g., 46°C), the electronic device is prohibited from calling the image processing algorithm in either the foreground or background. Since the electronic device is not charging, the system only detects whether the user is using the image processing algorithm function when the electronic device temperature is low and the battery level is high.

[0195] Based on whether the electronic device is charging, as well as its temperature and battery level, the system dynamically determines whether to monitor the foreground calls to image processing algorithms by the electronic device. This avoids unnecessary frequency limiting and improves the operating efficiency and user experience of the electronic device.

[0196] When an electronic device performs foreground operations on image processing algorithms, the CPU frequency can be flexibly adjusted according to the actual frequency limiting requirements of the electronic device to reduce power consumption and heat generation, thereby improving the performance and stability of the electronic device. When the electronic device does not perform foreground operations on image processing algorithms, the normal operation of the electronic device is maintained, unaffected by frequency limiting, ensuring the functionality and reliability of the electronic device.

[0197] In one possible example, in response to detecting that the device temperature of the electronic device is higher than a first temperature (e.g., 46°C), the image processing algorithm is stopped from being called. That is, when the device temperature of the electronic device is too high, the function of the image processing algorithm is no longer executed to avoid further calls to the image processing algorithm, which would increase the performance loss or waste of resources of the electronic device.

[0198] It should be noted that the example values ​​for device temperature, battery level, and duration in this application are only for illustrating the method and facilitating understanding, and do not constitute a specific limitation. It should be understood that in actual application scenarios, the values ​​are not limited to a single specific value, but are limited to those that can implement the method in the example of this application.

[0199] It's understandable that, especially in background scenarios where electronic devices are charging while the screen is off, users are more inclined to charge their devices. However, because image processing causes the battery level of electronic devices to decrease as they are charged, it affects the performance and stability of the electronic devices, resulting in a reduced user experience.

[0200] In one optional embodiment, the decision to monitor background operations of the electronic device on the image processing algorithm is made based on the restricted and unrestricted call periods of the electronic device, as well as the battery level and temperature of the electronic device. The restricted call period can be the nighttime hours of each day, for example, the period between 1:00 AM and 5:00 AM; the unrestricted call period can be the daytime hours of each day, for example, the period outside of 1:00 AM and 5:00 AM. It should be understood that the above examples are only for illustrating this implementation method and for ease of understanding, but are not limited to this in actual application scenarios.

[0201] For example, background image processing algorithm calls refer to the operation of an electronic device running image processing algorithms on an interface that is not visible to the user, such as background analysis, background update, background recognition, background compression, etc.

[0202] For example, during the restricted access period of an electronic device, in response to the detection that the battery level of the electronic device is greater than a second level (e.g., 50%, 60%, etc., where the second level is greater than the first level) while the screen is off and charging, and the device temperature is less than a fourth temperature (e.g., 38°C), the background access operation of the image processing algorithm of the electronic device is monitored. That is, the function of whether the electronic device is running the image processing algorithm in the background will only be detected when the electronic device is in the restricted access period and the battery level is high and the temperature is low.

[0203] During the unrestricted call period of the electronic device, in response to the detection that the electronic device is charging with the screen off, the background call operation of the image processing algorithm by the electronic device is monitored. That is, the function of whether the electronic device is running the image processing algorithm in the background will only be detected when the electronic device is charging during the unrestricted call period.

[0204] Based on the restricted and unrestricted call periods of electronic devices, as well as the battery level and temperature of the electronic devices, the background call operations of the electronic devices to image processing algorithms are monitored to avoid unnecessary frequency limiting operations, thereby improving the operating efficiency of electronic devices and the user experience.

[0205] When an electronic device performs background operations on image processing algorithms, the CPU frequency can be flexibly adjusted according to the actual frequency limiting requirements of the electronic device to reduce power consumption and heat generation, thereby improving the performance and stability of the electronic device. When the electronic device does not perform background operations on image processing algorithms, the normal operation of the electronic device can be maintained without being affected by frequency limiting, ensuring the functionality and reliability of the electronic device.

[0206] As explained above, frequency limiting triggering scenarios can be divided into foreground triggering scenarios and background triggering scenarios. Foreground triggering scenarios refer to situations where the electronic device is under user operation, such as browsing the web, playing games, or watching videos. Background triggering scenarios refer to situations where the electronic device is not under user operation, such as charging with the screen locked or running applications in the background.

[0207] Figure 4 This illustration shows a schematic diagram of the process for determining the frequency limiting conditions and frequency limiting operation mode in a frequency limiting trigger scenario according to an embodiment of this application. Figure 4 As shown, in one optional implementation, in a foreground-triggered scenario, if the device temperature of the electronic device exceeds a preset second temperature (e.g., 40°C), it indicates that the electronic device is at risk of overheating and the processor frequency needs to be reduced to decrease heat generation. In this case, the electronic device meets the frequency limiting condition.

[0208] Another alternative implementation, such as Figure 4 As shown, in a background-triggered scenario, if the battery level decreases instead of increases when the electronic device is charging with the screen off, it indicates that the device's power consumption exceeds the charging speed. Therefore, the processor frequency needs to be reduced to decrease power consumption. In this case, the electronic device also meets the frequency limiting condition.

[0209] The processor frequency of electronic devices can be dynamically adjusted according to different scenarios and conditions, thereby protecting the security and performance of electronic devices and improving the user experience when using electronic devices to call image processing algorithms to process images or generate videos.

[0210] In one alternative implementation, such as Figure 4 As shown, the frequency-limiting operation mode of the electronic device determined based on the frequency-limiting trigger scenario includes:

[0211] When the frequency limiting trigger scenario is a foreground trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the device temperature of the electronic device; when the frequency limiting trigger scenario is a background trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the number of times the battery power of the electronic device decreases during the monitoring time of screen-off charging.

[0212] If the frequency limiting conditions are met by the electronic device based on the frequency limiting trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the frequency limiting trigger scenario. For example, based on different foreground trigger scenarios or background trigger scenarios, the call duration of the electronic device for each call to the image processing algorithm and the sleep duration after each call to the image processing algorithm are determined.

[0213] When the frequency limiting trigger scenario is a foreground trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the device temperature, the call duration of the image processing algorithm each time the electronic device calls it, and the sleep duration after each call to the image processing algorithm.

[0214] In one example, Figure 5 This illustration shows a schematic diagram of the process for determining the frequency-limiting operation mode in a foreground-triggered scenario according to an embodiment of this application. Figure 5As shown, determining the frequency-limiting operation mode of the electronic device based on its device temperature includes:

[0215] In response to detecting that the device temperature of the electronic device is greater than a second temperature (e.g., 40°C) and less than a third temperature (e.g., 43°C), a first frequency-limiting operation mode is determined for the electronic device, wherein the electronic device sleeps for a first duration (e.g., 10 seconds) after each invocation of the image processing algorithm; in response to detecting that the device temperature of the electronic device is greater than the third temperature (e.g., 43°C) and less than the first temperature (e.g., 46°C), a second frequency-limiting operation mode is determined for the electronic device, wherein the electronic device sleeps for a second duration (e.g., 20 seconds) after each invocation of the image processing algorithm; wherein the second duration is greater than the first duration, the second temperature is less than the third temperature, and the third temperature is less than the first temperature.

[0216] For example, when the device temperature is between 40°C and 43°C, the CPU frequency upper limit is reduced to 1.5GHz and the lower limit to 0.8GHz, with a frequency adjustment rate of 0.1GHz / s. The strategy is tiered, and the electronic device's call duration for each image processing algorithm is 10 seconds, followed by a 10-second sleep period. When the device temperature is between 43°C and 46°C, the CPU frequency upper limit is reduced to 1.0GHz and the lower limit to 0.5GHz, with a frequency adjustment rate of 0.05GHz / s. The strategy is tiered, and the electronic device's call duration for each image processing algorithm is 10 seconds, followed by a 20-second sleep period.

[0217] In one example, the restriction control policy will also automatically recover during the operation of the electronic device. For instance, in a foreground-triggered scenario, during the process of a user actively triggering the invocation of an image processing algorithm, when the image processing algorithm slows down, the rate of adjustment of the frequency will automatically decrease, and the device temperature of the electronic device will decrease accordingly. When it is detected that the device temperature has returned to normal (less than 40°C) and has not increased in temperature for 10 minutes, the electronic device will quickly run the image processing algorithm in a normal state.

[0218] Based on the call duration and sleep duration of image processing algorithms used by electronic devices, the frequency of image processing algorithm calls can be controlled to reduce power consumption and improve the operating efficiency and user experience of the electronic devices. When the device temperature is high, the CPU frequency can be reduced to decrease the time spent calling image processing algorithms, while the sleep time can be increased to reduce power consumption and heat generation, thereby improving the performance and stability of the electronic devices.

[0219] In another example, different upper and lower limits for the CPU frequency, as well as the rate and strategy for adjusting the frequency, can be selected based on the device temperature. For instance, when the device temperature exceeds 50°C, the upper limit of the CPU frequency is reduced to 1.5GHz, the lower limit is reduced to 0.8GHz, and the frequency adjustment rate is 0.1GHz / s, using a stepped strategy; when the device temperature is below 40°C, the upper limit of the CPU frequency is increased to 2.5GHz, the lower limit is increased to 1.2GHz, and the frequency adjustment rate is 0.2GHz / s, using a smooth strategy.

[0220] Another optional implementation method is to determine the frequency-limited operation mode of the electronic device based on the device temperature. That is, based on the device temperature, different upper and lower limits of CPU frequency are selected, as well as the rate and strategy for adjusting the frequency, the call duration of the image processing algorithm each time the electronic device calls the image processing algorithm, and the sleep duration after each call to the image processing algorithm.

[0221] For example, when the device temperature is between 40℃ and 43℃, the upper limit of the CPU frequency is reduced to 1.5GHz and the lower limit is reduced to 0.8GHz, with a frequency adjustment rate of 0.1GHz / s and a step-wise strategy. The electronic device takes 5 seconds to call each image processing algorithm and 10 seconds to sleep. As another example, when the device temperature is between 43℃ and 46℃, the upper limit of the CPU frequency is reduced to 1.0GHz and the lower limit is reduced to 0.5GHz, with a frequency adjustment rate of 0.05GHz / s and a step-wise strategy. The electronic device takes 3 seconds to call each image processing algorithm and 15 seconds to sleep.

[0222] In one example, Figure 6 This illustration shows a process for determining the frequency-limiting operation mode in a background-triggered scenario according to an embodiment of this application. Figure 6 As shown, in the case of a background trigger scenario for frequency limiting, the frequency limiting operation mode of the electronic device is determined based on the number of times the battery power decreases during the monitoring time of the electronic device charging with the screen off. That is, the call duration of the image processing algorithm each time the electronic device calls it, and the sleep duration after each call to the image processing algorithm are determined based on the number of times the battery power decreases.

[0223] In another example, different upper and lower limits for CPU frequency, as well as the rate and strategy for adjusting the frequency, can be selected based on the number of times the battery level drops during the monitored charging period when the electronic device is charging with the screen off. For example, if the electronic device's battery level drops more than 5 times in 10 minutes, the upper limit of the CPU frequency is reduced to 1.0 GHz, the lower limit is reduced to 0.5 GHz, and the frequency adjustment rate is 0.05 GHz / s, using a stepped strategy; if the electronic device's battery level drops less than 3 times in 10 minutes, the upper limit of the CPU frequency is increased to 2.0 GHz, the lower limit is increased to 1.0 GHz, and the frequency adjustment rate is 0.1 GHz / s, using a smooth strategy.

[0224] Based on the device temperature and the number of times the battery level drops, the frequency limiting operation mode of the electronic device is dynamically determined to avoid performance loss or resource waste caused by excessively high or low CPU frequencies. In foreground scenarios, the CPU frequency is adjusted according to the device temperature to reduce power consumption and heat generation, thereby improving the performance and stability of the electronic device. In background scenarios, the CPU frequency is adjusted according to the number of times the battery level drops, thereby reducing power consumption, extending the lifespan and battery life of the electronic device, and improving its reliability and security.

[0225] In one implementation, Figure 7 This illustration shows a schematic diagram of the frequency-limiting operation process of an electronic device in a foreground-triggered scenario according to an embodiment of this application. Figure 7 As shown, the frequency limiting trigger scenario is a foreground trigger scenario. When the electronic device is running under the first frequency limiting operation mode, the device temperature of the electronic device is re-detected. When the device temperature of the electronic device decreases and the total duration of the electronic device running under the first frequency limiting operation mode is greater than the fourth duration, the frequency limiting operation control of the electronic device is released.

[0226] For example, frequency limiting control can be achieved by modifying power management settings or BIOS settings to make the CPU frequency of electronic devices vary within a set range, thereby achieving the purpose of frequency limiting. Alternatively, it can be achieved by controlling the duration of each time an electronic device calls an image processing algorithm, as well as the sleep duration after the call ends, in order to reduce the frequent calls to the image processing algorithm.

[0227] When the electronic device is operating under the first frequency-limited mode, the device temperature is re-detected. Based on the temperature change, it is determined whether the CPU frequency or sleep time needs to be adjusted. For example, if the device temperature continues to rise, the CPU frequency can be further reduced or the sleep time increased; if the device temperature begins to drop, the CPU frequency can be appropriately increased or the sleep time reduced.

[0228] When the device temperature of the electronic device decreases and the total duration of operation of the electronic device based on the first frequency limiting mode exceeds the fourth duration, the frequency limiting operation control of the electronic device is released, that is, the normal operation state of the electronic device is restored, and the CPU frequency or sleep time is no longer limited, so as to improve the performance of the electronic device and the user experience.

[0229] When the frequency limiting trigger scenario is a foreground trigger scenario, the frequency limiting operation mode of the electronic device is dynamically adjusted according to the device temperature to avoid performance loss or resource waste caused by excessively high or low CPU frequencies. Based on the call duration and sleep duration of the image processing algorithm invoked by the electronic device, the call frequency of the image processing algorithm is controlled to reduce dependence on and consumption of the image processing algorithm, thereby improving the operating efficiency of the electronic device and the user experience. When the device temperature of the electronic device decreases and the total operating time of the electronic device under the first frequency limiting operation mode exceeds the fourth duration, the frequency limiting control of the electronic device is lifted, restoring the normal operating state of the electronic device, and the CPU frequency or sleep time is no longer limited, further improving the performance of the electronic device and the user experience.

[0230] In one possible example, when the electronic device is operating based on the second frequency-limiting mode, the device temperature of the electronic device is re-detected. That is, after each call to the image processing algorithm, the current temperature of the electronic device is obtained to determine whether the frequency-limiting mode needs to be adjusted.

[0231] As an example of this application, Figure 8 This illustration shows a schematic diagram of the frequency-limiting operation process of an electronic device in a foreground-triggered scenario according to an embodiment of this application. Figure 8 As shown, when the device temperature of the electronic device is lower than the first temperature (e.g., 46°C) and the total duration of the electronic device's operation based on the first frequency limiting mode is greater than the fourth duration (e.g., 10 minutes, 30 minutes, etc.), the frequency limiting mode of the electronic device is redefined. That is, based on the current frequency limiting trigger scenario of the electronic device, appropriate upper and lower limits of CPU frequency, as well as the rate and strategy for adjusting the frequency, the call duration of the image processing algorithm each time the electronic device calls it, and the sleep duration after each call to the image processing algorithm are determined.

[0232] For example, when the frequency limiting trigger scenario of the electronic device is the foreground trigger scenario, the upper limit of the CPU frequency is increased to 2.5GHz, the lower limit is increased to 1.2GHz, the frequency adjustment rate is 0.2GHz / s, the strategy is smooth, the call duration of each time the electronic device calls the image processing algorithm is 10 seconds, and the sleep duration is 5 seconds.

[0233] If the device temperature of the electronic device exceeds a first temperature (e.g., 46°C), the electronic device stops calling the image processing algorithm. That is, when the CPU frequency of the electronic device reaches its upper limit, the image processing algorithm function is no longer executed until the temperature of the electronic device drops below the first temperature (e.g., 46°C). It is understood that after stopping the algorithm call, the frequency limiting control method provided in this embodiment may or may not be executed.

[0234] Based on the device temperature, dynamically redetermine or stop the frequency limiting operation mode of the electronic device to avoid performance loss or resource waste caused by excessively high or low CPU frequencies. Adjust the frequency limiting operation mode of the electronic device based on the total duration of the frequency limiting operation to avoid prolonged frequency limiting operations affecting user experience or causing the device to overheat. If the device temperature is too high, stop the electronic device from calling image processing algorithms to reduce reliance on and consumption of image processing algorithms, thereby improving the operating efficiency and security of the electronic device.

[0235] In one example, when the frequency limiting trigger scenario is a foreground trigger scenario, the frequency limiting operation mode of the electronic device is determined according to the device temperature of the electronic device. That is, different upper and lower limits of CPU frequency, frequency adjustment rate and strategy, call duration of the image processing algorithm each time the electronic device calls the image processing algorithm, and sleep duration after each call of the image processing algorithm are selected according to the device temperature.

[0236] For example, when the device temperature is between 40℃ and 43℃, the upper limit of the CPU frequency is reduced to 1.5GHz and the lower limit is reduced to 0.8GHz, with a frequency adjustment rate of 0.1GHz / s and a step-wise strategy. The electronic device takes 5 seconds to call each image processing algorithm and 10 seconds to sleep. When the device temperature is between 43℃ and 46℃, the upper limit of the CPU frequency is reduced to 1.0GHz and the lower limit is reduced to 0.5GHz, with a frequency adjustment rate of 0.05GHz / s and a step-wise strategy. The electronic device takes 3 seconds to call each image processing algorithm and 15 seconds to sleep.

[0237] As an example of this application, if the device temperature of the electronic device is detected to be higher than a first temperature (e.g., 46°C), the electronic device stops calling the image processing algorithm. That is, when the device temperature is too high, the function of the image processing algorithm is no longer executed to avoid further increasing the device's heat generation and power consumption.

[0238] Based on the device temperature, the frequency-limiting operation mode of the electronic device is dynamically determined to avoid performance loss or resource waste caused by excessively high or low CPU frequencies. Based on the call duration and sleep duration of image processing algorithms, the call frequency of image processing algorithms is controlled to reduce reliance on and consumption of these algorithms, thereby improving the operating efficiency of the electronic device and the user experience.

[0239] When electronic devices are running hot, reducing CPU frequency decreases the time spent calling image processing algorithms, increases sleep time, reduces power consumption and heat generation, and improves the performance and stability of the electronic devices. Conversely, when electronic devices are excessively hot, stopping the use of image processing algorithms avoids unnecessary calls to these algorithms, protecting the safety and reliability of the electronic devices.

[0240] An alternative implementation method, Figure 9 This illustration shows a schematic diagram of the frequency-limiting operation process of an electronic device in a background-triggered scenario, according to an embodiment of this application. Figure 9 As shown, the frequency-limiting operation mode of the electronic device is determined based on the number of times the battery power decreases during the monitoring period of screen-off charging, including:

[0241] When the number of times the battery power drops reaches the first count, it is determined that after each time the above-mentioned electronic device calls the above-mentioned image processing algorithm for a first duration, it will sleep for a third duration, wherein the third duration is less than the first duration.

[0242] If the number of times the battery power decreases reaches the second time, the electronic device shall enter a sleep state for a first duration after each invocation of the image processing algorithm.

[0243] In background-triggered scenarios, where the image processing algorithm is called and run in the background, there are two frequency limiting levels. One frequency limiting level is for power outages of less than or equal to 2 times (generally considered a scenario that would occur in actual applications), and the other frequency limiting level is for power outages of more than 2 times (generally considered a theoretical scenario that would not occur in actual applications).

[0244] In one implementation, when the frequency-limited operation mode of the electronic device is in the first position, after the frequency-limited operation, it is detected whether the battery power of the electronic device continues to decrease within the monitoring period (e.g., 15 minutes) (also known as a power-down phenomenon). If the frequency-limited operation of the electronic device exceeds 10 minutes and there is no further decrease in battery power during this period, the frequency-limited control ends and the normal operation of the device is restored; if the battery power decreases, the process returns to detecting the number of times the battery power of the electronic device decreases within the monitoring period, for example, changing from 1 power-down to 2 power-downs.

[0245] Figure 10This illustration shows another schematic diagram of the frequency-limiting operation process of an electronic device in a background-triggered scenario, as described in an embodiment of this application. Figure 10 As shown, when the battery power decreases for the third time, it is determined that the electronic device will go into sleep mode for a fourth time after each time the image processing algorithm is invoked, wherein the fourth time is longer than the first time.

[0246] When the number of times the battery power decreases reaches the fourth time, it is determined that after each first time the above-mentioned electronic device calls the above-mentioned image processing algorithm, it will sleep for a second time, wherein the second time is longer than the fourth time.

[0247] In this embodiment, the second number is greater than the first number, the third number is greater than the second number, and the fourth number is greater than the third number.

[0248] In the case where the frequency limiting trigger scenario is a background trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the number of times the battery power decreases during the monitoring time of the electronic device charging with the screen off. That is, based on the number of times the battery power decreases, different call durations are selected for each call to the image processing algorithm by the electronic device, as well as the sleep duration after each call to the image processing algorithm.

[0249] In another implementation, such as Figure 10 As shown, for example, when the frequency limiting operation mode of an electronic device is in the second position, if the electronic device is detected to have been running the algorithm for more than 10 minutes and there has been no power failure during this period, it will be restored to the first position, that is, the frequency limiting operation mode with less than or equal to 2 power failures.

[0250] For example, when the battery level of an electronic device drops once within 10 minutes, the call duration for each image processing algorithm call is set to 10 seconds, and the sleep duration is set to 10 seconds; when the battery level drops twice within 10 minutes, the call duration for each image processing algorithm call is set to 10 seconds, and the sleep duration is set to 10 seconds; when the battery level drops three times within 10 minutes, the call duration for each image processing algorithm call is set to 10 seconds, and the sleep duration is set to 15 seconds; when the battery level drops four times within 10 minutes, the call duration for each image processing algorithm call is set to 10 seconds, and the sleep duration is set to 20 seconds.

[0251] Based on the number of times the battery level decreases during the monitored charging period with the screen off, the call duration and sleep duration of image processing algorithms are dynamically determined. This controls the frequency of image processing algorithm calls, reduces reliance on and consumption of these algorithms, improves the operating efficiency and user experience of the electronic device, and avoids performance loss or resource waste caused by excessively high or low CPU frequencies. For example, when the battery level of the electronic device decreases, the CPU frequency is reduced, the sleep time is increased, power consumption is reduced, the lifespan and battery life of the electronic device are extended, and the reliability and safety of the electronic device are improved.

[0252] In one implementation, the frequency-limiting control on the electronic device can be released in response to the electronic device's stop call to the image processing algorithm. That is, when the electronic device is using the image processing algorithm, the CPU frequency can be flexibly adjusted according to the actual frequency-limiting requirements of the electronic device, reducing power consumption and heat generation, and improving the performance and stability of the electronic device. When the electronic device no longer needs to use the image processing algorithm, it resumes normal operation without being affected by frequency limiting, thus improving the functionality and reliability of the electronic device.

[0253] This application provides an embodiment of a frequency limiting control method device. This device can be implemented as part or all of a computer device, which can be software, hardware, or a combination of both. Figure 1 The electronic device shown. The frequency limiting control method apparatus includes:

[0254] The acquisition unit is used to acquire the frequency-limiting trigger scenario of the electronic device;

[0255] The determining unit is used to determine the frequency-limiting operation mode of the electronic device based on the frequency-limiting trigger scenario, when it is determined that the electronic device meets the frequency-limiting conditions based on the frequency-limiting trigger scenario.

[0256] The control unit is used to control the above-mentioned electronic equipment to operate based on the above-mentioned frequency-limiting operation mode.

[0257] It should be noted that the frequency limiting control method and device provided in the above embodiments are only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0258] The functional units and modules in the above embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of the embodiments of this application.

[0259] The frequency limiting control method and apparatus provided in the above embodiments belong to the same concept as the frequency limiting control method embodiments. The specific working process and technical effects of the units and modules in the above embodiments can be found in the method embodiments section, and will not be repeated here.

[0260] This application also provides an electronic device, which includes one or more processors and a memory;

[0261] The memory is coupled to one or more processors. The memory stores computer program code, which includes computer instructions. One or more processors invoke the computer instructions to cause the electronic device to perform a frequency limiting control method as shown below:

[0262] Obtain the frequency limiting trigger scenarios of electronic devices;

[0263] If the frequency limiting conditions are met by the above-mentioned electronic device based on the frequency limiting trigger scenario, the frequency limiting operation mode of the above-mentioned electronic device shall be determined based on the above-mentioned frequency limiting trigger scenario.

[0264] The aforementioned electronic equipment is controlled to operate based on the aforementioned frequency-limiting operation mode.

[0265] According to any implementation of this application, the method further includes: in response to the electronic device's call to the image processing algorithm, triggering the detection of a frequency limiting trigger scenario of the electronic device.

[0266] According to any implementation of this application, the above method further includes:

[0267] While the aforementioned electronic device is charging, in response to detecting that the device temperature of the aforementioned electronic device is lower than a first temperature, the foreground call operation of the aforementioned electronic device to the aforementioned image processing algorithm is monitored.

[0268] According to any implementation of this application, the above method further includes:

[0269] During the restricted call period of the aforementioned electronic device, in response to detecting that the battery level of the aforementioned electronic device is greater than the second battery level and the device temperature is less than the fourth temperature when the screen is off and charging, the background call operation of the aforementioned electronic device on the aforementioned image processing algorithm is monitored, wherein the second battery level is greater than the first battery level;

[0270] During the unrestricted access period of the aforementioned electronic device, in response to detecting that the aforementioned electronic device is charging with the screen off, the background access operation of the aforementioned electronic device to the aforementioned image processing algorithm is monitored.

[0271] According to any implementation of this application, determining that the electronic device meets the frequency limiting condition based on the frequency limiting trigger scenario includes:

[0272] In the case where the frequency limiting trigger scenario is a foreground trigger scenario, in response to detecting that the device temperature of the electronic device is greater than the second temperature, it is determined that the electronic device meets the frequency limiting condition.

[0273] In the case where the frequency limiting trigger scenario is a background trigger scenario, in response to the detection that the battery power of the above electronic device decreases when the screen is off and charging, it is determined that the above electronic device meets the frequency limiting conditions.

[0274] According to any implementation of this application, determining the frequency-limiting operation mode of the electronic device based on the frequency-limiting trigger scenario includes:

[0275] When the frequency limiting trigger scenario is a foreground trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the device temperature of the electronic device.

[0276] In the case where the frequency limiting trigger scenario is a background trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the number of times the battery power of the electronic device decreases during the monitoring period of screen-off charging.

[0277] According to any implementation of this application, the frequency-limited operation mode of the above-mentioned electronic device includes:

[0278] The duration of each invocation of the aforementioned image processing algorithm by the aforementioned electronic device, and the sleep duration after each invocation of the aforementioned image processing algorithm.

[0279] According to any implementation of this application, determining the frequency-limited operation mode of the electronic device based on its device temperature includes:

[0280] In response to detecting that the device temperature of the electronic device is greater than the second temperature and less than the third temperature, a first frequency-limiting operation mode of the electronic device is determined. The first frequency-limiting operation mode is that the electronic device sleeps for a first duration after each first time of calling the image processing algorithm.

[0281] In response to detecting that the device temperature of the electronic device is greater than the third temperature and less than the first temperature, a second frequency-limiting operation mode of the electronic device is determined. The second frequency-limiting operation mode is that after each first duration of the image processing algorithm is called by the electronic device, it sleeps for a second duration.

[0282] Wherein, the second duration is longer than the first duration, the second temperature is less than the third temperature, and the third temperature is less than the first temperature.

[0283] According to any implementation of this application, the above method further includes:

[0284] While controlling the aforementioned electronic equipment to operate based on the first frequency-limited operation mode, the temperature of the aforementioned electronic equipment is re-detected;

[0285] If the temperature of the aforementioned electronic device decreases and the total duration of operation of the aforementioned electronic device based on the first frequency-limiting operation mode exceeds the fourth duration, the frequency-limiting operation control of the aforementioned electronic device will be released.

[0286] According to any implementation of this application, the above method further includes:

[0287] While controlling the aforementioned electronic equipment to operate based on the aforementioned second frequency-limited operation mode, the device temperature of the aforementioned electronic equipment is re-detected;

[0288] If the device temperature of the aforementioned electronic device is lower than the aforementioned first temperature, and the total duration of operation of the aforementioned electronic device based on the aforementioned first frequency limiting operation mode is greater than the fourth duration, the frequency limiting operation mode of the aforementioned electronic device shall be re-determined.

[0289] If the device temperature of the aforementioned electronic device exceeds the aforementioned first temperature, the aforementioned electronic device shall stop calling the aforementioned image processing algorithm.

[0290] According to any implementation of this application, the above method further includes:

[0291] In response to the detection that the device temperature of the aforementioned electronic device is greater than the aforementioned first temperature, the aforementioned image processing algorithm is stopped from being invoked.

[0292] According to any implementation of this application, determining the frequency-limiting operation mode of the electronic device based on the number of times the battery power decreases during the monitoring period of screen-off charging includes:

[0293] When the number of times the battery power drops reaches the first count, it is determined that after each time the above-mentioned electronic device calls the above-mentioned image processing algorithm for a first duration, it will sleep for a third duration, wherein the third duration is less than the first duration.

[0294] When the number of times the battery power drops reaches the second time, the electronic device shall go into sleep mode for a first time after each time the image processing algorithm is invoked.

[0295] When the number of times the battery power decreases reaches the third time, it is determined that after each time the above-mentioned electronic device calls the above-mentioned image processing algorithm for a first duration, it will sleep for a fourth duration, wherein the fourth duration is longer than the first duration.

[0296] When the number of times the battery power decreases reaches the fourth time, it is determined that after each time the above-mentioned electronic device calls the above-mentioned image processing algorithm for a first duration, it will sleep for a second duration, wherein the second duration is longer than the fourth duration.

[0297] Among them, the second number is greater than the first number, the third number is greater than the second number, and the fourth number is greater than the third number.

[0298] According to any implementation of this application, the above method further includes:

[0299] In response to the aforementioned electronic device's operation to stop calling the image processing algorithm, the frequency limiting control on the aforementioned electronic device is released.

[0300] The aforementioned electronic devices can be mobile phones, smart screens, tablets, wearable electronic devices, in-vehicle electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), projectors, or communication devices such as servers, storage devices, and base stations, or smart cars, etc. This application does not impose any limitations on the specific type of electronic device.

[0301] This application also provides a computer-readable storage medium storing computer instructions; when the computer-readable storage medium is used on an electronic device, it causes the electronic device to execute the aforementioned frequency limiting control method.

[0302] The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or can include one or more data storage devices such as servers or data centers that can be integrated with media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media, or semiconductor media (e.g., solid-state disks (SSDs)).

[0303] This application also provides a computer program product containing computer instructions, which, when run on an electronic device, enables the electronic device to execute the aforementioned frequency limiting control method.

[0304] The computer storage medium and computer program product provided in the embodiments of this application are used to execute the methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects corresponding to the methods provided above, and will not be repeated here.

[0305] In the above embodiments, implementation can also be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).

[0306] The above-described embodiments are optional embodiments provided by this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the technical scope disclosed in this application should be included within the protection scope of this application.

[0307] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A frequency limiting control method, characterized by, Applied to electronic devices, including: Under preset conditions, the electronic device is allowed to invoke image processing algorithms; In response to the electronic device's call to the image processing algorithm, a frequency limiting process is executed; In response to the electronic device's stop call operation on the image processing algorithm, the frequency limiting process is stopped. The frequency limiting process includes: The frequency limiting trigger scenario of the electronic device is obtained. The frequency limiting trigger scenario includes a foreground trigger scenario and a background trigger scenario. The foreground trigger scenario is when the electronic device is in a user-operated state, and the background trigger scenario is when the electronic device is in a non-user-operated state. When the electronic device meets the frequency limiting conditions of the frequency limiting trigger scenario, the frequency limiting operation mode of the electronic device is determined according to the frequency limiting trigger scenario; the frequency limiting conditions of the foreground trigger scenario are related to the device temperature of the electronic device; the frequency limiting conditions of the background trigger scenario are related to whether the battery power of the electronic device decreases when the screen is off and charging. The electronic device is controlled to operate based on the frequency-limited operation mode, which is related to the call duration and sleep duration of the image processing algorithm. In the foreground trigger scenario, the call duration and sleep duration are related to the temperature setting; in the background trigger scenario, the call duration and sleep duration are related to the number of times the battery power drops.

2. The method of claim 1, wherein, The provision allowing the electronic device to invoke image processing algorithms under preset conditions includes: When the electronic device is charging and its temperature is below a first temperature, the electronic device is allowed to call the image processing algorithm in the foreground. When the electronic device is not charging and its device temperature is lower than the first temperature and its battery power is greater than the first power level, the electronic device is allowed to call the image processing algorithm in the foreground. During the restricted access period of the electronic device, if the battery level of the electronic device is greater than the second battery level and the device temperature of the electronic device is less than the fourth temperature when the screen is off and charging, the electronic device is allowed to call the image processing algorithm in the background, wherein the second battery level is greater than the first battery level. During the unrestricted access period of the electronic device, when the electronic device is charging with the screen off, the electronic device is allowed to call the image processing algorithm in the background.

3. The method as described in claim 1, characterized in that, The method further includes: In response to the electronic device's call to the image processing algorithm, a frequency limiting trigger scenario for the electronic device is detected.

4. The method as described in claim 2, characterized in that, The method further includes: While the electronic device is charging, in response to detecting that the device temperature of the electronic device is lower than a first temperature, the foreground call operation of the electronic device to the image processing algorithm is monitored. When the electronic device is not charging, in response to detecting that the device temperature of the electronic device is lower than the first temperature and the battery power of the electronic device is greater than the first power level, the foreground call operation of the electronic device to the image processing algorithm is monitored; During the restricted call period of the electronic device, in response to detecting that the battery level of the electronic device is greater than the second battery level and the device temperature is less than the fourth temperature when the screen is off and charging, the background call operation of the electronic device to the image processing algorithm is monitored, wherein the second battery level is greater than the first battery level; During the unrestricted call period of the electronic device, in response to detecting that the electronic device is charging with the screen off, the background call operation of the electronic device to the image processing algorithm is monitored.

5. The method as described in claim 1, characterized in that, The step of determining that the electronic device meets the frequency limiting condition based on the frequency limiting trigger scenario includes: When the frequency limiting trigger scenario is a foreground trigger scenario, in response to detecting that the device temperature of the electronic device is greater than the second temperature, it is determined that the electronic device meets the frequency limiting condition; When the frequency limiting trigger scenario is a background trigger scenario, in response to detecting that the battery power of the electronic device decreases when the screen is off and charging, it is determined that the electronic device meets the frequency limiting condition.

6. The method as described in claim 1, characterized in that, Determining the frequency-limiting operation mode of the electronic device based on the frequency-limiting trigger scenario includes: When the frequency limiting trigger scenario is a foreground trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the device temperature of the electronic device; When the frequency limiting trigger scenario is a background trigger scenario, the frequency limiting operation mode of the electronic device is determined based on the number of times the battery power of the electronic device decreases during the monitoring period of the screen-off charging.

7. The method as described in claim 6, characterized in that, The frequency-limited operation mode of the electronic device includes: The duration of each invocation of the image processing algorithm by the electronic device, and the sleep duration after each invocation of the image processing algorithm.

8. The method as described in claim 7, characterized in that, Determining the frequency-limited operation mode of the electronic device based on its device temperature includes: In response to detecting that the device temperature of the electronic device is greater than a second temperature and less than a third temperature, a first frequency-limiting operation mode of the electronic device is determined. The first frequency-limiting operation mode is that the electronic device sleeps for a first duration after each first duration of the image processing algorithm is called. In response to detecting that the device temperature of the electronic device is greater than the third temperature and less than the first temperature, a second frequency-limiting operation mode of the electronic device is determined. The second frequency-limiting operation mode is that the electronic device sleeps for a second duration after each first duration of the image processing algorithm is invoked by the electronic device. Wherein, the second duration is greater than the first duration, the second temperature is less than the third temperature, and the third temperature is less than the first temperature.

9. The method as described in claim 8, characterized in that, The method further includes: When the electronic device is controlled to operate based on the first frequency-limited operation mode, the device temperature of the electronic device is re-detected; If the device temperature of the electronic device decreases and the total duration of operation of the electronic device based on the first frequency limiting operation mode is greater than the fourth duration, the frequency limiting operation control of the electronic device will be released.

10. The method as described in claim 8, characterized in that, The method further includes: When the electronic device is controlled to operate based on the second frequency-limited operation mode, the device temperature of the electronic device is re-detected; If the device temperature of the electronic device is lower than the first temperature, and the total duration of operation of the electronic device based on the first frequency limiting mode is greater than the fourth duration, the frequency limiting mode of the electronic device shall be redefined. If the device temperature of the electronic device is higher than the first temperature, the electronic device shall stop calling the image processing algorithm.

11. The method as described in claim 8, characterized in that, The method further includes: In response to the detection that the device temperature of the electronic device is greater than the first temperature, the invocation of the image processing algorithm is stopped.

12. The method as described in claim 7, characterized in that, The step of determining the frequency-limiting operation mode of the electronic device based on the number of times the battery power decreases during the monitoring period of the electronic device charging with the screen off includes: When the number of times the battery power drops reaches the first count, it is determined that after each time the electronic device calls the image processing algorithm for a first duration, it will sleep for a third duration, wherein the third duration is shorter than the first duration. When the number of times the battery power decreases reaches the second count, the electronic device shall enter a sleep state for a first duration after each invocation of the image processing algorithm. When the battery power decreases for the third time, it is determined that the electronic device will go into sleep mode for a fourth time after each time the image processing algorithm is invoked, wherein the fourth time is longer than the first time. When the battery power decreases for the fourth time, it is determined that the electronic device will sleep for a second time after each first time the image processing algorithm is invoked, wherein the second time is longer than the fourth time. Wherein, the second number is greater than the first number, the third number is greater than the second number, and the fourth number is greater than the third number.

13. The method according to any one of claims 1 to 12, characterized in that, The method further includes: In response to the electronic device's stop calling of the image processing algorithm, the frequency limiting control of the electronic device is released.

14. An electronic device, characterized in that, The electronic device includes: one or more processors, and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 13.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 13.