CN112306822B - Control method and device and electronic equipment - Google Patents

Control method and device and electronic equipment Download PDF

Info

Publication number
CN112306822B
CN112306822B CN202011382119.1A CN202011382119A CN112306822B CN 112306822 B CN112306822 B CN 112306822B CN 202011382119 A CN202011382119 A CN 202011382119A CN 112306822 B CN112306822 B CN 112306822B
Authority
CN
China
Prior art keywords
target component
state
target
information
outputting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011382119.1A
Other languages
Chinese (zh)
Other versions
CN112306822A (en
Inventor
王欢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202011382119.1A priority Critical patent/CN112306822B/en
Publication of CN112306822A publication Critical patent/CN112306822A/en
Application granted granted Critical
Publication of CN112306822B publication Critical patent/CN112306822B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Power Sources (AREA)
  • Telephone Function (AREA)

Abstract

The application provides a control method, a control device and electronic equipment, wherein the method is used for outputting corresponding prompt information at least according to the power utilization state by obtaining the power utilization state of a target component, so that the prompt is more targeted, further, the application program can be ensured to use the target component in time, and the running efficiency of the application program is improved.

Description

Control method and device and electronic equipment
Technical Field
The present disclosure relates to the field of electronic devices, and in particular, to a control method and apparatus, and an electronic device.
Background
Currently, when an application cannot use an image pickup apparatus, an operating system generally directly prompts that the image pickup apparatus cannot be used or cannot be found.
However, such a presentation method is not effective, and it is difficult to locate the cause of the image pickup apparatus being unusable in time.
Disclosure of Invention
The application provides the following technical scheme:
in one aspect, the present application provides a control method, including:
if a request for calling a target component is obtained, obtaining the power utilization state of the target component;
and outputting corresponding prompt information at least according to the power utilization states, wherein the prompt information correspondingly output by different power utilization states is different.
Wherein obtaining a request to invoke the target component includes:
if the application process is determined to run the target subprocess or newly establish the target subprocess, obtaining a request for calling the target component, wherein the target subprocess depends on the resource provided by the target component; or alternatively, the first and second heat exchangers may be,
and if the event that the target application process accesses the corresponding target component is intercepted, obtaining a request for calling the target component, wherein the target application process realizes the function based on the target component.
Obtaining the power utilization state of the target component comprises the following steps:
inquiring the power utilization state of a target component required by the target subprocess in a basic input/output system and/or an embedded controller of the electronic equipment through a preset driver; or alternatively, the first and second heat exchangers may be,
and inquiring the switch state of a physical switch associated with the target component in a basic input and output system and/or an embedded controller of the electronic equipment through a preset driver, wherein the physical switch controls the power utilization state of the target component.
Wherein, at least, according to the corresponding prompt message of power consumption state output, include:
if the target component is in an electrified state, acquiring resource occupation information of the target component, and outputting corresponding prompt information according to the determined first processing strategy according to the resource occupation information; or alternatively, the first and second heat exchangers may be,
And if the target component is in the power-off state, outputting corresponding prompt information according to the determined second processing strategy.
The method for outputting the corresponding prompt information according to the determined first processing strategy comprises the following steps:
if the target component is occupied by other application processes or other application subprocesses, outputting the prompt information that the target component is occupied or outputting the prompt information for switching to the target application process or the target subprocess; or alternatively, the first and second heat exchangers may be,
and if the target component is not occupied by other application processes or other application subprocesses, outputting prompt information for starting the target component.
The method for outputting the corresponding prompt information according to the determined first processing strategy comprises the following steps:
if the target component is not occupied by other application processes or other application subprocesses, obtaining the installation information of the driver of the target component;
if the installation information indicates that the driver of the target component is not installed, outputting prompt information that the driver of the target component is not installed; or alternatively, the first and second heat exchangers may be,
outputting prompt information of the non-latest version of the driver of the target component if the installation information characterizes that the driver of the target component is installed and the version of the driver of the target component is not the latest version;
Or if the target component is not occupied by other application processes or other application subprocesses, outputting prompt information that the target component is blocked by the antivirus software if the target component is blocked by the antivirus software.
The method for outputting the corresponding prompt information according to the determined second processing strategy comprises the following steps:
outputting prompt information of the target component powered off by the physical switch; or alternatively, the first and second heat exchangers may be,
and outputting prompt information of whether the target component is started or not so as to start the target component when an operation or an instruction for switching the switching state of the physical switch is obtained.
Outputting corresponding prompt information at least according to the electricity utilization state, including:
if the target component is in a power-on state and the target component is occupied by other application processes or other application sub-processes, acquiring priority information of the target application processes or the target sub-processes and state information of other components meeting a preset association relation with the target component, and outputting at least prompt information for using the other components according to the priority information and the state information of the other components; or alternatively, the first and second heat exchangers may be,
and if the target component is in a power-off state, acquiring state information of other components meeting a preset association relation with the target component, and outputting at least prompt information for starting the other components according to the state information of the other components.
Another aspect of the present application provides a control apparatus, including:
the power utilization state obtaining module is used for obtaining the power utilization state of the target component if a request for calling the target component is obtained;
and the prompt module is used for outputting corresponding prompt information at least according to the power utilization states, wherein the prompt information correspondingly output by different power utilization states is different.
A third aspect of the present application provides an electronic device, comprising:
a memory for storing at least one set of instructions;
a processor for invoking and executing said set of instructions in said memory, by executing said set of instructions, performing a control method as claimed in any one of the preceding claims.
The beneficial effects of this application include at least:
in the application, by obtaining the electricity utilization state of the target component, corresponding prompt information is output at least according to the electricity utilization state, so that prompt is more targeted, further, the application program can use the target component in time, and the running efficiency and the utilization rate of the application program are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic flow chart of a control method provided in embodiment 1 of the present application;
FIG. 2 is a schematic diagram of an implementation scenario of a control method provided herein;
FIG. 3 is a schematic diagram of another implementation scenario of a control method provided herein;
fig. 4 is a schematic flow chart of a control method provided in embodiment 2 of the present application;
FIG. 5 is a schematic diagram of still another implementation scenario of a control method provided herein;
FIG. 6 is a schematic diagram of still another implementation scenario of a control method provided herein;
FIG. 7 is a schematic diagram of still another implementation scenario of a control method provided herein;
FIG. 8 is a schematic diagram of still another implementation scenario of a control method provided herein;
FIG. 9 is a schematic diagram of still another implementation scenario of a control method provided herein;
FIG. 10 is a schematic diagram of still another implementation scenario of a control method provided herein;
fig. 11 is a schematic flow chart of a control method provided in embodiment 3 of the present application;
FIG. 12 is a schematic diagram of still another implementation scenario of a control method provided herein;
FIG. 13 is a schematic diagram of still another implementation scenario of a control method provided herein;
Fig. 14 is a schematic flow chart of a control method provided in embodiment 4 of the present application;
fig. 15 is a schematic flow chart of a control method provided in embodiment 5 of the present application;
fig. 16 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Referring to fig. 1, a flow chart of a control method provided in embodiment 1 of the present application may be applied to an electronic device, where the product type of the electronic device is not limited, and as shown in fig. 1, the method may include, but is not limited to, the following steps:
Step S101, if a request for calling a target component is obtained, obtaining the power utilization state of the target component.
In this embodiment, the target components may include, but are not limited to: an image pickup section, a sound input/output section, a fingerprint acquisition section, or a touch input section.
Wherein obtaining the request to invoke the target component may include:
s1011, if the application process is determined to run the target subprocess or newly build the target subprocess, a request for calling the target component is obtained.
An application process can be understood as: not limited to the process of an application (e.g., instant messaging software, office software, or shopping software) that implements functionality based on the target component.
The target sub-process can be understood as: sub-processes that rely on resources provided by the target component to implement specific functions, such as voice calls, video calls, voice conferences, video conferences, photo searches, or scanning two-dimensional codes. In the case where the target subprocess is a voice call or a voice conference, it depends on the resources provided by the voice input/output section; in the case that the target subprocess is a video call or a video conference, the target subprocess depends on resources provided by a voice input/output component and/or a camera component; in the case that the target sub-process searches for a photograph or scans a two-dimensional code, it depends on the resource provided by the camera component.
Because the target subprocess is a subprocess which depends on the resource provided by the target component to realize the specific function, if the application process is determined to run the target subprocess or newly build the target subprocess, the application process is characterized to initiate a request for calling the target component to the electronic device, and the electronic device can acquire the request for calling the target component.
Of course, obtaining the request to invoke the target component may also include:
s1012, if the event that the target application process accesses the corresponding target component is intercepted, a request for calling the target component is obtained.
In this embodiment, the target application process may be understood as: an application process for implementing a function based on a target component, such as a camera process, a recorder process, or a fingerprint recognition process.
Because the target application process is an application process for realizing functions based on the target component, if an event that the target application process accesses the corresponding target component is intercepted, the target application process is characterized in that a request for calling the target component is initiated to the electronic device, and the electronic device can obtain the request for calling the target component.
In this embodiment, the power utilization state of the components in the electronic device may be monitored and recorded by the bios of the electronic device; alternatively, the power consumption state of the components in the electronic device can be monitored and recorded by an embedded controller of the electronic device; alternatively, the power usage status of components in the electronic device may be monitored and recorded by both the basic input output system and the embedded controller of the electronic device.
Under the condition that the basic input and output system and the embedded controller of the electronic equipment monitor and record the power utilization state of the components in the electronic equipment, the basic input and output system and the embedded controller can monitor and record the power utilization state of all the components in the electronic equipment, and of course, the basic input and output system can monitor and record the power utilization state of one part of the components in the electronic equipment, and the embedded controller monitors and records the power utilization state of the other part of the components in the electronic equipment.
The basic input and output system and the embedded controller monitor and record the power utilization state of all components in the electronic equipment, so that the reliability of monitoring can be ensured, the recording accuracy is improved, the backup of the power utilization state of the components is realized, and the reliability of the power utilization state of the components can be ensured.
Specifically, obtaining the power consumption state of the target component may include:
and inquiring the power utilization state of the target component required by the target subprocess in a basic input and output system and/or an embedded controller of the electronic equipment through a preset driver.
In this embodiment, the preset driver may be integrated in the operating system of the electronic device. Specifically, if a request for calling a target component is obtained, a preset driver integrated in an operating system of the electronic device may be called, and the power utilization state of the target component required by the target sub-process is queried in a basic input output system and/or an embedded controller of the electronic device. In other embodiments, the preset driver may monitor the request for calling the target component, so as to actively query the bios and/or the embedded controller of the electronic device for the power consumption state of the target component required by the target sub-process, where the power consumption state is the power input state of the target component.
It should be noted that, the operating system needs to access the embedded controller through the bios, so, in the case that the preset driver is integrated in the operating system of the electronic device, a process of querying, by the preset driver, the power consumption state of the target component required by the target sub-process in the embedded controller of the electronic device may be understood as follows: and calling a preset driver, accessing the embedded controller through the basic input/output system, and inquiring the power utilization state of the target component required by the target subprocess in the embedded controller.
In this embodiment, a physical switch associated with a component may be provided in the electronic device, and the physical switch controls the power consumption state of the component. Accordingly, the power usage status of the component may be obtained by obtaining the switching status of the physical switch associated with the component.
The switching state of a physical switch associated with a component in the electronic equipment can be monitored and recorded by a basic input output system of the electronic equipment; alternatively, the switch status of a physical switch associated with a component in the electronic device may be monitored and recorded by an embedded controller of the electronic device; alternatively, the switch status of a physical switch associated with a component in an electronic device may be monitored and recorded by both the basic input output system and the embedded controller of the electronic device.
In the case that the basic input output system and the embedded controller of the electronic device monitor and record the switch states of the physical switches associated with the components in the electronic device, the basic input output system and the embedded controller may monitor and record the switch states of all the physical switches associated with the components in the electronic device, or of course, the basic input output system may monitor and record the switch states of one part of the physical switches in the electronic device, and the embedded controller may monitor and record the switch states of another part of the physical switches in the electronic device.
The basic input and output system and the embedded controller monitor and record the switch states of all physical switches associated with the components in the electronic equipment, so that the reliability of monitoring can be ensured, the recording accuracy is improved, the backup of the power utilization state of the components is realized, and the reliability of the power utilization state of the components can be ensured.
Another embodiment for obtaining the electricity consumption state of the target component may specifically be:
and inquiring the switch state of a physical switch associated with the target component in a basic input and output system and/or an embedded controller of the electronic equipment through a preset driver, wherein the physical switch controls the power utilization state of the target component.
The queried switch state of the physical switch associated with the target component can characterize the power utilization state of the target component.
In this embodiment, the power consumption state of the target component may include, but is not limited to: the target component is in an energized state or the target component is in a de-energized state.
Step S102, outputting corresponding prompt information at least according to the power utilization states, wherein the prompt information correspondingly output by different power utilization states is different.
In this embodiment, when the power utilization state of the target component is that the target component is in the power-on state, whether the target component can be normally called may be determined, and if it is determined that the target component can be normally called, no prompting information or prompting information for starting the target component may be output; if the target component is determined to be unable to be invoked normally, the reason affecting the normal invocation of the target component can be located, and the located reason is output.
And under the condition that the power utilization state of the target component is that the target component is in the power-off state, outputting prompt information that the target component is in the power-off state.
In the present application, the manner of outputting the presentation information is not limited. For example, corresponding prompt information can be output in a text form in a corresponding interface of the electronic equipment; or outputting corresponding prompt information in a voice form through a voice output part of the electronic equipment; or corresponding prompt information is output in a lamplight form through corresponding components in the electronic equipment.
Taking the running of an application process of the instant messaging software or the creation of a new video call as an example, the outputting of corresponding prompt information at least according to the power utilization state is described, for example:
if the application process of the instant messaging software is determined to run the video call or newly establish the video call, acquiring a request for calling the camera component and the pick-up component initiated by the application process of the instant messaging software, and acquiring the power utilization state of the camera component and the pick-up component when acquiring the request for calling the camera component and the pick-up component initiated by the application process of the instant messaging software.
If the power utilization state of the image pickup part is that the image pickup part is in the power-on state, if the image pickup part cannot be normally called, locating the reason influencing the normal call of the image pickup part, outputting prompt information comprising the reason influencing the normal call of the image pickup part when the image pickup part is in the power-on state on a video call interface, and outputting prompt information that the image pickup part is in the power-on state but is not used due to the influence of the A reason as shown in fig. 2. In fig. 2, the reason a indicates one of the reasons that affect normal call of the image pickup device.
If the power utilization state of the image capturing component is that the image capturing component is in the power-off state, as shown in fig. 3, a prompt message that the image capturing component is in the power-off state may be output on the video through interface.
Note that fig. 2 and 3 are only specific examples of a certain scenario, and the manner and scenario of outputting the prompt information in the present application are not limited to those shown in fig. 2 and 3.
In the application, if the request for calling the target component is obtained, the power utilization state of the target component is obtained, and corresponding prompt information is output at least according to the power utilization state, so that the prompt is more targeted, the application program can be ensured to use the target component in time, and the running efficiency of the application program is improved.
As a method embodiment 2 of the present application, mainly for a refinement of the control method described in embodiment 1 above, please refer to fig. 4, the method may include, but is not limited to, the following steps:
step S201, if a request for calling the target component is obtained, the power utilization state of the target component is obtained.
The detailed process of step S201 can be referred to the related description of step S101 in embodiment 1, and will not be described herein.
Step S202, if the target component is in the power-on state, obtaining the resource occupation information of the target component, and outputting corresponding prompt information according to the determined first processing strategy according to the resource occupation information.
In this embodiment, the resource occupation information may represent a resource occupation condition of the target component. For different resource occupation situations, a first processing strategy can be predetermined and used as reference information for outputting corresponding prompt information.
Outputting corresponding prompt information according to the determined first processing strategy according to the resource occupation information, which can include but is not limited to:
s2021, if the target component is occupied by other application processes or other application sub-processes, outputting the prompt information that the target component is occupied, or outputting the prompt information that the target application process or the target sub-process is switched to.
In this embodiment, taking the application process of the instant messaging software running or creating a new video call as an example, step S2021 is described, for example:
if it is determined that the application process of the instant messaging software runs the video call or newly-built video call, a request for calling the camera shooting component initiated by the application process of the instant messaging software is obtained, when the request for calling the camera shooting component initiated by the application process of the instant messaging software is obtained, the power utilization state of the camera shooting component is obtained, the camera shooting component is in a power-on state, and in the power-on state of the camera shooting component, if the camera shooting component is occupied by other application processes or other application sub-processes, prompt information of the camera shooting component occupied by other application processes or other application sub-processes is output at a video call interface, as shown in fig. 5. When the camera shooting component is in the power-on state, if the camera shooting component is occupied by other application processes or other application subprocesses, prompt information for switching to the target application process or the target subprocess can be output on the video call interface. As shown in fig. 6, when the video output camera component is occupied through the interface, the prompt message of the target application process or the target sub-process is requested to be switched.
Another specific implementation way of outputting the corresponding prompt information according to the determined first processing strategy according to the resource occupation information may be:
s2022, if the target component is not occupied by other application processes or other application sub-processes, outputting prompt information for enabling the target component.
If the target component is not occupied by other application processes or other application sub-processes, prompt information for starting the target component can be directly output.
Of course, if the target component is not occupied by other application processes or other application sub-processes and other information representing that the target component cannot be used is not obtained, prompt information for starting the target component is output to prompt the user that the surrounding images of the user are about to be obtained, and privacy security of the user is ensured.
In this embodiment, taking the application process of the instant messaging software running or creating a new video call as an example, step S2022 is described, for example:
if it is determined that the application process of the instant messaging software runs the video call or newly-built video call, a request for calling the camera component initiated by the application process of the instant messaging software is obtained, when the request for calling the camera component initiated by the application process of the instant messaging software is obtained, the power utilization state of the camera component is obtained, the camera component is in a power-on state, and in the power-on state of the camera component, if the camera component is not occupied by other application processes or other application subprocesses, as shown in fig. 7, prompt information about whether to enable the camera component can be output on a video call interface, and a selection button is output for inputting instructions about whether to enable the camera component.
In this embodiment, another specific implementation manner of outputting the corresponding prompt information according to the determined first processing policy according to the resource occupation information may be:
s2023, if the target component is not occupied by other application processes or other application sub-processes, obtaining the installation information of the driver of the target component.
S2024, if the installation information indicates that the driver of the target component is not installed, outputting prompt information of the driver of the target component being not installed.
In this embodiment, taking the camera accessing the image capturing element as an example, steps S2023 to S2024 are described, for example, if the camera is to access the image capturing element, the electronic apparatus may intercept the time when the camera accesses the image capturing element, obtain a request for the camera to call the image capturing element, obtain the power-on state of the image capturing element when the request for the camera to call the image capturing element is obtained, obtain the installation information of the driver of the target element if the image capturing element is in the power-on state, if the image capturing element is not occupied by other application processes or other application sub-processes, and obtain the installation information of the driver of the target element if the installation information indicates that the driver of the target element is not installed, the electronic apparatus may generate a prompt interface in which the driver of the image capturing element is not installed, as shown in fig. 8.
S2025, if the installation information indicates that the driver of the target component is installed and the version of the driver of the target component is not the latest version, outputting prompt information of the version of the driver of the target component.
Still taking the camera accessing the image capturing section as an example, steps S2023 and S2025 will be described, for example, if the camera is to access the image capturing section, the electronic apparatus may intercept the time when the camera accesses the image capturing section, obtain a request for the camera to call the image capturing section, obtain the power-on state of the image capturing section when the request for the camera to call the image capturing section is obtained, obtain the installation information of the driver of the target section if the image capturing section is in the power-on state, if the image capturing section is not occupied by other application processes or other application sub-processes in the power-on state, and output the hint information of the version of the driver of the image capturing section that is not the latest version in the camera interface if the installation information characterizes that the driver of the image capturing section has been installed and the version of the driver of the image capturing section is not the latest version, as shown in fig. 9.
In this embodiment, the outputting of the corresponding prompt information according to the determined first processing policy according to the resource occupation information may also be:
S2026, if the target component is not occupied by other application processes or other application sub-processes, outputting prompt information that the target component is blocked by the antivirus software if the target component is blocked by the antivirus software.
If the target component is not occupied by other application processes or other application subprocesses, whether the target component is blocked by the antivirus software can be continuously judged, and if the target component is blocked by the antivirus software, a prompt message that the target component is blocked by the antivirus software is output.
In this embodiment, step S2026 is described by taking the camera accessing the image capturing unit as an example, for example, if the camera is to access the image capturing unit, the electronic device may intercept the time for accessing the image capturing unit by the camera, obtain a request for invoking the image capturing unit by the camera, obtain the power-on state of the image capturing unit when obtaining the request for invoking the image capturing unit by the camera, determine whether the image capturing unit is blocked by the antivirus software if the image capturing unit is in the power-on state, if the image capturing unit is not occupied by other application processes or other application sub-processes, and if the image capturing unit is blocked by the antivirus software, the electronic device may generate a prompt interface in which prompt information that the image capturing unit is blocked by the antivirus software is output, as shown in fig. 10.
In this embodiment, if a request for calling a target component is obtained, the power consumption state of the target component is obtained, and if the target component is in the power-on state, the resource occupation information of the target component is obtained, so that corresponding prompt information is output according to the determined first processing policy according to the resource occupation information, so that the prompt is more targeted and perfect, the application program can use the target component in time, and the running efficiency of the application program is improved.
As a method embodiment 3 of the present application, mainly for a refinement of the control method described in embodiment 1 above, please refer to fig. 11, the method may include, but is not limited to, the following steps:
step S301, if a request for calling the target component is obtained, obtaining the power utilization state of the target component.
The detailed process of step S301 can be referred to the related description of step S101 in embodiment 1, and will not be described herein.
Step S302, if the target component is in a power-off state, outputting corresponding prompt information according to the determined second processing strategy.
In this embodiment, the second processing policy may be predetermined for the case where the target component is in the power-off state, and be used as the reference information for outputting the corresponding prompt information.
Outputting the corresponding prompt information according to the determined second processing strategy may include:
s3021, outputting prompt information that the target component is powered off by the physical switch.
Of course, while outputting the prompt information of the target component powered off by the physical switch, the prompt information of the position of the physical switch in the electronic device may also be output, so as to enable the target component through the physical switch.
And when the prompting information of the power-off of the target component by the physical switch is output, the prompting information of the position of the physical switch in the electronic equipment is also output, so that the target component can be started in time, and the starting efficiency is improved.
In this embodiment, step S3021 will be described by taking the camera accessing the image capturing section as an example, for example, if the camera is to access the image capturing section, the electronic device intercepts an event of accessing the image capturing section by the camera, obtains a request for invoking the image capturing section by the camera, obtains the power utilization state of the image capturing section when obtaining the request for invoking the image capturing section by the camera, and if the image capturing section is in the power-off state, the electronic device may generate a presentation interface in which the presentation information that the image capturing section is powered off by the physical switch is output, as shown in fig. 12. Of course, if the image capturing component is in the power-off state, the generated prompting interface may output the prompting information of the power-off of the image capturing component by the physical switch and the position of the physical switch in the electronic device, as shown in fig. 13, the prompting information of the image capturing component may be started by the physical switch on the right side of the electronic device.
Outputting the corresponding prompt information according to the determined second processing strategy, and may also include:
s3022, outputting prompt information of whether to enable the target component, so as to enable the target component when obtaining an operation or instruction for switching the switch state of the physical switch.
And outputting prompt information of whether the target component is started or not to prompt whether the target component is started or not, and starting the target component if an operation or an instruction for switching the switching state of the physical switch is obtained after prompting.
In this embodiment, if a request for calling a target component is obtained, the power consumption state of the target component is obtained, if the target component is in a power-off state, corresponding prompt information is output according to a determined second processing policy, so that the prompt is more targeted, the reason that the target component cannot be used is ensured to be located in time, the application program is ensured to be able to use the target component in time, and the running efficiency of the application program is improved.
As a refinement of the control method described in embodiment 1 above, please refer to fig. 14, the method embodiment 4 of the present application may include, but is not limited to, the following steps:
Step S401, if a request for calling the target component is obtained, the power utilization state of the target component is obtained.
The detailed process of step S401 can be referred to the related description of step S101 in embodiment 1, and will not be described herein.
Step S402, if the target component is in the power-on state and the target component is occupied by other application processes or other application sub-processes, obtaining priority information of the target application process or the target sub-process and obtaining state information of other components meeting a predetermined association relation with the target component, so as to output at least prompt information for using the other components according to the priority information and the state information of the other components.
Other components satisfying a predetermined association relationship with the target component can be understood as: other components of the electronic device that function the same as the target component; or other components of the electronic device external to the electronic device that are functionally identical to the target component.
For a specific process of obtaining state information of other components that satisfy a predetermined association relationship with the target component, reference may be made to the description of obtaining the power utilization state of the target component in the foregoing embodiments, which is not repeated herein.
Outputting at least prompt information for using other components according to the priority information and the state information of the other components can be understood as: if the obtained priority information of the target application process or the target subprocess represents that the priority of the target application process or the target subprocess is highest, determining other components in the power-on state from other components according to the state information of the other components, and outputting prompt information for using the other components in the power-on state when determining the other components in the power-on state.
In this embodiment, if the target component is in the power-on state and the target component is occupied by another application process or another application sub-process, the priority information of the target application process or the target sub-process and the state information of another component satisfying the predetermined association relation with the target component are obtained, so that at least the prompt information of using another component is output according to the priority information and the state information of another component, and it is ensured that when the target component is occupied by another application process or another application sub-process, another component can be found in time according to the prompt information of using another component, thereby ensuring timely switching of using another component, and further improving the running efficiency and the utilization rate of the application program.
As a refinement of the control method described in embodiment 1 above, please refer to fig. 15, the method embodiment 5 of the present application may include, but is not limited to, the following steps:
step S501, if a request for calling the target component is obtained, the power utilization state of the target component is obtained.
The detailed process of step S501 may be referred to the related description of step S101 in embodiment 1, and will not be described herein.
Step S502, if the target component is in a power-off state, obtaining state information of other components meeting a preset association relation with the target component, and outputting at least prompt information for starting the other components according to the state information of the other components.
Other components satisfying a predetermined association relationship with the target component can be understood as: other components of the electronic device that function the same as the target component; or other components of the electronic device external to the electronic device that are functionally identical to the target component.
For a specific process of obtaining state information of other components that satisfy a predetermined association relationship with the target component, reference may be made to the description of obtaining the power utilization state of the target component in the foregoing embodiments, which is not repeated herein.
Outputting at least the prompt to activate the other component based on the status information of the other component may include, but is not limited to: and according to the state information of the other components, determining the other components in the power-on state from the other components, and outputting prompt information for using the other components in the power-on state when determining the other components in the power-on state.
In this embodiment, by obtaining the power utilization state of the target component, if the target component is in the power-off state, state information of other components satisfying a predetermined association relationship with the target component is obtained, so as to output at least prompt information for starting the other components according to the state information of the other components, so that when the target component is in the power-off state, the other components can be started in time according to the prompt information for starting the other components, and further, the running efficiency of the application program is improved.
Corresponding to the embodiment of the control method provided by the application, the application also provides an embodiment of the electronic equipment applying the control method.
As shown in fig. 16, which is a schematic structural diagram of an embodiment 1 of an electronic device provided in the present application, the electronic device may include the following structures:
memory 100 and processor 200.
A memory 100 for storing at least one set of instructions;
a processor 200 for calling and executing the instruction set in the memory 100, by executing the instruction set:
if a request for calling a target component is obtained, obtaining the power utilization state of the target component;
and outputting corresponding prompt information at least according to the power utilization states, wherein the prompt information correspondingly output by different power utilization states is different.
Wherein obtaining the request to invoke the target component may include:
if the application process is determined to run the target subprocess or newly establish the target subprocess, obtaining a request for calling the target component, wherein the target subprocess depends on the resource provided by the target component; or alternatively, the first and second heat exchangers may be,
and if the event that the target application process accesses the corresponding target component is intercepted, obtaining a request for calling the target component, wherein the target application process realizes the function based on the target component.
In this embodiment, obtaining the power consumption state of the target component may include:
inquiring the power utilization state of a target component required by the target subprocess in a basic input/output system and/or an embedded controller of the electronic equipment through a preset driver; or alternatively, the first and second heat exchangers may be,
and inquiring the switch state of a physical switch associated with the target component in a basic input and output system and/or an embedded controller of the electronic equipment through a preset driver, wherein the physical switch controls the power utilization state of the target component.
In this embodiment, outputting corresponding prompt information at least according to the electricity consumption state may include:
if the target component is in an electrified state, acquiring resource occupation information of the target component, and outputting corresponding prompt information according to the determined first processing strategy according to the resource occupation information; or alternatively, the first and second heat exchangers may be,
and if the target component is in the power-off state, outputting corresponding prompt information according to the determined second processing strategy.
The outputting, according to the determined first processing policy, the corresponding prompt information may include:
if the target component is occupied by other application processes or other application subprocesses, outputting the prompt information that the target component is occupied or outputting the prompt information for switching to the target application process or the target subprocess; or alternatively, the first and second heat exchangers may be,
And if the target component is not occupied by other application processes or other application subprocesses, outputting prompt information for starting the target component.
The outputting, according to the determined first processing policy, the corresponding prompt information may include:
if the target component is not occupied by other application processes or other application subprocesses, obtaining the installation information of the driver of the target component;
if the installation information indicates that the driver of the target component is not installed, outputting prompt information that the driver of the target component is not installed;
outputting prompt information of the non-latest version of the driver of the target component if the installation information characterizes that the driver of the target component is installed and the version of the driver of the target component is not the latest version;
or if the target component is not occupied by other application processes or other application subprocesses, outputting prompt information that the target component is blocked by the antivirus software if the target component is blocked by the antivirus software.
The outputting the corresponding prompt information according to the determined second processing strategy may include:
outputting prompt information of the target component powered off by the physical switch; or alternatively, the first and second heat exchangers may be,
And outputting prompt information of whether the target component is started or not so as to start the target component when an operation or an instruction for switching the switching state of the physical switch is obtained.
Outputting corresponding prompt information at least according to the electricity utilization state can comprise:
if the target component is in a power-on state and the target component is occupied by other application processes or other application sub-processes, acquiring priority information of the target application processes or the target sub-processes and state information of other components meeting a preset association relation with the target component, and outputting at least prompt information for using the other components according to the priority information and the state information of the other components; or alternatively, the first and second heat exchangers may be,
and if the target component is in a power-off state, acquiring state information of other components meeting a preset association relation with the target component, and outputting at least prompt information for starting the other components according to the state information of the other components.
Corresponding to the embodiment of the control method provided by the application, the application also provides an embodiment of the control device.
In this embodiment, the control device may include:
And the electricity utilization state obtaining module is used for obtaining the electricity utilization state of the target component if the request for calling the target component is obtained.
And the prompt module is used for outputting corresponding prompt information at least according to the power utilization states, wherein the prompt information correspondingly output by different power utilization states is different.
In this embodiment, the power consumption state obtaining module may be specifically configured to:
if the application process is determined to run the target subprocess or newly establish the target subprocess, obtaining a request for calling the target component, wherein the target subprocess depends on the resource provided by the target component; or alternatively, the first and second heat exchangers may be,
and if the event that the target application process accesses the corresponding target component is intercepted, obtaining a request for calling the target component, wherein the target application process realizes the function based on the target component.
In this embodiment, the power consumption state obtaining module may be specifically configured to:
inquiring the power utilization state of a target component required by the target subprocess in a basic input/output system and/or an embedded controller of the electronic equipment through a preset driver; or alternatively, the first and second heat exchangers may be,
and inquiring the switch state of a physical switch associated with the target component in a basic input and output system and/or an embedded controller of the electronic equipment through a preset driver, wherein the physical switch controls the power utilization state of the target component.
In this embodiment, the prompting module may be specifically configured to:
if the target component is in an electrified state, acquiring resource occupation information of the target component, and outputting corresponding prompt information according to the determined first processing strategy according to the resource occupation information; or alternatively, the first and second heat exchangers may be,
and if the target component is in the power-off state, outputting corresponding prompt information according to the determined second processing strategy.
The process of outputting the corresponding prompt information by the prompt module according to the determined first processing strategy may specifically include:
if the target component is occupied by other application processes or other application subprocesses, outputting the prompt information that the target component is occupied or outputting the prompt information for switching to the target application process or the target subprocess; or alternatively, the first and second heat exchangers may be,
and if the target component is not occupied by other application processes or other application subprocesses, outputting prompt information for starting the target component.
The process of outputting the corresponding prompt information by the prompt module according to the determined first processing strategy may specifically include:
if the target component is not occupied by other application processes or other application subprocesses, obtaining the installation information of the driver of the target component;
If the installation information indicates that the driver of the target component is not installed, outputting prompt information that the driver of the target component is not installed;
outputting prompt information of the non-latest version of the driver of the target component if the installation information characterizes that the driver of the target component is installed and the version of the driver of the target component is not the latest version;
or if the target component is not occupied by other application processes or other application subprocesses, outputting prompt information that the target component is blocked by the antivirus software if the target component is blocked by the antivirus software.
The process of outputting the corresponding prompt information by the prompt module according to the determined second processing strategy may specifically include:
outputting prompt information of the target component powered off by the physical switch; or alternatively, the first and second heat exchangers may be,
and outputting prompt information of whether the target component is started or not so as to start the target component when an operation or an instruction for switching the switching state of the physical switch is obtained.
In this embodiment, the prompting module may be specifically configured to:
if the target component is in a power-on state and the target component is occupied by other application processes or other application sub-processes, acquiring priority information of the target application processes or the target sub-processes and state information of other components meeting a preset association relation with the target component, and outputting at least prompt information for using the other components according to the priority information and the state information of the other components; or alternatively, the first and second heat exchangers may be,
And if the target component is in a power-off state, acquiring state information of other components meeting a preset association relation with the target component, and outputting at least prompt information for starting the other components according to the state information of the other components.
Corresponding to the embodiment of the control method provided by the application, the application also provides an embodiment of the storage medium.
In this embodiment, a storage medium stores a computer program for implementing the control method according to any one of the foregoing embodiments, where the computer program is executed by a processor to implement the steps of the control method according to any one of the foregoing embodiments.
It should be noted that, in each embodiment, the differences from the other embodiments are emphasized, and the same similar parts between the embodiments are referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present application.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in the embodiments or some parts of the embodiments of the present application.
The foregoing has described in detail a control method, apparatus and electronic device provided in the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, where the foregoing examples are only used to help understand the method and core idea of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (8)

1. A control method, comprising:
if a request for calling a target component is obtained, obtaining the power utilization state of the target component;
outputting corresponding prompt information at least according to the power utilization states, wherein the prompt information correspondingly output by different power utilization states is different, and the power utilization states comprise an electrified state and a powered-off state;
and outputting corresponding prompt information at least according to the electricity utilization state, wherein the prompt information comprises at least one of the following:
if the target component is in an electrified state, acquiring resource occupation information of the target component, and outputting corresponding prompt information according to the determined first processing strategy according to the resource occupation information;
if the target component is in a power-off state, outputting prompt information of the power-off of the target component by the physical switch;
if the target component is in a power-off state, outputting prompt information of whether to enable the target component, so as to enable the target component when obtaining an operation or instruction for switching the switching state of the physical switch;
and if the target component is in a power-off state, acquiring state information of other components meeting a preset association relation with the target component, and outputting at least prompt information for starting the other components according to the state information of the other components.
2. The method of claim 1, wherein obtaining a request to invoke the target component comprises:
if the application process is determined to run the target subprocess or newly establish the target subprocess, obtaining a request for calling the target component, wherein the target subprocess depends on the resource provided by the target component; or alternatively, the first and second heat exchangers may be,
and if the event that the target application process accesses the corresponding target component is intercepted, obtaining a request for calling the target component, wherein the target application process realizes the function based on the target component.
3. The method of claim 2, obtaining the power usage status of the target component, comprising:
inquiring the power utilization state of a target component required by the target subprocess in a basic input/output system and/or an embedded controller of the electronic equipment through a preset driver; or alternatively, the first and second heat exchangers may be,
and inquiring the switch state of a physical switch associated with the target component in a basic input and output system and/or an embedded controller of the electronic equipment through a preset driver, wherein the physical switch controls the power utilization state of the target component.
4. The method of claim 1, wherein outputting the corresponding hint information according to the determined first processing policy comprises:
If the target component is occupied by other application processes or other application subprocesses, outputting the prompt information that the target component is occupied or outputting the prompt information for switching to the target application process or the target subprocess; or alternatively, the first and second heat exchangers may be,
and if the target component is not occupied by other application processes or other application subprocesses, outputting prompt information for starting the target component.
5. The method of claim 1, wherein outputting the corresponding hint information according to the determined first processing policy comprises:
if the target component is not occupied by other application processes or other application subprocesses, obtaining the installation information of the driver of the target component;
if the installation information indicates that the driver of the target component is not installed, outputting prompt information that the driver of the target component is not installed; or alternatively, the first and second heat exchangers may be,
outputting prompt information of the non-latest version of the driver of the target component if the installation information characterizes that the driver of the target component is installed and the version of the driver of the target component is not the latest version;
or if the target component is not occupied by other application processes or other application subprocesses, outputting prompt information that the target component is blocked by the antivirus software if the target component is blocked by the antivirus software.
6. The method according to claim 1, wherein if the target component is in a power-on state and the target component is occupied by another application process or another application sub-process, priority information of the target application process or the target sub-process is obtained and status information of another component satisfying a predetermined association relationship with the target component is obtained, so that at least hint information of using the other component is output according to the priority information and the status information of the other component.
7. A control apparatus comprising:
the power utilization state obtaining module is used for obtaining the power utilization state of the target component if a request for calling the target component is obtained;
the prompting module is used for outputting corresponding prompting information at least according to the power utilization states, wherein the prompting information correspondingly output by different power utilization states is different, and the power utilization states comprise an electrified state and a powered-off state;
outputting corresponding prompt information at least according to the electricity utilization state, wherein the prompt information comprises at least one of the following:
if the target component is in an electrified state, acquiring resource occupation information of the target component, and outputting corresponding prompt information according to the determined first processing strategy according to the resource occupation information;
If the target component is in a power-off state, outputting prompt information of the power-off of the target component by the physical switch;
if the target component is in a power-off state, outputting prompt information of whether to enable the target component, so as to enable the target component when obtaining an operation or instruction for switching the switching state of the physical switch;
and if the target component is in a power-off state, acquiring state information of other components meeting a preset association relation with the target component, and outputting at least prompt information for starting the other components according to the state information of the other components.
8. An electronic device, comprising:
a memory for storing at least one set of instructions;
a processor for invoking and executing said set of instructions in said memory, by executing said set of instructions, performing the control method of any of claims 1-6.
CN202011382119.1A 2020-11-30 2020-11-30 Control method and device and electronic equipment Active CN112306822B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011382119.1A CN112306822B (en) 2020-11-30 2020-11-30 Control method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011382119.1A CN112306822B (en) 2020-11-30 2020-11-30 Control method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112306822A CN112306822A (en) 2021-02-02
CN112306822B true CN112306822B (en) 2023-05-02

Family

ID=74486858

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011382119.1A Active CN112306822B (en) 2020-11-30 2020-11-30 Control method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112306822B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793246A (en) * 2014-01-22 2014-05-14 深圳Tcl新技术有限公司 Method and system for coordinating camera resources
CN109768621A (en) * 2018-12-20 2019-05-17 国网北京市电力公司 Control method, device, storage medium and the electronic device of power equipment
CN110995990A (en) * 2019-11-27 2020-04-10 维沃移动通信有限公司 Camera control method and electronic equipment
CN111176958A (en) * 2019-12-26 2020-05-19 联想(北京)有限公司 Information monitoring method, system and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8624809B2 (en) * 2007-11-29 2014-01-07 Apple Inc. Communication using light-emitting device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793246A (en) * 2014-01-22 2014-05-14 深圳Tcl新技术有限公司 Method and system for coordinating camera resources
CN109768621A (en) * 2018-12-20 2019-05-17 国网北京市电力公司 Control method, device, storage medium and the electronic device of power equipment
CN110995990A (en) * 2019-11-27 2020-04-10 维沃移动通信有限公司 Camera control method and electronic equipment
CN111176958A (en) * 2019-12-26 2020-05-19 联想(北京)有限公司 Information monitoring method, system and storage medium

Also Published As

Publication number Publication date
CN112306822A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
US10299127B2 (en) Autonomous, non-interactive, context-based services for cellular phone
EP3825852B1 (en) Occupation control method and apparatus for camera application
CN107748685B (en) Application program starting control method and device, terminal equipment and storage medium
KR20060047535A (en) Task-oriented processing as an auxiliary to primary computing environments
US20030126317A1 (en) Peripheral monitoring device and computer system having the same
CN107943269B (en) Scheduling job control method, device, terminal equipment and storage medium
CN108173840B (en) Intelligent logistics terminal integration system based on cloud platform
US20170206121A1 (en) Monitoring components in a service framework
CN110727941B (en) Privacy data protection method and device, terminal equipment and storage medium
CN110333917A (en) Data processing method, device, equipment and readable storage medium storing program for executing based on micro services
CN111261160B (en) Signal processing method and device
CN112306822B (en) Control method and device and electronic equipment
CN112637412A (en) Audio management method and device and computer storage medium
JP2010186397A (en) Safety confirmation system
CN107943268B (en) Scheduling job control method, device, terminal equipment and storage medium
CN110120963B (en) Data processing method, device, equipment and machine readable medium
WO2013189273A1 (en) Method and device for monitoring preconfigured operation in mobile terminal
CN103559080A (en) Constrained Execution of Background Application Code on Mobile Devices
CN116025580A (en) Method for adjusting rotation speed of fan and electronic equipment
CN113986190A (en) Application processing method and device and electronic equipment
CN110704247B (en) Processing method and device for application memory exception, electronic equipment and device
CN113270096A (en) Voice response method and device, electronic equipment and computer readable storage medium
CN114860242A (en) Compiling method, compiling device and storage medium
CN111723163A (en) Information processing method, device and system
CN114007090B (en) Video live broadcast establishing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant