WO2023169039A1 - 双系统状态同步方法、装置、电子设备和可读存储介质 - Google Patents

双系统状态同步方法、装置、电子设备和可读存储介质 Download PDF

Info

Publication number
WO2023169039A1
WO2023169039A1 PCT/CN2022/139666 CN2022139666W WO2023169039A1 WO 2023169039 A1 WO2023169039 A1 WO 2023169039A1 CN 2022139666 W CN2022139666 W CN 2022139666W WO 2023169039 A1 WO2023169039 A1 WO 2023169039A1
Authority
WO
WIPO (PCT)
Prior art keywords
mode
state
status
working mode
working
Prior art date
Application number
PCT/CN2022/139666
Other languages
English (en)
French (fr)
Inventor
张冠群
陈亚南
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023169039A1 publication Critical patent/WO2023169039A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Definitions

  • the present application relates to the field of electronic equipment, and in particular to a dual system state synchronization method, device, electronic equipment, computer-readable storage media and computer program products.
  • Embodiments of the present application provide a dual-system state synchronization method, device, electronic equipment, computer-readable storage media, and computer program products, which can ensure state synchronization of electronic equipment when switching between different systems.
  • a dual system status synchronization method applied to electronic equipment, the electronic equipment can run the first system and the second system, the method includes:
  • the first operating mode or the second operating mode detect the operating mode status of the first system
  • both the first system and the second system are running, and only the first system displays the interface; in the second operating mode, the first system and the second system are running. Both the second systems are running, and the first system or the second system performs interface display.
  • a dual system status synchronization device applied to electronic equipment, the electronic equipment can run the first system and the second system, the device includes:
  • a detection module for detecting the working mode status of the first system in the first operating mode or the second operating mode
  • An adjustment module configured to adjust the working mode state of the second system to be the same as the working mode state of the first system when the working mode state of the first system changes;
  • both the first system and the second system are running, and only the first system displays the interface; in the second operating mode, the first system and the second system are running. Both the second systems are running, and the first system or the second system performs interface display.
  • An electronic device includes a memory and a processor.
  • a computer program is stored in the memory. When the computer program is executed by the processor, it causes the processor to perform the following operations:
  • the first operating mode or the second operating mode detect the operating mode status of the first system
  • both the first system and the second system are running, and only the first system displays the interface; in the second operating mode, the first system and the second system are running. Both the second systems are running, and the first system or the second system performs interface display.
  • a computer-readable storage medium on which a computer program is stored The computer program implements the following operations when executed by a processor:
  • the first operating mode or the second operating mode detect the operating mode status of the first system
  • both the first system and the second system are running, and only the first system displays the interface; in the second operating mode, the first system and the second system are running. Both the second systems are running, and the first system or the second system performs interface display.
  • a computer program product including a computer program, which implements the following operations when executed by a processor:
  • the first operating mode or the second operating mode detect the operating mode status of the first system
  • both the first system and the second system are running, and only the first system displays the interface; in the second operating mode, the first system and the second system are running. Both the second systems are running, and the first system or the second system performs interface display.
  • both the first system and the second system are running, and only the first system displays the interface.
  • both the first system and the second system are running, and the first system or the second system displays the interface, thereby detecting the working mode status of the first system of the electronic device in the first operating mode or the second operating mode.
  • Figure 1 is an application environment diagram of a dual system state synchronization method in an embodiment.
  • Figure 2 is a flow chart of a dual system status synchronization method in an embodiment.
  • Figure 3 is a flow chart for synchronizing the working mode status of the first system and the second system in one embodiment.
  • Figure 4 is a schematic flowchart of a dual system state synchronization method when switching from light intelligence mode to other operating modes in one embodiment.
  • Figure 5 is a structural block diagram of a dual system state synchronization device in one embodiment.
  • Figure 6 is a schematic diagram of the internal structure of an electronic device in one embodiment.
  • first, second, etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element.
  • a first system may be referred to as a second system, and similarly, a second system may be referred to as a first system, without departing from the scope of the present application.
  • the first system and the second system are both systems, but they are not the same system.
  • the dual system status synchronization method provided by the embodiment of the present application can be applied in the application environment as shown in Figure 1.
  • the electronic device 102 can interact with the user.
  • the electronic device 102 can run at least two systems (i.e., operating systems). Taking the first system and the second system running on the electronic device 102 as an example, in the first operating mode or the second operating mode, the operation of the first system is detected. Mode status; wherein, in the first operating mode, both the first system and the second system are running, and only the first system displays the interface; in the second operating mode, both the first system and the second system are running, and the first system The system or the second system performs interface display.
  • the electronic device 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices, and portable wearable devices.
  • the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, and smart vehicle-mounted devices. wait.
  • Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc.
  • multiple systems can be run on the electronic device, and the multiple systems include at least two systems, and the at least two systems include a first system and a second system.
  • the electronic device includes a first processor corresponding to a first system (ie, a large core system) and a second processor corresponding to a second system (ie, a small core system). Both the first processor and the second processor are microprocessors, wherein the first processor is a core processor. The first processor and the second processor can configure corresponding microprocessors according to actual applications.
  • the system can be Android system, Linux system, Windows system, IOS system, RTOS (Real Time Operating System, real-time operating system), etc., but is not limited to this.
  • the power consumption of the first system for normal operation is higher than the power consumption of the second system for normal operation.
  • the first processor may be a CPU (Central Process Unit) processor, corresponding to the first system may be an Android system; the second processor may be an MCU (Microcontroller Unit)
  • the processor, the corresponding second system can be RTOS (Real Time Operating System, real-time operating system).
  • the main frequency of the CPU can reach 1.5GHz (gigahertz), while the main frequency of the MCU is about 150MHz (megahertz), so the power consumption of the first processor is higher than that of the second processor, and the power consumption of the first system is higher than Second system power consumption.
  • At least one of the first operating mode, the second operating mode and the third operating mode may exist.
  • the first operating mode that is, the high-performance mode
  • both the first system and the second system start normally
  • only the first system displays the interface, that is, the display right of the electronic device screen is only controlled by the first system.
  • System control in the first operating mode, that is, the hybrid mode, in the second operating mode, both the first system and the second system start normally
  • the first system or the second system performs interface display, that is, the display right of the electronic device screen can be controlled by the second operating mode.
  • One system may also be controlled by a second system, that is, the screen display rights of the electronic device can be dynamically switched between the two systems according to the operating status of the device.
  • the third operating mode is the light smart mode. In the third operating mode, the first system is shut down, only the second system is running, and only the second system displays the interface. That is, the display right of the screen of the electronic device is controlled by the second system. control. It can be understood that the power consumption of the electronic device in the first operating mode is greater than the power consumption in the second operating mode, and the power consumption of the electronic device in the second operating mode is greater than the power consumption in the third operating mode.
  • FIG 2 is a flow chart of a dual system status synchronization method in an embodiment.
  • the dual system state synchronization method in this embodiment is described by taking the electronic device running on the electronic device in Figure 1 as an example.
  • the dual system status synchronization method includes:
  • Operation 202 In the first operating mode or the second operating mode, detect the operating mode status of the first system.
  • the first operating mode and the second operating mode are both modes in which the operating system in the electronic device can operate, that is, the first system and the second system can operate in the mode.
  • the working mode refers to the mode used by the system in the electronic device to work in the operating mode, such as sleep mode, eye protection mode, flight mode, etc., but is not limited to this.
  • the working mode status may include an enabled state and an off state.
  • both the first system and the second system of the electronic device are running, and only the first system displays the interface, and the second system cannot display the interface, so as to pass the first system.
  • the electronic device can detect the working mode status of the first system. Further, when the electronic device is in the first operating mode, it is detected that the operating mode state of the first system is an enabled state or a closed state.
  • both the first system and the second system are running, and the first system or the second system displays an interface to interact with the user through the displayed interface.
  • the electronic device may detect the operating mode status of the first system.
  • both the first system and the second system remain running, and interface interaction can be performed through the first system or through the second system. Interface interaction can be performed, and the interface interaction is adjusted so that only the first system performs interface interaction, and the electronic device can detect the working mode status of the first system.
  • the electronic device in the first operating mode or the second operating mode, or in the case of switching from the second operating mode to the first operating mode, the electronic device can perform real-time or scheduled changes in the operating mode state of the first system. monitor. When the working mode status of the first system changes, the first system can notify the second system in real time.
  • Operation 204 When the working mode state of the first system changes, adjust the working mode state of the second system to be the same as the working mode state of the first system.
  • the electronic device detects a change in the working mode state of the first system, it adjusts the working mode state of the second system so that the working mode state of the second system is adjusted to be the same as the working mode state of the first system.
  • the first system when the working mode status of the first system changes, can notify the second system in real time to control the second system to adjust its own working mode status to the working mode of the first system.
  • the status is the same.
  • the first system is a large-core operating system
  • the second system is a small-core operating system.
  • the large-core operating system can implement more functions and consumes higher power, and the small-core operating system implements fewer functions. , lower power consumption.
  • At least one of screen brightness, silent mode state and vibration mode state corresponding to the changed working mode state is determined. Adjust the working mode state of the second system of the electronic device to be the same as the working mode state of the first system, and adjust at least one of the screen brightness, silent mode state and vibration mode state of the second system to be the same as after the change Same as the first system.
  • the method further includes: in the second operating mode, detecting the working mode state of the second system; when the working mode state of the second system changes, adjusting the working mode state of the first system to The same status as the second working mode.
  • both the first system and the second system are running, and the first system or the second system displays an interface to interact with the user through the interface displayed by the first system or the second system.
  • the electronic device can detect the operating mode state of the first system.
  • the operating mode state of the second system changes, the electronic device can adjust the operating mode state of the first system to be consistent with the second operating mode.
  • the status is the same.
  • the first system can be notified in real time through the second system to control the first system to adjust its own working mode state to be consistent with the working mode state of the second system. same.
  • the working mode state of the first system of the electronic device is detected, and when the working mode state of the first system changes, the working mode state of the second system of the electronic device is changed.
  • the working mode state is adjusted to be the same as the working mode state of the first system, so that the states of different systems of the electronic device in the working mode are consistent, and interference caused by state asynchronousness is effectively avoided.
  • the method further includes:
  • Operation 302 In the second operating mode, detect the working mode status of the first system and the working mode status of the second system respectively.
  • both the first system and the second system are running, and interface interaction is performed through the first system or interface interaction is performed through the second system, that is, the display right of the electronic device screen can be controlled by the first system or the second system.
  • the electronic device needs to detect the working mode status of the first system and the operation of the second system respectively in the second operating mode, or when switching from the first operating mode to the second operating mode. mode status. Further, the electronic device can detect the working mode state of the first system and the working mode state of the second system in real time or regularly.
  • Operation 304 in the case where the working mode state of the first system changes, determine a first timestamp of the changing of the working mode state of the first system.
  • the electronic device can detect the working mode status of the first system in real time or regularly, and when the working mode status of the first system changes, record the first timestamp of the change in the working mode status of the first system.
  • the electronic device can detect the working mode status of the first system in real time or regularly, record the timestamp of each detection and the corresponding working mode status, and compare the working mode status recorded in the current detection with the adjacent one. Compare the working mode status recorded in one inspection. When the working mode status recorded in the current detection is the same as the working mode status recorded in the previous adjacent detection, it is determined that the working mode status of the first system has not changed, and the next detection is continued.
  • the timestamp recorded in the current detection will be used as the third A timestamp.
  • Operation 306 in the case where the working mode state of the second system changes, determine a second timestamp of the changing of the working mode state of the second system.
  • the electronic device can detect the working mode status of the second system in real time or regularly, and record a second timestamp of the change in the working mode status of the second system when the working mode status of the second system changes.
  • the electronic device can detect the working mode status of the second system in real time or regularly, record the timestamp of each detection and the corresponding working mode status, and compare the working mode status recorded in the current detection with the adjacent working mode status. Compare the working mode status recorded in one inspection.
  • the working mode status recorded in the current detection is the same as the working mode status recorded in the previous adjacent detection, it is determined that the working mode status of the second system has not changed, and the next detection is continued.
  • the timestamp recorded in the current detection will be used as the second system. Two timestamps.
  • Operation 308 Synchronize the working mode status of the first system and the second system according to the first time stamp and the second time stamp.
  • the electronic device adjusts the working mode state of the first system or the working mode state of the second system according to the first time stamp and the second time stamp, so that the working mode states of the first system and the second system are the same.
  • the electronic device can compare the first timestamp with the second timestamp, and synchronize the working mode status of the first system and the second system based on the comparison result. Further, the electronic device can compare the first timestamp and the second timestamp, and adjust the working mode state of the first system or the working mode state of the second system based on the timestamp comparison result, so that the working mode state of the first system and the second system The working mode status is the same.
  • the electronic device can compare the first timestamp with the second timestamp, and compare the working mode state corresponding to the first timestamp with the working mode state corresponding to the second timestamp. Based on the timestamp comparison result and the status comparison result, the working mode status of the first system and the second system is synchronized.
  • the electronic device can adjust the working mode state corresponding to the system corresponding to the first timestamp to be the same as the working mode state corresponding to the system corresponding to the second timestamp.
  • the electronic device may adjust the working mode state corresponding to the system corresponding to the second timestamp to be the same as the working mode state corresponding to the system corresponding to the first timestamp.
  • the working mode status of the first system and the working mode status of the second system change.
  • a first timestamp of the changing of the working mode state of the first system is determined, and the time when the first system state changes is recorded in time.
  • a second timestamp of the changing of the working mode state of the second system is determined, and the time when the first system state changes is recorded in time.
  • the working mode state of the first system or the working mode state of the second system is adjusted so that the first system and the second system
  • the working mode status can be synchronized in real time.
  • synchronizing the working mode status of the first system and the second system according to the first timestamp and the second timestamp includes:
  • Adjust the working mode state corresponding to the system corresponding to the previous timestamp among the first timestamp and the second timestamp to be the same as the working mode state corresponding to the system corresponding to the later timestamp.
  • the electronic device can compare the first timestamp and the second timestamp, and determine the earlier timestamp and the later timestamp of the first timestamp and the second timestamp.
  • the electronic device determines the system corresponding to the previous timestamp and the system corresponding to the later timestamp, and adjusts the working mode state corresponding to the system corresponding to the previous timestamp to the system corresponding to the later timestamp.
  • the corresponding working mode status is the same.
  • the electronic device may determine the working mode state corresponding to the first timestamp and the working mode state corresponding to the second timestamp.
  • the working mode state corresponding to the system corresponding to the previous timestamp is adjusted to correspond to the later timestamp.
  • the corresponding working modes of the systems are the same.
  • the previous timestamp is the first timestamp
  • the later timestamp is the second timestamp
  • the system corresponding to the first timestamp is the first system
  • the corresponding working mode state is sleep mode enabled.
  • the system corresponding to the second timestamp is the second system
  • the corresponding working mode status is the off sleep mode. Then the electronic device adjusts the off sleep mode of the second system to the enabled sleep mode, so that both the first system and the second system are in sleep mode.
  • the enabled state of the mode is the first timestamp
  • the later timestamp is the second timestamp
  • the system corresponding to the first timestamp is the first system
  • the corresponding working mode state is sleep mode enabled.
  • the electronic device adjusts the off sleep mode of the second system to the enabled sleep mode, so that both the first system and the second system are in sleep mode.
  • the enabled state of the mode is the first timestamp
  • the later timestamp is the second timestamp
  • the system corresponding to the first timestamp is the first system
  • At least one of screen brightness, silent mode state, and vibration mode state corresponding to the working mode state corresponding to the later timestamp is determined. Adjust the working mode status of the system corresponding to the previous timestamp to the same working mode status as the system corresponding to the later timestamp, and adjust the screen brightness and silent mode of the system corresponding to the later timestamp. At least one of the state and the vibration mode state is adjusted to be the same as the system corresponding to the previous timestamp.
  • the working mode state corresponding to the system corresponding to the previous timestamp is adjusted to the same working mode state corresponding to the system corresponding to the later timestamp.
  • the method further includes: in the third operating mode, detecting the working mode state of the second system; wherein only the second system is operated in the third operating mode; and when the working mode state of the second system changes In the case of , record the corresponding relevant status data; the relevant status data includes the changed working mode status; wherein the relevant status data is used to indicate adjusting the working mode status of the first system to be the same as the changed working mode status.
  • the third operating mode is a mode in which the second system in the electronic device operates and the first system does not operate.
  • the working mode status of the second system is detected regularly or in real time.
  • relevant status data corresponding to the status change is recorded, and the relevant status data includes the changed working mode status.
  • the electronic device can adjust the working mode state of the first system based on the relevant status data, so that the working mode state of the first system is the same as the changed working mode state of the second system.
  • the electronic device can send relevant status data to the first system through the second system, so that the first system receives the relevant status data while running, and adjusts its own working mode state based on the relevant status data. to the same working mode state as that of the second system after the change.
  • the operating mode status of the second system is detected. ; When the working mode status of the second system changes, record the corresponding relevant status data.
  • the second system since only the second system is running in the third operating mode and the first system is not running, it can be detected whether the working mode status of the second system has changed.
  • the working mode status of the second system changes, record relevant status data including the changed working mode status, so as to adjust the working mode status of the first system to be the same as the changed working mode status through the relevant status data instructions,
  • This allows the first system to maintain the same working mode state as the second system when the first system resumes operation, thereby ensuring the consistency of the working mode states of each system when running. And it can ensure the consistency of the working mode status of each system before and after switching between different systems.
  • the method further includes:
  • the third operating mode only the second system is running and the first system is not running, so the first system cannot receive data generated by the second system in real time.
  • the first system can operate in the first operating mode and the second operating mode.
  • the relevant Status data is sent to the first system.
  • the first system adjusts its own working mode state to the changed working mode state in the relevant status data, so that the working mode state of the first system is the same as the working mode state of the second system.
  • the third operating mode is switched to the first operating mode or to the second operating mode
  • the The relevant status data is sent to the first system, so that the first system maintains the same working mode status as the second system when operation is resumed, thereby ensuring that the working mode status of different systems of the electronic device remains synchronized when running.
  • the relevant status data includes at least one of the first screen brightness after status change, the first status of silent mode, and the first status of vibration mode; the method further includes:
  • the relevant status data includes the first screen brightness
  • the relevant status data includes the first status of the silent mode
  • the state is adjusted to the first state of the silent mode
  • the relevant state data includes the first state of the vibration mode
  • the vibration mode state of the first system is adjusted to the first state of the vibration mode.
  • relevant status data after the status change is recorded.
  • the relevant status data includes the first screen brightness after the status change, the first status of the silent mode, and the third status of the vibration mode. at least one of a state.
  • the first screen brightness refers to the screen brightness of the second system after the state changes.
  • the first state of the silent mode refers to the state corresponding to the silent mode of the second system after the state changes, such as an enabled state or a closed state.
  • the first state of the vibration mode refers to the state corresponding to the vibration mode of the second system after the state changes.
  • the electronic device sends relevant status data to the first system through the second system.
  • the relevant status data received by the first system includes the first screen brightness
  • the first system adjusts its corresponding screen brightness to the first screen brightness.
  • the relevant state data received by the first system includes the first state of the silent mode
  • the first system adjusts its own silent mode state to the first state of the silent mode.
  • the relevant state data received by the first system includes the first state of the vibration mode
  • the first system adjusts its own vibration mode state to the first state of the vibration mode.
  • the corresponding screen brightness of the second system can be modified multiple times, and the last modified screen brightness can be used as the first screen brightness after the state change.
  • the screen brightness corresponding to the first system is adjusted to the first screen brightness to maintain the consistency of the working mode status and screen brightness of different systems, so that the user It can avoid eye discomfort caused by large changes in screen brightness when switching systems.
  • the silent mode state of the first system is adjusted to the first state of the silent mode to maintain the consistency of the working mode state and the silent mode state of different systems, and avoid The sound impact caused by the silent mode state after the system is switched.
  • the vibration mode state of the first system is adjusted to the first state of the vibration mode, so as to maintain the consistency of the working mode state and the vibration mode state of different systems, and avoid The impact caused by the vibration mode state after system switching.
  • the relevant status data includes at least one of the second screen brightness before the status change, the second status of silent mode, and the second status of vibration mode; the method further includes:
  • the relevant state data includes the second screen brightness, adjusting the screen brightness of the first system and the second system to the second screen brightness, and if the related state data includes the second state of the silent mode , then adjust the silent mode state of the first system and the second system to the second state of the silent mode. If the relevant state data includes the second state of the vibration mode, adjust the vibration mode state of the first system and the second system to The second state of vibration mode.
  • the electronic device records the working mode status after the second system status changes, and may also record the second screen brightness before the status change, the second status of the silent mode, At least one of the second states of the vibration mode.
  • the second screen brightness refers to the screen brightness of the second system before the state changes.
  • the second state of the silent mode refers to the state corresponding to the silent mode of the second system before the state changes.
  • the second state of the vibration mode refers to the state corresponding to the vibration mode of the second system before the state changes, such as an enabled state or a closed state.
  • At least one of the second screen brightness, the second state of silent mode, the second state of vibration mode, and the changed working mode state are sent to the first system as relevant state data, so that the first system
  • the mode status is adjusted to the changed working mode status in the relevant status data, so that the working mode status of the first system is the same as the working mode status of the second system.
  • the working mode status is adjusted from the enabled state to the off state, if the relevant status data includes the second screen brightness, the first system adjusts its corresponding screen brightness to the second screen brightness, and the second system adjusts its corresponding screen brightness to the second screen brightness.
  • the screen brightness is adjusted to the secondary screen brightness.
  • the first system adjusts its corresponding silent mode state to the second state of the silent mode
  • the second system adjusts its corresponding silent mode state to the third state of the silent mode.
  • the first system adjusts its corresponding vibration mode state to the second state of the vibration mode, and the second system adjusts its corresponding vibration mode state to the third state of the vibration mode.
  • Two states If the relevant state data includes the second state of the vibration mode, the first system adjusts its corresponding vibration mode state to the second state of the vibration mode, and the second system adjusts its corresponding vibration mode state to the third state of the vibration mode.
  • the working mode state changes from the enabled state to the off state. If the relevant status data includes the second screen brightness, the screen brightness of the first system and the second system is adjusted to the second screen brightness, so that when exiting the working mode , the second system automatically returns to the screen brightness before entering the working mode, and the first system can synchronize the screen brightness with the second system. Entering the off state, if the relevant status data includes the second state of the silent mode, adjust the silent mode states of the first system and the second system to the second state of the silent mode, so that the second system automatically recovers when exiting the working mode to the silent mode state before entering the working mode, and the first system can maintain synchronization with the second system in the silent mode state.
  • the relevant state data includes the second state of the vibration mode, adjust the vibration mode state of the first system and the second system to the second state of the vibration mode, so that the second system automatically recovers when exiting the working mode No user operation is required to reach the vibration mode state before entering the working mode, and the first system can maintain synchronization with the second system in the vibration mode state, achieving data synchronization.
  • the working mode state is the enabled state
  • the user is allowed to modify the screen brightness, but the silent mode state and the vibration mode state are not allowed to be modified.
  • the silent mode state of the running first system and the second system is adjusted to the enabled state
  • the running state of the first system and the second system is adjusted to the enabled state.
  • Adjust the vibration mode status to off, adjust the screen brightness of the running first system and the second system to the lowest value, and turn off the audio and video being played.
  • "audioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT)" can be used to enable the silent mode and turn off the vibration mode.
  • the brightness value of the android system ranges from 0 to 255
  • the brightness value of electronic devices can be divided into 5 levels.
  • the lowest level of brightness is 10, which can be determined by "Settings.System.putInt(getContentResolver(),Settings.System.SCREEN_BRIGHTNESS” ,10)” Adjust the screen brightness to the lowest setting.
  • the currently playing audio and video can be closed by preempting the audio and video focus.
  • the silent mode cannot be operated and the vibration state cannot be changed in the sleep mode, but the screen brightness can be modified. If you need to adjust the sleep mode status of the first system and the second system to the enabled state, you can first adjust the silent mode status to the enabled state, adjust the vibration mode status to the off state, turn off the audio and video being played, and then enter Sleep mode activation state.
  • the silent mode state of each system cannot be changed after entering the sleep mode. After exiting the sleep mode, each system can automatically restore the silent mode state before entering the sleep mode. After entering sleep mode, the vibration mode status of each system cannot be changed. After exiting sleep mode, each system can automatically restore the vibration mode status before entering sleep mode.
  • the screen brightness is allowed to be modified. If the user does not modify the screen brightness during sleep mode, each system can automatically restore the brightness value before entering sleep mode after exiting sleep mode. If the user modifies the screen brightness during sleep mode, the user will The modified brightness value shall prevail. Each system does not resume audio playback after exiting sleep mode.
  • the method of entering sleep mode may include the user triggering the sleep mode, the user setting a timer to enter the sleep mode, or the device algorithm detecting the user's sleep before entering the sleep mode. Users can choose to turn on the function of identifying sleep, so that the electronic device can automatically identify whether the user has entered sleep and determine whether to adjust the system to sleep mode.
  • the power consumption in the first operating mode is higher than the power consumption in the second operating mode, and the power consumption in the second operating mode is higher than the power consumption in the third operating mode.
  • both the first system and the second system are running, and only the first system performs interface interaction with the user.
  • the electronic device can provide the user with complete and comprehensive functions through the first system, that is, all functions of the electronic device can be used in the first operating mode. Therefore, the first operating mode has the highest power consumption.
  • both the first system and the second system are running, and the first system performs interface interaction with the user, or the second system performs interface interaction with the user.
  • the electronic device can provide users with more functions through the first system and the second system, that is, most functions can be used in the second operating mode, but a small number of functions cannot be used in the second operating mode. use. Therefore, the power consumption of the second operating mode is lower than that of the first operating mode.
  • the third operating mode only the second system is run, and only the second system interacts with the user.
  • the electronic device provides users with fewer functions through the second system, that is, a small number of functions of the electronic device can be used in the third operating mode, and most functions cannot be used in the third operating mode. Therefore, the power consumption of the third operating mode is lower than the power consumption of the second operating mode.
  • the first operating mode is the high-performance mode
  • the second operating mode is the hybrid mode
  • the third operating mode is the light intelligence mode.
  • the first system is a large-core operating system
  • the second system is a small-core operating system.
  • High-performance mode the large-core operating system and the small-core operating system coexist, but all page interactions with users are performed under the large-core operating system. This mode can bring the most complete functional experience to users, and all functions can be This mode is used, but High Performance mode is the most power consuming.
  • hybrid mode the large-core operating system and the small-core operating system coexist.
  • the user's page interaction will switch between the large-core operating system and the small-core operating system according to different scenarios.
  • the light smart mode only the small core operating system is running, and many functions cannot be used by users, such as downloaded third-party applications.
  • the light smart mode is the most power-saving among the three modes.
  • the power consumption of the first operating mode is higher than the power consumption of the second operating mode
  • the power consumption of the second operating mode is higher than the power consumption of the third operating mode, which can provide the user with guaranteed operation of the electronic device.
  • the first operating mode is a high-performance mode
  • the second operating mode is a hybrid mode
  • the third operating mode is a light intelligence mode.
  • the first system is a large-core operating system
  • the second system is a small-core operating system
  • the working mode is the sleep mode.
  • the large-core operating system and the small-core operating system coexist.
  • the large-core operating system runs in the foreground and the small-core operating system runs in the background.
  • all page interactions with the user are performed under the large-core operating system, so only It is necessary to set up monitoring of sleep mode state changes in the large-core operating system.
  • the small-core operating system is notified in real time through dual-core communication, so that the sleep mode state of the small-core operating system is consistent with that of the large-core operating system. Sleep mode status remains unified.
  • the large-core operating system and the small-core operating system coexist, and the user's page interaction may be in the large-core operating system or the small-core operating system. Therefore, sleep mode state synchronization needs to be set separately in the small-core operating system. Listening, any change on one side needs to notify the other side to keep the sleep mode state synchronized.
  • the hybrid mode needs to introduce the concept of timestamp.
  • the large-core operating system receives the sleep mode status change message of the small-core operating system, it first determines whether the sleep mode status of the large-core operating system is consistent. For example, the sleep mode status of the small-core operating system is enabled, and the sleep mode status of the large-core operating system is turned off. If the sleep mode states of the large and small core operating systems are inconsistent, you need to compare the time stamps of the sleep mode state changes of the small core operating system and the timestamp of the latest sleep mode state change of the large core operating system. The mode status shall prevail. On the contrary, if the small-core operating system receives a message that the sleep mode state of the large-core operating system has changed, the same processing logic is used.
  • the relevant status data will be sent to the big-core operating system at once for processing.
  • the relevant status data that needs to be sent to the big-core operating system includes: the sleep mode status after the small-core operating system status changes.
  • the small-core operating system is referred to as small core
  • the large-core operating system is referred to as large core.
  • it is a dual-system state synchronization method when switching from light intelligence mode to high-performance mode in one embodiment.
  • the light intelligence mode is switched to the high performance mode or the hybrid mode.
  • operation 404 it is determined whether the small core operating system is in sleep mode. If so, operation 406 is performed. Otherwise, operation 416 is performed.
  • Operation 406 Adjust the sleep mode state of the large-core operating system to the enabled state, that is, adjust the sleeping large-core operating system to enter the sleep mode, and perform operation 408.
  • Operation 408 Determine whether the current screen brightness of the small core operating system is consistent with the screen brightness before entering the sleep mode. If they are consistent, perform operation 416; if they are inconsistent, perform operation 410.
  • Operation 410 Save the screen brightness before the small-core operating system enters the sleep mode, and send the screen brightness before entering the sleep mode to the large-core operating system to perform operation 412.
  • operation 412 after exiting the sleep mode, determine whether the large and small core operating systems have saved the screen brightness before entering the sleep mode. If so, perform operation 414. If not, the process ends.
  • Operation 414 Adjust the screen brightness of the large and small core operating systems to the screen brightness before entering the sleep mode.
  • Operation 416 Send the screen brightness of the small-core operating system to the large-core operating system so that the screen brightness of the large-core operating system is consistent.
  • the screen brightness of the big and small core operating systems is 5.
  • the user adjusts the screen brightness of the small core operating system to 3.
  • the screen brightness is automatically adjusted to 1.
  • the small-core operating system sends screen brightness 1 and 3 to the large-core operating system, and the large-core operating system enters sleep mode and automatically adjusts the screen brightness to 1.
  • the small-core operating system restores the screen brightness to 3, and the large-core operating system adjusts the current screen brightness to screen brightness 3 (that is, the screen brightness before the small-core operating system enters sleep), so that the large-core operating system adjusts the screen brightness when entering and exiting. Remain consistent in sleep mode state.
  • a dual system state synchronization method applied to electronic equipment, and the electronic equipment can run the first system and the second system.
  • the method includes:
  • the first operating mode or the second operating mode or when switching from the second operating mode to the first operating mode, detect the working mode status of the first system; when the working mode status of the first system changes, Adjust the working mode state of the second system to be the same as the working mode state of the first system; wherein, in the first operating mode, both the first system and the second system are running, and only the first system displays the interface; in the first operating mode, In the second operating mode, both the first system and the second system are running, and the first system or the second system displays the interface.
  • the second operating mode or when switching from the first operating mode to the second operating mode, detect the working mode state of the first system and the working mode state of the second system respectively; When the working mode status changes, determine the first timestamp of the working mode status change of the first system; when the working mode status of the second system changes, determine the second timestamp of the working mode status change of the second system. ; Adjust the working mode state corresponding to the system corresponding to the previous timestamp among the first timestamp and the second timestamp to be the same as the working mode state corresponding to the system corresponding to the later timestamp.
  • the third operating mode detect the working mode status of the second system; wherein only the second system is operated in the third operating mode; when the working mode status of the second system changes, record the corresponding Relevant status data; the relevant status data includes at least one of the first screen brightness after the status change, the first status of the silent mode, the first status of the vibration mode, and the changed working mode status.
  • relevant status data is sent to the first system; the screen brightness corresponding to the first system is adjusted to the first screen brightness, and the first screen brightness is adjusted to the first screen brightness.
  • the silent mode state of the system is adjusted to the first state of silent mode
  • the vibration mode state of the first system is adjusted to the first state of vibration mode
  • the working mode state of the first system is adjusted to the same state as that of the second system after the state is changed.
  • the mode status is the same.
  • the relevant status data also includes at least one of the second screen brightness before the status change, the second status of the silent mode, and the second status of the vibration mode.
  • the working mode status enters the off status
  • the The screen brightness of the first system and the second system is adjusted to the second screen brightness
  • the silent mode status of the first system and the second system is adjusted to the second status of the silent mode
  • the vibration mode status of the first system and the second system is adjusted. Adjust to the second state of vibration mode.
  • different systems can be run in different operating modes.
  • the operating mode of the first system of the electronic device is detected.
  • state when the working mode state of the first system changes, adjust the working mode state of the second system of the electronic device to be the same as the working mode state of the first system, so that the states of different systems of the electronic device in the working mode Consistency, effectively avoiding interference caused by state out-of-synchronization.
  • the working mode state of the first system In the second operating mode, or when switching from the first operating mode to the second operating mode, it is respectively detected whether the working mode state of the first system and the working mode state of the second system change.
  • a first timestamp of the changing of the working mode state of the first system is determined, and the time when the first system state changes is recorded in time.
  • a second timestamp of the changing of the working mode state of the second system is determined, and the time when the first system state changes is recorded in time.
  • Adjust the working mode state corresponding to the system corresponding to the previous timestamp among the first timestamp and the second timestamp to be the same as the working mode state corresponding to the system corresponding to the later timestamp, based on the timestamp Determine the system with the latest working mode status change, thereby adjusting the working mode status of other systems to the latest working mode status, so that each system of the electronic device can maintain the consistency of the latest status.
  • the system Since only the second system is running in the third operating mode and the first system is not running, it can be detected whether the operating mode status of the second system has changed.
  • the working mode status of the second system changes, record the relevant status data including the changed working mode status, and send the relevant status data to the first system, so that the first system maintains the same status as the second system when the operation is resumed.
  • the system has the same working mode status, thereby ensuring that the working mode status of different systems of the electronic device remains synchronized when running. And it can ensure the consistency of the working mode status of each system before and after switching between different systems.
  • the screen brightness corresponding to the first system is adjusted to the first screen brightness to maintain the consistency of the working mode status and screen brightness of different systems, so that the user can avoid errors caused by large changes in screen brightness when switching systems. Eye discomfort problems. Adjust the silent mode state of the first system to the first silent mode state to maintain consistency between the working mode state and the silent mode state of different systems and avoid sound effects caused by the silent mode state after the system is switched. Adjust the vibration mode state of the first system to the first state of the vibration mode to maintain consistency between the working mode state and the vibration mode state of different systems and avoid the impact of the vibration mode state after the system is switched.
  • the working mode state changes from the enabled state to the off state, and the screen brightness of the first system and the second system is adjusted to the second screen brightness, so that when exiting the working mode, the second system automatically returns to the screen brightness before entering the working mode, and
  • the first system is able to synchronize screen brightness with the second system.
  • Enter the shutdown state adjust the silent mode status of the first system and the second system to the second status of the silent mode, so that when exiting the working mode, the second system automatically returns to the silent mode state before entering the working mode, and the first system
  • the system is able to synchronize with the second system in a silent mode state.
  • Entering the off state adjusts the vibration mode state of the first system and the second system to the second state of the vibration mode, so that when exiting the working mode, the second system automatically returns to the vibration mode state before entering the working mode without user operation. , and the first system can maintain synchronization with the second system in the vibration mode state, achieving data synchronization.
  • FIG. 5 is a structural block diagram of a dual system status synchronization device according to an embodiment. As shown in Figure 5, the dual system status synchronization device includes a detection module 502 and an adjustment module 504, where,
  • the detection module 502 is used to detect the working mode status of the first system in the first operating mode or the second operating mode.
  • the adjustment module 504 is configured to adjust the working mode state of the second system to be the same as the working mode state of the first system when the working mode state of the first system changes.
  • both the first system and the second system are running, and only the first system displays the interface; in the second operating mode, both the first system and the second system are running, and the first system or the third system is running.
  • the second system displays the interface.
  • the working mode state of the first system of the electronic device is detected, and when the working mode state of the first system changes, the working mode state of the second system of the electronic device is changed.
  • the working mode state is adjusted to be the same as the working mode state of the first system, so that the states of different systems of the electronic device in the working mode are consistent, and interference caused by state asynchronousness is effectively avoided.
  • the detection module 502 is also used to respectively detect the working mode state of the first system and the working mode state of the second system in the second operating mode; when the working mode state of the first system changes , determine the first timestamp when the working mode state of the first system changes; when the working mode state of the second system changes, determine the second timestamp when the working mode state of the second system changes;
  • the adjustment module 504 is also configured to synchronize the working mode status of the first system and the second system according to the first time stamp and the second time stamp.
  • the working mode status of the first system and the working mode status of the second system change.
  • a first timestamp of the changing of the working mode state of the first system is determined, and the time when the first system state changes is recorded in time.
  • a second timestamp of the changing of the working mode state of the second system is determined, and the time when the first system state changes is recorded in time.
  • the working mode state of the first system or the working mode state of the second system is adjusted so that the first system and the second system
  • the working mode status can be synchronized in real time.
  • the adjustment module 504 is also used to adjust the working mode state corresponding to the system corresponding to the previous timestamp among the first timestamp and the second timestamp to the working mode state corresponding to the later timestamp.
  • the corresponding working mode status of the system is the same.
  • the working mode state corresponding to the system corresponding to the previous timestamp is adjusted to the same working mode state corresponding to the system corresponding to the later timestamp.
  • the detection module 502 is also used to detect the working mode status of the second system in the third operating mode; wherein only the second system is run in the third operating mode; When the mode status changes, the corresponding relevant status data is recorded; the relevant status data includes the changed working mode status; wherein the relevant status data is used to indicate adjusting the working mode status of the first system to be the same as the changed working mode status. .
  • the second system since only the second system is running in the third operating mode and the first system is not running, it can be detected whether the working mode status of the second system has changed.
  • the working mode status of the second system changes, record relevant status data including the changed working mode status, so as to adjust the working mode status of the first system to be the same as the changed working mode status through the relevant status data instructions,
  • This allows the first system to maintain the same working mode state as the second system when the first system resumes operation, thereby ensuring the consistency of the working mode states of each system when running. And it can ensure the consistency of the working mode status of each system before and after switching between different systems.
  • the device further includes a sending module configured to send relevant status data to the first system when the third operating mode is switched to the first operating mode or to the second operating mode. ;
  • the adjustment module 504 is also used to adjust the working mode state of the first system to be the same as the working mode state after the second system state is changed.
  • the third operating mode is switched to the first operating mode or to the second operating mode
  • the The relevant status data is sent to the first system, so that the first system maintains the same working mode status as the second system when operation is resumed, thereby ensuring that the working mode status of different systems of the electronic device remains synchronized when running.
  • the relevant status data includes at least one of the first screen brightness after status change, the first status of silent mode, and the first status of vibration mode; the adjustment module 504 is also configured to adjust the relevant status data In the case where the first screen brightness is included, the screen brightness corresponding to the first system is adjusted to the first screen brightness; in the case where the relevant status data includes the first status of the silent mode, the silent mode status of the first system is adjusted to the silent mode. a first state of the mode; in the case where the relevant state data includes the first state of the vibration mode, adjusting the vibration mode state of the first system to the first state of the vibration mode.
  • the screen brightness corresponding to the first system is adjusted to the first screen brightness to maintain the consistency of the working mode status and screen brightness of different systems, so that the user It can avoid eye discomfort caused by large changes in screen brightness when switching systems.
  • the silent mode state of the first system is adjusted to the first state of the silent mode to maintain the consistency of the working mode state and the silent mode state of different systems, and avoid The sound impact caused by the silent mode state after the system is switched.
  • the vibration mode state of the first system is adjusted to the first state of the vibration mode, so as to maintain the consistency of the working mode state and the vibration mode state of different systems, and avoid The impact caused by the vibration mode state after system switching.
  • the relevant status data includes at least one of the second screen brightness before the status change, the second status of the silent mode, and the second status of the vibration mode; the adjustment module 504 is also used to respond to the working mode status. Entering the off state, if the relevant state data includes the second screen brightness, adjust the screen brightness of the first system and the second system to the second screen brightness, and if the relevant state data includes the second state of the silent mode, adjust the first The silent mode states of the system and the second system are adjusted to the second state of the silent mode. If the relevant state data includes the second state of the vibration mode, the vibration mode states of the first system and the second system are adjusted to the second state of the vibration mode. state.
  • the working mode state changes from the enabled state to the off state. If the relevant status data includes the second screen brightness, the screen brightness of the first system and the second system is adjusted to the second screen brightness, so that when exiting the working mode , the second system automatically returns to the screen brightness before entering the working mode, and the first system can synchronize the screen brightness with the second system. Entering the off state, if the relevant status data includes the second state of the silent mode, adjust the silent mode states of the first system and the second system to the second state of the silent mode, so that the second system automatically recovers when exiting the working mode to the silent mode state before entering the working mode, and the first system can maintain synchronization with the second system in the silent mode state.
  • the relevant state data includes the second state of the vibration mode, adjust the vibration mode state of the first system and the second system to the second state of the vibration mode, so that the second system automatically recovers when exiting the working mode No user operation is required to reach the vibration mode state before entering the working mode, and the first system can maintain synchronization with the second system in the vibration mode state, achieving data synchronization.
  • the power consumption in the first operating mode is higher than the power consumption in the second operating mode, and the power consumption in the second operating mode is higher than the power consumption in the third operating mode.
  • the power consumption of the first operating mode is higher than the power consumption of the second operating mode
  • the power consumption of the second operating mode is higher than the power consumption of the third operating mode, which can provide the user with guaranteed operation of the electronic device.
  • each module in the above dual system status synchronization device is only for illustration. In other embodiments, the dual system status synchronization device can be divided into different modules as needed to complete all or part of the above dual system status synchronization device. Function.
  • Each module in the above-mentioned dual system status synchronization device can be realized in whole or in part by software, hardware and combinations thereof.
  • Each of the above modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
  • Figure 6 is a schematic diagram of the internal structure of an electronic device in one embodiment.
  • the electronic device includes a processor and a memory connected through a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
  • Memory may include non-volatile storage media and internal memory.
  • Non-volatile storage media stores operating systems and computer programs.
  • the computer program can be executed by the processor to implement a dual system state synchronization method provided in the following embodiments.
  • the internal memory provides a cached execution environment for operating system computer programs in non-volatile storage media.
  • the electronic device can be any terminal device such as a mobile phone, tablet computer, PDA (Personal Digital Assistant), POS (Point of Sales, sales terminal), vehicle-mounted computer, wearable device, etc.
  • each module in the dual system state synchronization device may be in the form of a computer program.
  • the computer program can be run on a terminal or on a server.
  • the program modules formed by the computer program can be stored in the memory of the electronic device.
  • An embodiment of the present application also provides a computer-readable storage medium.
  • One or more non-volatile computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the operations of the dual system state synchronization method .
  • a computer program product containing instructions that, when run on a computer, causes the computer to perform a dual system state synchronization method.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM), which acts as external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous Synchlink DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Hardware Redundancy (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种双系统状态同步方法,应用于电子设备,电子设备能运行第一系统和第二系统,该方法包括:在第一运行模式或第二运行模式下,检测第一系统的工作模式状态(202);在第一系统的工作模式状态改变的情况下,将第二系统的工作模式状态调整至与第一系统的工作模式状态相同;在第一运行模式下第一系统和第二系统均运行,且仅有第一系统进行界面显示;在第二运行模式下第一系统和第二系统均运行,且第一系统或第二系统进行界面显示(204)。

Description

双系统状态同步方法、装置、电子设备和可读存储介质
相关申请的交叉引用
本申请要求于2022年03月11日提交中国专利局、申请号为2022102416730、发明名称为“双系统状态同步方法、装置、电子设备和可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子设备领域,特别是涉及一种双系统状态同步方法、装置、电子设备、计算机可读存储介质和计算机程序产品。
背景技术
随着电子设备技术的发展,出现了多系统设备。电子设备的不同系统可在多种系统运行模式下运行,但是各个系统相互独立,电子设备的不同系统之间存在状态不同步的问题。
发明内容
本申请实施例提供了一种双系统状态同步方法、装置、电子设备、计算机可读存储介质和计算机程序产品,可以保证电子设备在不同系统切换时的状态同步。
一种双系统状态同步方法,应用于电子设备,所述电子设备能运行第一系统和第二系统,所述方法包括:
在第一运行模式或第二运行模式下,检测所述第一系统的工作模式状态;及
在所述第一系统的工作模式状态改变的情况下,将所述第二系统的工作模式状态调整至与所述第一系统的工作模式状态相同;
其中,在所述第一运行模式下所述第一系统和所述第二系统均运行,且仅有所述第一系统进行界面显示;在所述第二运行模式下所述第一系统和所述第二系统均运行,且所述第一系统或所述第二系统进行界面显示。
一种双系统状态同步装置,应用于电子设备,所述电子设备能运行第一系统和第二系统,所述装置包括:
检测模块,用于在第一运行模式或第二运行模式下,检测所述第一系统的工作模式状态;及
调整模块,用于在所述第一系统的工作模式状态改变的情况下,将所述第二系统的工作模式状态调整至与所述第一系统的工作模式状态相同;
其中,在所述第一运行模式下所述第一系统和所述第二系统均运行,且仅有所述第一系统进行界面显示;在所述第二运行模式下所述第一系统和所述第二系统均运行,且所述第一系统或所述第二系统进行界面显示。
一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下操作:
在第一运行模式或第二运行模式下,检测所述第一系统的工作模式状态;及
在所述第一系统的工作模式状态改变的情况下,将所述第二系统的工作模式状态调整至与所述第一系统的工作模式状态相同;
其中,在所述第一运行模式下所述第一系统和所述第二系统均运行,且仅有所述第一系统进行界面显示;在所述第二运行模式下所述第一系统和所述第二系统均运行,且所述第一系统或所述第二系统进行界面显示。
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如下操作:
在第一运行模式或第二运行模式下,检测所述第一系统的工作模式状态;及
在所述第一系统的工作模式状态改变的情况下,将所述第二系统的工作模式状态调整至与所述第一系统的工作模式状态相同;
其中,在所述第一运行模式下所述第一系统和所述第二系统均运行,且仅有所述第一系统进行界面显示;在所述第二运行模式下所述第一系统和所述第二系统均运行,且所述第一系统或所述第二系统进行界面显示。
一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如下操作:
在第一运行模式或第二运行模式下,检测所述第一系统的工作模式状态;及
在所述第一系统的工作模式状态改变的情况下,将所述第二系统的工作模式状态调整至与所述第一系统的工作模式状态相同;
其中,在所述第一运行模式下所述第一系统和所述第二系统均运行,且仅有所述第一系统进行界面显示;在所述第二运行模式下所述第一系统和所述第二系统均运行,且所述第一系统或所述第二系统进行界面显示。
上述双系统状态同步方法、装置、电子设备和计算机可读存储介质和计算机程序产品,在第一运行模式下第一系统和第二系统均运行,且仅有第一系统进行界面显示,在第二运行模式下第一系统和第二系统均运行,且第一系统或第二系统进行界面显示,从而在第一运行模式或第二运行模式下,检测电子设备的第一系统的工作模式状态是否发送改变,以在第一系统的工作模式状态改变的情况下,将电子设备的第二系统的工作模式状态调整至与第一系统的工作模式状态相同,使得电子设备的不同系统在工作模式下的状态一致性,有效避免状态不同步所造成的干扰。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他实施例的附图。
图1为一个实施例中双系统状态同步方法的应用环境图。
图2为一个实施例中双系统状态同步方法的流程图。
图3为一个实施例中同步第一系统和第二系统的工作模式状态的流程图。
图4为一个实施例中从轻智能模式切换为其他运行模式时的双系统状态同步方法的流程示意图。
图5为一个实施例中双系统状态同步装置的结构框图。
图6为一个实施例中电子设备的内部结构示意图。
具体实施方式
为了便于理解本申请,下面将参照相关附图对本申请进行更全面的描述。附图中给出了本申请的较佳实施例。但是,本申请可以以许多不同的形式来实现,并不限于本文所描述的实施例。相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一系统称为第二系统,且类似地,可将第二系统称为第一系统。第一系统和第二系统两者都是系统,但其不是同一系统。
本申请实施例提供的双系统状态同步方法,可以应用于如图1所示的应用环境中。其中,电子设备102可以与用户进行交互。电子设备102中可以运行至少两个系统(即操作系统),以电子设备102上运行第一系统和第二系统为例,在第一运行模式或第二运行模式下,检测第一系统的工作模式状态;其中,在第一运行模式下第一系统和第二系统均 运行,且仅有第一系统进行界面显示;在第二运行模式下第一系统和第二系统均运行,且第一系统或第二系统进行界面显示,在第一系统的工作模式状态改变的情况下,将第二系统的工作模式状态调整至与第一系统的工作模式状态相同,从而能确保在电子设备的不同系统切换时可以有效保证系统状态的同步。其中,电子设备102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑、物联网设备和便携式可穿戴设备,物联网设备可为智能音箱、智能电视、智能空调、智能车载设备等。便携式可穿戴设备可为智能手表、智能手环、头戴设备等。
需要说明的是,电子设备上可以运行多系统,该多系统包括至少两个系统,该至少两个系统包括第一系统和第二系统。电子设备包括对应于第一系统(即大核系统)的第一处理器和对应于第二系统(即小核系统)的第二处理器。第一处理器和第二处理器均为微处理器,其中,第一处理器为核心处理器。第一处理器和第二处理器可以根据实际应用配置相应的微处理器。系统可以是安卓系统、Linux系统、Windows系统、IOS系统、RTOS(Real Time Operating System,实时操作系统)等不限于此。
可选的是,第一系统正常运行的功耗高于第二系统正常运行的功耗。例如,以第一处理器可以是CPU(Central Process Unit,中央处理器)处理器,对应于第一系统可以是安卓(Android)系统;第二处理器可以是MCU(Microcontroller Unit,微控制单元)处理器,对应的第二系统可以是RTOS(Real Time Operating System,实时操作系统)。其中,CPU的主频可达到1.5GHz(吉赫兹),而MCU的主频约150MHz(兆赫兹),因此第一处理器的功耗高于第二处理器,第一系统的功耗高于第二系统的功耗。
多系统的电子设备启动运行过程中,可以至少存在第一运行模式、第二运行模式和第三运行模式中的至少一种。其中,第一运行模式,即高性能模式,在第一运行模式下第一系统和第二系统均正常启动,且仅有第一系统进行界面显示,即电子设备屏幕的显示权仅由第一系统控制。第二运行模式,即混动模式,在第二运行模式下第一系统和第二系统均正常启动,且第一系统或第二系统进行界面显示,即电子设备屏幕的显示权既可以由第一系统控制也可能由第二系统控制,即电子设备的屏幕显示权可以根据设备运行状态在两个系统之间动态切换。第三运行模式,即轻智能模式,在第三运行模式下,第一系统处于关机状态,仅第二系统运行,仅有第二系统进行界面显示,即电子设备屏幕的显示权由第二系统控制。可以理解的是,电子设备在第一运行模式下的功耗大于在第二模式下的功耗,且电子设备在第二运行模式下的功耗大于在第三运行模式下的功耗。
图2为一个实施例中双系统状态同步方法的流程图。本实施例中的双系统状态同步方法,以运行于图1中的电子设备上为例进行描述。如图2所示,该双系统状态同步方法,包括:
操作202,在第一运行模式或第二运行模式下,检测第一系统的工作模式状态。
其中,第一运行模式和第二运行模式均为电子设备中的操作系统能够运行的模式,即第一系统和第二系统能够运行的模式。工作模式是指电子设备中的系统进行在运行模式下进行工作所使用的模式,例如睡眠模式、护眼模式、飞行模式等,但不限于此。工作模式状态可包括启用状态和关闭状态。
具体地,电子设备在处于第一运行模式的情况下,电子设备的第一系统和第二系统均运行,且仅有第一系统进行界面显示,第二系统不能进行界面显示,以通过第一系统所显示界面与用户进行交互,则电子设备可检测第一系统的工作模式状态。进一步地,电子设备在处于第一运行模式的情况下,检测该第一系统的工作模式状态为启用状态或关闭状态。
在第二运行模式下第一系统和第二系统均运行,且第一系统或第二系统进行界面显示,以通过所显示界面与用户进行交互。在第二运行模式下,电子设备可检测第一系统的工作模式状态。
在一个实施例中,在电子设备从第二运行模式切换为第一运行模式的情况下,第一系统和第二系统均保持运行,且从可通过第一系统进行界面交互或通过第二系统可以进行界面交互,调整为仅由第一系统进行界面交互,则电子设备可检测第一系统的工作模式状态。
在一个实施例中,在第一运行模式或第二运行模式下,或从第二运行模式切换为第一运行模式的情况下,电子设备可对第一系统的工作模式状态变化进行实时或定时监听。在第一系统的工作模式状态发送改变时,第一系统可实时通知第二系统。
操作204,在第一系统的工作模式状态改变的情况下,将第二系统的工作模式状态调整至与第一系统的工作模式状态相同。
具体地,电子设备检测到第一系统的工作模式状态改变的情况下,调整第二系统的工作模式状态,使得第二系统的工作模式状态调整至与第一系统的工作模式状态相同。
在一个实施例中,在第一系统的工作模式状态改变的情况下,可通过第一系统实时通知第二系统,以控制第二系统将自身的工作模式状态调整至与第一系统的工作模式状态相同。
在一个实施例中,第一系统为大核操作系统,第二系统为小核操作系统,大核操作系统可以实现更多的功能,功耗也更高,小核操作系统实现较少的功能,功耗较低。
在一个实施例中,在第一系统的工作模式状态改变的情况下,确定改变后的工作模式状态所对应的屏幕亮度、静音模式状态和振动模式状态中的至少一种。将电子设备的第二系统的工作模式状态调整至与第一系统的工作模式状态相同,并将第二系统的屏幕亮度、静音模式状态和振动模式状态中的至少一种,调整至与改变后的第一系统相同。
在一个实施例中,该方法还包括:在第二运行模式下,检测第二系统的工作模式状态;在第二系统的工作模式状态改变的情况下,将第一系统的工作模式状态调整至与第二工作模式状态相同。
具体地,在第二运行模式下第一系统和第二系统均运行,且第一系统或第二系统进行界面显示,以通过第一系统或第二系统所显示的界面与用户进行交互。在第二运行模式下,电子设备可检测第一系统的工作模式状态,在第二系统的工作模式状态改变的情况下,电子设备可将第一系统的工作模式状态调整至与第二工作模式状态相同。进一步地,在检测到第二系统的工作模式状态改变的情况下,可通过第二系统实时通知第一系统,以控制第一系统将自身的工作模式状态调整至与第二系统的工作模式状态相同。
本实施例中,在第一运行模式或第二运行模式下,检测电子设备的第一系统的工作模式状态,在第一系统的工作模式状态改变的情况下,将电子设备的第二系统的工作模式状态调整至与第一系统的工作模式状态相同,使得电子设备的不同系统在工作模式下的状态一致性,有效避免状态不同步所造成的干扰。
在一个实施例中,如图3所示,该方法还包括:
操作302,在第二运行模式下,分别检测第一系统的工作模式状态和第二系统的工作模式状态。
具体地,在第二运行模式下第一系统和第二系统均运行,且通过第一系统进行界面交互或第二系统进行界面交互,即电子设备屏幕的显示权既可以由第一系统控制也可能由第二系统控制,则电子设备在第二运行模式下,或从第一运行模式切换为第二运行模式的情况下,均需要分别检测第一系统的工作模式状态和第二系统的工作模式状态。进一步地,电子设备可实时或定时分别对第一系统的工作模式状态和第二系统的工作模式状态进行检测。
操作304,在第一系统的工作模式状态改变的情况下,确定第一系统的工作模式状态改变的第一时间戳。
具体地,电子设备可实时或定时检测第一系统的工作模式状态,在第一系统的工作模 式状态发生改变的情况下,记录该第一系统的工作模式状态改变的第一时间戳。
在一个实施例中,电子设备可实时或定时检测第一系统的工作模式状态,并记录每次检测的时间戳和对应的工作模式状态,将当次检测所记录的工作模式状态与相邻上一次检测所记录的工作模式状态进行对比。在当次检测所记录的工作模式状态与相邻上一次检测所记录的工作模式状态相同的情况下,判定第一系统的工作模式状态未发生改变,则继续下一次检测。
在当次检测所记录的工作模式状态与相邻上一次检测所记录的工作模式状态不同的情况下,判定第一系统的工作模式状态发生改变,则将当次检测所记录的时间戳作为第一时间戳。
操作306,在第二系统的工作模式状态改变的情况下,确定第二系统的工作模式状态改变的第二时间戳。
具体地,电子设备可实时或定时检测第二系统的工作模式状态,在第二系统的工作模式状态发生改变的情况下,记录该第二系统的工作模式状态改变的第二时间戳。
在一个实施例中,电子设备可实时或定时检测第二系统的工作模式状态,并记录每次检测的时间戳和对应的工作模式状态,将当次检测所记录的工作模式状态与相邻上一次检测所记录的工作模式状态进行对比。在当次检测所记录的工作模式状态与相邻上一次检测所记录的工作模式状态相同的情况下,判定第二系统的工作模式状态未发生改变,则继续下一次检测。在当次检测所记录的工作模式状态与相邻上一次检测所记录的工作模式状态不同的情况下,判定第二系统的工作模式状态发生改变,则将当次检测所记录的时间戳作为第二时间戳。
操作308,根据第一时间戳和第二时间戳同步第一系统和第二系统的工作模式状态。
具体地,电子设备根据第一时间戳和第二时间戳,调整第一系统的工作模式状态或第二系统的工作模式状态,使得第一系统和第二系统的工作模式状态相同。
在一个实施例中,电子设备可将第一时间戳和第二时间戳进行对比,基于对比结果同步第一系统和第二系统的工作模式状态。进一步地,电子设备可将第一时间戳和第二时间戳进行对比,基于时间戳对比结果调整第一系统的工作模式状态或第二系统的工作模式状态,使得第一系统和第二系统的工作模式状态相同。
在一个实施例中,电子设备可对比第一时间戳和第二时间戳,并对比第一时间戳对应的工作模式状态和第二时间戳对应的工作模式状态。基于时间戳对比结果和状态对比结果,同步第一系统和第二系统的工作模式状态。
在一个实施例中,电子设备可将第一时间戳对应的系统所对应的工作模式状态,调整至与第二时间戳对应的系统所对应的工作模式状态相同。或者,电子设备可将第二时间戳对应的系统所对应的工作模式状态,调整至与第一时间戳对应的系统所对应的工作模式状态相同。
本实施例中,在第二运行模式下,或从第一运行模式切换为第二运行模式的情况下,分别检测第一系统的工作模式状态和第二系统的工作模式状态是否发生改变。在第一系统的工作模式状态改变的情况下,确定第一系统的工作模式状态改变的第一时间戳,以及时记录第一系统状态改变的时间。在第二系统的工作模式状态改变的情况下,确定第二系统的工作模式状态改变的第二时间戳,以及时记录第一系统状态改变的时间。根据第一系统的工作模式状态改变的时间戳和第一系统的工作模式状态改变的时间戳,调整第一系统的工作模式状态或第二系统的工作模式状态,使得第一系统和第二系统的工作模式状态能够实时保持同步。
在一个实施例中,根据第一时间戳和第二时间戳同步第一系统和第二系统的工作模式状态,包括:
将第一时间戳和第二时间戳中,在前的时间戳对应的系统所对应的工作模式状态,调 整至与在后的时间戳对应的系统所对应的工作模式状态相同。
具体地,电子设备可将第一时间戳和第二时间戳进行对比,确定第一时间戳和第二时间戳中在前的时间戳和在后的时间戳。电子设备确定在前的时间戳对应的系统和在后的时间戳对应的系统,并将在前的时间戳对应的系统所对应的工作模式状态,调整至与在后的时间戳对应的系统所对应的工作模式状态相同。
在一个实施例中,电子设备可确定第一时间戳对应的工作模式状态和第二时间戳对应的工作模式状态。在第一时间戳对应的工作模式状态和第二时间戳对应的工作模式状态不同的情况下,将在前的时间戳对应的系统所对应的工作模式状态,调整至与在后的时间戳对应的系统所对应的工作模式状态相同。
例如,在前的时间戳为第一时间戳,在后的时间戳为第二时间戳,第一时间戳对应的系统为第一系统,对应的工作模式状态为启用睡眠模式。第二时间戳对应的系统为第二系统,对应的工作模式状态为关闭睡眠模式,则电子设备将第二系统的关闭睡眠模式调整为启用睡眠模式,使得第一系统和第二系统均为睡眠模式的启用状态。
在一个实施例中,确定在后的时间戳对应的工作模式状态所对应的屏幕亮度、静音模式状态和振动模式状态中的至少一种。将在前的时间戳对应的系统所对应的工作模式状态,调整至与在后的时间戳对应的系统所对应的工作模式状态相同,并将在后时间戳对应的系统的屏幕亮度、静音模式状态和振动模式状态中的至少一种,调整至与在前时间戳对应的系统相同。
本实施例中,将第一时间戳和第二时间戳中,在前的时间戳对应的系统所对应的工作模式状态,调整至与在后的时间戳对应的系统所对应的工作模式状态相同,能够基于时间戳确定最新发生工作模式状态改变的系统,从而将其他系统的工作模式状态调整为最新的工作模式状态,使得电子设备的各系统能够保持最新状态的一致性。
在一个实施例中,该方法还包括:在第三运行模式下,检测第二系统的工作模式状态;其中,在第三运行模式下仅运行第二系统;在第二系统的工作模式状态改变的情况下,记录对应的相关状态数据;该相关状态数据包括改变后的工作模式状态;其中,相关状态数据用于指示调整第一系统的工作模式状态至与改变后的工作模式状态相同。
其中,第三运行模式为电子设备中的第二系统运行、第一系统不运行的模式。
具体地,电子设备在第三运行模式下仅运行第二系统,且仅有第二系统进行界面显示,则定时或实时检测第二系统的工作模式状态。在第二系统的工作模式状态发生改变的情况下,记录状态改变对应的相关状态数据,该相关状态数据包括改变后的工作模式状态。
电子设备可基于相关状态数据调整第一系统的工作模式状态,使得第一系统的工作模式状态与该第二系统改变后的工作模式状态相同。
在一个实施例中,电子设备可通过第二系统将相关状态数据发送至第一系统,使得第一系统在运行的情况下接收该相关状态数据,并基于相关状态数据将自身的工作模式状态调整至与第二系统改变后的工作模式状态相同。
在一个实施例中,在第三运行模式下,或从第一运行模式切换为第三运行模式、或从第二运行模式切换为第三运行模式的情况下,检测第二系统的工作模式状态;在第二系统的工作模式状态改变的情况下,记录对应的相关状态数据。
本实施例中,由于在第三运行模式下仅有第二系统运行,而第一系统不运行,则可检测第二系统的工作模式状态是否发生改变。在第二系统的工作模式状态改变的情况下,记录包含改变后的工作模式状态的相关状态数据,以通过相关状态数据指示调整第一系统的工作模式状态至与改变后的工作模式状态相同,使得在第一系统恢复运行的情况下保持与第二系统相同的工作模式状态,从而能够保证各系统在运行的情况下工作模式状态的一致性。并且能够保证在不同系统切换前后,各系统工作模式状态的一致性。
在一个实施例中,该方法还包括:
在第三运行模式切换为第一运行模式或切换为第二运行模式的情况下,将相关状态数据发送给第一系统;将第一系统的工作模式状态调整至与第二系统状态改变后的工作模式状态相同。
具体地,在第三运行模式下仅有第二系统运行、第一系统不运行,则第一系统无法实时接收第二系统发生的数据。第一系统可以在第一运行模式和第二运行模式下运行,则在第三运行模式切换为第一运行模式或第三运行模式切换为第二运行模式的情况下,通过第二系统将相关状态数据发送给第一系统。第一系统将自身的工作模式状态调整为该相关状态数据中的改变后的工作模式状态,使得第一系统的工作模式状态与第二系统的工作模式状态相同。
本实施例中,由于在第三运行模式下仅有第二系统运行,而第一系统不运行,则在第三运行模式切换为第一运行模式或切换为第二运行模式的情况下,将相关状态数据发送给第一系统,使得第一系统在恢复运行的情况下保持与第二系统相同的工作模式状态,从而能够确保电子设备的不同系统在运行的情况下工作模式状态保持同步。
在一个实施例中,该相关状态数据包括状态改变后的第一屏幕亮度、静音模式的第一状态、振动模式的第一状态中的至少一种;该方法还包括:
在相关状态数据包括第一屏幕亮度的情况下,将第一系统对应的屏幕亮度调整为第一屏幕亮度;在相关状态数据包括静音模式的第一状态的情况下,将第一系统的静音模式状态调整为静音模式的第一状态;在相关状态数据包括振动模式的第一状态的情况下,将第一系统的振动模式状态调整为振动模式的第一状态。
具体地,在第二系统的工作模式状态发生改变的情况下,记录状态改变后的相关状态数据,相关状态数据包括状态改变后的第一屏幕亮度、静音模式的第一状态、振动模式的第一状态中的至少一种。其中,第一屏幕亮度是指第二系统在状态改变后的屏幕亮度。静音模式的第一状态是指第二系统在状态改变后的静音模式所对应的状态,例如为启用状态或关闭状态。振动模式的第一状态是指第二系统在状态改变后的振动模式所对应的状态。
在第三运行模式切换为第一运行模式或第二运行模式的情况下,电子设备通过第二系统将相关状态数据发送给第一系统。在第一系统接收到的相关状态数据包括第一屏幕亮度的情况下,第一系统将自身对应的屏幕亮度调整为第一屏幕亮度。在第一系统接收到的相关状态数据包括静音模式的第一状态的情况下,第一系统将自身的静音模式状态调整为静音模式的第一状态。在第一系统接收到的相关状态数据包括振动模式的第一状态的情况下,第一系统将自身的振动模式状态调整为振动模式的第一状态。
在一个实施例中,在第二系统的工作模式状态发生改变后,可多次修改第二系统对应的屏幕亮度,则可将最后一次修改的屏幕亮度作为该状态改变后的第一屏幕亮度。
本实施例中,在相关状态数据包括第一屏幕亮度的情况下,将第一系统对应的屏幕亮度调整为第一屏幕亮度,以保持不同系统在工作模式状态和屏幕亮度的一致性,使得用户在切换系统时能够避免屏幕亮度发生较大的改变所导致的眼部不适的问题。在相关状态数据包括静音模式的第一状态的情况下,将第一系统的静音模式状态调整为静音模式的第一状态,以保持不同系统在工作模式状态和静音模式状态的一致性,避免在系统切换后由于静音模式状态所导致的声音方面的影响。在相关状态数据包括振动模式的第一状态的情况下,将第一系统的振动模式状态调整为振动模式的第一状态,以保持不同系统在工作模式状态和振动模式状态的一致性,避免在系统切换后由于振动模式状态所产生的影响。
在一个实施例中,相关状态数据包括状态改变前的第二屏幕亮度、静音模式的第二状态、振动模式的第二状态中的至少一种;该方法还包括:
响应于工作模式状态进入关闭状态,若相关状态数据包括第二屏幕亮度,则将第一系统和第二系统的屏幕亮度调整为第二屏幕亮度,以及若相关状态数据包括静音模式的第二 状态,则将第一系统和第二系统的静音模式状态调整为静音模式的第二状态,若相关状态数据包括振动模式的第二状态,则将第一系统和第二系统的振动模式状态调整为振动模式的第二状态。
具体地,在第二系统的工作模式状态发生改变的情况下,电子设备记录第二系统状态改变后的工作模式状态,还可以记录状态改变前的第二屏幕亮度、静音模式的第二状态、振动模式的第二状态中的至少一种。其中,第二屏幕亮度是指第二系统在状态改变前的屏幕亮度。静音模式的第二状态是指第二系统在状态改变前的静音模式所对应的状态。振动模式的第二状态是指第二系统在状态改变前的振动模式所对应的状态,例如为启用状态或关闭状态。
将第二屏幕亮度、静音模式的第二状态、振动模式的第二状态中的至少一种,以及改变后的工作模式状态作为相关状态数据发送给第一系统,使得第一系统将自身的工作模式状态调整为该相关状态数据中的改变后的工作模式状态,使得第一系统的工作模式状态与第二系统的工作模式状态相同。
在工作模式状态从启用状态调整为关闭状态的情况下,若相关状态数据包括第二屏幕亮度,则通过第一系统将自身对应的屏幕亮度调整为第二屏幕亮度、通过第二系统将自身对应的的屏幕亮度调整为第二屏幕亮度。
若相关状态数据包括静音模式的第二状态,则通过第一系统将自身对应的静音模式状态调整为静音模式的第二状态、通过第二系统将自身对应的静音模式状态调整为静音模式的第二状态。
若相关状态数据包括振动模式的第二状态,则通过第一系统将自身对应的振动模式状态调整为振动模式的第二状态、通过第二系统将自身对应的振动模式状态调整为振动模式的第二状态。
本实施例中,工作模式状态从启用状态进入关闭状态,若相关状态数据包括第二屏幕亮度,则将第一系统和第二系统的屏幕亮度调整为第二屏幕亮度,使得在退出工作模式时,第二系统自动恢复到进入工作模式之前的屏幕亮度,且第一系统能够在屏幕亮度上与第二系统保持同步。进入关闭状态,若相关状态数据包括静音模式的第二状态,则将第一系统和第二系统的静音模式状态调整为静音模式的第二状态,使得在退出工作模式时,第二系统自动恢复到进入工作模式之前的静音模式状态,且第一系统能够在静音模式状态上与第二系统保持同步。进入关闭状态,若相关状态数据包括振动模式的第二状态,则将第一系统和第二系统的振动模式状态调整为振动模式的第二状态,使得在退出工作模式时,第二系统自动恢复到进入工作模式之前的振动模式状态,无需用户操作,且第一系统能够在振动模式状态上与第二系统保持同步,实现了数据的同步。
在一个实施例中,在工作模式状态为启用状态的情况下,允许用户修改屏幕亮度,但不允许修改静音模式状态和振动模式状态。
在一个实施例中,在工作模式状态为睡眠模式的启动状态的情况下,将运行的第一系统和第二系统的静音模式状态调整为启用状态,将运行的第一系统和第二系统的振动模式状态调整为关闭状态,将运行的第一系统和第二系统的屏幕亮度调为最低值,并关闭正在播放的音频、视频。例如,在本实施例中,可通过“audioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT)”实现静音模式的启用状态及振动模式的关闭状态。
由于android系统的亮度值范围在0-255之间,电子设备的亮度值可分为5个等级,最低等级亮度为10,可通过“Settings.System.putInt(getContentResolver(),Settings.System.SCREEN_BRIGHTNESS,10)”将屏幕亮度调为最低。
通过预设的音频焦点抢占协议,将音频、视频焦点抢占过来即可关闭当前播放的音频、视频。
在一个实施例中,睡眠模式下不能操作静音模式,不能改变振动状态,但可以修改屏幕亮度。在需要将第一系统和第二系统的睡眠模式状态调整为启用状态的情况下,可先将静音模式状态调整为启用状态、振动模式状态调整为关闭状态,关闭正在播放的音频、视频再进入睡眠模式的启动状态。
在一个实施例中,进入睡眠模式后不能改变各系统的静音模式状态,退出睡眠模式后各系统可自动恢复进入睡眠模式前的静音模式状态。进入睡眠模式后不能改变各系统的振动模式状态,退出睡眠模式后各系统可自动恢复进入睡眠模式前的振动模式状态。
进入睡眠模式后允许修改屏幕亮度,若睡眠模式中用户没有修改屏幕亮度,退出睡眠模式后各系统可自动恢复恢复进入睡眠模式前的亮度值,若睡眠模式中用户修改了屏幕亮度,则以用户修改后的亮度值为准。退出睡眠模式后各系统不恢复音频播放。
进入睡眠模式的方式可包括用户触发进入睡眠模式,用户设置定时进入睡眠模式,或者通过设备算法检测用户睡眠后进入睡眠模式。用户可选择开启识别睡眠的功能,以通过电子设备自动识别用户是否进入睡眠而判断是否将系统调整进入睡眠模式。
在一个实施例中,第一运行模式的功耗高于第二运行模式的功耗,第二运行模式的功耗高于第三运行模式的功耗。
具体地,在第一运行模式下,第一系统和第二系统均运行,且仅由第一系统与用户进行界面交互。在第一运行模式下,电子设备通过第一系统能够给用户提供完整、全面的功能,即电子设备的所有功能均可以在第一运行模式下使用。因此,第一运行模式的功耗最高。
在第二运行模式下第一系统和第二系统均运行,且由第一系统与用户进行界面交互,或由第二系统与用户进行界面交互。在第二运行模式下,电子设备通过第一系统和第二系统能够给用户提供较多的功能,即大部分功能可以在第二运行模式下使用,但少部分功能在第二运行模式下无法使用。因此,第二运行模式的功耗低于第一运行模式的功耗。
在第三运行模式下仅运行第二系统,且仅由第二系统与用户进行界面交互。在第三运行模式下,电子设备通过第二系统给用户提供较少的功能,即电子设备的少部分功能均可以在第三运行模式下使用,大部分功能在第三运行模式下无法使用。因此,第三运行模式的功耗低于第二运行模式的功耗。
例如,第一运行模式即高性能模式,第二运行模式即混动模式,第三运行模式即轻智能模式。第一系统为大核操作系统,第二系统为小核操作系统。
在高性能模式下大核操作系统与小核操作系统并存,但与用户的页面交互全部是在大核操作系统下进行,该模式能够给用户带来最完整的功能体验,所有功能均能够在该模式下使用,但高性能模式是最耗电的。
在混动模式下大核操作系统与小核操作系统并存,与用户的页面交互会根据场景的不同在大核操作系统与小核操作系统之间进行切换,有少数功能该模式下无法使用,例如动态表盘,语音助手等,但在功耗上,混动模式的功耗低于高性能模式的功耗。
在轻智能模式下只有小核操作系统在运行,很多功能用户无法使用,例如下载的第三方应用等,但轻智能模式是3种模式中最省电的。
本实施例中,第一运行模式的功耗高于第二运行模式的功耗,第二运行模式的功耗高于第三运行模式的功耗,能够在保证电子设备运行的情况下给用户提供多种可选择的运行模式,使得用户可以根据电量和功耗自行选择需要使用的运行模式,有效满足用户在不同场景下的使用需求。
在一个实施例中,第一运行模式即高性能模式,第二运行模式即混动模式,第三运行模式即轻智能模式。第一系统为大核操作系统,第二系统为小核操作系统,工作模式即睡眠模式。
在高性能模式下大核操作系统与小核操作系统并存,大核操作系统在前台运行,小 核操作系统在后台运行,但与用户的页面交互全部是在大核操作系统下进行,因此只需要在大核操作系统设置睡眠模式状态变化的监听,大核操作系统的睡眠模式状态发生改变时通过双核通信实时通知小核操作系统,使得小核操作系统的睡眠模式状态与大核操作系统的睡眠模式状态保持统一。
在混动模式下大核操作系统与小核操作系统并存,且用户的页面交互可能在大核操作系统,也可能在小核操作系统,因此需要在大小核操作系统分别设置睡眠模式状态同步的监听,任何一方发生改变都需要通知另一方,以保持睡眠模式状态同步。
与高性能模式相比,混动模式需要引入一个时间戳的概念,当大核操作系统收到小核操作系统的睡眠模式状态改变的消息时,首先判断大小核操作系统睡眠模式状态是否一致,如小核操作系统的睡眠模式状态为启用状态,大核操作系统为的睡眠模式状态为关闭状态。若大小核操作系统的睡眠模式状态不一致,则需要对比小核操作系统的睡眠模式状态改变的时间戳与大核操作系统最近一次睡眠模式状态改变的时间戳之间的先后顺序,以后发生的睡眠模式状态为准。反之,若小核操作系统收到大核操作系统的睡眠模式状态改变的消息时,也是相同的处理逻辑。
在轻智能模式下只有小核操作系统在运行,大核操作系统关闭,所有的状态改变都发生在小核操作系统,只需要在小核操作系统设置睡眠模式状态变化的监听。但由于大核操作系统不在运行,因此不能实时通知大小核操作系统状态的改变,所以该模式下需要记录下小核操作系统所有睡眠模式状态以及其联动项最后一次的状态变化记录等相关状态数据。当回到高性能模式或者混动模式时将相关状态数据一次性发给大核操作系统做处理,需要发给大核操作系统的相关状态数据包括:小核操作系统状态改变后的睡眠模式状态(即睡眠模式处于启用状态或睡眠模式处于关闭状态)、小核操作系统状态改变前后的屏幕亮度,小核操作系统状态改变前后的静音模式状态(即静音模式处于启用状态或睡眠模式处于关闭状态)、小核操作系统状态改变前后的振动模式状态(即振动模式处于启用状态或睡眠模式处于关闭状态)。
在一个实施例中,小核操作系统简称小核,大核操作系统简称大核,如图4所示,为一个实施例中从轻智能模式切换为高性能模式时的双系统状态同步方法,包括:
操作402,轻智能模式切换为高性能模式或混动模式。
操作404,判断小核操作系统是否处于睡眠模式,是则执行操作406,否则执行操作416。
操作406,将大核操作系统的睡眠模式状态调整为启用状态,即调整睡眠大核操作系统进入睡眠模式,执行操作408。
操作408,判断小核操作系统当前的屏幕亮度与进入睡眠模式前的屏幕亮度是否一致,一致则执行操作416,不一致则执行操作410。
操作410,保存小核操作系统进入睡眠模式前的屏幕亮度,并将进入睡眠模式前的屏幕亮度发送给大核操作系统,执行操作412。
操作412,退出睡眠模式后,判断大小核操作系统是否有保存进入睡眠模式前的屏幕亮度,有则执行操作414,没有则结束。
操作414,将大小核操作系统的屏幕亮度调整为进入睡眠模式前的屏幕亮度。
操作416,将小核操作系统的屏幕亮度发送给大核操作系统,使得大小核操作系统的屏幕亮度一致。
本实施例中,从轻智能模式切换为高性能模式时,通过判断小核操作系统是否处于睡眠模式,以进行相应操作,从而能够基于相应操作保证大小核操作系统睡眠模式状态的一致性,并保证大小核操作系统所对应的屏幕亮度的一致性,可以保证在不同模式下用户对睡眠模式的体验可以做到无感知切换。
例如,高性能模式下大小核操作系统的屏幕亮度为5,调整为轻智能模式后,用户调 整小核操作系统屏幕亮度为3,在轻智能模式下进入睡眠模式时,自动将屏幕亮度调整为1。当从轻智能模式调整为高性能模式时,小核操作系统将屏幕亮度1和3发送给大核操作系统,大核操作系统进入睡眠模式,并自动将屏幕亮度调为1。当退出睡眠模式后,小核操作系统恢复屏幕亮度为3,大核将当前屏幕亮度调整为屏幕亮度3(即小核操作系统进睡眠前的屏幕亮度),使得大小核操作系统在进、出睡眠模式状态时保持一致。
在一个实施例中,提供了一种双系统状态同步方法,应用于电子设备,电子设备能运行第一系统和第二系统,方法包括:
在第一运行模式或第二运行模式下,或从第二运行模式切换为第一运行模式的情况下,检测第一系统的工作模式状态;在第一系统的工作模式状态改变的情况下,将第二系统的工作模式状态调整至与第一系统的工作模式状态相同;其中,在第一运行模式下第一系统和第二系统均运行,且仅有第一系统进行界面显示;在第二运行模式下第一系统和第二系统均运行,且第一系统或第二系统进行界面显示。
可选地,在第二运行模式下,或从第一运行模式切换为第二运行模式的情况下,分别检测第一系统的工作模式状态和第二系统的工作模式状态;在第一系统的工作模式状态改变的情况下,确定第一系统的工作模式状态改变的第一时间戳;在第二系统的工作模式状态改变的情况下,确定第二系统的工作模式状态改变的第二时间戳;将第一时间戳和第二时间戳中,在前的时间戳对应的系统所对应的工作模式状态,调整至与在后的时间戳对应的系统所对应的工作模式状态相同。
可选地,在第三运行模式下,检测第二系统的工作模式状态;其中,在第三运行模式下仅运行第二系统;在第二系统的工作模式状态改变的情况下,记录对应的相关状态数据;相关状态数据包括状态改变后的第一屏幕亮度、静音模式的第一状态、振动模式的第一状态中的至少一种,以及改变后的工作模式状态。在第三运行模式切换为第一运行模式或切换为第二运行模式的情况下,将相关状态数据发送给第一系统;将第一系统对应的屏幕亮度调整为第一屏幕亮度,将第一系统的静音模式状态调整为静音模式的第一状态,将第一系统的振动模式状态调整为振动模式的第一状态,将第一系统的工作模式状态调整至与第二系统状态改变后的工作模式状态相同。
可选地,相关状态数据还包括状态改变前的第二屏幕亮度、静音模式的第二状态、振动模式的第二状态中的至少一种,则在工作模式状态进入关闭状态的情况下,将第一系统和第二系统的屏幕亮度调整为第二屏幕亮度,将第一系统和第二系统的静音模式状态调整为静音模式的第二状态,将第一系统和第二系统的振动模式状态调整为振动模式的第二状态。
本实施例中,在不同的运行模式下可运行不同的系统,在第一运行模式下,或从第二运行模式切换为第一运行模式的情况下,检测电子设备的第一系统的工作模式状态,在第一系统的工作模式状态改变的情况下,将电子设备的第二系统的工作模式状态调整至与第一系统的工作模式状态相同,使得电子设备的不同系统在工作模式下的状态一致性,有效避免状态不同步所造成的干扰。
在第二运行模式下,或从第一运行模式切换为第二运行模式的情况下,分别检测第一系统的工作模式状态和第二系统的工作模式状态是否发生改变。在第一系统的工作模式状态改变的情况下,确定第一系统的工作模式状态改变的第一时间戳,以及时记录第一系统状态改变的时间。在第二系统的工作模式状态改变的情况下,确定第二系统的工作模式状态改变的第二时间戳,以及时记录第一系统状态改变的时间。将第一时间戳和第二时间戳中,在前的时间戳对应的系统所对应的工作模式状态,调整至与在后的时间戳对应的系统所对应的工作模式状态相同,能够基于时间戳确定最新发生工作模式状态改变的系统,从而将其他系统的工作模式状态调整为最新的工作模式状态,使得电子设备的各系统能够保持最新状态的一致性。
由于在第三运行模式下仅有第二系统运行,而第一系统不运行,则可检测第二系统的工作模式状态是否发生改变。在第二系统的工作模式状态改变的情况下,记录包含改变后的工作模式状态的相关状态数据,将相关状态数据发送给第一系统,使得第一系统在恢复运行的情况下保持与第二系统相同的工作模式状态,从而能够确保电子设备的不同系统在运行的情况下工作模式状态保持同步。并且能够保证在不同系统切换前后,各系统工作模式状态的一致性。并且,将第一系统对应的屏幕亮度调整为第一屏幕亮度,以保持不同系统在工作模式状态和屏幕亮度的一致性,使得用户在切换系统时能够避免屏幕亮度发生较大的改变所导致的眼部不适的问题。将第一系统的静音模式状态调整为静音模式的第一状态,以保持不同系统在工作模式状态和静音模式状态的一致性,避免在系统切换后由于静音模式状态所导致的声音方面的影响。将第一系统的振动模式状态调整为振动模式的第一状态,以保持不同系统在工作模式状态和振动模式状态的一致性,避免在系统切换后由于振动模式状态所产生的影响。
工作模式状态从启用状态进入关闭状态,将第一系统和第二系统的屏幕亮度调整为第二屏幕亮度,使得在退出工作模式时,第二系统自动恢复到进入工作模式之前的屏幕亮度,且第一系统能够在屏幕亮度上与第二系统保持同步。进入关闭状态,将第一系统和第二系统的静音模式状态调整为静音模式的第二状态,使得在退出工作模式时,第二系统自动恢复到进入工作模式之前的静音模式状态,且第一系统能够在静音模式状态上与第二系统保持同步。进入关闭状态则将第一系统和第二系统的振动模式状态调整为振动模式的第二状态,使得在退出工作模式时,第二系统自动恢复到进入工作模式之前的振动模式状态,无需用户操作,且第一系统能够在振动模式状态上与第二系统保持同步,实现了数据的同步。
应该理解的是,虽然图2-4的流程图中的各个操作按照箭头的指示依次显示,但是这些操作并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些操作的执行并没有严格的顺序限制,这些操作可以以其它的顺序执行。而且,图2-4中的至少一部分操作可以包括多个子操作或者多个阶段,这些子操作或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子操作或者阶段的执行顺序也不必然是依次进行,而是可以与其它操作或者其它操作的子操作或者阶段的至少一部分轮流或者交替地执行。
图5为一个实施例的双系统状态同步装置的结构框图。如图5所示,该双系统状态同步装置,包括检测模块502和调整模块504,其中,
检测模块502,用于在第一运行模式或第二运行模式下,检测第一系统的工作模式状态。
调整模块504,用于在第一系统的工作模式状态改变的情况下,将第二系统的工作模式状态调整至与第一系统的工作模式状态相同。
其中,在第一运行模式下第一系统和第二系统均运行,且仅有第一系统进行界面显示;在第二运行模式下第一系统和第二系统均运行,且第一系统或第二系统进行界面显示。
本实施例中,在第一运行模式或第二运行模式下,检测电子设备的第一系统的工作模式状态,在第一系统的工作模式状态改变的情况下,将电子设备的第二系统的工作模式状态调整至与第一系统的工作模式状态相同,使得电子设备的不同系统在工作模式下的状态一致性,有效避免状态不同步所造成的干扰。
在一个实施例中,该检测模块502,还用于在第二运行模式下,分别检测第一系统的工作模式状态和第二系统的工作模式状态;在第一系统的工作模式状态改变的情况下,确定第一系统的工作模式状态改变的第一时间戳;在第二系统的工作模式状态改变的情况 下,确定第二系统的工作模式状态改变的第二时间戳;
调整模块504,还用于根据第一时间戳和第二时间戳同步第一系统和第二系统的工作模式状态。
本实施例中,在第二运行模式下,或从第一运行模式切换为第二运行模式的情况下,分别检测第一系统的工作模式状态和第二系统的工作模式状态是否发生改变。在第一系统的工作模式状态改变的情况下,确定第一系统的工作模式状态改变的第一时间戳,以及时记录第一系统状态改变的时间。在第二系统的工作模式状态改变的情况下,确定第二系统的工作模式状态改变的第二时间戳,以及时记录第一系统状态改变的时间。根据第一系统的工作模式状态改变的时间戳和第一系统的工作模式状态改变的时间戳,调整第一系统的工作模式状态或第二系统的工作模式状态,使得第一系统和第二系统的工作模式状态能够实时保持同步。
在一个实施例中,调整模块504,还用于将第一时间戳和第二时间戳中,在前的时间戳对应的系统所对应的工作模式状态,调整至与在后的时间戳对应的系统所对应的工作模式状态相同。
本实施例中,将第一时间戳和第二时间戳中,在前的时间戳对应的系统所对应的工作模式状态,调整至与在后的时间戳对应的系统所对应的工作模式状态相同,能够基于时间戳确定最新发生工作模式状态改变的系统,从而将其他系统的工作模式状态调整为最新的工作模式状态,使得电子设备的各系统能够保持最新状态的一致性。
在一个实施例中,该检测模块502,还用于在第三运行模式下,检测第二系统的工作模式状态;其中,在第三运行模式下仅运行第二系统;在第二系统的工作模式状态改变的情况下,记录对应的相关状态数据;相关状态数据包括改变后的工作模式状态;其中,相关状态数据用于指示调整第一系统的工作模式状态至与改变后的工作模式状态相同。
本实施例中,由于在第三运行模式下仅有第二系统运行,而第一系统不运行,则可检测第二系统的工作模式状态是否发生改变。在第二系统的工作模式状态改变的情况下,记录包含改变后的工作模式状态的相关状态数据,以通过相关状态数据指示调整第一系统的工作模式状态至与改变后的工作模式状态相同,使得在第一系统恢复运行的情况下保持与第二系统相同的工作模式状态,从而能够保证各系统在运行的情况下工作模式状态的一致性。并且能够保证在不同系统切换前后,各系统工作模式状态的一致性。
在一个实施例中,该装置还包括发送模块,该发送模块,用于在第三运行模式切换为第一运行模式或切换为第二运行模式的情况下,将相关状态数据发送给第一系统;
调整模块504,还用于将第一系统的工作模式状态调整至与第二系统状态改变后的工作模式状态相同。
本实施例中,由于在第三运行模式下仅有第二系统运行,而第一系统不运行,则在第三运行模式切换为第一运行模式或切换为第二运行模式的情况下,将相关状态数据发送给第一系统,使得第一系统在恢复运行的情况下保持与第二系统相同的工作模式状态,从而能够确保电子设备的不同系统在运行的情况下工作模式状态保持同步。
在一个实施例中,该相关状态数据包括状态改变后的第一屏幕亮度、静音模式的第一状态、振动模式的第一状态中的至少一种;调整模块504,还用于在相关状态数据包括第一屏幕亮度的情况下,将第一系统对应的屏幕亮度调整为第一屏幕亮度;在相关状态数据包括静音模式的第一状态的情况下,将第一系统的静音模式状态调整为静音模式的第一状态;在相关状态数据包括振动模式的第一状态的情况下,将第一系统的振动模式状态调整为振动模式的第一状态。
本实施例中,在相关状态数据包括第一屏幕亮度的情况下,将第一系统对应的屏幕亮度调整为第一屏幕亮度,以保持不同系统在工作模式状态和屏幕亮度的一致性,使得用户在切换系统时能够避免屏幕亮度发生较大的改变所导致的眼部不适的问题。在相关状态数 据包括静音模式的第一状态的情况下,将第一系统的静音模式状态调整为静音模式的第一状态,以保持不同系统在工作模式状态和静音模式状态的一致性,避免在系统切换后由于静音模式状态所导致的声音方面的影响。在相关状态数据包括振动模式的第一状态的情况下,将第一系统的振动模式状态调整为振动模式的第一状态,以保持不同系统在工作模式状态和振动模式状态的一致性,避免在系统切换后由于振动模式状态所产生的影响。
在一个实施例中,相关状态数据包括状态改变前的第二屏幕亮度、静音模式的第二状态、振动模式的第二状态中的至少一种;调整模块504,还用于响应于工作模式状态进入关闭状态,若相关状态数据包括第二屏幕亮度,则将第一系统和第二系统的屏幕亮度调整为第二屏幕亮度,以及若相关状态数据包括静音模式的第二状态,则将第一系统和第二系统的静音模式状态调整为静音模式的第二状态,若相关状态数据包括振动模式的第二状态,则将第一系统和第二系统的振动模式状态调整为振动模式的第二状态。
本实施例中,工作模式状态从启用状态进入关闭状态,若相关状态数据包括第二屏幕亮度,则将第一系统和第二系统的屏幕亮度调整为第二屏幕亮度,使得在退出工作模式时,第二系统自动恢复到进入工作模式之前的屏幕亮度,且第一系统能够在屏幕亮度上与第二系统保持同步。进入关闭状态,若相关状态数据包括静音模式的第二状态,则将第一系统和第二系统的静音模式状态调整为静音模式的第二状态,使得在退出工作模式时,第二系统自动恢复到进入工作模式之前的静音模式状态,且第一系统能够在静音模式状态上与第二系统保持同步。进入关闭状态,若相关状态数据包括振动模式的第二状态,则将第一系统和第二系统的振动模式状态调整为振动模式的第二状态,使得在退出工作模式时,第二系统自动恢复到进入工作模式之前的振动模式状态,无需用户操作,且第一系统能够在振动模式状态上与第二系统保持同步,实现了数据的同步。
在一个实施例中,第一运行模式的功耗高于第二运行模式的功耗,第二运行模式的功耗高于第三运行模式的功耗。
本实施例中,第一运行模式的功耗高于第二运行模式的功耗,第二运行模式的功耗高于第三运行模式的功耗,能够在保证电子设备运行的情况下给用户提供多种可选择的运行模式,使得用户可以根据电量和功耗自行选择需要使用的运行模式,有效满足用户在不同场景下的使用需求。
上述双系统状态同步装置中各个模块的划分仅用于举例说明,在其他实施例中,可将双系统状态同步装置按照需要划分为不同的模块,以完成上述双系统状态同步装置的全部或部分功能。
关于双系统状态同步装置的具体限定可以参见上文中对于双系统状态同步方法的限定,在此不再赘述。上述双系统状态同步装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于电子设备中的处理器中,也可以以软件形式存储于电子设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
图6为一个实施例中电子设备的内部结构示意图。如图6所示,该电子设备包括通过系统总线连接的处理器和存储器。其中,该处理器用于提供计算和控制能力,支撑整个电子设备的运行。存储器可包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现以下各个实施例所提供的一种双系统状态同步方法。内存储器为非易失性存储介质中的操作系统计算机程序提供高速缓存的运行环境。该电子设备可以是手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备。
本申请实施例中提供的双系统状态同步装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在电子设备的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的操作。
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行双系统状态同步方法的操作。
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行双系统状态同步方法。
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种双系统状态同步方法,其特征在于,应用于电子设备,所述电子设备能运行第一系统和第二系统,所述方法包括:
    在第一运行模式或第二运行模式下,检测所述第一系统的工作模式状态;及
    在所述第一系统的工作模式状态改变的情况下,将所述第二系统的工作模式状态调整至与所述第一系统的工作模式状态相同;
    其中,在所述第一运行模式下所述第一系统和所述第二系统均运行,且仅有所述第一系统进行界面显示;在所述第二运行模式下所述第一系统和所述第二系统均运行,且所述第一系统或所述第二系统进行界面显示。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在所述第二运行模式下,分别检测所述第一系统的工作模式状态和所述第二系统的工作模式状态;
    在所述第一系统的工作模式状态改变的情况下,确定所述第一系统的工作模式状态改变的第一时间戳;
    在所述第二系统的工作模式状态改变的情况下,确定所述第二系统的工作模式状态改变的第二时间戳;及
    根据所述第一时间戳和所述第二时间戳同步所述第一系统和所述第二系统的工作模式状态。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述第一时间戳和所述第二时间戳同步所述第一系统和所述第二系统的工作模式状态,包括:
    将所述第一时间戳和所述第二时间戳中,在前的时间戳对应的系统所对应的工作模式状态,调整至与在后的时间戳对应的系统所对应的工作模式状态相同。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在第三运行模式下,检测所述第二系统的工作模式状态;其中,在所述第三运行模式下仅运行所述第二系统;及
    在所述第二系统的工作模式状态改变的情况下,记录对应的相关状态数据;所述相关状态数据包括改变后的工作模式状态;
    其中,所述相关状态数据用于指示调整所述第一系统的工作模式状态至与所述改变后的工作模式状态相同。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    在所述第三运行模式切换为所述第一运行模式或切换为所述第二运行模式的情况下,将所述相关状态数据发送给所述第一系统;及
    将所述第一系统的工作模式状态调整至与所述第二系统状态改变后的工作模式状态相同。
  6. 根据权利要求5所述的方法,其特征在于,所述相关状态数据还包括状态改变后的第一屏幕亮度、静音模式的第一状态、振动模式的第一状态中的至少一种;所述方法还包括:
    在所述相关状态数据包括所述第一屏幕亮度的情况下,将所述第一系统对应的屏幕亮度调整为所述第一屏幕亮度;
    在所述相关状态数据包括所述静音模式的第一状态的情况下,将所述第一系统的静音模式状态调整为所述静音模式的第一状态;及
    在所述相关状态数据包括所述振动模式的第一状态的情况下,将所述第一系统的振动模式状态调整为所述振动模式的第一状态。
  7. 根据权利要求5所述的方法,其特征在于,所述相关状态数据还包括状态改变前的第二屏幕亮度、静音模式的第二状态、振动模式的第二状态中的至少一种;所述方法还 包括:
    响应于所述工作模式状态进入关闭状态,若相关状态数据包括所述第二屏幕亮度,则将所述第一系统和所述第二系统的屏幕亮度调整为所述第二屏幕亮度,以及
    若相关状态数据包括所述静音模式的第二状态,则将所述第一系统和所述第二系统的静音模式状态调整为所述静音模式的第二状态,若相关状态数据包括所述振动模式的第二状态,则将所述第一系统和所述第二系统的振动模式状态调整为所述振动模式的第二状态。
  8. 根据权利要求5所述的方法,其特征在于,所述第一运行模式的功耗高于所述第二运行模式的功耗,所述第二运行模式的功耗高于所述第三运行模式的功耗。
  9. 根据权利要求1至8任一项所述的方法,其特征在于,所述电子设备包括对应于所述第一系统的第一处理器和对应于所述第二系统的第二处理器,所述第一处理器为核心处理器。
  10. 一种双系统状态同步装置,其特征在于,应用于电子设备,所述电子设备能运行第一系统和第二系统,所述装置包括:
    检测模块,用于在第一运行模式或第二运行模式下,检测所述第一系统的工作模式状态;
    调整模块,用于在所述第一系统的工作模式状态改变的情况下,将所述第二系统的工作模式状态调整至与所述第一系统的工作模式状态相同;及
    其中,在所述第一运行模式下所述第一系统和所述第二系统均运行,且仅有所述第一系统进行界面显示;在所述第二运行模式下所述第一系统和所述第二系统均运行,且所述第一系统或所述第二系统进行界面显示。
  11. 根据权利要求10所述的装置,其特征在于,所述检测模块,还用于在所述第二运行模式下,分别检测所述第一系统的工作模式状态和所述第二系统的工作模式状态;在所述第一系统的工作模式状态改变的情况下,确定所述第一系统的工作模式状态改变的第一时间戳;在所述第二系统的工作模式状态改变的情况下,确定所述第二系统的工作模式状态改变的第二时间戳;及
    所述调整模块,还用于根据所述第一时间戳和所述第二时间戳同步所述第一系统和所述第二系统的工作模式状态。
  12. 根据权利要求11所述的装置,其特征在于,所述调整模块,还用于将所述第一时间戳和所述第二时间戳中,在前的时间戳对应的系统所对应的工作模式状态,调整至与在后的时间戳对应的系统所对应的工作模式状态相同。
  13. 根据权利要求10所述的装置,其特征在于,所述检测模块,还用于在第三运行模式下,检测所述第二系统的工作模式状态;其中,在所述第三运行模式下仅运行所述第二系统;在所述第二系统的工作模式状态改变的情况下,记录对应的相关状态数据;所述相关状态数据包括改变后的工作模式状态;
    其中,所述相关状态数据用于指示调整所述第一系统的工作模式状态至与所述改变后的工作模式状态相同。
  14. 根据权利要求13所述的装置,其特征在于,所述装置还包括发送模块;所述发送模块,用于在所述第三运行模式切换为所述第一运行模式或切换为所述第二运行模式的情况下,将所述相关状态数据发送给所述第一系统;及
    所述调整模块,还用于将所述第一系统的工作模式状态调整至与所述第二系统状态改变后的工作模式状态相同。
  15. 根据权利要求14所述的装置,其特征在于,所述相关状态数据还包括状态改变后的第一屏幕亮度、静音模式的第一状态、振动模式的第一状态中的至少一种;所述调整模块,还用于在所述相关状态数据包括所述第一屏幕亮度的情况下,将所述第一系统对应 的屏幕亮度调整为所述第一屏幕亮度;在所述相关状态数据包括所述静音模式的第一状态的情况下,将所述第一系统的静音模式状态调整为所述静音模式的第一状态;在所述相关状态数据包括所述振动模式的第一状态的情况下,将所述第一系统的振动模式状态调整为所述振动模式的第一状态。
  16. 根据权利要求14所述的装置,其特征在于,所述相关状态数据还包括状态改变前的第二屏幕亮度、静音模式的第二状态、振动模式的第二状态中的至少一种;所述调整模块,还用于响应于所述工作模式状态进入关闭状态,若相关状态数据包括所述第二屏幕亮度,则将所述第一系统和所述第二系统的屏幕亮度调整为所述第二屏幕亮度,以及若相关状态数据包括所述静音模式的第二状态,则将所述第一系统和所述第二系统的静音模式状态调整为所述静音模式的第二状态,若相关状态数据包括所述振动模式的第二状态,则将所述第一系统和所述第二系统的振动模式状态调整为所述振动模式的第二状态。
  17. 根据权利要求10至16任一项所述的装置,其特征在于,所述第一运行模式的功耗高于所述第二运行模式的功耗,所述第二运行模式的功耗高于所述第三运行模式的功耗。
  18. 一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1至9中任一项所述的方法的步骤。
  19. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至9中任一项所述的方法的步骤。
  20. 一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至9中任一项所述的方法的步骤。
