Function starting method and device, electronic device, and storage medium

By acquiring the parameter information of the target processing unit in the electronic device and switching to the backup processing unit to run the target algorithm, the problem of function failure caused by the optimization algorithm failing to run normally is solved, and the normal startup of the function and the optimization effect are realized.

CN122308945APending Publication Date: 2026-06-30BEIJING XIAOMI MOBILE SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2024-12-30
Publication Date
2026-06-30

Smart Images

  • Figure CN122308945A_ABST
    Figure CN122308945A_ABST
Patent Text Reader

Abstract

This disclosure relates to a function activation method, apparatus, electronic device, and storage medium. The method includes: receiving an activation command for a target function; optimizing the target function based on a target algorithm; acquiring preset parameter information for a target processing unit used to run the target algorithm; and, if the parameter information indicates that the performance released by the target processing unit is insufficient to run the target algorithm, running the target algorithm based on a backup processing unit of the target processing unit to activate the target function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing, and more particularly to a function activation method and apparatus, electronic device, and storage medium. Background Technology

[0002] Electronic devices such as smartphones and tablets have become indispensable tools in users' daily lives. However, when these devices attempt to display preview images, the preview interface frequently freezes, resulting in a poor user experience.

[0003] How to resolve the issue of specific functions failing to start normally in order to ensure a good user experience has become an urgent problem for technical personnel. Summary of the Invention

[0004] This disclosure provides a function activation method, apparatus, electronic device, and storage medium that can avoid the problem of certain functions failing to activate.

[0005] According to a first aspect of this disclosure, a method for activating a function is provided, comprising:

[0006] Receive the start command for the target function; the target function is optimized based on the target algorithm.

[0007] Obtain the preset parameter information of the target processing unit used to run the target algorithm;

[0008] If the parameter information indicates that the performance released by the target processing unit is insufficient to run the target algorithm, the target algorithm is run by the backup processing unit of the target processing unit to start the target function.

[0009] According to a second aspect of this disclosure, a function activation device is provided, comprising:

[0010] The receiving unit receives the start command of the target function; the target function is optimized based on the target algorithm.

[0011] The acquisition unit acquires preset parameter information of the target processing unit used to run the target algorithm;

[0012] If the parameter information indicates that the performance released by the target processing unit is insufficient to run the target algorithm, the running unit runs the target algorithm based on the backup processing unit of the target processing unit to start the target function.

[0013] According to a third aspect of this disclosure, an electronic device is provided, comprising:

[0014] processor;

[0015] Memory used to store processor-executable instructions;

[0016] The processor implements the method as described in the first aspect by running the executable instructions.

[0017] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method as described in the first aspect.

[0018] In the technical solution disclosed herein, after receiving the start command of the target function that needs to be optimized based on the target algorithm, the parameter information of the target processing unit used to run the target algorithm can be obtained first, and the performance released by the target processing unit can be judged based on the parameter information to run the target algorithm. If it is insufficient, the backup processing unit is switched to run the target algorithm to ensure the normal operation of the target function.

[0019] It should be understood that whether a target function optimized based on a target algorithm can be started is directly and strongly tied to the target algorithm itself. The target algorithm, in turn, depends on a specific processing unit to run. If that processing unit cannot support the execution of the target algorithm, the target function will fail to start normally. However, upon receiving a start command for the target function, this disclosure prioritizes determining, based on the parameter information of the target processing unit, whether the target processing unit used to run the target algorithm can support its execution. If not, it switches to a backup processing unit to run the target algorithm, thus avoiding the problem in related technologies where the inability of the optimized algorithm to run leads to the corresponding function failing to start normally. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0021] Figure 1 This is a flowchart illustrating a function activation method according to an exemplary embodiment of the present disclosure;

[0022] Figure 2 This is a schematic diagram illustrating a camera application scheduling APU core according to an exemplary embodiment of the present disclosure;

[0023] Figure 3 This is a flowchart illustrating an exemplary embodiment of an APU core detection method disclosed herein;

[0024] Figure 4 This is a flowchart illustrating an exemplary embodiment of the present disclosure of a preview interface display method;

[0025] Figure 5This is a block diagram illustrating a function activation device according to an exemplary embodiment of the present disclosure;

