Dual-system control method, electronic equipment and computer readable storage medium

By using daemons to transmit instructions in multi-system terminals, controlling the application layer and framework layer assembly of the second system, the problem of the background system being unable to start quickly in the existing technology is solved, and flexible control and efficient performance of dual systems are achieved, improving user experience.

CN119556994APending Publication Date: 2025-03-04ZTE TERMINAL CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311128259.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-01
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

When the prior art reduces the power consumption of multiple system terminals, the background system is completely stopped, and the user cannot start quickly when switching again, which has extremely poor user experience.

Method used

The instruction transmission is carried out through the first daemon of the first system and the second daemon of the second system, and the assembly in the second application layer and/or the second system framework layer of the second system are controlled to realize flexible control of the dual system.

Benefits of technology

It improves the control flexibility of dual systems, improves system performance, and provides a technical foundation for users to control dual systems on demand. The status of the assembly can be quickly restored, so that users cannot sense the system restart, which improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119556994A_ABST
    Figure CN119556994A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a dual-system control method, electronic equipment and a computer readable storage medium. The method is applied to electronic equipment comprising a first system and a second system, and comprises the following steps: under the condition that 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 a second system; and controlling a second application layer of the second system and / or a program set in a second system framework layer through the second daemon process. According to the embodiment of the invention, the control flexibility is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of system control, and in particular to a dual-system control method, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the development of terminal technology, multiple systems can be set 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. Summary of the invention

[0003] Embodiments of the present disclosure provide a dual-system control method, an electronic device, and a computer-readable storage medium.

[0004] 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, and the method includes:

[0005] 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;

[0006] Controlling the first daemon process to send the preset instruction to the second daemon process of the second system;

[0007] The second daemon process controls the assembly in the second application layer and / or the second system framework layer of the second system.

[0008] In a second aspect, an embodiment of the present disclosure provides an electronic device, including: a first system, a second system, and a processor;

[0009] The processor is configured to implement the dual-system control method based on the first system and the second system.

[0010] 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 implements the dual-system control method when executed by a processor.

[0011] The disclosed embodiment transmits instructions according to the first daemon process of the first system and the second daemon of the second system, and controls the second application layer of the second system and / or the program set in 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 the program sets in the second application layer and / or 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. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In the accompanying drawings of the embodiments of the present disclosure:

[0013] Figure 1 A schematic diagram of a dual-system control method flow chart provided in an embodiment of the present disclosure;

[0014] Figure 2 A schematic diagram of a dual system mechanism provided for an embodiment of the present disclosure;

[0015] Figure 3 A schematic diagram of a dual-system control method of the first mode in a non-foreground and background system switching scenario provided by an embodiment of the present disclosure;

[0016] Figure 4 A schematic diagram of a dual-system control method of the second mode in a non-foreground and background system switching scenario provided by an embodiment of the present disclosure;

[0017] Figure 5 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;

[0018] Figure 6 A schematic diagram of a default common 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] Figure 7 A schematic diagram of a first 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;

[0020] Figure 8 A schematic diagram of a second dual-system control method in the first mode in a front-end and back-end system switching scenario provided by an embodiment of the present disclosure;

[0021] Fig. 9 A schematic diagram of a dual-system control method in a default enhanced mode in a third mode in a front-end and back-end system switching scenario provided by an embodiment of the present disclosure;

[0022] Fig.10A schematic diagram of a first dual-system control method in a second mode in a foreground and background system switching scenario provided by an embodiment of the present disclosure;

[0023] Fig.11 A schematic diagram of a second dual-system control method in a second mode in a foreground and background system switching scenario provided by an embodiment of the present disclosure;

[0024] Fig.12 A schematic block diagram of an electronic device provided in an embodiment of the present disclosure;

[0025] Fig.13 A schematic block diagram of a computer-readable storage medium provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the communication perception data processing method and computer-readable storage medium provided by the embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.

[0027] 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 being limited to the embodiments set forth below. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete, and will enable those skilled in the art to fully understand the scope of the present disclosure.

[0028] 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.

[0029] The present disclosure may be described with reference to plan views and / or cross-sectional views by means of ideal schematic views of the present disclosure. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.