PCT/CN2022/139666 2022-03-11 2022-12-16 双系统状态同步方法、装置、电子设备和可读存储介质 WO2023169039A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210241673.0A CN116775318A (zh) 2022-03-11 2022-03-11 双系统状态同步方法、装置、电子设备和可读存储介质
CN202210241673.0 2022-03-11

Publications (1)

Publication Number Publication Date
WO2023169039A1 true WO2023169039A1 (zh) 2023-09-14

Family

ID=87937160

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/139666 WO2023169039A1 (zh) 2022-03-11 2022-12-16 双系统状态同步方法、装置、电子设备和可读存储介质

Country Status (2)

Country Link
CN (1) CN116775318A (zh)
WO (1) WO2023169039A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101382908A (zh) * 2007-09-05 2009-03-11 宏达国际电子股份有限公司 双操作系统的信息同步方法
US20180253322A1 (en) * 2017-03-03 2018-09-06 Lenovo (Beijing) Co., Ltd. Electronic device and mode switching method thereof
CN111951921A (zh) * 2020-07-06 2020-11-17 出门问问信息科技有限公司 一种信息交互方法、装置、电子设备及可读存储介质
CN112987907A (zh) * 2019-12-12 2021-06-18 Oppo广东移动通信有限公司 可穿戴设备的控制方法和装置、电子设备、可读存储介质
CN113238727A (zh) * 2021-06-04 2021-08-10 Oppo广东移动通信有限公司 屏幕切换方法及装置、计算机可读介质和电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101382908A (zh) * 2007-09-05 2009-03-11 宏达国际电子股份有限公司 双操作系统的信息同步方法
US20180253322A1 (en) * 2017-03-03 2018-09-06 Lenovo (Beijing) Co., Ltd. Electronic device and mode switching method thereof
CN112987907A (zh) * 2019-12-12 2021-06-18 Oppo广东移动通信有限公司 可穿戴设备的控制方法和装置、电子设备、可读存储介质
CN111951921A (zh) * 2020-07-06 2020-11-17 出门问问信息科技有限公司 一种信息交互方法、装置、电子设备及可读存储介质
CN113238727A (zh) * 2021-06-04 2021-08-10 Oppo广东移动通信有限公司 屏幕切换方法及装置、计算机可读介质和电子设备