[0026] Figure 6 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0027] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0028] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0029] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0030] Users often encounter problems when using electronic devices such as smartphones and tablets, where some functions fail to start properly. For example, the preview interface frequently freezes after launching the camera application.

[0031] Technical personnel discovered that the inability to activate this function is related to the introduction of optimization algorithms. For example, to improve the display effect of the preview interface, specific optimization algorithms are introduced to optimize the preview image. However, if these optimization algorithms malfunction, the preview interface will fail to display.

[0032] To address this issue, this disclosure proposes a function startup method to avoid the problem in related technologies where specific functions cannot be started normally due to issues with the operation of optimization algorithms.

[0033] Figure 1This embodiment of the present disclosure illustrates a method for activating a function. For example... Figure 1 As shown, the method may include the following steps:

[0034] Step 102: Receive the start command of the target function; the target function is optimized based on the target algorithm.

[0035] As explained above, the reason why certain functions, such as the preview interface freezing, cannot start normally in related technologies is due to the malfunction of the optimization algorithms used for those functions. Taking the preview interface freezing issue as an example, in order to introduce optimization algorithms into the preview interface display function to ensure the preview effect, developers usually edit the code in the preview interface display code to "display the optimized image in the preview interface." It's clear that after introducing the optimization algorithm, "the normal operation of the optimization algorithm" becomes a prerequisite for "displaying the image in the preview interface." Therefore, if the optimization algorithm fails to operate normally, it will cause the preview interface to freeze. In other words, certain functions, such as the preview interface display, may fail to start without optimization by the corresponding algorithm.

[0036] Based on this, this disclosure further investigates the underlying reasons why the optimization algorithm cannot run. In fact, the reason why the above-mentioned optimization algorithm cannot run properly is that the optimization algorithm often runs in a specific processing unit, and this processing unit may not be able to release enough performance to run the optimization algorithm for various reasons.

[0037] One of the most typical examples is that, during the manufacturing process, the parameters of a processing core, while within the acceptable error range for a qualified product, may approach the lower limit of that range. Such processing cores are anthropomorphically referred to in the industry as having "poor quality." In this context, if such "poor quality" processing cores enter the market, and the aforementioned optimization algorithms are run on these cores, they will fail to function properly because the cores cannot release sufficient performance, thus preventing the corresponding functions from being implemented.

[0038] Therefore, the reason why certain functions cannot be implemented in the relevant technologies is fundamentally due to the fact that the pre-set processing unit used to run the above-mentioned optimization algorithm cannot release sufficient performance.

[0039] In this disclosure, the above-mentioned optimization algorithm is referred to as the target algorithm, the specific function to be optimized by the target algorithm is referred to as the target function, and the pre-defined processing unit for running the target algorithm is referred to as the target processing unit.

[0040] In view of the reasons why the target function cannot be started normally, this disclosure, upon receiving a start command for the target function, no longer blindly runs the target algorithm based on the preset target processing unit, but instead prioritizes obtaining the parameter information of the target processing unit to determine whether the performance released by the target processing unit is sufficient to run the target algorithm. If it is insufficient, the target algorithm is run through the backup processing unit of the target processing unit to avoid the problem that the processing unit cannot support the operation of the optimization algorithm, thus causing the corresponding function to fail to be realized.

[0041] It should be noted that the statement that the performance released by the target processing unit is insufficient to run the target algorithm can encompass various situations. For example, it may only include "completely unable to run the target algorithm"; or it may include both "completely unable to run the target algorithm" and "although it can run, the running efficiency is low." Low running efficiency can be determined in several ways. For instance, a time limit can be preset; if the target algorithm's runtime exceeds this limit, low running efficiency is determined. Alternatively, a target duration and target progress can be preset to detect the target algorithm's progress within the target duration; if the progress does not exceed the target progress, low running efficiency is determined. Of course, these examples are merely illustrative; the specific definition of "the released performance is insufficient to run the target algorithm" can be determined by those skilled in the art based on actual needs, and this disclosure does not impose any limitations on this.

[0042] It should also be noted that the scenarios addressed in this disclosure are not limited to those such as preview displays, where the normal operation of the optimization algorithm is a prerequisite for function implementation, leading to a situation where "if the optimization algorithm fails to operate normally, the function cannot be implemented at all." In other words, this disclosure is not limited to scenarios where "the target function cannot be started without optimization of the target algorithm." This disclosure is still applicable in other scenarios where "only partial functionality can be implemented, or the functionality is poor, when the optimization algorithm fails to operate normally," thus avoiding problems such as incomplete or poor functionality.