[0030] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0031] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure. The term "and / or" as used in the present disclosure includes any and all combinations of one or more related enumerated items. The singular forms "one" and "the" as used in the present disclosure are also intended to include plural forms, unless the context clearly indicates otherwise. The terms "including", "made of..." as used in the present disclosure specify the presence of the 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.

[0032] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as commonly understood by those of ordinary skill 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 explicitly defined in this disclosure.

[0033] 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 intended to be limiting.

[0034] With the development of terminal technology, multiple systems can be set on a terminal to facilitate users to 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. For example, a terminal can be set up with dual systems, such as a work system and a life system. A terminal can also be set up with three or four systems, such as a work system, a life system, an entertainment system, a social system, etc. The following takes the dual system as an example. For the dual system, if it is currently in a working state, the system in the terminal can be switched to the working system. At this time, the working system is running in the foreground and the life system is running in the background. In addition, for users, the requirements for the battery life of the terminal are getting higher and higher. Therefore, although multi-system terminals bring convenience in work and life, multi-system terminals also bring greater power consumption, because how to minimize the power consumption of multi-system terminals is a problem that needs to be solved.

[0035] Although there are solutions in the current technology to reduce power consumption by stopping the background system, the current solution essentially turns the dual system into a single system mode and completely stops the background system. As a result, when the user needs to switch the background system to the foreground again, the background system cannot be quickly started, and the user can fully perceive that the system has restarted, resulting in an extremely poor user experience.

[0036] The disclosed embodiment transmits instructions according to the first daemon process of the first system and the second daemon of the second system, and controls the second application layer of the second system and / or the program set in 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 the program sets in the second application layer and / or 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.

[0037] The dual-system control method of the embodiment of the present disclosure can be executed by any electronic device that needs to switch systems, such as a terminal device or a server. The terminal device may include but is not limited to: vehicle-mounted equipment, user equipment (UE), mobile equipment, computing equipment, wearable equipment, etc., for example, including but not limited to cellular phones, cordless phones, personal digital assistants (PDA), portable computers, etc. The dual-system control method can be implemented by a processor calling a computer-readable program instruction stored in a memory, or it can be implemented by a server.

[0038] The following is a detailed introduction to the embodiments of the present disclosure.

[0039] 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, such as Figure 1 As shown, the method may include steps S11-S13:

[0040] 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;

[0041] S12, controlling the first daemon process to send a preset instruction to the second daemon process of the second system;

[0042] S13. Control the second application layer and / or the assembly in the second system framework layer of the second system through the second daemon process.

[0043] In the embodiment of the present disclosure, when the terminal starts to implement the solution of the embodiment of 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.

[0044] In the embodiment 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 includes but is not limited to: an application layer, a system framework layer, a hardware abstraction layer and a daemon process.

[0045] The application layer is the level at which applications run. For example, applications such as telephone, WeChat, and alarm clocks run at the application layer.

[0046] System framework layer: provides access interfaces for the application layer and runs some system services of the subsystem.

[0047] 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 access the hardware.

[0048] Daemon process: A process that runs continuously in the corresponding subsystem and will not be terminated due to the cessation of the application layer, framework layer, or hardware abstraction layer.

[0049] In the embodiments of the present disclosure, Figure 2 As shown, 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.

[0050] In the embodiment of the present disclosure, it can 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.

[0051] In the embodiment of the present disclosure, the solution of 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 solution of the embodiment of the present disclosure can be used in the main system.

[0052] In the embodiment of the present disclosure, the main system mainly runs the system kernel, controls the first system A and the second system B, and provides an access service interface for the first system A and the second system B. The first system A and the second system B are respectively used as a subsystem to respectively run a complete system, such as a life system, a work system, etc.

[0053] In the embodiments of the present disclosure, the embodiments of the present disclosure can be applied in 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 in the scenario where the first system A and the second system B perform foreground and background switching. The two scenarios are introduced respectively below.

[0054] First, the solution in the non-foreground and background system switching scenario is explained in detail.

[0055] In an embodiment 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.

