System switching method and apparatus, electronic device, medium and computer program product
By using a second system to listen for events triggered by applications and obtain screen control permissions, the complexity of system switching in existing technologies is solved, and a more efficient system switching process is achieved.
Patent Information
- Application Number
- PCT/CN2025/115860
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-21
- Filing Date
- 2025-08-20
- Publication Date
- 2026-02-26
AI Technical Summary
In the prior art, electronic devices need to send system switching requests through specific interfaces during system switching, which makes the system switching process complicated.
The second system listens for events triggered by the application and, when the system switching conditions are met, obtains screen control permissions from the first system to directly control the screen display of the application interface, thus avoiding waiting for the application to send a system switching request.
It improves the efficiency of system switching between the two systems, reduces invalid switching, and simplifies the system switching process.
Smart Images

Figure CN2025115860_26022026_PF_FP_ABST
Abstract
Description
System switching method and device, electronic device, medium and computer program product
[0001] The present application claims priority from the Chinese patent application No. 202411156873.1, filed on August 21, 2024, and entitled "System switching method and device, electronic device, medium and computer program product", the entire content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] Embodiments of the present application relate to the field of electronic devices, and in particular to a system switching method and device, electronic device, medium and computer program product. BACKGROUND
[0003] With the continuous upgrading of electronic devices, users' demand for electronic devices has also increased. In order to improve the endurance of mobile electronic devices, dual-system devices have gradually emerged.
[0004] In related technologies, when an application running in a second system requests system switching while a screen is controlled by a first system, the application needs to send a system switching request through a specific interface, so as to realize system switching based on the system switching request.
[0005] It can be seen that in related technologies, the application needs to adapt to a specific interface first, and then send a system switching request to realize system switching, which leads to a complex system switching process. SUMMARY
[0006] Embodiments of the present application provide a system switching method and device, electronic device, medium and computer program product. The technical solution is as follows:
[0007] In one aspect, the present application provides a system switching method, which is used in an electronic device supporting running a first system and a second system.
[0008] The method comprises:
[0009] The second system listens to an event triggered by an application running in the second system;
[0010] In a case where the event triggered by the application is listened to, the event meets system switching conditions, and the first system has a screen control authority, the second system acquires the screen control authority from the first system;
[0011] In a case where the screen control authority is acquired, the second system controls the screen to display an application interface of the application.
[0012] In another aspect, an embodiment of the present application provides a system switching apparatus, which is used in an electronic device supporting running of a first system and a second system.
[0013] The apparatus comprises:
[0014] a second system module, configured to listen to an event triggered by an application running in the second system module;
[0015] The second system module is further configured to acquire the screen control authority from the first system module when the event triggered by the application is listened to, the event meets a system switching condition, and the first system module has the screen control authority.
[0016] The second system module is further configured to control a screen to display an application interface of the application when the screen control authority is acquired.
[0017] In another aspect, an embodiment of the present application provides an electronic device, which comprises a processor and a memory; the memory stores at least one computer instruction, and the at least one computer instruction is used to be executed by the processor to implement the system switching method in the above aspect.
[0018] In another aspect, an embodiment of the present application provides a computer readable storage medium, which stores at least one computer instruction; the computer instruction is loaded and executed by a processor to implement the system switching method in the above aspect.
[0019] In another aspect, an embodiment of the present application provides a computer program product, which comprises computer instructions stored in a computer readable storage medium; a processor of an electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the electronic device to perform the system switching method in the above aspect. BRIEF DESCRIPTION OF DRAWINGS
[0020] FIG. 1 is a dual-core communication software framework of an Android operating system according to an example embodiment of the present application;
[0021] FIG. 2 is a dual-core communication software framework of an RTOS according to an example embodiment of the present application;
[0022] FIG. 3 is a flowchart of a system switching method according to an example embodiment of the present application;
[0023] FIG. 4 is an interface diagram of system switching according to an example embodiment of the present application;
[0024] FIG. 5 is a flow chart of a system switching method according to another exemplary embodiment of the present application;
[0025] FIG. 6 is a flow chart of a system switching method according to an exemplary embodiment of the present application;
[0026] FIG. 7 is a flow chart of a system switching method according to an exemplary embodiment of the present application;
[0027] FIG. 8 is a flow chart of a system switching method according to another exemplary embodiment of the present application;
[0028] FIG. 9 is a flow chart of a system switching method according to an exemplary embodiment of the present application;
[0029] FIG. 10 is a structural block diagram of a system switching apparatus according to an exemplary embodiment of the present application;
[0030] FIG. 11 is a structural block diagram of an electronic device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0031] For the purpose, technical solutions and advantages of the present application to be clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.
[0032] In a conventional electronic device, only a single processor is usually provided, and an operating system running on the processor is used to process events. However, with the increasing use requirements of users on the electronic device, the electronic device is also required to have a stronger data processing capability, and thus electronic devices equipped with dual-core dual-systems are produced. In a possible embodiment, the electronic device is provided with at least a first processor and a second processor having different processing performance and power consumption, and has a first system running on the first processor and a second system running on the second processor. In addition, the electronic device equipped with dual-core dual-systems is also provided with a system switching mechanism.
[0033] For example, in a smart watch or a smart bracelet, a high-performance processor and a low-power processor can be simultaneously included, and run on a first system and a second system (i.e., dual-core dual-systems) respectively.
[0034] In order to reduce power consumption, the system running on the low-power processor is usually used to process events with low performance requirements, and when there is an event with high performance requirements, the system running on the high-power processor is switched to process the event with high performance requirements, so as to meet the performance requirements of the electronic device.
[0035] Optionally, the first system runs on a low-power processor, and the second system runs on a high-performance processor; or the first system runs on a high-performance processor, and the second system runs on a low-power processor.
[0036] In the embodiments of the present application, the first processor and the second processor work asynchronously, and the first system and the second system need to realize system communication (or dual-core communication). In a possible application scenario, the first system is an Android operating system running on a central processing unit (CPU), and the second system is a real-time operating system (RTOS) running on a micro controller unit (MCU).
[0037] FIG. 1 is a dual-core communication software framework diagram of an Android operating system according to an example embodiment of the present application. The dual-core communication software framework follows the design principles of "low coupling, high reliability, and high reuse", and includes the development of modules in the Kernel (kernel), HIDL (Hardware Abstraction Layer Interface Description Language), Native Service (native service), Framework Service (framework service), Framework API (framework interface), and APP (application) parts.
[0038] The APP module includes Launcher (desktop launcher), Setting (setting), SystemUI (system user interface), and other functional modules. The Framework API module includes MCUManager (MCU management), SensorManager (sensor management), LocationManager (location management), and other management modules. The Framework Service module includes MCUManagerService (MCU management service), SystemSensorManager (system sensor management), LocationManagerService (location management service), and other service modules. The Native Service module includes dccservice (dcc service), Sensorservice (sensor service), and other service modules. The HIDL module includes Sensor HAL (sensor hardware abstraction layer), GPS HAL (global positioning system hardware abstraction layer), and other modules. The Kernel module includes dcc_data, Mcu_sensor, Mcu_gps, and other DCC Transfer Driver (DCC transfer driver).
[0039] The transmission layer, as an interface layer connecting the upper and lower layers in the dual-core communication software framework, shields the transmission details of the communication of the lower system (the data link layer) from the application layer, and provides a service channel for the application scenario; the application layer, as the main body of service provision, responds to human-computer interaction and transmits the data generated in the human-computer interaction process through the transmission layer, and responds to external data requests.
[0040] The RTOS is designed by using the peer-to-peer principle. Taking an electronic device as an example of a smart watch, FIG. 2 is a dual-core communication software framework diagram of the RTOS provided in an example embodiment of the present application.
[0041] As shown in FIG. 2, the dual-core communication software framework of the RTOS is divided into an application layer, a service layer, a framework layer, a hardware abstraction layer, and a platform layer.
[0042] The application layer includes watch face, Daily Tracker, Message center, Voice around Apps, Health Apps, Settings and the like; the service layer includes Sport & health task, System manager task, AMS, AudioService, Log Service, OFTP Service, BT Service, Delegate Service, RPC Service, sensor Service, storage Service and the like; the framework layer includes Message Pub, UI Framework, G2D Engine, Audio Middleware, Preference, File system, Algorithms, AsycEvent and the like; the hardware abstraction layer includes Screen / TP, sensors, Keypad, Motor and the like; the platform layer includes Board Support Package (BSP) and LOW level Driver, wherein the BSP includes Screen / TP, Codec, sensors, Flash, PSRAM and the like, and the LOW level Driver includes Uart, ADC, GPIO, SPI, I2C, IOS, PCM, I2S, HWTimer.
[0043] It should be noted that the dual-core communication software framework is only used for illustrative description, and those skilled in the art can add, delete or modify the above framework according to actual needs, and the embodiments of the present application do not limit the specific structure of the dual-core communication software framework.
[0044] Referring to FIG. 3, which is a flowchart of a system switching method according to an example embodiment of the present application. The method is applied to an electronic device supporting a first system and a second system, and includes the following steps.
[0045] In step 301, the second system listens to an event triggered by an application running on the second system.
[0046] Optionally, the electronic device is a smart watch, a smart bracelet or the like, which includes a high-performance processor and a low-power processor.
[0047] The high-performance processor and the low-power processor in the electronic device run the first system and the second system respectively. Since the first processor and the second processor work asynchronously, and the first system and the second system need to implement system communication (or dual-core communication), in the example embodiment of the present application, the second system is an Android operating system running on a central processing unit (CPU), and the first system is a real-time operating system (RTOS) running on a micro controller unit (MCU).
[0048] In a possible implementation, the electronic device is provided with a first processor and a second processor, wherein the processing performance of the first processor is lower than that of the second processor (the processing capacity and speed of the first processor are both lower than those of the second processor), and the power consumption of the first processor is lower than that of the second processor. Accordingly, the second system (running on the second processor) can process events processed by the first system (running on the first processor), and the first system does not necessarily process events processed by the second system.
[0049] In another possible implementation, the electronic device can also be provided with a single processor, and the first system and the second system run on different cores of the processor, wherein the processing performance of the core running the second system is higher than that of the core running the first system.
[0050] For example, taking the electronic device as a smart watch, the first processor as an MCU, the second processor as a CPU, the first system as an RTOS, and the second system as an Android system. Accordingly, events that can be processed by the first system include watch face display, watch face interface switching, notification message display and the like, which are scenes or weak interaction scenes with low requirements on processing performance; events that can be processed by the second system include call answering, starting an application, watch face editing, function setting and the like, which are scenes or strong interaction scenes with high requirements on processing performance.
[0051] In a possible implementation, the working modes of the electronic device include one or more of a performance mode, a hybrid mode and a low-power-consumption mode, and the electronic device can be provided with one or more of the modes according to product requirements, which are all within the protection scope of the present application. For example, in the performance mode, the control of the display device is always controlled by the high-performance processor (for example, the second system with higher performance controls the first system), and both systems are running when processing the business; in the low-power-consumption mode, only the processor with lower power consumption (for example, the first processor) remains in the wake-up state or the sleep state, and the processor with high power consumption (for example, the second processor) remains in the closed state, which can also be understood as that the low-power-consumption system does not close, and the high-power-consumption system closes; in the hybrid mode, the first system and the second system can be in the running or sleep state, and can be automatically switched according to the business requirements, so as to balance the power consumption and the performance. For example, when only the first system processes the event, the second processor is in the sleep state, and when the second processor is needed to process the business, the second processor (the second system) is woken up to process the business. In some embodiments, when the second processor is woken up to process the business, the first processor (the first system) can not sleep and can assist the second processor (the second system). In some embodiments, when there is no business requirement, the first processor (the first system) and the second processor (the second system) are both in the sleep state. In some embodiments, in the hybrid mode, the control of the display device (for example, the display screen) can also be switched between the first system and the second system. For example, when the application on the second system is running, the control of the display screen belongs to the second system, and when the second system is in the sleep state, the control of the display screen belongs to the first system. It can be understood that the electronic device of the present application can also have other running modes, which are not limited herein.
[0052] Optionally, in the wake-up state, the system-related data is cached in the memory (RAM, Random Access Memory) so as to run the system-related data at any time. In the sleep state, most of the hardware modules of the processor are closed, the system-related data is stored in the hard disk (ROM, Read Only Memory), and is written into the memory from the hard disk when switching to the wake-up state.
[0053] Unlike the electronic devices such as smart phones with strong interaction attributes, the wearable device is an auxiliary electronic device, and in most use scenarios, there is only weak interaction between the wearable device and the user. For example, the user only raises the wrist to check the time in most scenarios. Therefore, when the first system processes the event, the second processor is controlled to be in the sleep state (the second system is in the sleep state), so as to reduce the overall power consumption of the wearable device.
[0054] Optionally, when the first system is in the wake-up state, the electronic device displays a system interface of the first system, for example, the wearable device displays a watch face interface. In one possible application scenario, when the first system is in the wake-up state, the second system is in the sleep state; in another possible application scenario, when the first system is in the wake-up state, the second system is also in the wake-up state, and the first system is in the foreground running state while the second system is in the background running state.
[0055] Optionally, the application installed in the electronic device is an application supporting running in the second system. The application can be a native application program or a third-party application program. Optionally, the application can be started based on an external operation (such as a manual click operation) when the second system is in the foreground running state, for example, started based on a trigger start operation; or the application can be started based on an internally generated event when the second system is in the background running state or the sleep state, for example, started based on an event triggered by the application.
[0056] For example, the internally generated event refers to that the application program is internally provided with some logic or mechanism, and when certain conditions are met, a corresponding event is generated, which can be a signal, a message, a state change or some other form of notification. For example, the application is a map application program, and the user sets a destination in the application, so that after the user arrives at the destination, the application requests to be started and run to remind the user that the destination has been reached. For another example, the application is a learning application program, and the user sets a target learning duration in the application, so that after the target learning duration is reached, the application requests to be started and run to remind the user that the target learning duration has been reached.
[0057] In this embodiment, in order to respond to the event triggered by the application in a timely manner, the second system listens to the event triggered by the application in real time.
[0058] In step 302, when the event triggered by the application is listened to, the event meets the system switching condition, and the first system has the screen control authority, the second system acquires the screen control authority from the first system.
[0059] When the second system has the screen control authority and the event triggered by the application is listened to, the second system can directly control the screen to display the application interface of the application.
[0060] When the first system has the screen control authority, after the second system listens to the event triggered by the application, in order to improve the accuracy of system switching and avoid invalid switching between the two systems, it is determined whether the event triggered by the application meets the system switching condition, so that the second system obtains the screen control authority from the first system when the event meets the system switching condition. For example, the second system can send a screen control authority transfer request to the first system to obtain the screen control authority.
[0061] Optionally, the event meets the system switching condition refers to that the event triggered by the application is an event with a screen display requirement. For example, the application requests foreground running display, and the event triggered by the application meets the system switching condition. For another example, when the event triggered by the application is a request for background running, there is no screen display requirement, and therefore the event triggered by the application does not meet the system switching condition.
[0062] In step 303, when the screen control authority is obtained, the second system controls the application interface of the application displayed on the screen.
[0063] Optionally, after the second system obtains the screen control authority from the first system, the application interface of the application displayed on the screen can be controlled.
[0064] Illustratively, as shown in FIG. 4, the electronic device is a smart wearable device. When the first system has the screen control authority, the first system controls the screen to display the first system main interface 41. Meanwhile, the second system listens to the event triggered by the application. When the event triggered by the map application is listened to and the event meets the system switching condition, the second system sends a screen control authority transfer request to the first system, so that the second system controls the screen to display the "destination reached" prompt interface 42 corresponding to the map application when the second system obtains the screen control authority.
[0065] In a possible implementation, after the second system obtains the screen control authority, the first system is in a background running state.
[0066] In summary, in the embodiment of the application, the second system listens to the event triggered by the application running in the system in real time. When the event triggered by the application is listened to and the event meets the system switching condition, if the first system currently has the screen control authority, the second system obtains the screen control authority from the first system, and controls the screen to display the application interface of the application when the screen control authority is obtained. The system switching is actively performed by the second system based on the listened event, without waiting for the application to send a system switching request, and the system switching efficiency between the two systems is improved.
[0067] Optionally, in the case that the application triggered event is monitored, the event meets the system switching condition, and the first system has the screen control authority, the second system acquires the screen control authority from the first system, comprising:
[0068] In the case that the application triggered event is monitored, the event is a screen-on event, and the first system has the screen control authority, the second system acquires the screen control authority from the first system; or,
[0069] In the case that the application triggered event is monitored, the event is an application self-starting event, and the first system has the screen control authority, the second system acquires the screen control authority from the first system.
[0070] Optionally, in the case that the application triggered event is monitored, the event is an application self-starting event, and the first system has the screen control authority, the second system acquires the screen control authority from the first system, comprising:
[0071] In the case that the application triggered event is monitored, the event is an application self-starting event, the application self-starting event indicates a foreground running application, and the first system has the screen control authority, the second system acquires the screen control authority from the first system;
[0072] The method further comprises:
[0073] In the case that the application triggered event is monitored, the event is an application self-starting event, the application self-starting event indicates a background running application, and the first system has the screen control authority, the second system does not acquire the screen control authority from the first system.
[0074] Optionally, in the case that the application triggered event is monitored, the event meets the system switching condition, and the first system has the screen control authority, the second system acquires the screen control authority from the first system, comprising:
[0075] In the case that the application triggered event is monitored, the application information of the application does not conform to the application information blacklist, and the first system has the screen control authority, the second system acquires the screen control authority from the first system.
[0076] Optionally, in the case that the application triggered event is a screen-on event, the application information of the application comprises one or more of an application package name, an application class name, and application screen-on information; wherein the application screen-on information refers to triggering condition information contained when the application triggers the screen-on event;
[0077] In the case that the application triggered event is an application self-starting event, the application information of the application comprises one or more of an application package name, an application class name, an application self-starting number, and an application self-starting time;
[0078] The application information blacklist is a list of application information that does not support system switching, and includes one or more of an application package name blacklist, an application class name blacklist, application screen-on information rules, a first application self-starting number threshold, and an application self-starting time period.
[0079] Optionally, the case where the application information meets the application information blacklist includes one or more of the following:
[0080] The application package name of the application belongs to the application package name blacklist.
[0081] The application class name of the application belongs to the application class name blacklist.
[0082] The application screen-on information of the application does not meet the application screen-on information rules.
[0083] The application self-starting number of the application exceeds the first application self-starting number threshold.
[0084] The application self-starting time of the application belongs to the application self-starting time period.
[0085] Optionally, the method further includes:
[0086] According to the application usage data and the application self-starting data of each application in the second system, the first system or the second system dynamically updates the application information blacklist.
[0087] Optionally, according to the application usage data and the application self-starting data of each application in the second system, the first system or the second system dynamically updates the application information blacklist, including:
[0088] In a case where the application self-starting number of the application in the second system reaches a second application self-starting number threshold and the application usage frequency of the application is lower than an application usage frequency threshold, the first system or the second system adds the application package name of the application to the application package name blacklist.
[0089] In a case where the application self-starting number of the application in the second system does not reach the second application self-starting number threshold and the application usage frequency of the application is higher than the application usage frequency threshold, the first system or the second system removes the application package name of the application from the application package name blacklist.
[0090] Optionally, in a case where the event triggered by the application is listened to, the application information of the application does not meet the application information blacklist, and the first system has a screen control authority, the second system acquires the screen control authority from the first system, including:
[0091] In a case where the event triggered by the application is listened to and the first system has a screen control authority, the second system acquires the application information of the application.
[0092] In a case where it is determined that the application information of the application does not conform to the application information blacklist, the second system acquires the screen control right from the first system.
[0093] Optionally, in a case where the event triggered by the application is listened to, the application information of the application does not conform to the application information blacklist, and the first system has the screen control right, the second system acquires the screen control right from the first system, including:
[0094] In a case where the event triggered by the application is listened to and the first system has the screen control right, the second system acquires the application information of the application, and sends the application information to the first system.
[0095] In a case where the information confirmation message returned by the first system is received, the second system acquires the screen control right from the first system, and the information confirmation message indicates that the application information of the application does not conform to the application information blacklist.
[0096] Optionally, in a case where the event triggered by the application is listened to, the event meets the system switching condition, and the first system has the screen control right, the second system acquires the screen control right from the first system, including:
[0097] In a case where the event triggered by the application is listened to, the event meets the system switching condition, and the first system has the screen control right, the second system sends a screen control right transfer request to the first system.
[0098] In a case where the consent transfer response of the first system to the screen control right transfer request is received, the second system acquires the screen control right from the first system; or
[0099] In a case where the consent transfer response of the first system to the screen control right transfer request is not received within the response time length, the second system acquires the screen control right from the first system.
[0100] In order to improve the efficiency of system switching, in a possible implementation, whether the event triggered by the application meets the system switching condition can be determined according to the event type of the event. The system switching process under different event types will be described below by using exemplary embodiments.
[0101] Referring to FIG. 5, FIG. 5 is a flowchart of a system switching method provided by another exemplary embodiment of the present application. The method is applied to an electronic device supporting running a first system and a second system, and the method includes the following steps.
[0102] Step 501: The second system listens to an event triggered by an application, and the application is run by the second system.
[0103] The implementation of this step can refer to the above-described step 301, and this embodiment will not be described here.
[0104] At step 502, in a case that the application triggered event is listened to, the event is a screen-on event, and the first system has the screen control authority, the second system acquires the screen control authority from the first system.
[0105] For the event satisfying the system switching condition, it can be understood that the event triggered by the application running in the second system is a request screen-on event in a case that the first system has the screen control authority, and thus the second system has the screen control authority through the system switching, so as to control the application interface of the application displayed on the screen.
[0106] In some embodiments, the second system can judge whether the event satisfies the system switching condition by listening to whether the event triggered by the application is a screen-on event.
[0107] Optionally, the reasons causing the screen-on event of the second system can include various reasons. For example, the click operation of the user on the application start control in the first system, the key operation on the physical key, and the sliding operation on the first application interface, etc. These are all the ways of starting the application running in the second system from the first system, and are the application start events requested by the first system to the second system, which are the passive response system switching events for the second system.
[0108] In the embodiments of the present application, the second system listens to the screen-on event and judges whether the screen-on event is triggered by the application in the second system, so as to determine that the event satisfies the system switching condition and acquires the screen control authority from the first system. For example, in a case that the screen-on event is triggered by the application in the second system, it is determined that the event satisfies the system switching condition, and the second system acquires the screen control authority from the first system. For the second system, it is a system switching event initiated actively. For example, the second system can send a screen control authority transfer request to the first system to acquire the control authority of the screen.
[0109] Optionally, the screen-on event triggered by the application refers to the event that the application requests to run in the foreground and display. For example, when the application is started or the application is switched from the background running to the foreground running, the application will request to trigger the screen-on. For example, when the background service of the application needs to show important information to the user, such as receiving an urgent notification or reminder, the application will also request to trigger the screen-on.
[0110] For example, in the case of the second system being an Android system, the screen-on process is usually managed by a power manager service (PMS). In the case of detecting a call request, the power manager service is responsible for receiving the request for the call screen-on and performing the relevant screen-on process, so that in the case of the second system detecting that the power manager service starts to perform the screen-on process, the second system acquires the screen control authority from the first system.
[0111] In a possible implementation, the second system detects a screen-on event in the system, but the screen-on event is triggered by a user's key operation on a physical key, rather than an application actively triggering a screen-on event, so the second system does not actively acquire the screen control authority from the first system.
[0112] For example, in the case of the first system receiving a user's start operation on an application in the second system, the first system can directly transfer the screen control authority to the second system, which is different from the process of the second system actively detecting an application-triggered event in the embodiments of the present application.
[0113] In another possible implementation, the second system detects a screen-on event in the system and determines that the screen-on event is triggered by an application, so that the second system actively acquires the screen control authority from the first system.
[0114] In step 503, in the case of detecting an application-triggered event, the event being an application self-start event, and the first system having the screen control authority, the second system acquires the screen control authority from the first system.
[0115] For the event meeting the system switching condition, it can also be understood that in the case of the first system having the screen control authority, the event triggered by the application running in the second system is an application self-start event, so that the system switching is needed to enable the second system to have the screen control authority and thus to control the application interface of the application displayed on the screen.
[0116] In some embodiments, the second system can determine whether the event triggered by the application meets the system switching condition by detecting whether the event triggered by the application is an application self-start event.
[0117] Optionally, the application self-start event refers to an event in which an application program automatically starts and runs without receiving a user's direct operation and in the case of the application being in a closed state. For example, a user's setting of a timing task or a reminder task in an application program.
[0118] For example, when the application is self-started, the application needs to start an Activity or a Service component, so that the second system can determine whether the application is self-started by monitoring whether the application starts the Activity or the Service component.
[0119] Optionally, the application self-starting event can also be divided into an application self-starting event in a foreground and an application self-starting event in a background. The application self-starting event in the foreground needs the second system to first acquire the screen control permission, and the application self-starting event in the background does not need the second system to acquire the screen control permission.
[0120] Optionally, when the second system is an Android system, it can be determined that the application is started and in the foreground when the second system monitors that the application starts an Activity component, and it can be determined that the application is started but in the background when the second system monitors that the application starts a Service component but does not start an Activity component.
[0121] In order to optimize the system switching condition, in one possible implementation, when the second system monitors that the application triggers an event, the event is an application self-starting event, the application self-starting event indicates that the application is in the foreground, and the first system has the screen control permission, the second system acquires the screen control permission from the first system.
[0122] In another possible implementation, when the second system monitors that the application triggers an event, the event is an application self-starting event, the application self-starting event indicates that the application is in the background, and the first system has the screen control permission, the second system does not need to send a screen control permission transfer request to the first system.
[0123] In step 504, when the screen control permission is acquired, the second system controls the screen to display the application interface of the application.
[0124] In one possible implementation, in order to acquire the screen control permission from the first system, when the second system monitors that the application triggers an event, the event meets the system switching condition, and the first system has the screen control permission, the second system can first send a screen control permission transfer request to the first system, so that the second system acquires the screen control permission from the first system when the first system agrees to transfer the screen control permission.
[0125] Optionally, after the second system monitors that the application triggers an event that meets the system switching condition and sends a screen control permission transfer request to the first system, the first system can agree to transfer the screen control permission or can not agree to transfer the screen control permission.
[0126] In order to improve the success rate of system switching, the response time length can also be set for the screen control authority transfer request, for example, the response time length is set as 500 ms.
[0127] Optionally, the second system can also determine the corresponding response time length in real time according to the application type of the application and the event type of the application triggering event before sending the screen control authority transfer request to the first system.
[0128] In a possible implementation, in the case that the first system agrees to transfer the screen control authority, the second system acquires the screen control authority from the first system. In the case that the first system does not agree to transfer the screen control authority within the response time length, the second system can also acquire the screen control authority from the first system.
[0129] Optionally, after sending the screen control authority transfer request to the first system, the second system can enter the response countdown. In the case that the response time length is reached and the first system does not agree to transfer the screen control authority, the second system no longer waits for the response of the first system and directly acquires the screen control authority from the first system.
[0130] In the embodiment, the event triggered by the application is divided into the screen-on event and the application self-starting event, so that the system switching condition is determined by listening to the screen-on event and the application self-starting event respectively, the efficiency of automatic system switching is improved, and invalid system switching between systems is avoided.
[0131] For the screen-on event, the system switching condition is determined to be met in the case that the screen-on event is triggered by the application. For the application self-starting event, the system switching condition is determined to be met in the case that the application self-starting event indicates the foreground running application.
[0132] In addition, in the process that the second system sends the screen control authority transfer request to the first system, the response time length is set to ensure that the second system can acquire the screen control authority from the first system, and the success rate of system switching is ensured.
[0133] Referring to FIG. 6, FIG. 6 is a flowchart for determining whether to perform system switching by listening to a screen-on event according to an example embodiment of the present application.
[0134] In step 601, the second system listens to the screen-on event.
[0135] In step 602, whether the current screen control authority is in the first system?
[0136] In the case that the second system listens to the screen-on event, the second system determines whether the current screen control authority is in the first system.
[0137] Step 603, the second system control screen executes the screen-on event.
[0138] In the case that the first system does not have the screen control authority and the second system has the screen control authority, the second system directly controls the screen to execute the screen-on event and display the screen-on interface corresponding to the screen-on event.
[0139] Step 604, whether the screen-on event is triggered by an application?
[0140] In the case that the first system has the screen control authority, the second system needs to determine whether the screen-on event meets the system switching condition, that is, whether the screen-on event is triggered by an application.
[0141] Step 605, the second system exits the screen-on event response.
[0142] In the case that the screen-on event is not triggered by an application, the second system exits the screen-on event response, that is, the second system does not execute the screen-on event.
[0143] Step 606, the second system sends a screen control authority transfer request to the first system.
[0144] In the case that the screen-on event is triggered by an application, that is, the application triggers the screen-on event is listened to, and the first system has the screen control authority, the second system sends a screen control authority transfer request to the first system.
[0145] Step 607, whether the consent transfer response of the first system is received?
[0146] Step 608, whether the response time length is reached?
[0147] In the case that the consent transfer response of the first system to the screen control authority transfer request is not received, the second system continues to determine whether the response time length is reached.
[0148] Step 609, the second system obtains the screen control authority from the first system and controls the screen to display the application interface of the application.
[0149] In the case that the consent transfer response of the first system to the screen control authority transfer request is received, the second system obtains the screen control authority from the first system and controls the screen to display the application interface of the application.
[0150] In the case that the consent transfer response of the first system to the screen control authority transfer request is not received, but the response time length is reached, the second system obtains the screen control authority from the first system and controls the screen to display the application interface of the application.
[0151] Referring to FIG. 7, FIG. 7 is a flowchart of determining whether to perform system switching by monitoring application self-starting event according to an example embodiment of the present application.
[0152] In step 701, the second system monitors the application self-starting event.
[0153] In step 702, whether the current screen control authority is in the first system?
[0154] In the case that the second system monitors the application self-starting event, the second system determines whether the current screen control authority is in the first system.
[0155] In step 703, the second system controls the screen to execute the application self-starting event.
[0156] In the case that the first system does not have the screen control authority and the second system has the screen control authority, the second system directly controls the screen to execute the application self-starting event and display the application interface corresponding to the application self-starting event.
[0157] In step 704, the second system sends a screen control authority transfer request to the first system.
[0158] In the case that the second system monitors the application self-starting event and the first system has the screen control authority, the second system sends the screen control authority transfer request to the first system.
[0159] In step 705, whether the first system's consent transfer response is received?
[0160] In step 706, whether the response time length is reached?
[0161] In the case that the consent transfer response of the screen control authority transfer request is not received from the first system, the second system continues to determine whether the response time length is reached.
[0162] In step 707, the second system acquires the screen control authority from the first system and controls the screen to display the application interface of the application.
[0163] In the case that the consent transfer response of the screen control authority transfer request is received from the first system, the second system acquires the screen control authority from the first system and controls the screen to display the application interface of the application.
[0164] In the case that the consent transfer response of the screen control authority transfer request is not received from the first system but the response time length is reached, the second system acquires the screen control authority from the first system and controls the screen to display the application interface of the application.
[0165] In order to optimize the system switching process and avoid frequent or meaningless system switching, an application information blacklist can be set, so that whether the event triggered by the application meets the system switching condition is determined based on the application information blacklist. The following exemplary embodiments are used to describe the system switching process with the application information blacklist.
[0166] Referring to FIG. 8, FIG. 8 is a flowchart of a system switching method according to another exemplary embodiment of the present application. The method is applied to an electronic device supporting running a first system and a second system, and the method includes the following steps.
[0167] In step 801, the second system listens to an event triggered by an application running in the second system.
[0168] The implementation of the present step can refer to the above-described step 301, and the present embodiment is not described herein again.
[0169] In step 802, when the event triggered by the application is listened to, the application information of the application does not conform to the application information blacklist, and the first system has the screen control authority, the second system acquires the screen control authority from the first system.
[0170] Optionally, in the case that the event triggered by the application is a screen-on event, the application information of the application can include one or more of an application package name, an application class name, and application screen-on information.
[0171] The application package name is a unique identifier of the application program in the system. The application class name is a class instance in the programming code of the application program, and the application class name is usually a part of the application package name.
[0172] The application screen-on information refers to the trigger condition information contained when the application triggers the screen-on event. For example, a certain application program triggers the screen-on event based on a timing task, and the trigger condition information contained can include timing task completion information and UI interface drawing information.
[0173] Optionally, in the case that the event triggered by the application is an application self-starting event, the application information of the application can include one or more of an application package name, an application class name, an application self-starting number, and an application self-starting time.
[0174] The application self-starting number can be the application self-starting number in a certain preset time period. Optionally, the second system can count the application self-starting number of each application in the process of listening to the application self-starting event.
[0175] Optionally, the application information blacklist refers to a list of application information that does not support system switching. The application information blacklist can include one or more of an application package name blacklist of application information that does not support system switching, an application class name blacklist of application information that does not support system switching, application screen-on information rules, a first application self-starting number threshold, and an application self-starting time period of application information that does not support system switching.
[0176] The application screen-on information rules can include application screen-on information rules for a certain type of application or application screen-on information rules for a certain application. Setting the application screen-on information rules can effectively avoid the problem of performing system switching in the case of incomplete application screen-on information of a certain application.
[0177] For example, for an application program of a timing type task, the application screen-on information only includes timing task completion information and does not include UI interface drawing information, and it is considered that the application screen-on information is incomplete and does not meet the application screen-on information rules, i.e., the application information meets the application information blacklist.
[0178] The first application self-starting number threshold can effectively avoid the problem of frequent system switching caused by frequent self-starting of a certain application. For example, the first application self-starting number threshold can be 10 times, and in the case of 11 times of application self-starting of a certain application in a day, it is considered that the application information meets the application information blacklist.
[0179] Setting the application self-starting time period can effectively avoid the problem of system switching during the user's rest time period. For example, the application self-starting time period is from 23:00 to 05:00, and in the case of an application self-starting event triggered by a certain application at 2:00, it is considered that the application information meets the application information blacklist.
[0180] Therefore, for the case of application information meeting the application information blacklist, it can include one or more of the following: the application package name of the application belongs to the application package name blacklist; the application class name of the application belongs to the application class name blacklist; the application screen-on information of the application does not meet the application screen-on information rules; the application self-starting number of the application exceeds the first application self-starting number threshold; and the application self-starting time of the application belongs to the application self-starting time period.
[0181] The process of determining whether the application information of the application meets the application information blacklist can be performed by the first system or the second system.
[0182] In a possible implementation, in the case that the event triggered by the application is monitored and the first system has the screen control authority, the second system first acquires the application information of the application, and directly determines whether the application information of the application conforms to the application information blacklist according to the application information blacklist. Then, in the case that it is determined that the application information of the application does not conform to the application information blacklist, the second system acquires the screen control authority from the first system; and in the case that it is determined that the application information of the application conforms to the application information blacklist, the second system does not acquire the screen control authority from the first system.
[0183] In another possible implementation, in the case that the event triggered by the application is monitored and the first system has the screen control authority, the second system first acquires the application information of the application, and sends the application information to the first system, so that the first system determines whether the application information of the application conforms to the application information blacklist according to the application information blacklist. Then, in the case that an information confirmation message returned by the first system is received, the second system acquires the screen control authority from the first system, where the information confirmation message indicates that the application information of the application does not conform to the application information blacklist.
[0184] Optionally, in order to improve the data transmission efficiency between the first system and the second system, in the case that the first system determines whether the application information of the application conforms to the application information blacklist, the second system can send the application information of the application and the screen control authority transfer request to the first system at the same time, so that in the case that the application information does not conform to the application information blacklist, the first system directly transfers the screen control authority to the second system; and in the case that the application information conforms to the application information blacklist, the first system can feed back a response of refusing the authority transfer to the second system.
[0185] Optionally, the data in the application information blacklist can be preset by a developer, manually added by a user, or dynamically updated by the first system or the second system based on actual application data.
[0186] In a possible implementation, the first system or the second system can dynamically update the application information blacklist according to the application use data and the application self-starting data of each application in the second system.
[0187] Optionally, in the case that the application self-starting number of a certain application in the second system reaches a second application self-starting number threshold, and the application use frequency of the application is lower than an application use frequency threshold, the first system or the second system can add the application package name of the application to the application package name blacklist.
[0188] Optionally, in the case that the application self-starting number of a certain application in the second system does not reach the second application self-starting number threshold, and the application usage frequency of the application is higher than the application usage frequency threshold, the first system or the second system removes the application package name of the application from the application package name blacklist.
[0189] For example, the application usage frequency threshold can be a value preset by a developer, or a value dynamically determined according to historical application usage records of a user, and the embodiments of the present application do not limit this.
[0190] Optionally, in the case that a certain application frequently self-starts in the second system, and a certain application class name in the application is frequently used, the first system or the second system can also add the application class name of the application to the application class name blacklist.
[0191] It should be noted that, as one of the judgment conditions for judging whether the event triggered by the application meets the system switching condition, the data contained in the application information blacklist can be determined according to the problems in the actual system switching process, and the embodiments of the present application only illustrate the data that can be contained in the application information blacklist, but do not limit this.
[0192] Step 803, in the case that the screen control permission is acquired, the second system controls the screen to display the application interface of the application.
[0193] The implementation of the present step can refer to the above-mentioned step 303, and the present embodiment does not repeat here.
[0194] In the present embodiment, by setting the application information blacklist, after the event triggered by the application is listened to, whether the second system acquires the screen control permission from the first system is determined by judging whether the application information of the application meets the application information blacklist, the system switching condition is optimized, invalid system switching is avoided, and the system switching efficiency is improved.
[0195] Referring to FIG. 9, FIG. 9 is a flowchart for judging whether to perform system switching based on an application information blacklist according to one of the exemplary embodiments of the present application.
[0196] Step 901, the second system listens to an event triggered by an application.
[0197] The second system listens to an event triggered by an application, which can be a screen-on event requested by the application, or an application self-starting event of the application.
[0198] Step 902, is the current screen control permission in the first system?
[0199] In the case that the second system listens to the event triggered by the application, the second system judges whether the current screen control permission is in the first system.
[0200] Step 903, the second system control screen executes a bright screen event.
[0201] In the case that the first system does not have screen control authority and the second system has screen control authority, the second system directly controls the screen to execute the event triggered by the application and displays the application interface corresponding to the event triggered by the application.
[0202] Step 904, whether the application information of the application meets the application information blacklist?
[0203] In the case that the first system has screen control authority, the second system obtains the application information of the application and judges whether the application information of the application meets the application information blacklist according to the application information blacklist.
[0204] Step 905, the second system exits the event response.
[0205] In the case that the application information of the application meets the application information blacklist, i.e. the event triggered by the application does not meet the system switching condition, the second system exits the event response.
[0206] Step 906, the second system sends a screen control authority transfer request to the first system.
[0207] In the case that the application information of the application does not meet the application information blacklist, i.e. the event triggered by the application is listened to and the application information of the application does not meet the application information blacklist, and the first system has screen control authority, the second system sends a screen control authority transfer request to the first system.
[0208] Step 907, whether the consent transfer response of the first system is received?
[0209] Step 908, whether the response duration is reached?
[0210] In the case that the consent transfer response of the first system to the screen control authority transfer request is not received, the second system continues to judge whether the response duration is reached.
[0211] Step 909, the second system obtains the screen control authority from the first system and controls the screen to display the application interface of the application.
[0212] In the case that the consent transfer response of the first system to the screen control authority transfer request is received, the second system obtains the screen control authority from the first system and controls the screen to display the application interface of the application.
[0213] In the case that the consent transfer response of the first system to the screen control authority transfer request is not received, but the response duration is reached, the second system obtains the screen control authority from the first system and controls the screen to display the application interface of the application.
[0214] Referring to FIG. 10, FIG. 10 is a structural block diagram of a system switching apparatus provided by an example embodiment of the present application. The apparatus is used in an electronic device supporting running of a first system and a second system, and the apparatus comprises:
[0215] a second system module 1002, configured to listen to an event triggered by an application, the application being run by the second system module 1002;
[0216] the second system module 1002 is further configured to acquire the screen control authority from the first system module 1001 in a case that the event triggered by the application is listened to, the event meets a system switching condition, and the first system module 1001 has the screen control authority;
[0217] the second system module 1002 is further configured to control a screen to display an application interface of the application in a case that the screen control authority is acquired.
[0218] Optionally, the second system module 1002 is configured to:
[0219] acquire the screen control authority from the first system module 1001 in a case that the event triggered by the application is listened to, the event is a screen-on event, and the first system module 1001 has the screen control authority; or
[0220] acquire the screen control authority from the first system module 1001 in a case that the event triggered by the application is listened to, the event is an application self-starting event, and the first system module 1001 has the screen control authority.
[0221] Optionally, the second system module 1002 is configured to:
[0222] acquire the screen control authority from the first system module 1001 in a case that the event triggered by the application is listened to, the event is the application self-starting event, the application self-starting event indicates foreground running of the application, and the first system module 1001 has the screen control authority;
[0223] the second system module 1002 is further configured to:
[0224] not acquire the screen control authority from the first system module 1001 in a case that the event triggered by the application is listened to, the event is the application self-starting event, the application self-starting event indicates background running of the application, and the first system module 1001 has the screen control authority.
[0225] Optionally, the second system module 1002 is configured to:
[0226] acquire the screen control right from the first system module 1001 in a case where the application triggered event is listened to, the application information of the application does not conform to the application information blacklist, and the first system module 1001 has the screen control right.
[0227] Optionally, in a case where the application triggered event is a screen-on event, the application information of the application includes one or more of an application package name, an application class name, and application screen-on information; the application screen-on information refers to trigger condition information contained when the application triggers the screen-on event.
[0228] In a case where the application triggered event is an application self-starting event, the application information of the application includes one or more of an application package name, an application class name, an application self-starting number of times, and an application self-starting time point.
[0229] The application information blacklist is a list of application information that does not support system switching, and includes one or more of an application package name blacklist, an application class name blacklist, application screen-on information rules, a first application self-starting number of times threshold, and an application self-starting time period.
[0230] Optionally, the case where the application information conforms to the application information blacklist includes one or more of the following:
[0231] The application package name of the application belongs to the application package name blacklist;
[0232] The application class name of the application belongs to the application class name blacklist;
[0233] The application screen-on information of the application does not conform to the application screen-on information rules;
[0234] The application self-starting number of times of the application exceeds the first application self-starting number of times threshold;
[0235] The application self-starting time point of the application belongs to the application self-starting time period.
[0236] Optionally, the first system module 1001 or the second system module 1002 is configured to:
[0237] update the application information blacklist dynamically according to application usage data and application self-starting data of each application in the second system module 1002.
[0238] Optionally, the first system module 1001 or the second system module 1002 is configured to:
[0239] add the application package name of the application to the application package name blacklist, in a case where the number of times of application self-starting of the application applied in the second system module 1002 reaches a second application self-starting number threshold, and the application usage frequency of the application is lower than an application usage frequency threshold;
[0240] remove the application package name of the application from the application package name blacklist, in a case where the number of times of application self-starting of the application applied in the second system module 1002 does not reach the second application self-starting number threshold, and the application usage frequency of the application is higher than the application usage frequency threshold.
[0241] Optionally, the second system module 1002 is configured to:
[0242] obtain the application information of the application in a case where the event triggered by the application is monitored, and the first system module 1001 has the screen control authority;
[0243] obtain the screen control authority from the first system module 1001 in a case where it is determined that the application information of the application does not conform to the application information blacklist.
[0244] Optionally, the second system module 1002 is configured to:
[0245] obtain the application information of the application and send the application information to the first system module 1001 in a case where the event triggered by the application is monitored, and the first system module 1001 has the screen control authority;
[0246] obtain the screen control authority from the first system module 1001 in a case where an information confirmation message returned by the first system module 1001 is received, the information confirmation message indicating that the application information of the application does not conform to the application information blacklist.
[0247] Optionally, the second system module 1002 is configured to:
[0248] send a screen control authority transfer request to the first system in a case where the event triggered by the application is monitored, the event meets a system switching condition, and the first system has the screen control authority;
[0249] obtain the screen control authority from the first system module 1001 in a case where a consent transfer response to the screen control authority transfer request is received by the first system module 1001; or
[0250] In a case where no consent transfer response of the first system module 1001 to the screen control authority transfer request is received within the response duration, the screen control authority is acquired from the first system module 1001.
[0251] To sum up, in the embodiments of the present application, the second system listens to events triggered by applications running in the system in real time, and in a case where an event triggered by an application is listened to and the event meets the system switching condition, if the current first system has the screen control authority, the second system acquires the screen control authority from the first system, and in a case where the screen control authority is acquired, controls the application interface of the application displayed on the screen, thereby realizing that the second system actively performs system switching based on the listened event, without waiting for the application to send a system switching request before performing system switching, and improving the system switching efficiency between the two systems.
[0252] Please refer to FIG. 11, which is a structural block diagram of an electronic device according to an example embodiment of the present application. The electronic device in the present application can include one or more of the following components: a processor 1110 and a memory 1120.
[0253] Optionally, the processor 1110 includes at least a first processor 1111 and a second processor 1112, where the first processor 1111 is configured to run a first system and the second processor 1112 is configured to run a second system. In some embodiments, the power consumption of the first processor 1111 is lower than that of the second processor 1112, and the performance of the first processor 1111 is lower than that of the second processor 1112. In other embodiments, the power consumption of the first processor 1111 is higher than that of the second processor 1112, and the performance of the first processor 1111 is higher than that of the second processor 1112. For example, the power consumption of the first processor 1111 and the power consumption of the second processor 1112 can be understood as standby (sleep) power consumption, power consumption for processing the same service, or overall power consumption, etc., which can be measured by a current meter. For example, the performance of the first processor 1111 and the performance of the second processor 1112 can be understood as computing power or hardware resources, etc. The processor 1110 connects various parts in the entire electronic device through various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 1120, and calling data stored in the memory 1120. Optionally, the processor 1110 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA). The processor 1110 can integrate one or several combinations of a central processing unit (CPU), a graphics processing unit (GPU), a neural-network processing unit (NPU), and a modem, etc. Among them, the CPU is mainly used to process operating systems, user interfaces, and application programs, etc.; the GPU is used to render and draw the content to be displayed on the touch display screen; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 1110, but can be realized by a separate chip.
[0254] The memory 1120 can include a random access memory (RAM) and can also include a read-only memory (ROM). Optionally, the memory 1120 includes a non-transitory computer-readable storage medium. The memory 1120 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1120 can include a program storage area and a data storage area, where the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing each of the method embodiments described below, etc.; and the data storage area can store data created according to the use of the electronic device (such as audio data, a phone book, etc.).
[0255] The electronic device in the embodiments of the present application further includes a communication component 1130 and a display component 1140. The communication component 1130 can be a Bluetooth component, a WiFi (Wireless Fidelity) component, an NFC (Near Field Communication) component, etc., and is used to communicate with external devices (servers or other terminal devices) through wired or wireless networks; the display component 1140 is used to display a graphical user interface and / or receive user interaction operations.
[0256] In addition, those skilled in the art can understand that the structure of the electronic device shown in the above-described figures does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than those shown, or combine certain components, or different component arrangements. For example, the electronic device also includes radio frequency circuitry, an input unit, a sensor, audio circuitry, a speaker, a microphone, a power supply, etc., which are not described here in detail.
[0257] The embodiments of the present application also provide a computer-readable storage medium, which stores at least one computer instruction, and the computer instruction is loaded and executed by a processor to implement the system switching method as described in the above embodiments.
[0258] Optionally, the computer-readable storage medium can include a ROM, a RAM, a solid state disk (SSD), an optical disk, etc. The RAM can include a ReRAM (Resistance Random Access Memory) and a DRAM (Dynamic Random Access Memory).
[0259] The embodiment of the present application further provides a computer program product, which comprises computer instructions stored in a computer readable storage medium; a processor of an electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the system switching method as described in the above embodiment.
[0260] The above merely describes optional embodiments of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A system switching method, the method being used in an electronic device, the electronic device supporting running of a first system and a second system; the method comprising: the second system listening to an event triggered by an application, the application being run by the second system; in a case that the event triggered by the application is listened to, and the event meets a system switching condition, and the first system has a screen control authority, the second system acquiring the screen control authority from the first system; in a case that the screen control authority is acquired, the second system controlling a screen to display an application interface of the application. 2.The method of claim 1, wherein the case that the event triggered by the application is listened to, and the event meets the system switching condition, and the first system has the screen control authority, comprises: in a case that the event triggered by the application is listened to, and the event is a screen-on event, and the first system has the screen control authority, the second system acquiring the screen control authority from the first system; or, in a case that the event triggered by the application is listened to, and the event is an application self-starting event, and the first system has the screen control authority, the second system acquiring the screen control authority from the first system. 3.The method of claim 2, wherein the case that the event triggered by the application is listened to, and the event is the application self-starting event, and the first system has the screen control authority, comprises: in a case that the event triggered by the application is listened to, and the event is the application self-starting event, and the application self-starting event indicates foreground running of the application, and the first system has the screen control authority, the second system acquiring the screen control authority from the first system. 4.The method of claim 1, further comprising: in a case that the event triggered by the application is listened to, and the event is the application self-starting event, and the application self-starting event indicates background running of the application, and the first system has the screen control authority, the second system not acquiring the screen control authority from the first system. 5.The method of claim 1, wherein the case that the event triggered by the application is listened to, and the event meets the system switching condition, and the first system has the screen control authority, comprises: in a case that the event triggered by the application is listened to, and application information of the application does not conform to an application information blacklist, and the first system has the screen control authority, the second system acquiring the screen control authority from the first system.
2. The method of claim 1, wherein, 6.The method of claim 4, wherein, in a case that the event triggered by the application is the screen-on event, the application information of the application comprises one or more of an application package name, an application class name, and application screen-on information; wherein the application screen-on information indicates triggering condition information contained by the application when triggering the screen-on event. 3. The method of claim 2, wherein, 4. The method of claim 1, wherein, In a case where the application triggered event is an application self-starting event, the application information of the application comprises one or more of an application package name, an application class name, an application self-starting number, and an application self-starting time point; The application information blacklist is a list of application information that does not support system switching, and comprises one or more of an application package name blacklist, an application class name blacklist, application screen-on information rules, a first application self-starting number threshold, and an application self-starting time period.
6. The method of claim 5, wherein, The case where the application information of the application meets the application information blacklist comprises one or more of the following: The application package name of the application belongs to the application package name blacklist; The application class name of the application belongs to the application class name blacklist; The application screen-on information of the application does not meet the application screen-on information rules; The application self-starting number of the application exceeds the first application self-starting number threshold; The application self-starting time point of the application belongs to the application self-starting time period.
7. The method of claim 5, wherein, The method further comprises: According to the application usage data and the application self-starting data of each application in the second system, the first system or the second system dynamically updates the application information blacklist.
8. The method of claim 7, wherein, According to the application usage data and the application self-starting data of each application in the second system, the first system or the second system dynamically updates the application information blacklist, comprising: In a case where the application self-starting number of an application in the second system reaches a second application self-starting number threshold, and the application usage frequency of the application is lower than an application usage frequency threshold, the first system or the second system adds the application package name of the application to the application package name blacklist; In a case where the application self-starting number of an application in the second system does not reach the second application self-starting number threshold, and the application usage frequency of the application is higher than the application usage frequency threshold, the first system or the second system removes the application package name of the application from the application package name blacklist.
9. The method of claim 4, wherein, In a case where the application triggered event is an application self-starting event, the application information of the application comprises one or more of an application package name, an application class name, an application self-starting number, and an application self-starting time point; The application information blacklist is a list of application information that does not support system switching, and comprises one or more of an application package name blacklist, an application class name blacklist, application screen-on information rules, a first application self-starting number threshold, and an application self-starting time period. The case where the application information of the application meets the application information blacklist comprises one or more of the following:
10. The method of claim 4, wherein, The application package name of the application belongs to the application package name blacklist; The application class name of the application belongs to the application class name blacklist; The application screen-on information of the application does not meet the application screen-on information rules; The application self-starting number of the application exceeds the first application self-starting number threshold; The application self-starting time point of the application belongs to the application self-starting time period. The method further comprises: According to the application usage data and the application self-starting data of each application in the second system, the first system or the second system dynamically updates the application information blacklist. According to the application usage data and the application self-starting data of each application in the second system, the first system or the second system dynamically updates the application information blacklist, comprising: In a case where the application self-starting number of an application in the second system reaches a second application self-starting number threshold, and the application usage frequency of the application is lower than an application usage frequency threshold, the first system or the second system adds the application package name of the application to the application package name blacklist; In a case where the application self-starting number of an application in the second system does not reach the second application self-starting number threshold, and the application usage frequency of the application is higher than the application usage frequency threshold, the first system or the second system removes the application package name of the application from the application package name blacklist. In a case where the application triggered event is an application self-starting event, the application information of the application comprises one or more of an application package name, an application class name, an application self-starting number, and an application self-starting time point; The application information blacklist is a list of application information that does not support system switching, and comprises one or more of an application package name blacklist, an application class name blacklist, application screen-on information rules, a first application self-starting number threshold, and an application self-starting time period. The case where the application information of the application meets the application information blacklist comprises one or more of the following: The application package name of the application belongs to the application package name blacklist; The application class name of the application belongs to the application class name blacklist; The application screen-on information of the application does not meet the application screen-on information rules; The application self-starting number of the application exceeds the first application self-starting number threshold; The application self-starting time point of the application belongs to the application self-starting time period. In a case where the second system receives an information confirmation message returned by the first system, the information confirmation message indicating that the application information of the application does not conform to the application information blacklist, the second system acquires the screen control right from the first system.
11. The method of claim 1, wherein, In a case where the second system listens to an event triggered by the application, and the event meets a system switching condition, and the first system has a screen control right, the second system sends a screen control right transfer request to the first system. In a case where the second system receives an information confirmation message returned by the first system, the information confirmation message indicating that the application information of the application does not conform to the application information blacklist, the second system acquires the screen control right from the first system. In a case where the second system receives an information confirmation message returned by the first system, the information confirmation message indicating that the application information of the application does not conform to the application information blacklist, the second system acquires the screen control right from the first system.
12. A system switching apparatus, the apparatus being used in an electronic device, the electronic device supporting running of a first system and a second system; The apparatus comprises: a second system module, configured to listen to an event triggered by an application, the application being run by the second system module; The second system module is further configured to acquire a screen control right from a first system module in a case where the second system listens to the event triggered by the application, and the event meets a system switching condition, and the first system module has the screen control right. The second system module is further configured to control a screen to display an application interface of the application in a case where the second system acquires the screen control right.
13. An electronic device, the electronic device comprising a processor and a memory; the memory storing at least one computer instruction, the at least one computer instruction being used to be executed by the processor to implement the system switching method according to any one of claims 1 to 11.
14. A computer readable storage medium, the computer readable storage medium storing at least one computer instruction, the computer instruction being loaded and executed by a processor to implement the system switching method according to any one of claims 1 to 11.
15. A computer program product, the computer program product comprising computer instructions stored in a computer readable storage medium; a processor of an electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the system switching method according to any one of claims 1 to 11.
Citation Information
Patent Citations
System switching method and device, equipment and storage medium
CN114647452A
Application starting method and device, electronic equipment and readable storage medium
CN116483456A
Interface display method and device, equipment and storage medium
CN116521283A
Message display method and device, equipment and storage medium
CN118193093A
System switching method and device, electronic equipment, medium and computer program product
CN119127779A