[0043] Step 104: Obtain the preset parameter information of the target processing unit used to run the target algorithm.

[0044] In this disclosure, after receiving the start command of the target function, the preset parameter information of the target processing unit used to run the target algorithm can be obtained to determine whether the performance released by the target processing unit is sufficient to run the target algorithm.

[0045] For example, this disclosure can perform performance testing on the target processing unit in advance and maintain the obtained performance test results. Based on this, when a start command for the target function is received, the performance test results can be obtained as parameter information of the target processing unit.

[0046] For example, considering the potential "weakness" of the target processing unit, a "weak" unit typically requires higher power supply parameters to achieve the same performance as a conventional unit. However, electronic devices generally use standardized power supply parameters for all processing units. Therefore, during performance testing, multiple power supply parameters can be used to power the target processing unit, and its operation under these parameters can be monitored. If the power supply parameters for normal operation are not higher than the standard parameters, it proves that the target processing unit does not have the aforementioned "weakness" problem, and the standard power supply parameters are sufficient to provide the performance needed for the target algorithm. In this case, the performance test result can be recorded as sufficient to run the target algorithm. Conversely, if the power supply parameters for normal operation are higher than the standard parameters, it proves that the target processing unit has the aforementioned "weakness" problem, and the standard power supply parameters are insufficient to provide the performance needed for the target algorithm. In this case, the performance test result can be recorded as insufficient to run the target algorithm.

[0047] Of course, the example given here is only to illustrate the situation where "the performance release is insufficient to run the target algorithm because the target processing unit may have the aforementioned 'weak constitution' problem." In reality, "the performance release is insufficient to run the target algorithm" may also be caused by other factors, such as internal faults in the target processing unit. In this case, fault detection of the target processing unit can be performed in advance, and then the fault detection results can be used as the parameter information when the parameter information of the target processing unit needs to be obtained. For example, the parameter information of the target processing unit can also be conventional parameters of the processing core, such as the main frequency and maximum turbo frequency. Such parameters can be used to determine whether the target processing unit can release sufficient performance or to determine whether the target processing unit is faulty. How to obtain the parameter information of the target processing unit and how to determine whether the performance released by the target processing unit is sufficient to run the target algorithm based on the parameter information can be determined by those skilled in the art according to actual needs. This disclosure does not impose any restrictions on this.

[0048] It should be noted that, to avoid impacting normal user operation, the execution time of the performance tests can be limited. For example, the user's frequently used device time periods can be statistically analyzed, allowing performance tests to be performed on the target processing unit outside of these periods, and the resulting performance test results maintained. Taking smartphones as an example, if the user's frequently used time period is detected to be 6:30 AM to 11:30 PM, the performance test can be scheduled for 1:00 AM. Of course, this example is merely illustrative; the specific time period for performance testing can be determined by those skilled in the art based on actual needs, and this disclosure does not impose any restrictions on it.

[0049] Step 106: If the parameter information indicates that the performance released by the target processing unit is insufficient to run the target algorithm, the target algorithm is run based on the backup processing unit of the target processing unit to start the target function.

[0050] In this disclosure, a dedicated backup processing unit can be set up for the target processing unit so that when the performance released by the target processing unit is insufficient to run the target algorithm, the system can switch to the backup processing unit to run the target algorithm and thus start the target function.

[0051] It should also be emphasized that the backup processing unit of the target processing unit can be preset, or any available processing unit can be temporarily designated as the backup processing unit when the performance released by the target processing unit is insufficient to run the target algorithm. Of course, the example here is only illustrative, and how to determine the backup processing unit of the target processing unit can be determined by those skilled in the art according to actual needs, and this disclosure does not impose any restrictions on it.

[0052] In this disclosure, the performance released by the target processing unit is insufficient to run the target algorithm, or in other words, the target processing unit cannot support the target algorithm. This is related not only to the target processing unit itself but also to the target algorithm. Typically, to ensure optimization effectiveness, developers introduce complex optimization algorithms for various functions, which place high demands on the processing unit's performance. For example, developers can introduce artificial intelligence technology to optimize the target function. In this case, the target algorithm can be an artificial intelligence algorithm. Correspondingly, since an APU (Accelerated Processing Unit) has a faster computation effect than a conventional processor, a target accelerated processing unit for running the artificial intelligence algorithm can be pre-configured as the aforementioned target processing unit. In this case, a corresponding backup accelerated processing unit can also be configured as the aforementioned backup processing unit.