[0056] In an embodiment of the present disclosure, for example, when the function is an energy-saving function, the multiple mode controls may be multiple energy-saving mode controls, the first mode control may be a first energy-saving mode control, the second mode control may be a second energy-saving mode control, and the third mode control may be a third energy-saving mode control, wherein the first energy-saving mode control may be used to control the terminal to implement a normal energy-saving mode, the second energy-saving mode control may control the terminal to implement an enhanced energy-saving mode, and the second energy-saving mode control may be a default energy-saving mode control (which may default to a normal skill mode or may default to an enhanced energy-saving mode); in other embodiments, there may also be a fourth energy-saving mode control, a fifth energy-saving mode control, ..., and the number of energy-saving mode controls is not limited here, and the larger the number, the finer the division of energy-saving modes.

[0057] In the embodiments of the present disclosure, Figure 3 As shown, when the preset control includes: a first mode control; and the preset instruction includes a first stop instruction, the second daemon process B4 controls the assembly in the second application layer B1 and / or the second system framework layer B2, including:

[0058] Through the second daemon process B4, the assembly in the second application layer B1 and / or the second system framework layer B2 is controlled to stop running according to the first stop instruction.

[0059] In an embodiment of the present disclosure, when a user needs to control the terminal to enter a normal energy-saving mode, a first mode control (such as a first energy-saving mode control) on a first application layer A1 in the first system 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 the second application layer B1 of the second system B and / or the assembly in the second system framework layer B2 of the second system B to stop running according to the first stop instruction.

[0060] In the embodiments of the present disclosure, Figure 4 As shown, in the case where the second system B also includes a second hardware abstraction layer; the preset control includes: a second mode control; and the preset instruction includes a second stop instruction, the second daemon process B4 controls the assembly in the second application layer B1 and / or the second system framework layer B2, which may include:

[0061] By means of the second daemon process B4, according to the second stop instruction, the assembly in the second application layer B1 and / or the second system framework layer B2 is controlled to stop running;

[0062] The method may further include: controlling at least one process in the second hardware abstraction layer B3 to stop running according to a second stop instruction through the second daemon process B4.

[0063] In an embodiment 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 an enhanced mode (for example, enhanced energy-saving mode). At this time, on the basis of controlling the assembly in the second application layer B1 and / or 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.

[0064] In the embodiment of the present disclosure, the first system A running in the foreground and the second system B running in the background can both bind to the socket service, the second system B can serve as the socket server, and the first system A establishes socket communication according to the socket service provided by the second system B. When the first daemon process A4 receives the preset instruction, it sends the preset instruction to the second daemon process B4.

[0065] In the embodiment 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;

[0066] After controlling the assembly in the second application layer B1 and / or the second system framework layer B2 to stop running, the method may further include:

[0067] When it is detected that the first restart control of the first application layer A1 is triggered, a first restart instruction is sent to the first daemon process A4 through the first application layer A1;

[0068] Sending the first restart instruction to the second daemon process B4 through the first daemon process A4;

[0069] The second daemon process B4 is used to restart the assembly in the second application layer B1 and / or the second system framework layer B2 according to the first restart instruction.

[0070] In the embodiment 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;

[0071] After controlling at least one process in the second hardware abstraction layer B3 to stop running, the method may further include:

[0072] When it is detected that the second restart control of the first application layer A1 is triggered, a second restart instruction is sent to the first daemon process A4 through the first application layer A1;

[0073] Sending the second restart instruction to the second daemon process B4 through the first daemon process A4;

[0074] The second daemon process B4 restarts the process in the second hardware abstraction layer B3 according to the second restart instruction.

[0075] In the disclosed embodiment, the application layer of each system in the terminal can be set with a first restart control and a second restart control. No matter which system is in the foreground, the first restart control of the application layer of the system can be used to restart the application layer and / or system framework layer of the system running in the background, and the second restart control of the application layer of the system can be used to restart the process in the hardware abstraction layer of the system running in the background. Through the above embodiment, the program of the system running in the background can be quickly restarted, eliminating the restart feeling brought to the user by the current solution, and greatly improving the user experience.

[0076] In the embodiment of the present disclosure, a third restart control may also be set in the application layer of each system in the terminal, and the preset instruction may also include: a third restart instruction;

[0077] After the assembly in the application layer and / or the system framework layer of the system running in the background is stopped, and at least one process in the hardware abstraction layer of the system running in the background is stopped, the method may further include:

[0078] When it is detected 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;

[0079] Sending a 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;

[0080] Through the daemon process of the system running in the background, the assemblies in the application layer and / or system framework layer of the system running in the background and the processes in the hardware abstraction layer of the system running in the background are restarted according to the third restart instruction.

[0081] In the disclosed embodiment, the third restart control of the system application layer can be used to restart the application layer and / or system framework layer assemblies of the system running in the background, as well as the processes in the hardware abstraction layer, with one click, thereby further improving the user experience.

[0082] The following is a detailed description of the solution in the front-end and back-end system switching scenario.

[0083] In the embodiment 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 method may further include:

[0084] Through the second daemon process B4, according to the startup instruction, the assembly in the second application layer B1 and / or the second system framework layer B2 is controlled to start running;

[0085] The started second system B and the first system A are switched 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.

[0086] In the embodiment of the present disclosure, the preset control includes: a system switching control; the preset instruction includes a start instruction; and the dual system control method in the foreground and background switching scenario is described in detail below. Figure 5 As shown, the dual system control method may include steps S21-S25:

[0087] S21, when the first system A is running in the foreground, the second system B is running in the background, and the 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;

[0088] S22, controlling the first daemon process A4 to send a start instruction to the second daemon process B4 through the communication connection established between the first daemon process A4 and the second daemon process B4;

[0089] S23, through the second daemon process B4, according to the startup instruction, control the assembly in the second application layer B1 and / or the second system framework layer B2 to start running;

[0090] S24, switching the started second system B and the first system A to the foreground and background;

[0091] S25. Control the first daemon process A4 to stop the execution of the assembly in the first application layer A1 and / or the first system framework layer A2.

[0092] In the embodiment 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, it can be achieved by triggering the system switching control.

[0093] In the disclosed embodiment, the system switching control may be implemented by software or hardware, and the implementation method of the system switching control is not limited herein.

[0094] In an embodiment of the present disclosure, there are multiple systems in the terminal, for example, three or more systems, 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 multiple corresponding 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.

[0095] In the embodiment of the present disclosure, dual systems are taken 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.

[0096] In the embodiment of the present disclosure, when the system switching control preset in the first application layer A1 is triggered, it instructs the second system B in the background to switch to the foreground for operation. 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.

[0097] In the embodiment 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.

[0098] In the embodiment 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 services provided by the second system B.

[0099] In the embodiment of the present disclosure, after receiving the startup instruction, the second daemon process B4 can control the startup and running of the program set in the second application layer B1 and / or the second system framework layer B2 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.

[0100] In the disclosed embodiment, after the first system A switches to the background, the first daemon process A4 can be used to control the assembly in the first application layer and / or the first system framework layer. For example, in order to reduce power consumption, the first daemon process A4 can be used to control the assembly in the first application layer A1 and / or the first system framework layer A2 to stop running. By only stopping the assembly in the first application layer A1 and / or the first system framework layer A2, these assembly can be quickly started when they are started again, and the user is completely unaware of it, thereby improving the user experience.

[0101] In the embodiment of the present disclosure, controlling the assembly in the first application layer A1 and / or the first system framework layer A2 by the first daemon process A4 may include:

[0102] The stop instruction is received through the first daemon process A4, and the program set in the first application layer A1 and / or the first system framework layer A2 is controlled to stop running according to the stop instruction.

[0103] In the disclosed embodiment, the first daemon process A4 controls the first application layer A1 and / or the first system framework layer A2 to stop running. The user may take the initiative to stop the program set, or the terminal may automatically stop the program set. Different modes may be set in the terminal to instruct the terminal to stop running the program set in the application layer and / or the system framework layer of the system (such as the first system A) currently running in the background according to the user's wishes or according to the default settings. Different stop instructions may correspond to different modes. The following describes in detail different sending schemes of the stop instruction.

[0104] In the embodiment of the present disclosure, the stop instruction may include a third stop instruction. Before receiving the stop instruction through the first daemon process, the method may further include:

[0105] Monitor the foreground and background switching status of the first system A through the first system framework layer A2;

[0106] After the first system A switches to the background, a third stop instruction is sent to the first daemon process A4 through the first system framework layer A2.

