Dual-system control method, electronic device and computer-readable storage medium
By using daemons to transmit instructions in multi-system terminals and controlling the application layer and framework layer of dual-systems, the challenges of multi-system terminals in reducing power consumption and fast startup are solved, flexible control and rapid recovery are achieved, and user experience and system performance are improved.
Patent Information
- Application Number
- PCT/CN2024/103083
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-01
- Filing Date
- 2024-07-02
- Publication Date
- 2025-03-06
AI Technical Summary
In multi-system terminals, how to reduce power consumption without affecting the user experience, especially when the background system needs to quickly switch to the foreground to run, it is difficult for the prior art to achieve rapid startup and reduce power consumption.
The first daemon of the first system and the second daemon of the second system are transmitted through instruction, and the assembly in the second application layer of the second system and the second system framework layer is controlled for control, so as to realize flexible control of the dual system and quickly restore the program state when needed.
Improves the control flexibility of dual systems and improves system performance. Users can control dual systems on demand to reduce device power consumption and do not affect user experience when system switches.
Smart Images

Figure CN2024103083_06032025_PF_FP_ABST
Abstract
Description
Dual system control method, electronic device and computer readable storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 202311128259.X filed on September 1, 2023, the contents of which are incorporated herein by reference in their entirety. Technical Field
[0003] The present disclosure relates to the field of system control technology, and in particular to a dual-system control method, an electronic device, and a computer-readable storage medium. Background Art
[0004] With the development of terminal technology, multiple systems can be set up on a terminal, so that users can use different systems in different application scenarios. When the user needs a system, the system is switched to the foreground and the unnecessary system is switched to the background accordingly.
[0005] Public content
[0006] In a first aspect, an embodiment of the present disclosure provides a dual-system control method, which is applied to an electronic device including a first system and a second system, including: when a preset control in a first application layer of the first system is triggered, controlling the first application layer to send a preset instruction to a first daemon process of the first system; controlling the first daemon process to send the preset instruction to a second daemon process of the second system; and controlling at least one of the program sets in the second application layer and the second system framework layer of the second system through the second daemon process.
[0007] In a second aspect, an embodiment of the present disclosure provides an electronic device, including: a first system, a second system, and a processor; the processor is configured to implement the dual-system control method based on the first system and the second system.
[0008] In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor so that the processor implements the dual-system control method. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In the accompanying drawings of the embodiments of the present disclosure:
[0010] FIG1 is a schematic flow chart of a dual-system control method according to an embodiment of the present disclosure;
[0011] FIG2 is a schematic diagram of a dual-system structure provided by an embodiment of the present disclosure;
[0012] FIG3 is a schematic diagram of a dual-system control method in a first mode in a non-foreground / background system switching scenario provided by an embodiment of the present disclosure;
[0013] FIG4 is a schematic diagram of a dual-system control method in a second mode in a non-foreground / background system switching scenario provided by an embodiment of the present disclosure;
[0014] FIG5 is a schematic diagram of a dual-system control method in a front-end and back-end system switching scenario provided by an embodiment of the present disclosure;
[0015] FIG6 is a schematic diagram of a default normal mode dual-system control method in the third mode in a front-end and back-end system switching scenario provided by an embodiment of the present disclosure;
[0016] FIG7 is a schematic diagram of a dual-system control method in a first mode in a front-end and back-end system switching scenario provided by an embodiment of the present disclosure;
[0017] FIG8 is a schematic diagram of a dual-system control method in a first mode in a front-end and back-end system switching scenario provided by an embodiment of the present disclosure;
[0018] FIG9 is a schematic diagram of a default enhanced mode dual-system control method in the third mode in a front-end and back-end system switching scenario provided by an embodiment of the present disclosure;
[0019] FIG10 is a schematic diagram of a dual-system control method in a second mode in a front-end and back-end system switching scenario provided by an embodiment of the present disclosure;
[0020] FIG11 is a schematic diagram of a dual-system control method in a second mode in a front-end and back-end system switching scenario provided by an embodiment of the present disclosure;
[0021] FIG12 is a schematic block diagram of an electronic device according to an embodiment of the present disclosure;
[0022] FIG13 is a block diagram showing the composition of a computer-readable storage medium according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] To enable those skilled in the art to better understand the technical solutions of the present disclosure, the dual-system control method, electronic device, and computer-readable storage medium provided by the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0024] The present disclosure will be described more fully below with reference to the accompanying drawings, but the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth below. These embodiments are provided to make the present disclosure more thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.
[0025] The accompanying drawings of the embodiments of the present disclosure are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the detailed embodiments, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. By describing the detailed embodiments with reference to the accompanying drawings, the above and other features and advantages will become more apparent to those skilled in the art.
[0026] The present disclosure may be described with reference to plan views and / or cross-sectional views by way of ideal schematic views of the present disclosure. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.
[0027] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0028] The terms used in this disclosure are only used to describe specific embodiments and do not limit this disclosure. As used in this disclosure, the term "and / or" includes any and all combinations of one or more related enumerated items. As used in this disclosure, the singular forms "a" and "the" also include plural forms, unless the context clearly indicates otherwise. As used in this disclosure, the terms "comprising" and "made of" specify the presence of specific features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof.
[0029] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meanings as those commonly understood by those skilled in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined in this disclosure.
[0030] The present disclosure is not limited to the embodiments shown in the drawings, but includes modifications of the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the drawings have schematic properties, and the shapes of the regions shown in the drawings illustrate the specific shapes of the regions of the elements, but are not restrictive.
[0031] With the advancement of terminal technology, multiple systems can be configured on a single terminal, allowing users to use different systems in different application scenarios. When a user needs a system, it switches to the foreground, while the unneeded system switches to the background. For example, a terminal can have two systems, such as a work system and a life system. Alternatively, a terminal can have three or four systems, such as work, life, entertainment, and social systems. The following uses a dual system as an example. For a dual system, if the terminal is currently working, the work system can be switched to the work system, with the work system in the foreground and the life system in the background. Furthermore, users are increasingly demanding battery life on their terminals. Therefore, while multi-system terminals bring convenience to both work and life, they also consume more power. Minimizing the power consumption of multi-system terminals is a challenge that needs to be addressed.
[0032] Although there are solutions in the related art to reduce power consumption by stopping the background system, such solutions essentially turn the dual system into a single system mode and completely stop the background system. In this way, when the user needs to switch the background system to the foreground again, the background system may not be started quickly. The user can feel that the system has restarted, resulting in an extremely poor user experience.
[0033] The disclosed embodiment transmits instructions according to the first daemon process of the first system and the second daemon process of the second system, and controls at least one of the program sets in the second application layer of the second system and the second system framework layer when the corresponding control is triggered, which greatly improves the control flexibility of the dual systems, is extremely beneficial to improving system performance, and provides a technical basis for users to control the dual systems on demand (such as reducing device power consumption), and only controls at least one of the program sets in the second application layer and the second system framework layer, so that the status of these program sets can be quickly restored after being changed. For example, these program sets can be quickly started again after being stopped, and users are completely unaware of it when using the terminal, thereby improving the user experience.
[0034] The dual-system control method of the disclosed embodiments can be executed by any electronic device requiring system switching, such as a terminal device or a server. The terminal device may include, but is not limited to, an in-vehicle device, a user equipment (UE), a mobile device, a computing device, a wearable device, and the like. For example, it may include, but is not limited to, a cellular phone, a cordless phone, a personal digital assistant (PDA), a portable computer, and the like. The dual-system control method can be implemented by a processor invoking computer-readable program instructions stored in a memory, or it can be implemented by a server.
[0035] The technical solutions of the embodiments of the present disclosure are introduced in detail below.
[0036] In a first aspect, an embodiment of the present disclosure provides a dual-system control method, which is applied to a terminal including a first system and a second system, and is also applicable to multi-system control. As shown in FIG1 , the method may include steps S11 to S13 .
[0037] S11 . When a preset control in a first application layer of the first system is triggered, control the first application layer to send a preset instruction to a first daemon process of the first system.
[0038] S12. Control the first daemon process to send a preset instruction to the second daemon process of the second system.
[0039] S13. Control at least one of the program sets in the second application layer and the second system framework layer of the second system through the second daemon process.
[0040] In the embodiment of the present disclosure, when the terminal starts to implement the dual-system control method provided by the present disclosure, it can be assumed that the first system is running in the foreground of the terminal and the second system is running in the background of the terminal.
[0041] In some embodiments of the present disclosure, the dual system may include but is not limited to: a first system A and a second system B; each subsystem (i.e., the first system A and the second system B) includes but is not limited to: an application layer, a system framework layer, a hardware abstraction layer and a daemon process.
[0042] The application layer is the layer where applications run. For example, applications such as telephones, WeChat, and alarm clocks run in the application layer.
[0043] System framework layer: provides access interfaces for the application layer and runs some system services of the subsystem.
[0044] Hardware abstraction layer: It is accessed by the system framework layer and can access the kernel of the main system (such as hardware drivers) to achieve the purpose of accessing hardware.
[0045] Daemon process: A process that runs continuously in the corresponding subsystem and will not terminate due to the cessation of the application layer, framework layer, or hardware abstraction layer.
[0046] In some embodiments of the present disclosure, as shown in Figure 2, the first system A may include but is not limited to: a first application layer A1, a first system framework layer A2, a first hardware abstraction layer A3 and a first daemon process A4; the second system B may include but is not limited to: a second application layer B1, a second system framework layer B2, a second hardware abstraction layer B3 and a second daemon process B4.
[0047] In some embodiments of the present disclosure, it may be assumed that in an initial state, the first system A is running in the foreground and the second system B is running in the background.
[0048] The dual-system control method provided in the embodiment of the present disclosure can be applied to a dual-system terminal implemented based on container virtualization technology, that is, two subsystems are started under the main system of the terminal, such as the first system A and the second system B. The dual-system control method provided in the embodiment of the present disclosure can be used in the main system.
[0049] In some embodiments of the present disclosure, the main system primarily runs the system kernel, controls the first system A and the second system B, and provides access service interfaces for the first system A and the second system B. The first system A and the second system B each serve as a subsystem, each configured to run a complete system, such as a living system or a work system.
[0050] The dual-system control method provided in the embodiment of the present disclosure can be applied to the normal operation scenario of the first system A and the second system B (i.e., non-foreground and background system switching scenario), and can also be applied to the scenario where the first system A and the second system B perform foreground and background switching. The two scenarios are introduced below.
[0051] First, the solution for non-front-end and back-end system switching scenarios is explained in detail.
[0052] In some embodiments of the present disclosure, one or more preset controls may be set in the first application layer A1 and the second application layer B1, and the preset controls may include but are not limited to: multiple mode controls for at least one function, and the function may include but is not limited to: energy-saving function; the mode control may include one or more, for example, a first mode control, a second mode control, a third mode control, etc., and multiple mode controls can be used to control different functional modes.
[0053] In some embodiments of the present disclosure, for example, when the function is an energy-saving function, the multiple mode controls can be multiple energy-saving mode controls, the first mode control can be a first energy-saving mode control, the second mode control can be a second energy-saving mode control, and the third mode control can be a third energy-saving mode control. The first energy-saving mode control can be used to control the terminal to implement a normal energy-saving mode, the second energy-saving mode control can control the terminal to implement an enhanced energy-saving mode, and the second energy-saving mode control can be a default energy-saving mode control (which can default to a normal skill mode or an enhanced energy-saving mode). In some embodiments, a fourth energy-saving mode control, a fifth energy-saving mode control, ... can also be included. There is no limit on the number of energy-saving mode controls. The larger the number, the finer the division of energy-saving modes.
[0054] In some embodiments of the present disclosure, as shown in Figure 3, when the preset control includes: a first mode control; and the preset instruction includes a first stop instruction, controlling at least one of the program sets in the second application layer B1 and the second system framework layer B2 through the second daemon process B4 includes: controlling at least one of the program sets in the second application layer B1 and the second system framework layer B2 to stop running according to the first stop instruction through the second daemon process B4.
[0055] In some embodiments of the present disclosure, when a user needs to control the terminal to enter normal energy-saving mode, the first mode control (such as the first energy-saving mode control) on the first application layer A1 in the first system A that is currently running in the foreground can be triggered. As the first mode control is triggered, the first application layer A1 can send a first stop instruction so that the second daemon process B4 of the second system B that is currently running in the background controls at least one of the program sets in the second application layer B1 of the second system B and the second system framework layer B2 of the second system B to stop running according to the first stop instruction.
[0056] In some embodiments of the present disclosure, as shown in Figure 4, the second system B also includes a second hardware abstraction layer; the preset control includes: a second mode control; when the preset instruction includes a second stop instruction, controlling at least one of the program sets in the second application layer B1 and the second system framework layer B2 through the second daemon process B4 may include: controlling at least one of the program sets in the second application layer B1 and the second system framework layer B2 to stop running according to the second stop instruction through the second daemon process B4; the dual-system control method may further include: controlling at least one process in the second hardware abstraction layer B3 to stop running according to the second stop instruction through the second daemon process B4.
[0057] In some embodiments of the present disclosure, when the second mode control is triggered, for example, the second energy-saving mode control is triggered, it indicates that the user selects the enhanced mode (for example, enhanced energy-saving mode). At this time, on the basis of controlling at least one of the program sets in the second application layer B1 and the second system framework layer B2 to stop running, at least one process in the second hardware abstraction layer B3 can be further controlled to stop running.
[0058] In some embodiments of the present disclosure, a first system A running in the foreground and a second system B running in the background can both be bound to a socket service. The second system B can serve as the socket server, and the first system A establishes socket communication based on the socket service provided by the second system B. When the first daemon process A4 receives a preset instruction, it sends the preset instruction to the second daemon process B4.
[0059] In some embodiments of the present disclosure, the preset control may further include a first restart control, and the preset instruction may further include: a first restart instruction; after controlling at least one of the program sets in the second application layer B1 and the second system framework layer B2 to stop running, the dual-system control method may further include: when it is detected that the first restart control of the first application layer A1 is triggered, sending a first restart instruction to the first daemon process A4 through the first application layer A1; sending the first restart instruction to the second daemon process B4 through the first daemon process A4; and restarting at least one of the program sets in the second application layer B1 and the second system framework layer B2 according to the first restart instruction through the second daemon process B4.
[0060] In some embodiments of the present disclosure, the preset control may further include a second restart control, and the preset instruction may further include: a second restart instruction; after controlling at least one process in the second hardware abstraction layer B3 to stop running, the dual-system control method may further include: when it is detected that the second restart control of the first application layer A1 is triggered, sending a second restart instruction to the first daemon process A4 through the first application layer A1; sending the second restart instruction to the second daemon process B4 through the first daemon process A4; and restarting the process in the second hardware abstraction layer B3 according to the second restart instruction through the second daemon process B4.
[0061] In some embodiments of the present disclosure, a first restart control and a second restart control can be set in the application layer of each system in the terminal. Regardless of which system is in the foreground, the first restart control of the application layer of that system can be used to restart at least one of the application layer and system framework layer programs of the system running in the background. Furthermore, the second restart control of the application layer of that system can be used to restart the process in the hardware abstraction layer of the system running in the background. Through these embodiments, programs in the system running in the background can be quickly restarted, eliminating the restart feeling caused by related solutions and significantly improving the user experience.
[0062] In some embodiments of the present disclosure, a third restart control may be further set in the application layer of each system in the terminal, and the preset instruction may further include: a third restart instruction; after controlling at least one of the program collections in the application layer and the system framework layer of the system running in the background to stop running, and controlling at least one process in the hardware abstraction layer of the system running in the background to stop running, the dual-system control method may further include: when detecting that the third restart control in the application layer of the system running in the foreground is triggered, sending a third restart instruction to the daemon process of the system running in the foreground through the application layer of the system running in the foreground; sending the third restart instruction to the daemon process of the system running in the background through the daemon process of the system running in the foreground; and restarting at least one of the program collections in the application layer and the system framework layer of the system running in the background, and the process in the hardware abstraction layer of the system running in the background according to the third restart instruction through the daemon process of the system running in the background.
[0063] In the embodiment of the present disclosure, the third restart control of the system application layer can be used to restart at least one of the program collections of the application layer and the system framework layer of the system running in the background, as well as the process in the hardware abstraction layer, with one click, thereby further improving the user experience.
[0064] The following describes in detail the solution for the front-end and back-end system switching scenario.
[0065] In some embodiments of the present disclosure, the preset control may include: a system switching control; the preset instruction may include a startup instruction; after controlling the first daemon process A4 to send the preset instruction to the second daemon process B4, the dual-system control method may further include: through the second daemon process B4, controlling at least one of the program sets in the second application layer B1 and the second system framework layer B2 to start and run according to the startup instruction; switching the started second system B and the first system A between the foreground and the background, so that the first system A is in the background and the second system B is in the foreground.
[0066] The preset controls include: system switching controls; the preset instructions include start instructions; and the dual-system control method in the foreground and background switching scenario is introduced in detail below. As shown in FIG5 , the dual-system control method may include steps S21 to S25 .
[0067] S21 . When the first system A is running in the foreground and the second system B is running in the background, and a system switching control preset in the first application layer A1 is triggered, control the first application layer A1 to send a start instruction to the first daemon process A4 .
[0068] S22 . Control the first daemon process A4 to send a startup instruction to the second daemon process B4 through the communication connection established between the first daemon process A4 and the second daemon process B4 .
[0069] S23 , controlling at least one of the program sets in the second application layer B1 and the second system framework layer B2 to start and run according to the startup instruction through the second daemon process B4 .
[0070] S24: Switch the started second system B and the first system A between the foreground and the background.
[0071] S25 . Control at least one of the program sets in the first application layer A1 and the first system framework layer A2 to stop running through the first daemon process A4 .
[0072] In some embodiments of the present disclosure, a system switching control may be set in the application layer of each subsystem, and when a user wants to switch systems, this can be achieved by triggering the system switching control.
[0073] In some embodiments of the present disclosure, the system switching control may be implemented by software or hardware, and the implementation method of the system switching control is not limited herein.
[0074] In some embodiments of the present disclosure, there are multiple systems in the terminal, for example, three or more, one system is running in the foreground, and at least two systems are running in the background. In different application scenarios, in order to switch to the corresponding system, it is necessary to select the target system from multiple background systems. This can be achieved by setting corresponding multiple system switching controls. For example, each system corresponds to a system switching control. When it is necessary to switch to a certain system, the system switching control is triggered, so that the corresponding system can be switched from the background to the foreground.
[0075] In the present disclosure, dual systems are used as an example for description, for example, a first system A currently running in the foreground and a second system B currently running in the background.
[0076] In some embodiments of the present disclosure, when a system switching control preset in the first application layer A1 is triggered, it instructs the second system B running in the background to switch to the foreground. At this time, the first application layer A1 can be controlled to send a startup instruction to the first daemon process A4, and the first daemon process A4 sends the startup instruction to the second daemon process B4.
[0077] In some embodiments of the present disclosure, before the first daemon process A4 sends the start instruction to the second daemon process B4, a communication connection between the first daemon process A4 and the second daemon process B4 needs to be established in advance.
[0078] In some embodiments of the present disclosure, the first system A (currently running in the foreground) and the second system B (currently running in the background) can both be bound to socket services, the second system B can provide socket services as a socket server, and the first system A establishes socket communication based on the socket service provided by the second system B.
[0079] In some embodiments of the present disclosure, after receiving the startup instruction, the second daemon process B4 can control at least one of the program sets in the second application layer B1 and the second system framework layer B2 to start and run according to the startup instruction. After the second system B currently running in the background is started, the second system B and the first system A can be switched between the foreground and the background, so that the first system A switches to the background and the second system B switches to the foreground.
[0080] In some embodiments of the present disclosure, after the first system A switches to the background, at least one of the program sets in the first application layer A1 and the first system framework layer A2 can be controlled by the first daemon process A4. For example, to reduce power consumption, at least one of the program sets in the first application layer A1 and the first system framework layer A2 can be controlled by the first daemon process A4 to stop running. By stopping only at least one of the program sets in the first application layer A1 and the first system framework layer A2, these program sets can be quickly started when they are started again, and the user is completely unaware of it, thereby improving the user experience.
[0081] In some embodiments of the present disclosure, controlling at least one of the program sets in the first application layer A1 and the first system framework layer A2 through the first daemon process A4 may include: receiving a stop instruction through the first daemon process A4, and controlling at least one of the program sets in the first application layer A1 and the first system framework layer A2 to stop running according to the stop instruction.
[0082] In some embodiments of the present disclosure, the first daemon process A4 controls at least one of the programs in the first application layer A1 and the first system framework layer A2 to stop running. This can be done by the user actively stopping the program, or by the terminal automatically stopping the program. Different modes can be set in the terminal to instruct the terminal to stop running at least one of the programs in the application layer and the system framework layer of the system currently running in the background (such as the first system A) according to the user's wishes or according to the default settings. Different stop instructions can be corresponding to different modes. The following details different ways to send the stop instruction.
[0083] In some embodiments of the present disclosure, the stop instruction may include a third stop instruction. Before receiving the stop instruction through the first daemon process, the dual-system control method may further include: monitoring the foreground and background switching status of the first system A through the first system framework layer A2; after the first system A switches to background operation, sending the third stop instruction to the first daemon process A4 through the first system framework layer A2.
[0084] It is known that the above-mentioned different modes may include: a first mode, a second mode, a third mode, etc., for example, a first energy-saving mode, a second energy-saving mode, and a third energy-saving mode. The first energy-saving mode and the second energy-saving mode may be energy-saving modes executed according to the user's subjective wishes. The first energy-saving mode may be a normal energy-saving mode, and the second energy-saving mode may be an enhanced energy-saving mode; the third energy-saving mode may be a default energy-saving mode, and the default energy-saving mode may include a default normal mode and a default enhanced mode. The third energy-saving mode can be achieved by pre-setting the terminal, for example, pre-setting it to the default normal mode, or pre-setting it to the default enhanced mode.
[0085] In some embodiments of the present disclosure, the third mode (for example, the third energy-saving mode) may be included in the startup instruction sent when the system switching control is triggered, or the execution of the third mode may be indicated by the startup instruction, that is, as long as the user performs the system switching operation, the terminal will execute the third mode by default (unless the user chooses to execute the first mode or the second mode).
[0086] In some embodiments of the present disclosure, for example, when the terminal is set to the default normal mode, the first system framework layer A2 can send a third stop instruction to the first daemon process A4, so that the first daemon process A4 controls at least one of the program sets in the first application layer A1 and the first system framework layer A2 to stop running according to the third stop instruction, thereby achieving normal energy saving, as shown in Figure 6.
[0087] In some embodiments of the present disclosure, before this, in order to ensure that at least one of the programs in the first application layer A1 and the first system framework layer A2 is stopped running only after the first system A switches to the background, the first system framework layer A2 can monitor the foreground and background switching status of the first system A, and after the first system switches to the background, the first system framework layer A2 sends a third stop instruction to the first daemon process A4.
[0088] In some embodiments of the present disclosure, the preset control may further include: a first mode control; the stop instruction may include a fourth stop instruction, and the preset instruction also includes the fourth stop instruction; before switching the started second system B and the first system A between the foreground and background, and before receiving the stop instruction through the first daemon process A4, the dual-system control method may further include: when the first mode control in the first application layer A1 is triggered, sending the fourth stop instruction to the first daemon process A4 through the first application layer A1.
[0089] In some embodiments of the present disclosure, the preset control may further include: a first mode control; the stop instruction may include a fifth stop instruction, and the preset instruction also includes a fifth stop instruction; after the started second system B and the first system A are switched between the foreground and background, and before the stop instruction is received through the first daemon process A4, the dual-system control method may further include: when the first mode control preset in the second application layer B1 is triggered, sending the fifth stop instruction to the second daemon process B4 through the second application layer B1; sending the fifth stop instruction to the first daemon process A4 through the second daemon process B4.
[0090] In some embodiments of the present disclosure, the first mode is a mode executed according to the subjective will of the user. In order to enable the user to execute the corresponding will, a first mode control can be set in the application layer in both the first system A and the second system B. When it is detected that the first mode control is triggered, a stop instruction (for example, the fourth stop instruction or the fifth stop instruction) can be sent to the daemon process through the application layer based on the user's will, so that the first daemon process A4 controls at least one of the program sets in the first application layer A1 and the first system framework layer A2 to stop running according to the stop instruction.
[0091] In some embodiments of the present disclosure, as shown in Figure 7, the user can operate the first mode control set on the first application layer A1 before performing the system switching operation. When it is detected that the first mode control in the first application layer A1 is triggered, the fourth stop instruction is directly sent to the first daemon process A4 through the first application layer A1, so that after the first system A and the second system B are switched between the foreground and the background, at least one of the program sets in the first application layer A1 and the first system framework layer A2 is directly controlled by the first daemon process A4 according to the fourth stop instruction to stop running.
[0092] In some embodiments of the present disclosure, as shown in Figure 8, the user can operate the first mode control set on the second application layer B1 after performing the system switching operation. When it is detected that the first mode control in the second application layer B1 is triggered, the fifth stop instruction is directly sent to the second daemon process B4 through the second application layer B1, and the second daemon process B4 sends the fifth stop instruction to the first daemon process A4, and the first daemon process A4 controls at least one of the program sets in the first application layer A1 and the first system framework layer A2 to stop running according to the fifth stop instruction.
[0093] In some embodiments of the present disclosure, when the first daemon process A4 receives a stop instruction, it executes a stop instruction in a shell instruction (a command language) that stops at least one of the programs in the first application layer A1 and the first system framework layer A2 from running. At this time, all processes corresponding to the first application layer A1 and the first system framework layer A2 of the first system A running in the background stop running, reducing the workload of the CPU (central processing unit), and increasing the remaining system memory in the terminal, greatly reducing the power consumption of the device and improving the system performance of the device. Since it is not actually stopping the first system A running in the background, but stopping all processes at certain running levels in the first system A, the first system A can be quickly restarted.
[0094] In some embodiments of the present disclosure, as the system switching control corresponding to the first system A (there may be multiple systems in the background, so in order to clearly determine which system to switch between the system running in the foreground and the multiple systems running in the background when switching the systems, each system can be corresponded to a system switching control, so that the user can accurately select the system to switch to) is re-triggered, the first daemon process A4 of the first system A will receive a startup instruction sent by the second daemon process B4 of the second system B currently running in the foreground. At this time, the first daemon process A4 of the first system A can execute the start instruction in the shell instruction for starting the system, and all processes corresponding to the first application layer A1 and the first system framework layer A2 of the first system A will restart and run, ensuring the normal operation of the first system A. After the restart, the first system A can be switched to the foreground again.
[0095] In some embodiments of the present disclosure, after the started second system B and the first system A are switched between the foreground and the background (at this time, the first system A is running in the background and the second system B is running in the foreground), the dual-system control method may further include: receiving a stop instruction through the first daemon process A4, and controlling at least one process in the first hardware abstraction layer A3 to stop running according to the stop instruction.
[0096] This implementation can be executed directly in the second mode together with the solution of stopping at least one of the programs in the first application layer A1 and the first system framework layer A2 after the foreground and background switching is completed, or it can be executed separately in the fourth energy-saving mode. Since the solution when executed separately in the fourth energy-saving mode is similar to the solution when executed separately in the first mode to stop at least one of the programs in the first application layer A1 and the first system framework layer A2 (the difference is that the user needs to trigger the preset fourth energy-saving mode control, and send different stop instructions, and only control at least one process in the first hardware abstraction layer A3 to stop running according to the stop instruction), they will not be described one by one here. The solution in the second mode is introduced in detail below.
[0097] In some embodiments of the present disclosure, in order to distinguish different modes (such as different energy-saving modes) and make the terminal's working mode division more refined, an enhanced mode (such as an enhanced energy-saving mode) can be set, such as the aforementioned second mode, or it can be set to the enhanced mode by default. For example, in the aforementioned third mode, if the default mode is set to the default enhanced mode, then after the system switching control is triggered, the default enhanced mode in the third mode can be executed, that is, at least one of the program sets in the first application layer A1 and the first system framework layer A2 can be automatically stopped according to the stop instruction, and at least one process in the first hardware abstraction layer A3 can be stopped.
[0098] In some embodiments of the present disclosure, the default enhanced mode may also be monitored by the first system framework layer A2 for switching status, and a stop instruction may be sent after monitoring that the system switching is completed.
[0099] In some embodiments of the present disclosure, the stop instruction may include a sixth stop instruction. Before receiving the stop instruction through the first daemon process A4, the dual-system control method may further include: monitoring the foreground and background switching status of the first system through the first system framework layer A2; after the first system A switches to background operation, sending the sixth stop instruction to the first daemon process A4 through the first system framework layer A2.
[0100] In some embodiments of the present disclosure, when the terminal is set to the default enhanced mode, the first system framework layer A2 can send a sixth stop instruction to the first daemon process A4, so that the first daemon process A4 controls at least one of the program sets in the first application layer A1 and the first system framework layer A2 to stop running according to the sixth stop instruction, and controls at least one process in the first hardware abstraction layer A3 to stop running, as shown in Figure 9.
[0101] In some embodiments of the present disclosure, the second mode can be an enhanced energy-saving mode executed according to the user's subjective wishes, that is, the second mode can be started by the user when the user needs it. Therefore, after the user starts the second mode, at least one process in the first hardware abstraction layer A3 can be controlled to stop running through the first daemon process A4.
[0102] In some embodiments of the present disclosure, the preset control may further include: a second mode control; the stop instruction may include a seventh stop instruction, and the preset instruction may further include a seventh stop instruction; before switching the started second system B and the first system A between the foreground and the background, and before receiving the stop instruction through the first daemon process A4 (at this time the first system A is running in the foreground and the second system B is running in the background), the dual-system control method may further include: when the second mode control in the first application layer A1 is triggered, sending the seventh stop instruction to the first daemon process A4 through the first application layer A1.
[0103] In some embodiments of the present disclosure, for example, a second mode control can be set on at least one of the first application layer A1 of the first system A and the second application layer B1 of the second system B. As shown in Figure 10, before the first system A and the second system B perform foreground and background switching, when it is detected that the second mode control on the first application layer A1 is triggered, a seventh stop instruction can be sent to the first daemon process A4 through the first application layer A1. The first daemon process A4 controls at least one of the program sets in the first application layer A1 and the first system framework layer A2 to stop running according to the seventh stop instruction, and controls at least one process in the first hardware abstraction layer A3 to stop running, so as to control at least one hardware to stop working, for example, controlling the camera to stop working, controlling the audio to stop working, etc.
[0104] In some embodiments of the present disclosure, the preset control may further include: a second mode control; the stop instruction includes an eighth stop instruction, and the preset instruction also includes an eighth stop instruction; after the started second system B and the first system A are switched between the foreground and the background (at this time the first system A is running in the background and the second system B is running in the foreground), and before the stop instruction is received through the first daemon process, the dual-system control method may further include: when the second mode control in the second application layer B1 is triggered, sending the eighth stop instruction to the second daemon process B4 through the second application layer B1; sending the eighth stop instruction to the first daemon process A4 through the second daemon process B4.
[0105] In some embodiments of the present disclosure, for example, a second mode control can be set on at least one of the first application layer A1 of the first system A and the second application layer B1 of the second system B. As shown in Figure 11, after the second system B and the first system A switch between the foreground and background, when it is detected that the second mode control on the second application layer B1 is triggered, an eighth stop instruction can be sent to the second daemon process B4 through the second application layer B1, and the second daemon process B4 sends the eighth stop instruction to the first daemon process A4, so that the first daemon process A4 controls at least one of the program sets in the first application layer A1 and the first system framework layer A2 to stop running according to the eighth stop instruction, and controls at least one process in the first hardware abstraction layer A3 to stop running, so as to control at least one hardware to stop working.
[0106] In some embodiments of the present disclosure, controlling at least one process in the first hardware abstraction layer A3 to stop running through the first daemon process A4 may include: polling the hardware control service name within the first hardware abstraction layer A3 through the first daemon process A4; and controlling the hardware control service corresponding to the hardware control service name through the first daemon process A4 to stop running the corresponding hardware.
[0107] In some embodiments of the present disclosure, in order to enhance energy conservation, the first daemon process A4 may poll the hardware control service names within the first hardware abstraction layer A3 in sequence, and stop the corresponding hardware in sequence through the corresponding hardware control services, that is, all the hardware of the hardware abstraction layer may be stopped according to the hardware control service names.
[0108] Through the above implementation, all processes in the application layer, system framework layer, and hardware abstraction layer can be stopped. At this time, all processes in the corresponding layers of the system running in the background are stopped, which greatly reduces the CPU workload, increases the system's remaining memory, reduces device power consumption, and improves the device's system performance.
[0109] In some embodiments of the present disclosure, when the hardware needs to be restarted, the hardware control service is started through the hardware control service name in the hardware abstraction layer, that is, the hardware abstraction layer process is started through the start service name, and the start instruction in the system shell instruction is called to complete the process startup of the system framework layer and the application layer. This ensures that the hardware abstraction layer, application layer, and system framework layer services all operate normally, ensuring the normal operation of the entire system.
[0110] In the dual-system control method provided in the embodiment of the present disclosure, the system running in the background is not actually stopped. Instead, all processes at the corresponding operating level of the system running in the background are stopped. This allows the user to start the background system only when needed, and complete the startup of all processes at the corresponding level of the background system before the system is switched. This allows the background system to start very quickly. After the user switches the system, the user can see the newly switched system in a timely manner without being aware of it. This can not only quickly start the system, but also reduce power consumption, improve device performance, and ensure the normal operation of the entire system.
[0111] An embodiment of the present disclosure provides an electronic device 100, as shown in FIG12 , which may include: a first system A, a second system B, and a processor 101; the processor 101 may be configured to implement the dual-system control method based on the first system A and the second system B.
[0112] In some embodiments of the present disclosure, the first system A includes: a first application layer A1 and a first daemon process A4; the second system B includes: a second application layer B1, a second system framework layer B2 and a second daemon process B4; the processor implements a dual-system control method based on the first system A and the second system B, which may include: when a preset control in the first application layer A1 is triggered, controlling the first application layer A1 to send a preset instruction to the first daemon process A4; controlling the first daemon process A4 to send the preset instruction to the second daemon process B4; and controlling at least one of the program sets in the second application layer B1 and the second system framework layer B2 through the second daemon process B4.
[0113] An embodiment of the present disclosure provides a computer-readable storage medium 200 , as shown in FIG13 , on which a computer program is stored. The computer program is executed by a processor, so that the processor implements the dual-system control method described in the first aspect.
[0114] Those skilled in the art will appreciate that all or some of the steps and functional modules / units in the apparatus disclosed above may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0115] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation.
[0116] Some or all of the physical components may be implemented as software executed by a processor (such as a central processing unit (CPU), a digital signal processor, or a microprocessor), or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or temporary media). As is well known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; compact disc (CD-ROM), digital versatile disc (DVD) or other optical disc storage; magnetic cassettes, tapes, disk storage or other magnetic storage; any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0117] The present disclosure has disclosed example embodiments, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A dual-system control method, applied to an electronic device including a first system and a second system, comprising: When a preset control in a first application layer of the first system is triggered, controlling the first application layer to send a preset instruction to a first daemon process of the first system; Controlling the first daemon process to send the preset instruction to the second daemon process of the second system; At least one of the program sets in the second application layer and the second system framework layer of the second system is controlled by the second daemon process.
2. The dual system control method according to claim 1, wherein: The preset control includes: a first mode control; the preset instruction includes a first stop instruction; The controlling of at least one of the second application layer and the second system framework layer of the second system by the second daemon process comprises: Through the second daemon process, at least one of the program sets in the second application layer and the second system framework layer is controlled to stop running according to the first stop instruction.
3. The dual system control method according to claim 1, wherein: The second system further includes a second hardware abstraction layer; the preset control includes: a second mode control; the preset instruction includes a second stop instruction; The controlling of at least one of the second application layer and the second system framework layer of the second system by the second daemon process comprises: Controlling, by the second daemon process, at least one of the program sets in the second application layer and the second system framework layer to stop running according to the second stop instruction; The method further includes: controlling at least one process in the second hardware abstraction layer to stop running according to the second stop instruction through the second daemon process.
4. The dual system control method according to claim 2 or 3, wherein: The preset control further includes a first restart control, and the preset instruction further includes: a first restart instruction; The method further comprises: After controlling at least one of the programs in the second application layer and the second system framework layer to stop running, upon detecting that the first restart control of the first application layer is When triggered, sending the first restart instruction to the first daemon process through the first application layer; sending the first restart instruction to the second daemon process through the first daemon process; At least one of the program sets in the second application layer and the second system framework layer is restarted according to the first restart instruction through the second daemon process.
5. The dual system control method according to claim 3, wherein: The preset control further includes a second restart control, and the preset instruction further includes: a second restart instruction; The method further comprises: After controlling at least one process in the second hardware abstraction layer to stop running, in the case of detecting that a second restart control of the first application layer is triggered, sending the second restart instruction to the first daemon process through the first application layer; sending the second restart instruction to the second daemon process through the first daemon process; Restart the process in the second hardware abstraction layer according to the second restart instruction through the second daemon process.
6. The dual system control method according to claim 1, wherein: The preset controls include: system switching controls; the preset instructions include start instructions; The controlling of at least one of the programs in the second application layer and the second system framework layer of the second system by the second daemon process comprises: Controlling at least one of the program sets in the second application layer and the second system framework layer to start and run according to the startup instruction through the second daemon process; The method further comprises: Switching the started second system and the first system between the foreground and the background, so that the first system runs in the background and the second system runs in the foreground; At least one of the program sets in the first application layer and the first system framework layer of the first system is controlled to stop running by the first daemon process.
7. The dual system control method according to claim 6, wherein: The controlling at least one of the programs in the first application layer and the first system framework layer of the first system to stop running by the first daemon process comprises: A stop instruction is received through the first daemon process, and at least one of the program sets in the first application layer and the first system framework layer is controlled to stop running according to the stop instruction.
8. The dual system control method according to claim 7, wherein: The stop instruction includes a third stop instruction, and the method further includes: Before receiving the stop instruction through the first daemon process, monitoring the foreground and background switching status of the first system through the first system framework layer; After the first system is switched to background operation, the third stop instruction is sent to the first daemon process through the first system framework layer.
9. The dual system control method according to claim 7, wherein: The preset control further includes: a first mode control; the stop instruction includes a fourth stop instruction, and the preset instruction further includes the fourth stop instruction; The method further comprises: Before switching the started second system to the foreground and background of the first system and before receiving a stop instruction through the first daemon process, when the first mode control in the first application layer is triggered, the fourth stop instruction is sent to the first daemon process through the first application layer.
10. The dual system control method according to claim 7, wherein: The preset control further includes: a first mode control; the stop instruction includes a fifth stop instruction, and the preset instruction further includes the fifth stop instruction; The method further comprises: After the started second system and the first system are switched between the foreground and the background, and before the first daemon process receives a stop instruction, in the case where the first mode control in the second application layer is triggered, sending the fifth stop instruction to the second daemon process through the second application layer; The fifth stop instruction is sent to the first daemon process through the second daemon process.
11. The dual system control method according to claim 7, wherein: The first system also includes: a first hardware abstraction layer; The method further comprises: After the started second system and the first system are switched between the foreground and the background, at least one process in the first hardware abstraction layer is controlled to stop running according to the stop instruction.
12. The dual system control method according to claim 11, wherein: Controlling at least one process in the first hardware abstraction layer to stop running according to the stop instruction comprises: Polling the hardware control service name in the first hardware abstraction layer through the first daemon process; The hardware control service corresponding to the hardware control service name is controlled by the first daemon process to stop running corresponding hardware.
13. The dual system control method according to claim 11, wherein: The stop instruction includes a sixth stop instruction, and the method further includes: Before receiving the stop instruction through the first daemon process, monitoring the foreground and background switching status of the first system through the first system framework layer; After the first system is switched to background operation, the sixth stop instruction is sent to the first daemon process through the first system framework layer.
14. The dual system control method according to claim 11, wherein: The preset control further includes: a second mode control; the stop instruction includes a seventh stop instruction, and the preset instruction further includes the seventh stop instruction; The method further comprises: Before switching the started second system to the foreground and background of the first system and before receiving a stop instruction through the first daemon process, when the second mode control in the first application layer is triggered, the seventh stop instruction is sent to the first daemon process through the first application layer.
15. The dual system control method according to claim 11, wherein: The preset control further includes: a second mode control; the stop instruction includes an eighth stop instruction, and the preset instruction further includes the eighth stop instruction; The method further comprises: After the second system is started and the first system is switched to the foreground and background, and before the first daemon process receives a stop instruction, the second application When the second mode control in the layer is triggered, sending the eighth stop instruction to the second daemon process through the second application layer; The eighth stop instruction is sent to the first daemon process through the second daemon process.
16. An electronic device, comprising: A first system, a second system, and a processor; The processor is configured to implement the dual-system control method according to any one of claims 1 to 15 based on the first system and the second system.
17. The electronic device according to claim 16, wherein: The first system includes: a first application layer and a first daemon process; the second system includes: a second application layer, a second system framework layer and a second daemon process; The processor implements the dual-system control method based on the first system and the second system, including: When a preset control in the first application layer is triggered, controlling the first application layer to send a preset instruction to the first daemon process; Controlling the first daemon process to send the preset instruction to the second daemon process; At least one of the second application layer and the second system framework layer is controlled by the second daemon process.
18. A computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor so that the processor implements the dual-system control method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Inter-process communication method based on Android application layer and basis application communication system
CN103902390A
Double-system directional connection method and device
CN106850554A
Dual-system equipment, application display method thereof and storage medium
CN112817718A
Operating system switching method and device, equipment and storage medium
CN112860322A
Running method of multiple Android operating systems and terminal equipment
CN113176899A