[0053] Of course, the examples given here are merely illustrative. The specific algorithm used to optimize the target function, and the processing unit on which the target algorithm runs, can be determined by those skilled in the art based on actual needs. For example, the target algorithm can also be a neural network algorithm, a reinforcement learning algorithm, etc., and the target processing unit can also be a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), etc. This disclosure does not impose any restrictions on these aspects.

[0054] In this disclosure, the target function can be different in different application scenarios.

[0055] In one embodiment, the target function can be the image preview function of a camera application, and correspondingly, the target algorithm can be an image optimization algorithm for the image preview function. Under this premise, if the acquired parameter information indicates that the performance released by the target processing unit is insufficient to run the image optimization algorithm, the image optimization algorithm can be run based on the backup processing unit of the target processing unit to display the optimized preview image in the preview interface of the camera application.

[0056] In another embodiment, the target function can be the rendering function of the editing software, and correspondingly, the target algorithm can be a rendering optimization algorithm for image rendering. Under this premise, if the acquired parameter information indicates that the performance released by the target processing unit is insufficient to run the rendering optimization algorithm, the rendering optimization algorithm can be run based on the backup processing unit of the target processing unit to perform the rendering operation. In this embodiment, since the rendering operation has a high load and is usually implemented based on the GPU, the GPU core is often used as both the target processing unit and the backup processing unit in this scenario.

[0057] Of course, the above examples are merely illustrative. The specific scenarios in which the technical solutions of this disclosure are applied, and the target functions and optimization algorithms in various scenarios, can be determined by those skilled in the art based on actual needs. This disclosure does not impose any restrictions on these aspects.

[0058] It should be emphasized that the implementing entity of the technical solution disclosed herein can be any type of electronic device. For example, the electronic device can be a mobile terminal such as a smartphone or tablet computer, or a fixed terminal such as a smart TV or PC (personal computer). It should be understood that any electronic device capable of performing certain functions and with functional optimization needs can be used as the electronic device in this disclosure. The specific type of electronic device used as the implementing entity of the technical solution disclosed herein can be determined by those skilled in the art based on actual needs, and this disclosure does not impose any restrictions on this.

[0059] As can be seen from the above technical solution, after receiving the start command of the target function that needs to be optimized based on the target algorithm, this disclosure can first obtain the preset parameter information of the target processing unit used to run the target algorithm, and determine whether the performance released by the target processing unit is sufficient to run the target algorithm based on the parameter information. If it is insufficient, the backup processing unit is switched to run the target algorithm to ensure the normal operation of the target function.

[0060] It should be understood that whether a target function optimized based on a target algorithm can be started is directly and strongly tied to the target algorithm itself. The target algorithm, in turn, depends on a specific processing unit to run. If that processing unit cannot support the execution of the target algorithm, the target function will directly fail to start normally. However, upon receiving a start command for the target function, this disclosure prioritizes determining, based on the parameter information of the target processing unit, whether the target processing unit used to run the target algorithm can support its execution. If not, it switches to a backup processing unit to run the target algorithm, thus avoiding the problem in related technologies where the inability of the optimized algorithm to run leads to the corresponding function failing to start normally.

[0061] The following example illustrates the technical solution disclosed herein: "The target function is a preview interface display function, the target algorithm is an AI algorithm, and the target processing unit is an APU core, which displays the preview interface of a smartphone."

[0062] In this embodiment, the role of the AI ​​algorithm is to optimize the preview screen displayed on the preview interface. In order to ensure that the preview screen displayed is the optimized preview screen, the developers wrote code in the underlying logic to represent "displaying the preview screen optimized by the AI ​​algorithm", that is, "optimization based on AI algorithm" is a prerequisite for "displaying the preview interface".

[0063] Under this premise, if the APU core used to run the AI ​​algorithm has some parameters that are below the lower limit due to quality control issues, the APU core will have the aforementioned "weak constitution" problem. It will require more power to release the same performance as a regular APU core. However, for smartphones, the underlying logic is set to use specified power supply parameters for each APU core, that is, to use the conventional power supply parameters mentioned above. Therefore, if the method in the relevant technology is used, that is, if the AI ​​algorithm still runs on the APU core, the AI ​​algorithm will not be able to run properly due to insufficient performance release of the APU core under the conventional power supply parameters, which will lead to problems such as the preview interface freezing.