[0107] In the embodiments of the present disclosure, 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, wherein the first energy-saving mode and the second energy-saving mode may be energy-saving modes executed according to the subjective wishes of the user, 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, which may include a default normal mode and a default enhanced mode, and the third energy-saving mode may 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.

[0108] In an embodiment of the present disclosure, the third mode (for example, the third energy-saving mode) may be included in a startup instruction sent when the system switching control is triggered, or the execution of the third mode may be indicated by a startup instruction, that is, as long as the user performs a 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).

[0109] In the embodiment of the present disclosure, for example, when the terminal is set to the default normal mode, the first system framework layer A2 may send a third stop instruction to the first daemon process A4, so that the first daemon process A4 controls the first application layer A1 and / or the assembly in the first system framework layer A2 to stop running according to the third stop instruction, thereby achieving normal energy saving, such as Figure 6 shown.

[0110] In the embodiment of the present disclosure, before this, in order to ensure that the program assembly in the first application layer A1 and / or 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 third stop instruction is sent to the first daemon process A4 through the first system framework layer A2.

[0111] In the embodiment 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 further includes the fourth stop instruction;

[0112] 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, the method may further include:

[0113] When the first mode control in the first application layer A1 is triggered, a fourth stop instruction is sent to the first daemon process A4 through the first application layer A1.

[0114] In the embodiment 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 further includes a fifth stop instruction;

[0115] After 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, the method may further include:

[0116] When the first mode control preset in the second application layer B1 is triggered, a fifth stop instruction is sent to the second daemon process B4 through the second application layer B1;

[0117] The fifth stop instruction is sent to the first daemon process A4 through the second daemon process B4.

[0118] In the embodiment of the present disclosure, based on the fact that 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, the first mode control can be set in the application layer in the first system A and the second system B. When it is detected that the first mode control is triggered, based on the user's will, a stop instruction (for example, the fourth stop instruction or the fifth stop instruction) can be sent to the daemon process by the application layer, so that the first daemon process A4 controls the assembly in the first application layer A1 and / or the first system framework layer A2 to stop running according to the stop instruction.

[0119] In the embodiments of the present disclosure, Figure 7 As shown, 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, the first daemon process A4 directly controls the assembly in the first application layer A1 and / or the first system framework layer A2 to stop running according to the fourth stop instruction.

[0120] In the embodiments of the present disclosure, Figure 8 As shown, 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 the assembly in the first application layer A1 and / or the first system framework layer A2 to stop running according to the fifth stop instruction.

[0121] In the disclosed embodiment, when the first daemon process A4 receives a stop instruction, it executes a stop instruction in a shell instruction (a command language) to stop the first application layer A1 and / or 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, which reduces the workload of the CPU (central processing unit), and increases the remaining system memory in the terminal, greatly reducing the power consumption of the device and improving the system performance of the device. Since the first system A running in the background is not really stopped, but all processes of certain operating levels of the first system A are stopped, the first system A can be quickly restarted.

[0122] In the embodiment of the present disclosure, as the system switching control corresponding to the first system A (there may be multiple systems in the background. Therefore, 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 be switched), 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 are restarted, ensuring the normal operation of the first system A. After the restart, the first system A can be switched to the foreground again.

[0123] In the embodiment of the present disclosure, after the started second system B and the first system A are switched between the foreground and the background (the first system A is running in the background and the second system B is running in the foreground), the method may further include:

[0124] The stop instruction is received by the first daemon process A4, and at least one process in the first hardware abstraction layer A3 is controlled to stop running according to the stop instruction.