Also Published As

Publication number Publication date
CN116775318A (zh) 2023-09-19

Similar Documents

Publication Publication Date Title
US11416061B2 (en) Terminal control method and apparatus, and terminal
US7861099B2 (en) Method and apparatus for user-activity-based dynamic power management and policy creation for mobile platforms
US7861098B2 (en) Method and apparatus for user-activity-based dynamic power management and policy creation for mobile platforms
JP5410109B2 (ja) 電力制御システム及び電力制御方法
US20050124389A1 (en) Portable electronic apparatus and power management method thereof
US7146513B2 (en) System for adjusting a clock frequency based on comparing a required process times and a worst case execution times and adjusting a voltage and clock frequency based on a number of ready state application tasks
WO2013104254A1 (zh) 接收设备、视频刷新频率的控制方法、装置及系统
JPH10234027A (ja) 撮像システム,方法および記憶媒体
WO2014180329A1 (zh) 一种调整智能终端唤醒频率的方法及装置
WO2014075473A1 (zh) 终端的节能显示方法及装置、lcd模组、终端
CN109157839A (zh) 帧率调控方法、装置、存储介质及终端
WO2012031540A1 (zh) 一种调节内存运行频率的方法及电子设备
WO2022057704A1 (zh) 应用程序运行模式切换方法、装置、电子设备和存储介质
WO2023185139A1 (zh) 干扰控制方法及相关装置
TW201407334A (zh) 控制應用的方法和裝置及其電腦可讀取媒體
US10338936B2 (en) Method for controlling schedule of executing application in terminal device and terminal device implementing the method
EP2537094B1 (en) Method and apparatus for crash recovery and resynchronization
WO2023169039A1 (zh) 双系统状态同步方法、装置、电子设备和可读存储介质
WO2021175194A1 (zh) 终端定时开机的方法及终端
WO2018076698A1 (zh) 终端的延迟显示的方法、装置及终端、计算机存储介质
WO2019024643A1 (zh) 数据同步管控方法、装置及电子设备
CN113031744A (zh) 处理方法及处理装置
WO2022127341A1 (zh) 系统切换方法、装置、设备及存储介质
WO2023197681A1 (zh) 模式切换方法及装置、终端设备、存储介质
TWI488036B (zh) 可降低待機耗電之電子裝置及其方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22930659

Country of ref document: EP

Kind code of ref document: A1