[0064] In this embodiment, the APU processor in the smartphone may include, for example: Figure 2The core shown is named CORE0, 1...n. Based on this, if the smartphone runs AI algorithms through CORE0 by default, the AI ​​algorithms can be deployed in CORE0 so that the camera application can call them when it starts.

[0065] In this embodiment, by adopting the technical solution disclosed herein, the performance of each APU core in a smartphone can be periodically tested.

[0066] The following section will use CORE0 as an example to introduce the process of performance testing for a single APU core.

[0067] Figure 3 This is a flowchart illustrating an exemplary embodiment of the present disclosure of an APU core detection method. Figure 3 As shown, the method may include the following steps:

[0068] Step 301: Start the regular APU kernel scheduler to schedule CORE0.

[0069] In this embodiment, an APU kernel scheduler specifically designed for testing APU cores can be pre-configured to determine whether the corresponding APU core has sufficient performance to run the corresponding algorithm based on the program's running status, or in other words, whether the APU core is the aforementioned "weak" APU core.

[0070] For example, the APU kernel scheduler can run the AI ​​algorithm specifically designed to optimize the preview interface, or it can run other types of algorithms such as neural network algorithms. Of course, this example is merely illustrative; the specific algorithm the APU kernel scheduler runs to complete the test can be determined by those skilled in the art based on the actual situation, and this disclosure does not impose any limitations on this. It should be noted that the algorithm typically needs to be a high-load algorithm to ensure that the core passing the test is capable of running high-load algorithms similar to AI algorithms.

[0071] Step 302: Perform DVFS testing on CORE0; if the test passes, record the performance test result of passing the DVFS test; otherwise, record the performance test result of failing the DVFS test.

[0072] In this embodiment, after the APU kernel scheduler is started to schedule CORE0, a DVFS (Dynamic Voltage and Frequency Scaling) test can be performed on CORE0 to determine whether CORE0 is the aforementioned "weak" APU core.

[0073] For example, during the test, different voltage values ​​can be used to power CORE0, and the running status of the APU kernel scheduler under various power supply conditions can be obtained. If the voltage value that allows the APU kernel scheduler to run normally is the standard voltage value of a smartphone, then CORE0 is determined to have passed the DVFS test, and the test result is recorded. If the voltage value that allows the APU kernel scheduler to run normally is higher than the standard voltage value of a smartphone, then CORE0 is determined to have failed the DVFS test, and the test result is also recorded.

[0074] Through the above method, this embodiment can also obtain and record the test results of CORE1, 2...n. Based on this, during the actual operation of the camera application, the APU core running the AI ​​algorithm can be determined according to the test results.

[0075] Assuming the test described above recorded the results as "CORE0: fail; CORE1: success", then CORE1 can be set as the backup APU core for CORE0. Based on this, the process of launching the camera application and displaying the preview interface can be as follows: Figure 4 As shown.

[0076] Figure 4 This is a flowchart illustrating a preview interface display method as an exemplary embodiment of this disclosure. Figure 4 As shown, the method may include the following steps:

[0077] Step 401: Launch the camera application.

[0078] In this embodiment, the smartphone can launch the camera application under user operation. After launch, the camera application will schedule the camera module to capture images and prepare to display the captured images as preview images in the preview interface.

[0079] Step 402: Initiate AI algorithm scheduling instructions.

[0080] In this embodiment, since AI algorithms are used by default to optimize the preview image, a scheduling command for the AI ​​algorithm can be initiated after the camera application is launched, so as to optimize the preview image through the AI ​​algorithm.

[0081] Step 403: Obtain the recorded DVFS test results.

[0082] In this embodiment, instead of directly running the AI ​​algorithm on the pre-set default CORE0 core used for running AI algorithms as in related technologies, the recorded DVFS test results are obtained first to determine whether CORE0 has the problem of parameters being too low. If so, the AI ​​algorithm is switched to the backup APU core.

[0083] Since this embodiment uses the test result "CORE0: fail; CORE1: success" as an example, in this embodiment, since CORE0 failed the DVFS test, it can be determined from the obtained DVFS test result that the APU core needs to be switched to run the AI ​​algorithm.

