A control method and apparatus
By controlling event triggering in different modes through the first processor, the conflict between user configuration information and operating system default configuration information in electronic devices is resolved, ensuring the reliability and accuracy of quickly triggering user-defined functions.
Patent Information
- Application Number
- CN202211731501.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2042-12-30
AI Technical Summary
In the prior art, when electronic devices are operated by closing the lid, flipping the screen, or using shortcut keys, the user-defined configuration information conflicts with the default configuration information of the operating system, resulting in the inability to quickly trigger application functions such as screen switching.
The first processor (such as an EC chip) uses different modes to control the triggering of events, selects the appropriate method according to the user configuration information, avoids conflicts, and ensures that the electronic device performs the required actions in different usage scenarios.
This technology avoids event conflicts between different control methods under the same operating signal in electronic devices, improving the reliability and accuracy of control and meeting users' customized operation needs.
Smart Images

Figure CN116185583B_ABST
Abstract
Description
Technical Field
[0001] This application relates primarily to the field of communication technology, and more specifically to a control method and apparatus. Background Technology
[0002] Currently, for electronic devices such as laptops and mobile phones, their operating systems usually support quickly triggering the electronic device to enter states such as hibernation, sleep, or screen-off by closing the lid, flipping the device, or using shortcut keys, without requiring the user to open the control menu and select the corresponding state button, thus improving the convenience of operating electronic devices. Summary of the Invention
[0003] In view of the above, this application provides the following technical solution:
[0004] This application proposes a control method, including:
[0005] In a first mode, the first processor, in response to a received first signal, issues a first trigger instruction, the first trigger instruction being used to trigger a first event in the operating system;
[0006] In the second mode, in response to the received first signal, the first processor issues the first trigger instruction and the second trigger instruction, the second trigger instruction being used to trigger a second event in the operating system.
[0007] Optionally, if the first event and the second event are executed simultaneously in the operating system, the second event can interrupt the execution of the first event.
[0008] Optionally, the first processor acquires first flag information; the first flag information is configured according to the target application in the operating system;
[0009] The first processor determines whether to enter the first mode or the second mode based on the first flag information.
[0010] This application also proposes a control method, including:
[0011] The target application performs a first configuration operation to cause the first processor to switch between a first mode and a second mode.
[0012] In the first mode, the first processor, in response to a received first signal, issues a first trigger instruction, which is used to trigger a first event in the operating system; in the second mode, the first processor, in response to the received first signal, issues the first trigger instruction and a second trigger instruction, which is used to trigger a second event in the operating system.
[0013] Optionally, the target application performs a first configuration operation, including:
[0014] Configure a first flag bit information according to the startup state of the target application, and the first processor determines whether to enter the first mode or the second mode based on the first flag bit information.
[0015] Optionally, the target application performs a first configuration operation, including:
[0016] Receive instruction information;
[0017] Configure first flag information according to the instruction information, so that the first processor can determine whether to enter the first mode or the second mode based on the first flag information.
[0018] Optionally, the method further includes:
[0019] The target application responds to a first event triggered in the first mode;
[0020] Upon responding to the first event, the target application performs a first operation, which is associated with the second event.
[0021] Optionally, performing the first operation includes:
[0022] The target application sends a second signal to the first processor, causing the first processor to issue the second trigger command in response to the received second signal.
[0023] Optionally, sending the second signal to the first processor includes:
[0024] The target application obtains the configuration information corresponding to the second event;
[0025] The target application determines that the configuration information is in a first state and sends the second signal to the first processor.
[0026] Optionally, performing the first operation includes:
[0027] The target application directly controls the operating system to perform actions.
[0028] Optionally, the target application directly controls the operating system to perform actions, including:
[0029] The target application obtains the configuration information corresponding to the second event;
[0030] The target application determines the configuration information to be in a first state, and controls the operating system to perform a first action based on the configuration information. The first action corresponds to the second event.
[0031] Optionally, the target application directly controls the operating system to perform actions, including:
[0032] The target application obtains the configuration information corresponding to the second event;
[0033] The target application determines the configuration information to be in a second state, and controls the operating system to perform a second action based on the configuration information. The second action cooperates with the triggered first event to achieve the first function.
[0034] This application also proposes a control device deployed in a first processor of an electronic device, the device comprising:
[0035] The first trigger module is used by the first processor in a first mode to issue a first trigger instruction in response to a received first signal, wherein the first trigger instruction is used to trigger a first event in the operating system;
[0036] The second trigger module is used by the first processor in the second mode to issue the first trigger instruction and the second trigger instruction in response to the received first signal, wherein the second trigger instruction is used to trigger a second event in the operating system.
[0037] This application also proposes a control device, deployed in a second processor of an electronic device, the second processor supporting the operation of the electronic device's operating system, the device comprising:
[0038] A configuration operation module is used for the target application to perform a first configuration operation, so that the first processor can switch between a first mode and a second mode.
[0039] In the first mode, the first processor, in response to a received first signal, issues a first trigger instruction, which is used to trigger a first event in the operating system; in the second mode, the first processor, in response to the received first signal, issues the first trigger instruction and a second trigger instruction, which is used to trigger a second event in the operating system.
[0040] Therefore, this application provides a control method and apparatus. In a first mode, a first processor, in response to a received first signal, issues a first trigger instruction, which is used to trigger a first event in the operating system. In a second mode, the first processor, in response to a received first signal, issues a first trigger instruction and a second trigger instruction, which is used to trigger a second event in the operating system. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0042] Figure 1 A flowchart illustrating an optional example of the control method proposed in this application;
[0043] Figure 2 A flowchart illustrating yet another alternative example of the control method proposed in this application;
[0044] Figure 3 A schematic diagram of the signaling flow, which is another optional example of the control method proposed in this application;
[0045] Figure 4 A schematic diagram of the signaling flow, which is another optional example of the control method proposed in this application;
[0046] Figure 5 A schematic diagram of the signaling flow, which is another optional example of the control method proposed in this application;
[0047] Figure 6 A schematic diagram of the signaling flow, which is another optional example of the control method proposed in this application;
[0048] Figure 7 A schematic diagram of the signaling flow, which is another optional example of the control method proposed in this application;
[0049] Figure 8 This is a schematic diagram of an optional example of the control device proposed in this application. Detailed Implementation
[0050] Regarding the description in the background section, in certain applications of electronic devices, users may wish to quickly trigger certain functions of the application by closing the lid (such as when both bodies of a laptop are closed), flipping the screen, or using shortcut keys. For example, on a laptop with multiple screens, if the user closes the lid while the content is being displayed on the B-side screen, they may want the content to be sent to the A-side screen for continued display. However, this user configuration information may conflict with the operating system's configuration information for hibernation / sleep actions in response to the lid-closing event, causing the user configuration information to fail to execute. Thus, it is not possible to quickly trigger application functions such as screen switching through the lid-closing operation.
[0051] To address the aforementioned issues, a configuration of "Do Nothing" is proposed for events generated by actions such as closing the lid, flipping the screen, or using shortcut keys. This means the operating system will not execute any triggering commands. Thus, when users perform such shortcut operations during electronic device use, they can execute operations like screen switching according to the user-defined configuration information, temporarily avoiding the configuration conflict problem. However, once the user adjusts the "Do Nothing" configuration, the aforementioned conflict problem cannot be avoided.
[0052] To further improve the above-mentioned problems, this application proposes that the first processor (EC chip (Embedded Controller)) can control the triggering of events in different ways, referred to as different modes, in order to address the quick operation method described above. In this way, in practical applications, a suitable method can be selected to control the triggering of events according to the actual application requirements of the electronic device.
[0053] As in the example above, after the first processor receives the cover-closing signal, in one mode, it can trigger a corresponding screen switching event, denoted as a mode switching event, according to the user's configuration for the cover-closing signal. In another mode, the cover-closing operation simultaneously meets the triggering conditions of both the cover-closing event and the mode switching event, but in this case, it will not respond to the mode switching event, but will directly respond to the cover-closing event and enter a hibernation / sleep / screen-off state. This avoids the conflict between the configuration content of the cover-closing event and the mode switching event, and ensures the reliability and accuracy of controlling the electronic device to perform the required actions through the cover-closing operation in different usage scenarios of the electronic device.
[0054] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0055] Reference Figure 1 The diagram below illustrates an optional example of the control method proposed in this application. This method can be applied to electronic devices such as laptops, mobile phones, and tablets, and can be executed by the first processor (such as an EC chip) of the electronic device. Figure 1 As shown, the control method proposed in this embodiment may include:
[0056] Step S11: In the first mode, the first processor, in response to the received first signal, issues a first trigger instruction; the first trigger instruction is used to trigger a first event in the operating system.
[0057] In step S12, in the second mode, the first processor, in response to the received first signal, issues a first trigger instruction and a second trigger instruction; the second trigger instruction is used to trigger a second event in the operating system.
[0058] Based on the above description of the technical solution of this application, when performing operations such as closing the cover, flipping the screen, or pressing shortcut keys on an electronic device, after the first processor obtains the first signal representing the corresponding operation, it can determine, according to the current mode, which event control method to use to trigger which event in the operating system when responding to the signal.
[0059] The first mode of the first processor may not allow direct triggering of the event represented by the first signal content, such as the cover-closing event corresponding to the cover-closing signal. Instead, the corresponding event may be triggered according to the user's configuration information for the first signal content, such as the screen switching event configured for the cover-closing operation in a multi-screen electronic device. Of course, if the user has configured other types of events for the cover-closing operation, those other types of events may be triggered.
[0060] Correspondingly, the second mode of the first processor may refer to allowing the direct triggering of the event represented by the first signal content, such as the cover-closing event corresponding to the cover-closing signal. At the same time, if the cover-closing signal is also configured with a corresponding screen switching event, that is, if the user has configured other types of events for the first signal content, and the cover-closing signal meets the triggering conditions of that type of event, that is, the same content signal meets two events of different control methods. In order to avoid event conflict, only the event represented by the first signal content will be triggered, and the other event configured by the user will not be triggered. The specific implementation method is not limited in this application.
[0061] In practical applications of this application, the mode switching between the first mode and the second mode of the first processor can be implemented according to the actual application requirements of the electronic device. Optionally, if the events configured by the user for the various shortcut operations described above are responded to by a target application in the operating system, this application can trigger the first processor to enter the first mode or the second mode according to the configuration of the target application. The configuration operation performed by the target application can be flexibly determined according to the actual situation, and this application does not limit the configuration content. In addition, this application can also trigger the first processor to enter the first mode or the second mode through physical buttons, function buttons, or other specific triggering methods. This application does not limit the method of triggering the mode switching between these two modes.
[0062] As analyzed above, after the first processor receives the first signal, it can first determine the current mode. If it is in the first mode, in the process of responding to the first signal, it can output the first trigger instruction to trigger the first event corresponding to the content of the first signal according to the event configuration information customized by the user. At this time, the second event corresponding to the content of the first signal configured by the operating system developer is not allowed to be triggered. Therefore, there is no conflict problem between the triggering of two events corresponding to the same content signal, which satisfies the user's need for the electronic device to currently execute the first event.
[0063] If the first processor receives the first signal and determines that it is currently in the second mode, based on the above description of the second mode, although the content of the first signal meets the triggering conditions of the events triggered by the two different control methods, the first event triggered by the user-configured first control method cannot be responded to. Therefore, even if the first trigger instruction and the second trigger instruction are output to trigger the events corresponding to different control methods, the electronic device can execute the second trigger instruction to trigger the corresponding second event, but cannot execute the first trigger instruction, and thus cannot trigger the first event.
[0064] As can be seen, in the actual use of electronic devices, this application can control the mode of the first processor and, when responding to the received first signal, adopt the control method corresponding to that mode to trigger the corresponding first or second event in the operating system. This satisfies the user's current operation that generates the first signal and the user's desire for the electronic device to perform the target action. This avoids conflicts between events triggered by two different control methods for the same content signal in the electronic device and improves the control reliability of the electronic device.
[0065] Reference Figure 2 This is a flowchart illustrating another optional example of the control method proposed in this application. This embodiment can describe an optional refined implementation method of the control method proposed above, such as... Figure 2 As shown, the method may include:
[0066] Step S21: The first processor obtains the first flag information;
[0067] In practical applications of this application, the first flag bit information can indicate whether the first processor triggers the event corresponding to the received signal content, i.e., the second event. If the signal is when the user performs a lid-closing operation on the electronic device, the first flag bit information can be a lid over write flag, which can indicate whether a lid close event is triggered. If the lid over write flag is 0, it can indicate that a lid close event is triggered, entering a hibernation / sleep / screen-off state; if the lid over write flag is 1, it can indicate that the lid close event is not triggered or is not actively triggered, only the mode event is triggered to realize application functions such as screen switching.
[0068] It should be noted that for different types of quick operation behaviors such as closing the lid, flipping the lid, or using shortcut keys, the first processor can be configured with corresponding first flag information. The meaning and configuration method of the first flag information corresponding to different operation types are similar, and can be referred to but not limited to the configuration implementation method of Lid Over Write Flag mentioned above.
[0069] In some embodiments, if the operating system of the electronic device has a target application installed, such as proprietary software of an electronic device manufacturer, the first flag information can be configured according to the startup status of the target application or the received instruction information. For example, after the target application is determined to be started, the first flag information in the first processor can be modified, such as updating 0 to 1 in the default state; or, after the target application is started, the user can input instruction information in the target application to modify the first flag information, thereby modifying the first flag information in the first processor accordingly. The implementation process includes, but is not limited to, the content described in this application.
[0070] Corresponding to the aforementioned target application, during startup and operation, the operating status of the electronic device and related information such as the user's usage status and intentions regarding the electronic device can be monitored. This can be achieved by using corresponding detection components in the electronic device (such as one or more of various sensors, cameras, etc.). The specific process will not be detailed in this application. Of course, this application can also achieve various function configurations of the electronic device through certain functions configured in the target application. This application does not limit the configuration and functions of the target application and can be determined as appropriate.
[0071] Step S22: The first processor determines whether to enter the first mode or the second mode based on the first flag information;
[0072] Based on the above description of the first flag information, the different contents of the first flag information can correspond to different modes of the first processor. Therefore, the first processor can read the current first flag information to determine whether it is in the first mode or the second mode, and decide how to control what event to trigger after receiving the first signal.
[0073] For example, taking the Lid Over Write Flag configured for the Lid Close event as an example, if the first processor reads that the Lid Over Write Flag is 1, it can enter the first mode. Subsequently, the target application can manage the various execution actions configured for the lid closing operation, such as screen switching, screen off, or hibernation / sleep, etc., which is controlled by the target application to trigger the Mode event in the operating system. Conversely, if the Lid Over Write Flag is 0, the first processor enters the default second mode and directly triggers the Lid Close event.
[0074] In step S23, in the first mode, the first processor, in response to the received first signal, issues a first trigger instruction; the first trigger instruction is used to trigger a first event in the operating system.
[0075] In step S24, in the second mode, the first processor, in response to the received first signal, issues a first trigger instruction and a second trigger instruction, the second trigger instruction being used to trigger a second event in the operating system.
[0076] In this embodiment, the first signal may be generated by the corresponding detection component in the electronic device after the user performs an operation such as closing the cover, flipping the cover, or inputting a shortcut key on the electronic device, and transmitted to the first processor to trigger the first processor to control the electronic device to execute the first event or the second event according to the control method proposed in this application.
[0077] For example, taking the closing operation of a laptop as an example, an attitude sensor such as an angle sensor or a distance sensor can be configured in the connection area between the first body of the laptop (such as the body containing side A and side B) and the second body (such as the body containing side C and side D). As side B of the first body and side C of the second body move closer together, that is, during the closing operation, the detection component can continuously output a first signal representing the current angle between side B and side C, and transmit it to the first processor in real time. The first processor can determine the laptop to send the closing action based on the change of the first signal over a continuous period of time.
[0078] Optionally, the detection component can also determine the current operation of the electronic device based on the sensed signal changes, and then send a first signal characterizing that operation to the first processor. This application does not limit the method of acquiring the first signal. It should be understood that for the detection of other operations such as screen flipping or shortcut key input, other types of detection components can also be used to obtain the corresponding first signal. The implementation process is not detailed in this application.
[0079] After the first processor receives the first signal, as analyzed above, it can read the first flag information corresponding to the first signal, such as the Lid Over Write Flag corresponding to the lid closing signal, and thus determine whether to enter the first mode or the second mode. In this way, when responding to the first signal, it can determine whether to trigger one or two events according to the control method of the current mode. In the second mode, two trigger commands are output to trigger two events, such as the LidClose event and the Mode event mentioned above. Since the target application is not running in the second mode, the Mode event cannot be executed; only the Lid Close event can be executed, thus avoiding conflicts caused by triggering two events.
[0080] Therefore, in the use of electronic devices such as multi-screen laptops, if a user wants to switch screen displays without entering sleep / screen-off mode by closing or flipping the lid, after inputting configuration information representing this meaning, the user can modify the first flag information to prevent triggering the operating system manufacturer's configured events for this operation, such as lid-closing or screen-flipping events, by launching the target application or entering commands within the target application. Instead, the user can trigger the event configured for the operation. Afterward, when the user performs the lid-closing or flipping operation, they can directly switch screen displays as described above, without conflicting with the lid-closing sleep / screen-off action.
[0081] It should be noted that the implementation methods for screen switching include, but are not limited to, switching between screen A and screen B. It can also include switching control between different display areas or interfaces on the same screen. Similarly, in addition to the screen switching control described above, the first event can also include other application control behaviors, such as screen casting, which can be customized according to actual needs. This application will not provide detailed examples of each.
[0082] Reference Figure 3 This is a schematic diagram of the signaling flow for another optional example of the control method proposed in this application. This embodiment can describe another optional refined implementation method of the control method proposed above, such as... Figure 3 As shown, the method may include:
[0083] Step S31: The first processor receives the first signal and determines that it is entering the first mode;
[0084] The implementation process of step S31 can be described in accordance with the description of the corresponding part of the above embodiment, and will not be repeated in this embodiment.
[0085] In step S32, the first processor responds to the first signal in the first mode, issues a first trigger instruction, and triggers the first event in the operating system;
[0086] Step S33: The target application responds to the first event triggered in the first mode and performs a first operation, which is associated with the second event;
[0087] Taking the scenario of generating the first signal by closing the lid of a laptop as an example, after the user performs the closing operation on the electronic device, if it is determined that the first processor is in the first mode, the running target application will take over the various behavior controls of the operating system for the closing operation. The first processor only generates a first trigger instruction to trigger the Mode event, and informs the second processor (i.e., the processor that supports the operation of the operating system, such as the CPU) of the Mode event. The target application running on the second processor will respond to the Mode event, query the user's configuration information for the closing operation, and execute the corresponding first operation, such as screen switching. This application does not limit the control implementation method for executing the first operation.
[0088] Therefore, in the first mode, the target application is configured to respond to a first event and execute a first operation, so that the first event is responded to by the target application of the operating system, thus satisfying the user's mode switching control requirements for customized configuration of quick operation behavior of electronic devices. The first operation executed by the target application can be associated with a second event. For example, the first operation may include the operation triggered by the second event. The target application can directly control the operating system to execute the first operation associated with the second event, or it can call the first processor to execute the first operation; the implementation process is not limited in this application.
[0089] Based on this, in some embodiments, when a target application calls a first processor to execute a first operation associated with a second event, the first operation may include the target application sending a second signal to the first processor, such as an indication signal that calls the first processor to implement an operation associated with the second event and configured corresponding to the first signal. Therefore, the target application executing the first operation may include: the target application sending a trigger signal for the second event, i.e., the second signal, to the first processor. Upon receiving the second signal, the first processor may respond to the second signal and issue a second trigger command, thereby triggering the second event in the operating system, such as a Lid Close event, and controlling the operating system to enter any of the corresponding hibernation / sleep / screen off / Do Nothing states according to the configuration information corresponding to the second event.
[0090] It should be noted that during the execution of the first operation associated with the second event, the target application can directly invoke the first processor to trigger the second event as described above, or it can further determine whether to invoke the first processor based on the configuration information of the second event. Therefore, based on the above description, the first operation can also include the target application obtaining the configuration information corresponding to the second event, determining that the configuration information is a first state (e.g., a hibernation or sleep state for the lid-closing operation), and sending a second signal to the first processor to notify the first processor to trigger the second event and control the operating system to enter the first state.
[0091] Optionally, to implement the control method described above by calling the first processor, an API for calling triggers for different shortcut operations such as closing the lid, flipping the lid, or using shortcut keys can be added to the first processor, such as the API defined by WMI scripts. In this way, when the target application responds to the triggered first event in the first mode and performs the first operation, it can call the corresponding API (such as the WMI API corresponding to any shortcut operation such as closing the lid or flipping the lid) to send a second signal based on the electronic device operation behavior represented by the first signal, notify the first processor to trigger the second event, and control the operating system to enter the corresponding first state. However, it is not limited to the implementation method of the target application calling the first processor to trigger the second event described in this application.
[0092] Referring to the description of the above embodiments, and referring to Figure 4 The diagram shown is a signaling flow diagram of another optional example of the control method proposed in this application. This embodiment can describe an optional event-triggered control method in which the target application calls the first processor to trigger a second event during the process of the first processor responding to the received first signal in the first mode. Other implementation processes of the control method can be referred to the description in the corresponding part of the context, such as... Figure 4 As shown, the control method may include:
[0093] In step S41, the first processor, in the first mode, responds to the received first signal, issues a first trigger command, and triggers the first event;
[0094] Step S42: The target application responds to the first event and obtains the configuration information corresponding to the second event;
[0095] Step S43: The target application determines that the configuration information is in the first state and sends the second signal to the first processor;
[0096] In step S44, the first processor responds to the received second signal by issuing a second trigger instruction, triggering the second event, and controlling the operating system to perform actions.
[0097] For example, let's continue with the scenario of closing the lid of a multi-screen laptop. A Lid Close event and a Mode event are pre-configured for this closing action. After the user closes the lid of the multi-screen laptop, the corresponding detection component in the laptop transmits a closing signal representing this action to the EC (Overwrite Control Center). The EC reads that the Lid Over Write Flag is 1, indicating that the target application has started and can take over the operating system's behavior. It can then send a trigger command for the Mode event, triggering the Mode event and transmitting it to the target application running on the CPU.
[0098] After receiving the triggered Mode event, the target application can query the lid-closing configuration information corresponding to the LidClose event during the response process. If it is in the first state such as Sleep, Hibernate, or Screen Off, it can call the WMMI API of Lid Close Trigger to notify the EC to trigger the Lid Close event and issue corresponding control commands to control the operating system to enter the first state. If the Lid Close event is configured as Do Nothing (the second state), it is not necessary to notify the EC to trigger the Lid Close event. The target application can directly perform actions such as screen switching according to the configuration corresponding to the first event. It should be noted that the two triggering control methods for the first and second events corresponding to other shortcut operations are similar, and this application will not provide detailed examples of each.
[0099] In some other embodiments, during the execution of the first operation in response to the triggered first event in the first mode, the target application can also directly control the operating system to perform actions, including but not limited to actions such as hibernation or sleep described above, as well as actions such as turning off the screen or switching the display content of at least one screen of the electronic device. In this case, a control interface for the operating system can be pre-configured, and after the target application responds to the first event, it can directly call the control interface to directly control the operating system to perform actions such as hibernation, sleep, screen turning off, or screen switching.
[0100] Optionally, as analyzed above, after responding to the first event, the target application can further combine the configuration information of the second event to determine whether to call the first processor, directly control the operating system to perform an action, and what action to control the operating system to perform. Therefore, the aforementioned first operation can also include the target application obtaining the configuration information corresponding to the second event. If the configuration information is in a first state (such as the operating system entering hibernation or sleep state configured for the lid-closing operation), the application can call the control interface corresponding to the first state, such as the hibernation control interface, to control the operating system to perform the first action and enter the first state. It can be seen that in this case, the first action corresponds to the second event and is applicable to scenarios where the configuration information of the first event includes the first state.
[0101] If the configuration information configured for the second event is in the second state (e.g., Do Nothing), based on this configuration information, the interface corresponding to the configuration information of the first event that differs from the second event can be called, such as the screen switching interface under the Mode event, to directly control the operating system to perform the second action and achieve the first function. For example, after closing the lid, the content displayed on the B-side screen is switched to the A-side screen. This application does not restrict the implementation method of how the A-side screen displays the content displayed from the B-side screen.
[0102] As can be seen, the second action in this embodiment is in conjunction with the triggered first event to achieve the first function. It should be understood that when the quick operation behavior corresponds to the second event configuration Do Nothing in the configuration information of the first event, the target application can configure other actions in addition to screen switching actions to achieve other functions. Users can customize the configuration, and this application will not provide detailed examples of each one.
[0103] Based on the description of the above embodiments, refer to Figure 5 The diagram shown is a signaling flow diagram of another optional example of the control method proposed in this application. This embodiment can describe another optional event-triggered control method in which the target application directly controls the operating system to perform actions, such as... Figure 5 As shown, the method may include:
[0104] In step S51, the first processor, in the first mode, responds to the received first signal, issues a first trigger command, and triggers the first event;
[0105] Step S52: The target application responds to the first event and obtains the configuration information corresponding to the second event;
[0106] Step S53: The target application determines that the configuration information is in a first state, and controls the operating system to perform a first action based on the first state; the first action corresponds to the second event.
[0107] In step S54, the target application determines that the configuration information is in the second state, and controls the operating system to perform a second action based on the second state. The second action cooperates with the triggered first event to achieve the first function.
[0108] Taking the scenario of performing a lid-closing operation on a multi-screen laptop as an example, and assuming that a Lid Close event and a Mode event are pre-configured for this operation, the EC receives the lid-closing signal, reads that the Lid Over Write Flag is 1, sends a trigger command for the Mode event, triggers the Mode event, and transmits it to the target application running on the CPU. The target application responds to the Mode event, queries the lid-closing configuration information corresponding to the Lid Close event (which may be in Sleep, Hibernate, or Screen Off states), and can call the operating system's control interface to directly control the operating system to enter the corresponding Sleep, Hibernate, or Screen Off states. If the Lid Close event is configured as Do Nothing, the screen switching interface under the Mode event is called to control the operating system to switch between multiple screens, such as switching the content displayed on the B-side screen to the A-side screen. The control implementation process for other functions is similar, and will not be detailed here.
[0109] In summary, when the first event and the second event are executed simultaneously in the operating system, the second event can interrupt the execution of the first event to avoid conflict. For example, when the first processor responds to the received first signal in the first mode, it can first trigger the execution of the first event. During this process, in certain scenarios, the first processor can be called to trigger the execution of the second event. Thus, the operating system will have both the first and second events triggered. However, during the execution of the first event, the triggered second event can interrupt the execution of the first event and directly execute the second event. The implementation process can be referred to the description of the corresponding part of the above embodiments, and will not be repeated here.
[0110] It should be noted that, for cases where the first event and the second event are executed simultaneously in the operating system, including but not limited to the case where the first processor is in the first mode responding to the first signal as described above, the response rules for the first event and the second event can be flexibly configured according to actual needs. This application will not provide detailed examples of each case.
[0111] As analyzed above, when the first processor is in the second mode, it responds to the first signal and, as described in the corresponding section above, issues a first trigger instruction to trigger the first event and a second trigger instruction to trigger the second event, which are then sent to the second processor. However, in the second mode, the electronic device does not have / has not started the target application that responds to the first event, and the operating system only responds to the second event. The implementation process can be referred to the relevant description of the first processor triggering the second event above, which will not be repeated here in this embodiment.
[0112] Reference Figure 6 The following is a schematic diagram of the signaling flow, which is another optional example of the control method proposed in this application. Figure 6 As shown, the method may include:
[0113] Step S61: The target application performs the first configuration operation;
[0114] Step S62: The first processor switches between the first mode and the second mode according to the configuration result of the first configuration operation.
[0115] In step S63, the first processor enters the first mode and, in response to the received first signal, issues a first trigger instruction; the first trigger instruction is used to trigger a first event in the operating system.
[0116] In step S64, the first processor enters the second mode and, in response to the received first signal, issues a first trigger instruction and a second trigger instruction; the second trigger instruction is used to trigger a second event in the operating system.
[0117] As can be seen, the target application's first configuration operation enables the first processor to switch between a first mode and a second mode, avoiding conflicts between the triggering of two events for the same content signal and reliably fulfilling the user's application requirements for the electronic device. The implementation process of the first configuration operation can be referred to, but is not limited to, the description in the corresponding context. For the implementation process of steps S63 and S64, refer to the relevant description of the control method executed by the first processor described in the above embodiments; this application will not repeat it here.
[0118] In some embodiments, during the implementation of the first configuration operation by the target application, the first flag information can be configured according to the startup state of the target application, so that the first processor can determine whether to enter the first mode or the second mode according to the first flag information. The implementation process of this embodiment can be described in accordance with the description of the corresponding part above.
[0119] Optionally, during the target application startup process, the first event trigger interface can be invoked to allow the BIOS (Basic Input Output System) chip to modify the first flag information stored in the EC (Electronic Core Module), such as updating the first flag from its default state value to another state value. For example, if the first event triggered by the first mode is a Mode event, the Get Base Mode interface can be called, and the BIOS program can modify the corresponding Flag stored in the EC RAM to 1 (the default state is 0). However, this method of modifying the first flag information is not the only possible implementation.
[0120] In some other embodiments, such as Figure 7 The signaling flow diagram shown here is another optional example of the control method proposed in this application. It can describe an optional refined implementation method of the control method proposed above, such as... Figure 7 As shown, the method may include:
[0121] Step S71: The target application receives instruction information;
[0122] Step S72: The target application configures the first flag information according to the instruction information;
[0123] Based on the description of the corresponding section above, one can enter the flag configuration interface of the target application, input the modification instruction information for the first flag that needs to be configured, and thereby configure the information of the first flag and obtain the corresponding first flag information. This application does not limit the content of the instruction information or the method of obtaining it, and is not limited to this method of configuring the first flag information.
[0124] In step S73, the first processor determines whether to enter the first mode or the second mode based on the first flag information.
[0125] In practical applications, users customize new actions or operating system states for different types of quick operation behaviors, such as closing the lid, flipping the lid, or using shortcut keys. These include actions like screen switching, screen mirroring, or adjusting the display position on the electronic device's screen, as mentioned above. These differ from the actions / states configured by the operating system manufacturer, such as hibernation or sleep states corresponding to the lid-closing operation. To avoid triggering conflicts between two events corresponding to the same operation, a corresponding first flag bit is configured in the first processor to determine whether direct triggering of the second event is allowed.
[0126] In the first mode, when the first processor triggers the first event, it will not directly trigger the second event. However, during the target application's response to the first event, it can call the first processor to trigger the second event to meet the state control requirements such as closing the lid to hibernate or sleep. The implementation process can be referred to the description of the corresponding part of the above embodiment, and will not be described in detail here. In addition, the control process of the first processor receiving the first signal and responding after determining whether to enter the first mode or the second mode can also be described in the description of the corresponding part of the above embodiment, and will not be repeated here.
[0127] Reference Figure 8 The diagram below shows an optional example of the control device proposed in this application. The device may include:
[0128] The configuration operation module 81 is used for the target application to perform a first configuration operation, so that the first processor can switch between a first mode and a second mode.
[0129] The first trigger module 82 is used by the first processor in a first mode to issue a first trigger instruction in response to a received first signal, wherein the first trigger instruction is used to trigger a first event in the operating system;
[0130] The second trigger module 83 is used by the first processor in the second mode to issue the first trigger instruction and the second trigger instruction in response to the received first signal, wherein the second trigger instruction is used to trigger a second event in the operating system.
[0131] Based on the description of the control method in the above embodiments, the first trigger module 82 and the second trigger module 83 can be deployed in the first processor of the electronic device, such as EC, while the configuration operation module 81 can be deployed in the second processor of the electronic device, which can support the operation of the electronic device's operating system, such as CPU.
[0132] Optionally, to implement this control method, a target application can also be installed in the second processor, enabling it to respond to the triggered first event when the first processor enters the first mode. The implementation process is not detailed in this embodiment. Furthermore, if the first event and the second event are executed simultaneously in the operating system, the second event can interrupt the execution of the first event.
[0133] Optionally, the above configuration operation module 81 may include:
[0134] The first configuration unit is used to configure first flag information according to the startup state of the target application; or,
[0135] The instruction information receiving unit is used to receive instruction information;
[0136] The second configuration unit is used to configure the first flag information according to the instruction information;
[0137] Based on this, the above-mentioned device may further include a component deployed in the first processor:
[0138] The first acquisition module is used to acquire first flag information; the first flag information is configured according to the target application in the operating system;
[0139] The first determining module is used to determine whether to enter the first mode or the second mode based on the first flag information.
[0140] In some other embodiments, the above-described apparatus may further include the following modules deployed in the target application of the second processor:
[0141] The first event response module is used to respond to the first event triggered in the first mode;
[0142] The first operation execution module is used to execute a first operation by the target application after responding to the first event, wherein the first operation is associated with the second event.
[0143] Optionally, the first operation execution module may include:
[0144] The first transmitting unit is used to send a second signal from the target application to the first processor;
[0145] In one implementation, the first transmitting unit may include:
[0146] The first acquisition unit is used to acquire configuration information corresponding to the second event;
[0147] The second sending unit is used to determine that the configuration information is in a first state and send the second signal to the first processor.
[0148] Based on this, the above-mentioned device may further include a component deployed in the first processor:
[0149] The second response module is configured to issue the second trigger command in response to the received second signal.
[0150] In some other embodiments, the first operation execution module described above may also include:
[0151] The first control unit is used to directly control the operating system to perform actions.
[0152] In one implementation, the first control unit may include:
[0153] The second acquisition unit is used to acquire configuration information corresponding to the second event;
[0154] The second control unit is configured to determine that the configuration information is in a first state, and control the operating system to perform a first action according to the configuration information, wherein the first action corresponds to the second event.
[0155] In another implementation, the first control unit may include:
[0156] The third acquisition unit is used to acquire configuration information corresponding to the second event;
[0157] The third control unit is used to determine that the configuration information is in a second state, and to control the operating system to perform a second action according to the configuration information. The second action cooperates with the triggered first event to realize the first function.
[0158] It should be noted that the various modules and units in the above-mentioned device embodiments can all be stored in the memory as program modules. The target application running the corresponding first processor or second processor executes the program modules stored in the memory to achieve the corresponding functions. The functions achieved by each program module and its combination, as well as the technical effects achieved, can be referred to the description of the corresponding part of the above-mentioned method embodiments, which will not be repeated in this embodiment.
[0159] This application also provides a computer-readable storage medium on which a computer program can be stored, which can be invoked and loaded by a processor to implement the various steps of the control method described in the above embodiments.
[0160] This application also proposes an electronic device applicable to the above control method. The electronic device may include at least a detection component, a first processor, and a second processor. The detection component may include various sensors and communication detectors, etc., for detecting the operating status and / or attitude change information of the electronic device, etc., and transmitting a corresponding first signal to the first processor. The first processor may be an EC (Electronic Control Unit) that executes the control method described in the above method embodiment applicable to the first processor. The second processor may be a CPU that supports the operation of the electronic device's operating system. After the target application is installed in the electronic device, it can also run on the second processor to implement the control method described in the above method embodiment on the target application side. This embodiment will not be described in detail here.
[0161] It should be understood that the structure of the electronic device described above does not constitute a limitation on the electronic device in the embodiments of this application. In practical applications, the electronic device may include more components or combine certain components, such as a touch sensing unit for sensing touch events on a touch display panel, a keyboard, a mouse, a camera, a microphone, or at least one input component; a display, a speaker, a vibration mechanism, a lamp, or at least one output component; an antenna; a sensor module; a power module, etc., which can be determined according to the type of electronic device and its functional requirements. This application will not list them all here.
[0162] Finally, it should be noted that, regarding the above embodiments, relational terms such as "first," "second," etc., are merely used to distinguish one operation, unit, or module from another, and do not necessarily require or imply any such actual relationship or order between these units, operations, or modules. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, or system. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, or system that includes said element.
[0163] The various embodiments in this specification are described in a progressive or parallel manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to mutually. For the apparatus and electronic devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to in the method section.
[0164] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A control method, comprising: In a first mode, the first processor, in response to a received first signal, issues a first trigger instruction, the first trigger instruction being used to trigger a first event in the operating system; In the second mode, in response to the received first signal, the first processor issues the first trigger instruction and the second trigger instruction, the second trigger instruction being used to trigger a second event in the operating system.
2. The method according to claim 1, wherein if the first event and the second event are executed simultaneously in the operating system, the second event can interrupt the execution of the first event.
3. The method according to claim 1, further comprising: The first processor acquires the first flag information; The first flag information is configured according to the target application in the operating system; The first processor determines whether to enter the first mode or the second mode based on the first flag information.
4. The method according to claim 1, wherein in the first mode, the first event is responded to by a target application in the operating system, the target application being configured to perform a first operation after responding to the first event, the first operation being associated with the second event.
5. A control method, comprising: The target application performs a first configuration operation to cause the first processor to switch between a first mode and a second mode; In the first mode, the first processor, in response to a received first signal, issues a first trigger instruction, which is used to trigger a first event in the operating system; in the second mode, the first processor, in response to the received first signal, issues the first trigger instruction and a second trigger instruction, which is used to trigger a second event in the operating system.
6. The method according to claim 5, wherein the target application performs a first configuration operation, comprising: Configure first flag information according to the startup state of the target application, so that the first processor can determine whether to enter the first mode or the second mode based on the first flag information.
7. The method according to claim 5, further comprising: The target application responds to a first event triggered in the first mode; Upon responding to the first event, the target application performs a first operation, which is associated with the second event.
8. The method according to claim 7, wherein performing the first operation comprises: The target application sends a second signal to the first processor, causing the first processor to issue the second trigger command in response to the received second signal.
9. A control device, deployed in a first processor of an electronic device, the device comprising: The first trigger module is used by the first processor in a first mode to issue a first trigger instruction in response to a received first signal, wherein the first trigger instruction is used to trigger a first event in the operating system; The second trigger module is used by the first processor in the second mode to issue the first trigger instruction and the second trigger instruction in response to the received first signal, wherein the second trigger instruction is used to trigger a second event in the operating system.
10. A control device comprising a second processor deployed in an electronic device, the second processor supporting the operation of an operating system of the electronic device, the device comprising: A configuration operation module is used by the target application to perform a first configuration operation, so that the first processor can switch between a first mode and a second mode. In the first mode, the first processor, in response to a received first signal, issues a first trigger instruction, which is used to trigger a first event in the operating system; in the second mode, the first processor, in response to the received first signal, issues the first trigger instruction and a second trigger instruction, which is used to trigger a second event in the operating system.
Citation Information
Patent Citations
RISC-V architecture-based sleep mode switching improvement system and method
CN111459562A
