Control method and device, electronic equipment and storage medium
By updating the parameters of the target component using inter-system communication and state transition flags without restarting the electronic device, the operating state of the electronic device can be quickly changed, solving the problem of long conversion time in the prior art and improving convenience and efficiency.
Patent Information
- Application Number
- CN202111667231.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2041-12-30
AI Technical Summary
Existing technologies require users to participate in and undergo a restart process multiple times when switching electronic device components from a normal operating state to an overclocked operating state or vice versa, resulting in a long conversion time.
A control method is provided that triggers an electronic device to update the parameters of a target component without restarting by receiving a control command, thereby switching between a first operating state and a second operating state, and achieving rapid state transition by utilizing inter-system communication and state transition flags of the electronic device.
This shortens the time required for target components to switch operating states, improving the convenience and efficiency of user operation.
Smart Images

Figure CN114326522B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of control, more particularly, to a control method and device, an electronic device and a storage medium. BACKGROUND
[0002] At present, when some components of an electronic device, such as a memory, are to be switched from a normal running state to a super frequency running state, or from the super frequency running state to the normal running state, the parameters of the components need to be modified, and the process needs to restart the electronic device and requires multiple user participation, so that the time required for the target component to perform the running state conversion is relatively long. SUMMARY
[0003] The purpose of the present application is to provide a control method and device, an electronic device and a storage medium, comprising the following technical solutions:
[0004] A control method, the method comprising:
[0005] obtaining a control instruction; the control instruction indicates that a target component of an electronic device is to be switched from a first running state to a second running state; the frequency of the target component is different when in the first running state and in the second running state;
[0006] if the electronic device is in a first state, triggering the electronic device to switch from the first state to a second state, so that in the process of the electronic device switching from the first state to the second state, the parameters of the target component are updated from the parameters corresponding to the first running state to the parameters corresponding to the second running state;
[0007] The power consumption of the electronic device when in the first state is lower than the power consumption of the electronic device when in the second state.
[0008] The above method, preferably, the obtaining of the control instruction comprises:
[0009] obtaining a control instruction when the electronic device is in the first state;
[0010] Alternatively,
[0011] obtaining a control instruction when the electronic device is in the second state.
[0012] The above method, preferably, if a control instruction is obtained when the electronic device is in the second state, the method further comprises:
[0013] controlling the electronic device to switch from the second state to the first state.
[0014] The method, preferably, the controlling the electronic device to switch from the second state to the first state comprises:
[0015] The first system of the electronic device sends a running state transition indication to the second system of the electronic device in response to the control instruction.
[0016] The second system sends response information to the first system so that the first system controls the electronic device to enter the first state.
[0017] The method, preferably, the controlling the electronic device to switch from the second state to the first state comprises:
[0018] A controller in the electronic device sends a running state transition notification to the first system in response to the control instruction.
[0019] The first system sends a running state transition indication to the second system of the electronic device.
[0020] The second system sends response information to the first system so that the first system controls the electronic device to enter the first state.
[0021] The method, preferably, further comprises: the second system setting a running state transition flag.
[0022] The updating the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state during the switching of the electronic device from the first state to the second state comprises:
[0023] The second system updates the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state based on the running state transition flag during the switching of the electronic device from the first state to the second state.
[0024] The method, preferably, if a control instruction is obtained while the electronic device is in the first state, the updating the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state during the switching of the electronic device from the first state to the second state comprises:
[0025] A controller in the electronic device sends a running state transition indication to the second system of the electronic device in response to the control instruction.
[0026] The second system updates the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state in response to the running state transition indication.
[0027] The method, preferably, the target component is a memory, and the updating of the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state comprises:
[0028] reading the first type of configuration parameter corresponding to the second running state;
[0029] updating the first type of configuration parameter in the parameter of the memory to the read first type of configuration parameter corresponding to the second running state;
[0030] loading the second type of configuration parameter corresponding to the second running state; the second type of configuration parameter is obtained by training the target component.
[0031] The method, preferably, the loading of the second type of configuration parameter corresponding to the second running state comprises:
[0032] training the target component based on the updated first type of configuration parameter to obtain a new second type of configuration parameter; and loading the new second type of configuration parameter;
[0033] or,
[0034] loading a historical second type of configuration parameter obtained by the last time of training the target component.
[0035] An electronic device, comprising:
[0036] a memory for storing a program;
[0037] a processor for calling and executing the program in the memory, and realizing each step of the control method according to any one of the above through the execution of the program.
[0038] A readable storage medium having a computer program stored thereon, the computer program being executed by a processor to realize each step of the control method according to any one of the above.
[0039] As can be seen from the above solutions, the control method, apparatus, electronic device, and storage medium provided in this application obtain control commands; these control commands instruct the target component of the electronic device to change from its current first operating state to a second operating state; the frequency of the target component differs when it is in the first operating state and the second operating state; if the electronic device is in the first state, it is triggered to switch from the first state to the second state, so that during the switch, the parameters of the target component are updated from those corresponding to the first operating state to those corresponding to the second operating state; the power consumption of the electronic device in the first state is lower than that in the second state. Based on this application, it is not necessary to restart the electronic device; the target component can be switched from the first operating state to the second operating state simply by the user triggering the control command, thereby shortening the time required for the target component to switch operating states. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A flowchart illustrating an implementation of the control method provided in this application embodiment;
[0042] Figure 2 A flowchart illustrating an implementation of switching a control electronic device from a second state to a first state, as provided in an embodiment of this application;
[0043] Figure 3 A flowchart illustrating an implementation of switching a control electronic device from a second state to a first state, as provided in an embodiment of this application;
[0044] Figure 4 A flowchart illustrating an implementation of updating the parameters of a target component from those corresponding to a first operating state to those corresponding to a second operating state, provided in this application embodiment;
[0045] Figure 5 A flowchart illustrating an implementation of updating the parameters of a target component from those corresponding to a first operating state to those corresponding to a second operating state, provided in this application embodiment;
[0046] Figure 6 A schematic diagram of the control device provided in an embodiment of this application;
[0047] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0048] The terms "first", "second", "third", "fourth" and the like in the description and in the claims, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of these terms herein is to be construed to cover a generalised use of these terms to describe elements distinguishable from other elements. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present application.
[0050] In order to better understand the present application, first, the existing control method is described. Taking the memory overclocking as an example, if it is desired to convert the memory of a computer (notebook or desktop computer, etc.) from a normal running state to an overclocking running state, in the case that the computer is in a normal running state, the user needs to first save information (for example, save the document in an open state, close the document, etc.), then trigger a restart process, operate a specific key during the restart process to enter the bios interface, then make overclocking settings in the bios interface, save after the settings, and then the system restarts, the memory is trained during the restart, and the operating system is started after the training is completed, and the conversion of the memory from the normal running state to the overclocking running state is completed. Obviously, the user needs to participate in the process multiple times, such as saving information, triggering a restart process, operating a key, overclocking settings, etc. Moreover, even if human operation is not considered, the process needs to go through a shutdown and a startup process, and the time required for the shutdown and the startup of a new machine is usually half a minute, and the memory training needs to consume half a minute. Therefore, the existing control method needs at least 1 minute to complete the conversion of the memory from the normal running state to the overclocking running state. With the increase of the use time of the machine, the time consumed for the startup and the shutdown of the machine will also increase, and accordingly, the time required for the conversion of the memory from the normal running state to the overclocking running state will also increase. In addition to the time consumed by human operation, the time will be even longer.
[0051] The present application will be described below.
[0052] The control method provided by the embodiments of the present application can be used in an electronic device, which can be a notebook computer or a desktop computer, etc.
[0053] As Figure 1 shown, an implementation flowchart of the control method provided by the embodiments of the present application can include:
[0054] Step S101: obtaining a control instruction; the control instruction indicates that a target component of the electronic device is to be switched from a current first running state to a second running state; the target component has different frequencies in the first running state and in the second running state.
[0055] The target component can be any component in the electronic device that can realize switching of a working frequency (or running frequency), such as a memory, a central processing unit (CPU), or a graphics processing unit (GPU).
[0056] The control instruction can be generated by a user triggering a hot key (such as a function key of a keyboard or a mouse), or can be generated by the user triggering a configuration interface displayed on an output area of the electronic device.
[0057] In one case, the working frequency of the target component in the first running state is less than the working frequency of the target component in the second running state, and this case where the target component is switched from the current first running state to the second running state is referred to as overclocking; in another case, the working frequency of the target component in the first running state is greater than the working frequency of the target component in the second running state.
[0058] Step S102: if the electronic device is in a first state, triggering the electronic device to switch from the first state to a second state, so as to update a parameter of the target component from a parameter corresponding to the first running state to a parameter corresponding to the second running state in the process of switching the electronic device from the first state to the second state.
[0059] The power consumption of the electronic device in the first state is lower than the power consumption of the electronic device in the second state. The first state is not a shutdown state. As an example, the first state can be a modern standby (MS) state, a suspend to disk (S4) state, or a suspend to RAM (S3) state, and the second state can be a normal running state.
[0060] When the control instruction is obtained, the electronic device can be in the first state, or can not be in the first state. If the electronic device is not in the first state, the electronic device needs to be controlled to enter the first state first.
[0061] Updating the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state realizes switching of the target component from the current first running state to the second running state, that is, the present application switches the target component from the current first running state to the second running state in the process of switching the electronic device from the first state to the second state.
[0062] The control method provided in the embodiments of the present application does not need to restart the electronic device, but only needs to trigger the control instruction by the user to change the target component from the first running state to the second running state, thereby shortening the time length required for the target component to change the running state.
[0063] In an optional embodiment, the implementation of the obtaining the control instruction can be as follows:
[0064] The control instruction is obtained when the electronic device is in the first state.
[0065] When the electronic device is in the first state, the user can trigger the generation of the control instruction by operating the hot key. For example, long-pressing or continuously pressing a certain specific key, or short-pressing a combination of several keys.
[0066] For different target components, different hot keys can be used to trigger the control instruction corresponding to the target component.
[0067] In an optional embodiment, another implementation of the obtaining the control instruction can be as follows:
[0068] The control instruction is obtained when the electronic device is in the second state.
[0069] When the electronic device is in the second state, the user can trigger the generation of the control instruction by operating the hot key. For example, long-pressing or continuously pressing a certain specific key, or short-pressing a combination of several keys. For different target components, different hot keys can be used to trigger the control instruction corresponding to the target component.
[0070] Alternatively, when the electronic device is in the second state, the user can find the setting interface and operate the preset switch on the setting interface to trigger the generation of the control instruction. For different target components, different preset switches on the setting interface can be used to trigger the control instruction corresponding to the target component.
[0071] Optionally, if the control instruction is obtained when the electronic device is in the second state, the control method provided in the embodiments of the present application can further include:
[0072] The electronic device is controlled to switch from the second state to the first state, so as to trigger the electronic device to switch from the first state to the second state, and in the process of the electronic device switching from the first state to the second state, the parameter of the target component is updated from the parameter corresponding to the first running state to the parameter corresponding to the second running state.
[0073] Optionally, after the electronic device is switched from the second state to the first state by the control, the electronic device can be switched from the first state to the second state by a timer. For example, the timer can be started when the electronic device is switched from the second state to the first state, and the electronic device can be switched from the first state to the second state when the timer reaches a preset time length (e.g., 1 s or 1 ms).
[0074] In an optional embodiment, when the control instruction is obtained through the setting interface, the implementation flowchart of switching the electronic device from the second state to the first state can include the following steps, as shown in Figure 2
[0075] Step S201: The first system of the electronic device sends a running state transition instruction to the second system of the electronic device in response to the control instruction.
[0076] The first system can be an operating system of the electronic device, such as a windows operating system, a Unix operating system, etc.
[0077] The second system can be a boot system of the electronic device, such as a basic input output system (BIOS). The BIOS can be a traditional BIOS or a BIOS supporting unified extensible firmware interface (UEFI).
[0078] When the control instruction is obtained through the setting interface, the first system can directly obtain the control instruction and respond to the control instruction, because the setting interface is provided by the first system.
[0079] Step S202: The second system sends a response message to the first system, so that the first system controls the electronic device to enter the first state.
[0080] After receiving the running state transition instruction, the second system sends a response message to the first system, so that the first system confirms that the second system has received the running state transition instruction. At this time, the first system can control the electronic device to switch from the second state to the first state.
[0081] The second system can send the response message to a target service in the first system, so that the target service knows that the electronic device can be controlled to enter the first state, and then the target service controls the electronic device to switch from the second state to the first state.
[0082] In an optional embodiment, when the control instruction is obtained through the hot key, the implementation flowchart of switching the electronic device from the second state to the first state can include the following steps, as shown in Figure 3
[0083] Step S301: A controller in the electronic device sends a running state transition notification to the first system in response to a control instruction.
[0084] The first system can be an operating system of the electronic device, such as a Windows operating system, a Unix operating system, etc.
[0085] As an example, the controller can be an embedded controller (EC), which can be implemented by a single-chip microcomputer. The controller is connected with a keyboard and can detect a signal generated when a hot key is operated. After detecting the signal generated when the hot key is operated, the controller sends an interaction request to the first system through an interface. After receiving the interaction request, the first system instructs a controller driver unit in the first operating system to interact with the controller. The controller driver unit can send a response message to the controller. After receiving the response message, the controller sends a running state transition notification to the controller driver unit.
[0086] Step S302: The first system sends a running state transition instruction to a second system of the electronic device.
[0087] The second system can be a boot system of the electronic device, such as a basic input output system (BIOS). The BIOS can be a traditional BIOS or a BIOS supporting unified extensible firmware interface (UEFI).
[0088] The running state transition instruction can be sent by the controller driver unit to the second system after receiving the running state transition notification sent by the embedded controller.
[0089] Step S303: The second system sends a response message to the first system, so that the first system controls the electronic device to enter the first state.
[0090] After receiving the state transition instruction sent by the controller driver unit, the second system can send a response message to a target service in the first system, so that the target service knows that the electronic device can be controlled to enter the first state, and then the target service controls the electronic device to switch from the second state to the first state.
[0091] In an optional embodiment, the control method provided by the embodiment of the application can further include that, in addition to sending the response message to the first system, the second system sets a running state transition flag. The process of updating the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state during the switching of the electronic device from the first state to the second state includes:
[0092] In a process in which the electronic device is switched from the first state to the second state, the second system updates the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state based on the running state transition flag.
[0093] By setting the running state transition flag, the second system can update the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state if the running state transition flag exists. If the running state transition flag does not exist, the parameter of the target component will not be updated from the parameter corresponding to the first running state to the parameter corresponding to the second running state.
[0094] In a process in which the electronic device is switched from the first state to the second state, the second system updates the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state based on the running state transition flag.
[0095] Further, after updating the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state, the second system deletes the running state transition flag.
[0096] In an optional embodiment, the control method provided by the embodiments of the present application can further include:
[0097] The first system outputs an interaction interface.
[0098] Optionally, the first system can output the interaction interface in response to a control instruction, or the first system can output the interaction interface when receiving a response message sent by the second system.
[0099] The first system receives a target parameter input through the interaction interface, and the target parameter represents that the second running state is a target running state.
[0100] In an actual application scenario, a component can have multiple running states, such as a 4800MHz running state, a 5200MHz running state, a 5600MHz running state, and the like. For example, when the target component is in the first running state, the working frequency is 4800MHz. When the user wants to overclock the target component, the user can select the 5200Hz running state or the 5600MHz running state. The three working frequencies can be set in the interactive interface. The user selects one of the 5200MHz and 5600MHz options to input a target parameter, which represents the working frequency selected by the user. For example, if the user selects 5200MHz, the target parameter takes the value a, and if the user selects 5600MHz, the target parameter takes the value b.
[0101] The first system sends the target parameter to the second system, so that the second system sets a running state transition flag, which represents the transition of the target component from the current first running state to the target running state.
[0102] After receiving the target parameter, the second system can determine whether to switch the target component to the 5200MHz running state or the 5600MHz running state according to the target parameter, and then determine the running state transition flag according to the target parameter. As an example, if the value of the target parameter is a, the second system sets the running state transition flag as Flag1, which represents the transition of the target component from the current 4800MHz running state to the 5200MHz running state. If the value of the target parameter is b, the second system sets the running state transition flag as Flag2, which represents the transition of the target component from the current 4800MHz running state to the 5600MHz running state.
[0103] Based on this embodiment, the user can set the running state to which the target component is to be switched according to the needs, thereby improving the convenience of switching the running state of the target component.
[0104] In an optional embodiment, if a control instruction is obtained when the electronic device is in the first state, the electronic device starts a process of switching from the first state to the second state. Correspondingly, one implementation flowchart of updating the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state in the process of switching the electronic device from the first state to the second state is as shown in Figure 4 , which can include the following steps.
[0105] Step S401: The controller in the electronic device sends a running state transition indication to the second system of the electronic device in response to the control instruction.
[0106] As an example, the controller can be an embedded control EC, which can be implemented by a single-chip microcomputer. The embedded controller is connected with the keyboard and can detect the signal generated when the hot key is operated.
[0107] The second system can be a basic input / output system BIOS of the electronic device, which can be a traditional BIOS or a BIOS supporting UEFI.
[0108] The controller detects the signal generated when the hot key is operated and sends the running state transition indication to the second system through the interface.
[0109] Step S402: In response to the running state transition indication, the second system updates the parameters of the target component from the parameters corresponding to the first running state to the parameters corresponding to the second running state in the process of switching the electronic device from the first state to the second state.
[0110] After the second system receives the running state transition indication, it does not need to set the running state transition flag, but directly updates the parameters of the target component from the parameters corresponding to the first running state to the parameters corresponding to the second running state in the process of switching the electronic device from the first state to the second state.
[0111] Based on the present application, the process of running state transition of the target component can be triggered when the electronic device is in the first state, further improving the convenience of user operation.
[0112] In an optional embodiment, in the case where the target component is a memory, the above-mentioned implementation flowchart of updating the parameters of the target component from the parameters corresponding to the first running state to the parameters corresponding to the second running state can include: Figure 5
[0113] Step S501: Read the first type of configuration parameters corresponding to the second running state.
[0114] The parameters corresponding to the running state of the memory include two types of configuration parameters: the first type of configuration parameters and the second type of configuration parameters. That is, the memory has two types of configuration parameters corresponding to each running state. Among them, in the case where the memory and its running state are determined, the first type of configuration parameters is fixed and unchanged, while the second type of configuration parameters is obtained by training the memory.
[0115] As an example, the first type of configuration parameters can include but are not limited to: serial presence detect (SPD) and memory voltage.
[0116] Step S502: Update the first type of configuration parameters in the parameters of the memory to the first type of configuration parameters corresponding to the second running state read;
[0117] Step S503: loading the second type configuration parameter corresponding to the second running state; the second type configuration parameter is obtained by training the target component. That is, updating the second type configuration parameter in the memory parameter to the loaded second type configuration parameter.
[0118] Optionally, the second type configuration parameter can be obtained by training the memory after updating the first type configuration parameter. Based on this, one implementation of the above loading the second type configuration parameter corresponding to the second running state can be:
[0119] Training the target component based on the updated first type configuration parameter to obtain the new second type configuration parameter corresponding to the target component; loading the new second type configuration parameter. The specific training process can refer to the existing scheme, which is not the focus of the present application and will not be described here.
[0120] As mentioned above, the first type configuration parameter is fixed and unchanged in the case of the memory and its running state being determined. Therefore, for the memory, the second type configuration parameter corresponding to the second running state can be obtained by training the memory based on the first type configuration parameter corresponding to the second running state in advance. Then, when the second type configuration parameter corresponding to the second running state needs to be loaded, it can be directly loaded without immediate training, thereby further improving the efficiency of running state conversion of the memory. Therefore, the second type configuration parameter can be obtained by training the memory in advance. Based on this, one implementation of the above loading the second type configuration parameter corresponding to the second running state can be:
[0121] Loading the historical second type configuration parameter obtained by training the target component (i.e. the memory) last time.
[0122] Currently, the electronic device usually performs the training process of the memory when starting after full power-off of the electronic device, or when starting after replacing the hardware. Based on this, the above process of training the memory based on the first type configuration parameter corresponding to the second running state in advance can be performed when starting after full power-off of the electronic device, or can be performed when starting after replacing the hardware of the electronic device.
[0123] The present application can train the memory for multiple running states of the memory during the starting process after full power-off of the electronic device, or during the starting process after replacing the hardware, so as to obtain and save the second type configuration parameter corresponding to each running state, thereby the second type configuration parameter can be directly loaded after the running state of the memory is transformed.
[0124] For each running state of the memory, the memory can be trained based on the first type configuration parameter in the running state to obtain the second type configuration parameter in the running state.
[0125] The first type of configuration parameter and the second type of configuration parameter can be stored in a memory mounted under the second system.
[0126] After the training is completed, the first type of configuration parameter and the second type of configuration parameter corresponding to the running state of the memory set based on the electronic device can be loaded.
[0127] Optionally, in the case where the first state is a sleep state, the control method provided by the embodiment of the application can further include:
[0128] If a control instruction is obtained in the case where the electronic device is in the second state, the data in the memory can be saved to the hard disk after the electronic device is switched from the second state to the first state. The data in the memory can be saved to the hard disk by the second system.
[0129] In the process of switching the electronic device from the first state to the second state, the data in the hard disk can be restored to the memory. The data in the hard disk can be restored to the memory by the second system.
[0130] In the case where the first state is a sleep state, the data is saved in the memory. To avoid the running state conversion of the target component causing the loss of the memory data, the data in the memory can be saved to the hard disk after the electronic device is switched from the second state to the first state, and the data in the hard disk can be restored to the memory in the process of switching the electronic device from the first state to the second state.
[0131] Taking the first state as a sleep state or a hibernate state and the second state as a normal running state as an example, in the process of switching the electronic device from the first state to the second state, the BIOS will undergo multiple stages such as security verification (Security, SEC), pre-efi initialization (PEI), driver execution environment (DXE), and boot device selection (BDS).
[0132] In the process of switching the electronic device from the first state to the second state, the parameters of the target component are updated from the parameters corresponding to the first running state to the parameters corresponding to the second running state. Specifically, the parameters of the target component can be updated from the parameters corresponding to the first running state to the parameters corresponding to the second running state in the PEI stage of the second system.
[0133] Corresponding to the method embodiment, the embodiment of the application further provides a control device. A structure diagram of the control device provided by the embodiment of the application is shown in Figure 6 may include:
[0134] The obtaining module 601 and the control module 602; wherein,
[0135] The obtaining module 601 is configured to obtain a control instruction, the control instruction indicating that a target component of an electronic device is to be switched from a first running state to a second running state, the target component having different frequencies in the first running state and in the second running state;
[0136] The control module 602 is configured to trigger the electronic device to switch from the first state to the second state if the electronic device is in the first state, so as to update a parameter of the target component from a parameter corresponding to the first running state to a parameter corresponding to the second running state in a process in which the electronic device switches from the first state to the second state.
[0137] The power consumption of the electronic device in the first state is lower than the power consumption of the electronic device in the second state.
[0138] The control device provided by the embodiments of the present application does not need to restart the electronic device, but only needs to trigger the control instruction to switch the target component from the first running state to the second running state, thereby shortening the time length required for the target component to switch the running state.
[0139] In an optional embodiment, the obtaining module 601 is configured to:
[0140] obtain the control instruction in a case where the electronic device is in the first state;
[0141] or,
[0142] obtain the control instruction in a case where the electronic device is in the second state.
[0143] In an optional embodiment, if the obtaining module 601 obtains the control instruction in the case where the electronic device is in the second state, the control module 602 is further configured to:
[0144] control the electronic device to switch from the second state to the first state.
[0145] In an optional embodiment, the control module 602 is configured to:
[0146] send, by a first system of the electronic device, a running state switching instruction to a second system of the electronic device in response to the control instruction;
[0147] send, by the second system, response information to the first system, so that the first system controls the electronic device to enter the first state.
[0148] In an optional embodiment, the control module 602 is configured to:
[0149] The controller in the electronic device sends a running state transition notification to a first system in response to the control instruction;
[0150] The first system sends a running state transition indication to a second system of the electronic device;
[0151] The second system sends response information to the first system so that the first system controls the electronic device to enter the first state.
[0152] In an optional embodiment, the control module 602 is further configured to set a running state transition flag through the second system;
[0153] In the process of switching the electronic device from the first state to the second state, the second system updates the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state based on the running state transition flag.
[0154] In an optional embodiment, if the obtaining module 601 obtains the control instruction when the electronic device is in the first state, the control module 602 is configured to:
[0155] The controller in the electronic device sends a running state transition indication to a second system of the electronic device in response to the control instruction;
[0156] The second system updates the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state in response to the running state transition indication.
[0157] In an optional embodiment, the target component is a memory, and when the control module 602 updates the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state, the control module 602 is configured to:
[0158] read first type configuration parameters corresponding to the second running state;
[0159] update the first type configuration parameters in the parameter of the memory to the read first type configuration parameters corresponding to the second running state;
[0160] load second type configuration parameters corresponding to the second running state; the second type configuration parameters are obtained by training the target component.
[0161] In an optional embodiment, when the control module 602 loads the second type configuration parameters corresponding to the second running state, the control module 602 is configured to:
[0162] training the target component based on the updated first type of configuration parameter to obtain new second type of configuration parameter; and loading the new second type of configuration parameter.
[0163] Or,
[0164] loading a historical second type of configuration parameter obtained by training the target component last time.
[0165] Corresponding to the method embodiments, the present application also provides an electronic device, a structural schematic diagram of which is shown in Figure 7 The electronic device can include at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4.
[0166] In the embodiments of the present application, the number of the processor 1, the communication interface 2, the memory 3 and the communication bus 4 is at least one, and the processor 1, the communication interface 2 and the memory 3 complete the communication with each other through the communication bus 4.
[0167] The processor 1 can be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application, etc.
[0168] The memory 3 can include a high-speed RAM memory, and can also include a non-volatile memory, etc., such as at least one disk memory.
[0169] The memory 3 stores a program, and the processor 1 can call the program stored in the memory 3, and the program is used for:
[0170] obtaining a control instruction; the control instruction indicates that a target component of the electronic device is changed from a current first running state to a second running state; the frequency of the target component in the first running state is different from the frequency of the target component in the second running state;
[0171] If the electronic device is in the first state, triggering the electronic device to switch from the first state to the second state, so as to update the parameter of the target component from the parameter corresponding to the first running state to the parameter corresponding to the second running state in the process of switching the electronic device from the first state to the second state;
[0172] The power consumption of the electronic device in the first state is lower than the power consumption of the electronic device in the second state.
[0173] Optionally, the refinement function and the extension function of the program can refer to the description above.
[0174] The embodiment of the present application further provides a storage medium which can store a program suitable for a processor to execute, and the program is used for:
[0175] obtaining a control instruction; the control instruction indicates that a target component of an electronic device is to be changed from a first running state to a second running state; the frequency of the target component is different when in the first running state and in the second running state;
[0176] if the electronic device is in a first state, triggering the electronic device to switch from the first state to a second state, so as to update a parameter of the target component from a parameter corresponding to the first running state to a parameter corresponding to the second running state in the process that the electronic device switches from the first state to the second state;
[0177] the power consumption of the electronic device when in the first state is lower than the power consumption of the electronic device when in the second state.
[0178] Optionally, the refinement function and the extension function of the program can refer to the description above.
[0179] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be realized in electronic hardware or in combination of computer software and electronic hardware. Whether the functions are realized in hardware or software mode depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0180] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be realized by other ways. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0181] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment of the present application according to actual needs.
[0182] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.
[0183] It should be understood that the embodiments in the present application, from the right, each embodiment, features can be combined, combined, can achieve the solution to the foregoing technical problems.
[0184] The functions, if implemented in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art or the part of the technical solutions can be embodied in the form of a software product, and the computer software product stored in a storage medium includes a plurality of instructions for executing all or part of the steps of the method described in various embodiments of the present application by a computer device (which can be a personal computer, a server, or a network device, etc.). The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0185] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A control method, the method comprising: Obtain control commands; The control command instructs the target component of the electronic device to change from the current first operating state to the second operating state. The target component operates at different frequencies when it is in the first operating state and when it is in the second operating state. If the electronic device is in a first state, it is triggered to switch from the first state to a second state, so that during the process of switching from the first state to the second state, the parameters of the target component are updated from the parameters corresponding to the first operating state to the parameters corresponding to the second operating state; the first state is a standby state, a hibernation state, or a sleep state, and the second state is a normal operating state; the power consumption of the electronic device in the first state is lower than the power consumption of the electronic device in the second state. If the electronic device is in the second state, control the electronic device to switch from the second state to the first state, trigger the electronic device to switch from the first state to the second state, so that during the process of the electronic device switching from the first state to the second state, the parameters of the target component are updated from the parameters corresponding to the first operating state to the parameters corresponding to the second operating state.
2. The method according to claim 1, wherein obtaining the control command comprises: When the electronic device is in the first state, a control command is obtained; or, When the electronic device is in the second state, a control command is obtained.
3. The method according to claim 1, wherein controlling the electronic device to switch from the second state to the first state comprises: The first system of the electronic device responds to the control command by sending an operating state change indication to the second system of the electronic device; The second system sends a response message to the first system so that the first system can control the electronic device to enter the first state.
4. The method according to claim 1, wherein controlling the electronic device to switch from the second state to the first state comprises: The controller in the electronic device responds to the control command by sending a notification of a change in operating status to the first system; The first system sends an operating state transition indication to the second system of the electronic device; The second system sends a response message to the first system so that the first system can control the electronic device to enter the first state.
5. The method according to claim 3 or 4, further comprising: The second system sets a flag indicating a change in operating status; The step of updating the parameters of the target component from those corresponding to the first operating state to those corresponding to the second operating state during the process of the electronic device switching from the first state to the second operating state includes: During the process of the electronic device switching from the first state to the second state, the second system updates the parameters of the target component from the parameters corresponding to the first operating state to the parameters corresponding to the second operating state based on the operating state transition flag.
6. The method according to claim 2, wherein if a control command is obtained when the electronic device is in the first state, the step of updating the parameters of the target component from the parameters corresponding to the first operating state to the parameters corresponding to the second operating state during the process of the electronic device switching from the first state to the second state includes: In response to the control command, the controller in the electronic device sends an operating state transition indication to the second system of the electronic device; In response to the operating state transition indication, the second system updates the parameters of the target component from the parameters corresponding to the first operating state to the parameters corresponding to the second operating state.
7. The method according to claim 1, wherein the target component is memory, and updating the parameters of the target component from the parameters corresponding to the first running state to the parameters corresponding to the second running state includes: Read the first type of configuration parameters corresponding to the second running state; Update the first type of configuration parameters in the memory parameters to the first type of configuration parameters corresponding to the second running state read; Load the second type of configuration parameters corresponding to the second running state; the second type of configuration parameters are obtained by training the target component.
8. The method according to claim 7, wherein loading the second type of configuration parameters corresponding to the second running state includes: The target component is trained based on the updated first type of configuration parameters to obtain a new second type of configuration parameters; Load the new second type of configuration parameters; or, Load the historical second-class configuration parameters obtained from the most recent training of the target component.
9. An electronic device, comprising: Memory, used to store programs; A processor is configured to invoke and execute the program in the memory, thereby implementing the various steps of the control method as described in any one of claims 1-8.
Citation Information
Patent Citations
Low-power wearable equipment and multi-operation system switching, communication and management method thereof
CN105204931A
Control method and device for over-frequency working state of CPU
CN107357654A
Switching method and system
CN109445858A