[0084] Step 404: Confirm that the CORE0 test failed.

[0085] Step 405: Switch to CORE1 to run the AI ​​algorithm to optimize the preview screen.

[0086] In this embodiment, since CORE1 is used as a backup APU core for CORE0, the AI ​​algorithm can be switched to CORE1 to optimize the preview screen.

[0087] Step 406: Display the optimized preview in the camera application's preview interface.

[0088] In this embodiment, after the preview image is optimized using AI algorithms, it can be displayed in the preview interface of the camera application.

[0089] As can be seen from this embodiment, this embodiment can perform DVFS testing on the APU core in advance to determine whether there are APU cores with some parameters that are below the lower limit, resulting in the above-mentioned "weak constitution" problem. Then, when the default APU core used to run the AI ​​algorithm is such a core, the system switches to the backup APU core to run the AI ​​algorithm, ensuring the normal display of the preview interface.

[0090] It is evident that the technical solution disclosed herein can circumvent the problem described above where a specific function cannot be implemented due to the failure of the optimization algorithm.

[0091] Figure 5 This is a block diagram illustrating a function activation device according to an exemplary embodiment of this disclosure. (Refer to...) Figure 5 The device includes a receiving unit 501, an acquisition unit 502, and an operation unit 503.

[0092] The receiving unit 501 receives the start command of the target function; the target function is optimized based on the target algorithm.

[0093] The acquisition unit 502 acquires preset parameter information of the target processing unit used to run the target algorithm;

[0094] If the parameter information indicates that the performance released by the target processing unit is insufficient to run the target algorithm, the running unit 503 runs the target algorithm based on the backup processing unit of the target processing unit to start the target function.

[0095] The target algorithm can be optionally: an artificial intelligence algorithm;

[0096] The target processing unit used to run the target algorithm is: the target acceleration processing unit used to run the artificial intelligence algorithm.

[0097] Optionally, the target function is the image preview function of the camera application; the target algorithm is an image optimization algorithm for the image preview function.

[0098] The running unit 503 is further configured to: run the image optimization algorithm based on the backup processing unit of the target processing unit to display the optimized preview image in the preview interface of the camera application.

[0099] Optionally, the target function is the rendering function of the editing software; the target algorithm is a rendering optimization algorithm for image rendering.

[0100] The running unit 503 is further configured to: run the rendering optimization algorithm based on the backup processing unit of the target processing unit to perform rendering operations.

[0101] Optional,

[0102] It also includes: a test unit 504, which performs performance tests on a preset target processing unit used to run the target algorithm, and maintains the performance test results;

[0103] The acquisition unit 502 is further used to: acquire the performance test results.

[0104] Optionally, test unit 504 is further used for:

[0105] The target processing unit, which is used to run the target algorithm, is powered by a variety of power supply parameters, and the operating status of the target processing unit is monitored under various power supply parameters.

[0106] Under the condition that the power supply parameters that enable the target processing unit to operate normally are not higher than the conventional power supply parameters, record the performance test results of the target processing unit, which are sufficient to run the target algorithm.

[0107] When the power supply parameters for the target processing unit to operate normally are higher than the normal power supply parameters, the performance test results of the target processing unit being insufficient to run the target algorithm are recorded.

[0108] Optionally, test unit 504 is further used for:

[0109] Statistics on users' most frequently used device time periods;

[0110] When the device is not in its usual operating hours, a performance test is performed on the preset target processing unit used to run the target algorithm, and the performance test results are maintained.

[0111] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0112] Accordingly, this disclosure also provides a function activation device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the function activation method as described in any of the above embodiments, for example, the method may include: receiving a activation instruction for a target function; optimizing the target function based on a target algorithm; obtaining preset parameter information of a target processing unit for running the target algorithm; and, if the parameter information indicates that the performance released by the target processing unit is insufficient to run the target algorithm, running the target algorithm based on a backup processing unit of the target processing unit to activate the target function.

[0113] Accordingly, this disclosure also provides an electronic device, which includes a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors. The one or more programs include instructions for implementing the function startup method as described in any of the above embodiments. For example, the method may include: receiving a startup instruction for a target function; optimizing the target function based on a target algorithm; obtaining preset parameter information of a target processing unit for running the target algorithm; and, if the parameter information indicates that the performance released by the target processing unit is insufficient to run the target algorithm, running the target algorithm based on a backup processing unit of the target processing unit to start the target function.