[0125] In the disclosed embodiment, the scheme of this embodiment can be directly executed in the second mode together with the scheme of stopping the assembly of programs in the first application layer A1 and / or 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 scheme when executed separately in the fourth energy-saving mode is similar to the scheme of stopping the assembly of programs in the first application layer A1 and / or the first system framework layer A2 when executed separately in the first mode (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 scheme in the second mode is introduced in detail below.

[0126] In the 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, the assembly in the first application layer A1 and / or the first system framework layer A2 is automatically stopped according to the stop instruction, and at least one process in the first hardware abstraction layer A3 is stopped.

[0127] In the disclosed embodiment, the default enhanced mode can also be monitored by the first system framework layer A2 for switching status, and a stop instruction is sent after monitoring that the system switching is completed.

[0128] In the embodiment of the present disclosure, the stop instruction may include a sixth stop instruction. Before the first daemon process A4 receives the stop instruction, the method may further include:

[0129] Monitor the foreground and background switching status of the first system through the first system framework layer A2;

[0130] After the first system A switches to the background, a sixth stop instruction is sent to the first daemon process A4 through the first system framework layer A2.

[0131] In the embodiment of the present disclosure, when the terminal is set to the default enhanced mode, the first system framework layer A2 may send a sixth stop instruction to the first daemon process A4, so that the first daemon process A4 controls the first application layer A1 and / or the assembly in 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, such as Fig. 9 shown.

[0132] In the embodiment of the present disclosure, the second mode can be an enhanced energy-saving mode executed according to the subjective will of the user, 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.

[0133] In the embodiment 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;

[0134] Before switching the started second system B and the first system A between the foreground and the background, and before receiving a stop instruction through the first daemon process (at this time, the first system A is running in the foreground and the second system B is running in the background), the method may further include:

[0135] When the second mode control in the first application layer A1 is triggered, a seventh stop instruction is sent to the first daemon process A4 through the first application layer A1.

[0136] In the embodiment of the present disclosure, for example, the second mode control may be set on the first application layer A1 of the first system A and / or on the second application layer B1 of the second system B, such as Fig.10As shown, 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, the seventh stop instruction can be sent to the first daemon process A4 through the first application layer A1. The first daemon process A4 controls the assembly in the first application layer A1 and / or 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.

[0137] In the embodiment 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 further includes an eighth stop instruction;

[0138] After switching the started second system B and the first system A between the foreground and the background (the first system A is running in the background and the second system B is running in the foreground), and before receiving a stop instruction through the first daemon process, the method may further include:

[0139] When the second mode control in the second application layer B1 is triggered, an eighth stop instruction is sent to the second daemon process B4 through the second application layer B1;

[0140] The eighth stop instruction is sent to the first daemon process A4 through the second daemon process B4.

[0141] In the embodiment of the present disclosure, for example, the second mode control may be set on the first application layer A1 of the first system A and / or on the second application layer B1 of the second system B, such as Fig.11 As shown, after the second system B switches the foreground and background with the first system A, when it is detected that the second mode control on the second application layer B1 is triggered, the 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 the assembly in the first application layer A1 and / or 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.

[0142] In the embodiment of the present disclosure, controlling at least one process in the first hardware abstraction layer A3 to stop running by the first daemon process A4 may include:

[0143] Polling the hardware control service name in the first hardware abstraction layer A3 through the first daemon process A4;

[0144] The first daemon process A4 controls the hardware control service corresponding to the hardware control service name to stop running the corresponding hardware.

[0145] In the disclosed embodiment, in order to enhance energy saving, the first daemon process A4 may poll the hardware control service names in 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.

[0146] In the embodiment of the present disclosure, the above-mentioned scheme can be used to stop all processes in the application layer, system framework layer, and hardware abstraction layer. 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.

[0147] In the disclosed embodiment, when it is necessary to restart the hardware, 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.

[0148] In the disclosed embodiment, the system running in the background is not really stopped, but all processes of the corresponding running level of the system running in the background are stopped, so that the user can start the background running system only when the background running system is needed, and before the system is switched, all processes of the corresponding level of the background running system are started, so that the background running system starts very quickly, and after the user switches the system, the user can see the newly switched system in time without being aware of it. This can not only start the system quickly, but also reduce power consumption, improve device performance, and ensure the normal operation of the entire system.

[0149] The present disclosure provides an electronic device 100, such as Fig.12 As shown, it may include: a first system A, a second system B and a processor 101;

[0150] The processor 101 may be configured to implement the dual-system control method based on the first system A and the second system B.

[0151] In the embodiment 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;

[0152] The processor implements a dual-system control method based on the first system A and the second system B, which may include:

[0153] When a preset control in the first application layer A1 is triggered, the first application layer A1 is controlled to send a preset instruction to the first daemon process A4;

[0154] Control the first daemon process A4 to send a preset instruction to the second daemon process B4;

[0155] The assembly in the second application layer B1 and / or the second system framework layer B2 is controlled by the second daemon process B4.

[0156] The present disclosure provides a computer-readable storage medium 200. Fig.13 As shown, a computer program is stored thereon, and when the computer program is executed by a processor, the dual-system control method described in the first aspect is implemented.

[0157] Those skilled in the art will appreciate that all or some of the steps, systems, and functional modules / units in the apparatus disclosed above may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0158] 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.