[0114] Figure 6This is a block diagram illustrating an apparatus 600 for implementing a function activation method according to an exemplary embodiment. For example, apparatus 600 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0115] Reference Figure 6 The device 600 may include one or more of the following components: a processing component 602, a memory 604, a power supply component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.

[0116] Processing component 602 typically controls the overall operation of device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.

[0117] Memory 604 is configured to store various types of data to support the operation of device 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0118] Power supply component 606 provides power to the various components of device 600. Power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 600.

[0119] Multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0120] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.

[0121] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0122] Sensor assembly 614 includes one or more sensors for providing status assessments of various aspects of device 600. For example, sensor assembly 614 may detect the on / off state of device 600, the relative positioning of components such as the display and keypad of device 600, changes in the position of device 600 or a component of device 600, the presence or absence of user contact with device 600, the orientation or acceleration / deceleration of device 600, and temperature changes of device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0123] Communication component 616 is configured to facilitate wired or wireless communication between device 600 and other devices. Device 600 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G LTE, 5G NR (New Radio), or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0124] In an exemplary embodiment, the apparatus 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0125] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by a processor 620 of the device 600 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0126] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0127] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

[0128] The above description is merely a preferred embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method of enabling a function, characterized by, include: Receive the start command for the target function; The target function is optimized based on the target algorithm; Obtain the preset parameter information of the target processing unit used to run the target algorithm; If the parameter information indicates that the performance released by the target processing unit is insufficient to run the target algorithm, the target algorithm is run by the backup processing unit of the target processing unit to start the target function.

2. The method according to claim 1, characterized in that, The target algorithm is: an artificial intelligence algorithm; The target processing unit used to run the target algorithm is: the target acceleration processing unit used to run the artificial intelligence algorithm.

3. The method of claim 1, wherein, The target function is the image preview function of the camera application; the target algorithm is an image optimization algorithm for the image preview function. The backup processing unit based on the target processing unit runs the target algorithm to activate the target function, including: the backup processing unit based on the target processing unit runs the image optimization algorithm to display the optimized preview image in the preview interface of the camera application.

4. The method of claim 1, wherein, The target function is the rendering function of the editing software; the target algorithm is a rendering optimization algorithm for image rendering. The backup processing unit based on the target processing unit runs the target algorithm to start the target function, including: the backup processing unit based on the target processing unit runs the rendering optimization algorithm to perform rendering operations.

5. The method according to claim 1, characterized in that, It also includes: performing performance tests on the preset target processing unit used to run the target algorithm, and maintaining the performance test results; The step of obtaining the preset parameter information of the target processing unit used to run the target algorithm includes: obtaining the performance test results.

6. The method of claim 5, wherein, The performance test of the preset target processing unit for running the target algorithm includes: The target processing unit, which is used to run the target algorithm, is powered by a variety of power supply parameters, and the operating status of the target processing unit is monitored under various power supply parameters. Under the condition that the power supply parameters that enable the target processing unit to operate normally are not higher than the conventional power supply parameters, record the performance test results of the target processing unit, which are sufficient to run the target algorithm. When the power supply parameters for the target processing unit to operate normally are higher than the normal power supply parameters, the performance test results of the target processing unit being insufficient to run the target algorithm are recorded.

7. The method of claim 5, wherein, The performance test of the preset target processing unit for running the target algorithm includes: Statistics on users' most frequently used device time periods; When the device is not in its usual operating hours, a performance test is performed on the preset target processing unit used to run the target algorithm, and the performance test results are maintained.

8. A function activation device characterized by comprising: include: The receiving unit receives the start command for the target function; The target function is optimized based on the target algorithm; The acquisition unit acquires preset parameter information of the target processing unit used to run the target algorithm; If the parameter information indicates that the performance released by the target processing unit is insufficient to run the target algorithm, the running unit runs the target algorithm based on the backup processing unit of the target processing unit to start the target function.

9. An electronic device, comprising: include: processor; Memory used to store processor-executable instructions; The processor implements the method as described in any one of claims 1-7 by executing the executable instructions.

10. A computer readable storage medium having stored thereon computer instructions, wherein, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-7.