[0159] Some physical components or all 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 implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-temporary medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium 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; read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical disk storage; magnetic cassettes, magnetic 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, it is well known to those skilled in the art that 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.

[0160] 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 limiting purposes. 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, those skilled in the art will appreciate 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, characterized in that: Applied to an electronic device including a first system and a second system, the method includes: 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; The second daemon process controls the assembly in the second application layer and / or the second system framework layer of the second system.

2. The dual system control method according to claim 1, characterized in that: The preset control includes: a first mode control; the preset instruction includes a first stop instruction; The controlling of the application layer of the second system and / or the assembly in the second system framework layer by the second daemon process includes: The second daemon process is used to control the assembly in the second application layer and / or the second system framework layer to stop running according to the first stop instruction.

3. The dual system control method according to claim 1, characterized in that: 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 the application layer of the second system and / or the assembly in the second system framework layer by the second daemon process includes: Controlling, by the second daemon process, the assembly in the second application layer and / or 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, characterized in that: The preset control further includes a first restart control, and the preset instruction further includes: a first restart instruction; After controlling the assembly in the second application layer and / or the second system framework layer to stop running, the method further includes: When detecting that a first restart control of the first application layer is 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; Restart the second application layer and / or the second system framework layer program set according to the first restart instruction through the second daemon process.

5. The dual system control method according to claim 3, characterized in that: The preset control further includes a second restart control, and the preset instruction further includes: a second restart instruction; After controlling at least one process in the second hardware abstraction layer to stop running, the method further includes: When it is detected that the 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, characterized in that: The preset controls include: system switching controls; the preset instructions include start instructions; The controlling of the second application layer and / or the second system framework layer of the second system by the second daemon process includes: Controlling, by the second daemon process, according to the startup instruction, the startup and running of the assembly in the second application layer and / or the second system framework layer; The method further comprises: Switching the started second system and the first system between the foreground and the background, so that the first system is in the background and the second system is in the foreground; The first daemon process is used to control the first application layer and / or the first system framework layer of the first system to stop running.

7. The dual system control method according to claim 6, characterized in that: The controlling the first application layer and / or the first system framework layer of the first system to stop running by the first daemon process includes: A stop instruction is received through the first daemon process, and the assembly in the first application layer and / or 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, characterized in that: The stop instruction includes a third stop instruction. Before receiving the stop instruction through the first daemon process, the method further includes: Monitoring the foreground and background switching status of the first system through the first system framework layer; After the first system is switched to the background, 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, characterized in that: 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; Before switching the started second system and the first system between foreground and background, and before receiving a stop instruction through the first daemon process, the method further includes: 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, characterized in that: 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; After switching the started second system and the first system between the foreground and the background, and before receiving a stop instruction through the first daemon process, the method further includes: When 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, characterized in that: The first system also includes: a first hardware abstraction layer; After switching the started second system and the first system to the foreground and the background, the method further includes: 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, characterized in that: The step of 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, characterized in that: The stop instruction includes a sixth stop instruction. Before receiving the stop instruction through the first daemon process, the method further includes: Monitoring the foreground and background switching status of the first system through the first system framework layer; After the first system is switched to the background, 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, characterized in that: 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; Before switching the started second system and the first system between foreground and background, and before receiving a stop instruction through the first daemon process, the method further includes: 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, characterized in that: 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; After switching the started second system and the first system between the foreground and the background, and before receiving a stop instruction through the first daemon process, the method further includes: When the second mode control in the second application 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, characterized in that: include: 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, characterized in that: 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; The second daemon process controls the assembly in the second application layer and / or the second system framework layer.

18. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the dual-system control method according to any one of claims 1 to 15.