Method, device, electronic device and storage medium for calling shared hardware

By setting a method for calling shared hardware in electronic devices, the problem of hardware calling difficulties in dual-system electronic devices is solved, hardware sharing and on-demand calling are realized, costs are reduced and user experience is improved.

CN116414551BActive Publication Date: 2025-09-23GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111656502.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-09-23
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

In dual-system electronic devices, it is difficult to effectively call and allocate hardware between the two operating systems, resulting in high hardware costs and poor user experience.

Method used

By setting shared hardware of the first processor and the second processor in the electronic device, detecting a call event and sending it to the first system control when a preset condition is met, the hardware can be shared and called on demand.

Benefits of technology

It enables dual systems to share hardware and call it on demand, reducing hardware costs and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116414551B_ABST
    Figure CN116414551B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and storage medium for calling shared hardware, and relates to the technical field of electronic devices. The method is applied to an electronic device, which includes a first processor, a second processor and shared hardware of the first processor and the second processor, the first processor being used to run the first system, and the second processor being used to run the second system. The method includes: when the shared hardware is controlled by the second system, a call event for the shared hardware is detected, and when the call event meets the preset call event, the call event is sent to the first system to instruct the first system to control the shared hardware to execute the call event. The present application can realize the sharing and on-demand calling of hardware by the dual systems of an electronic device, reduce the hardware cost of the electronic device and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic devices, and more specifically, to a method, device, electronic device, and storage medium for calling shared hardware. Background Art

[0002] Dual-booting refers to the ability to install two different operating systems on the same electronic device to meet different operational requirements or resolve software compatibility issues. Both operating systems on an electronic device require hardware to perform their respective functions. Due to the size and weight constraints of electronic devices, and the limited amount of hardware that can be installed, accessing and allocating hardware between the two operating systems presents challenges. Summary of the Invention

[0003] In view of the above problems, the present application proposes a method, device, electronic device and storage medium for calling shared hardware to solve the above problems.

[0004] In a first aspect, an embodiment of the present application provides a method for calling shared hardware, which is applied to an electronic device, wherein the electronic device includes a first processor, a second processor, and shared hardware of the first processor and the second processor, the first processor is used to run a first system, and the second processor is used to run a second system. The method includes: when the shared hardware is controlled by the second system, detecting a call event for the shared hardware; when the call event meets a preset call event, sending the call event to the first system to instruct the first system to control the shared hardware to execute the call event.

[0005] In a second aspect, an embodiment of the present application provides a shared hardware calling device, which is applied to an electronic device, wherein the electronic device includes a first processor, a second processor, and shared hardware of the first processor and the second processor, the first processor is used to run a first system, and the second processor is used to run a second system. The device includes: a call event detection module, which is used to detect a call event for the shared hardware when the shared hardware is controlled by the second system; and a call event sending module, which is used to send the call event to the first system when the call event meets a preset call event, so as to instruct the first system to control the shared hardware to execute the call event.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor executes the above method.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which program code is stored, and the program code can be called by a processor to execute the above method.

[0008] The embodiments of the present application provide a method, apparatus, electronic device, and storage medium for calling shared hardware. The electronic device includes a first processor, a second processor, and shared hardware between the first and second processors. The first processor is used to run a first system, and the second processor is used to run a second system. When the shared hardware is controlled by the second system, a call event for the shared hardware is detected. When the call event meets a preset call event, the call event is sent to the first system to instruct the first system to control the shared hardware to execute the call event. This allows the electronic device's dual systems to share hardware and call it on demand, reducing the hardware cost of the electronic device and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic diagram showing an application environment for a method for calling shared hardware provided in an embodiment of the present application is shown;

[0011] Figure 2 A schematic diagram showing a flow chart of a method for calling shared hardware provided in one embodiment of the present application is shown;

[0012] Figure 3 A schematic diagram showing a flow chart of a method for calling shared hardware provided in one embodiment of the present application is shown;

[0013] Figure 4 A schematic diagram showing a flow chart of a method for calling shared hardware provided in one embodiment of the present application is shown;

[0014] Figure 5 A schematic diagram showing a flow chart of a method for calling shared hardware provided in one embodiment of the present application is shown;

[0015] Figure 6 A schematic diagram showing a flow chart of a method for calling shared hardware provided in one embodiment of the present application is shown;

[0016] Figure 7 Shows the application Figure 6 Schematic diagram of the flow of the shared hardware calling method shown;

[0017] Figure 8 A schematic diagram showing a flow chart of a method for calling shared hardware provided in one embodiment of the present application is shown;

[0018] Figure 9 A schematic diagram showing a flow chart of a method for calling shared hardware provided in one embodiment of the present application is shown;

[0019] Figure 10 A module block diagram of a shared hardware calling device provided in an embodiment of the present application is shown;

[0020] Figure 11 A block diagram of an electronic device for executing a method for calling shared hardware for power-on exception handling according to an embodiment of the present application is shown;

[0021] Figure 12 A storage unit according to an embodiment of the present application is shown for storing or carrying program code for implementing a calling method for shared hardware according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to enable people skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0023] Dual-booting refers to the ability to install two different operating systems on the same electronic device to meet different operational requirements or resolve software compatibility issues. Both operating systems on the electronic device require hardware to perform their respective functions. Due to the size and weight constraints of electronic devices, as well as the limited number of hardware devices that can be installed, accessing and allocating hardware between the two operating systems presents challenges.

[0024] To address the above issues, the inventors, after extensive research, have discovered and proposed the shared hardware calling method, device, electronic device, and storage medium provided in the embodiments of this application. These methods can enable dual systems in an electronic device to share and call hardware on demand, reducing the hardware cost of the electronic device and improving the user experience. The specific shared hardware calling method is described in detail in the subsequent embodiments.

[0025] The following describes the application environment of the calling method for shared hardware provided in the embodiments of the present application.

[0026] In this embodiment, the operating system of the electronic device may include a first system and a second system. The operating system relies on a processor to perform operations. The first system may include an Android system, and the second system may include an MCU system, or the first system may include an MCU system and the second system may include an Android system, without limitation.

[0027] In some embodiments, the first system and the second system are respectively executed in different processors, for example, see Figure 1 , the electronic device 100 may include a processor and shared hardware 130, wherein the processor includes a first processor 111 and a second processor 112, the first processor 111 is connected to the second processor 112, the first processor 112 is connected to the shared hardware 130, and the second processor 112 is connected to the shared hardware 130, that is, the first processor 111 is connected to the second processor and the shared hardware 130 respectively, and the second processor 112 is connected to the first processor 111 and the shared hardware 130 respectively. The first processor 111 is used to run the first system, and the second processor 112 is used to run the second system. The shared hardware 130 refers to hardware that can be called by the first system or the second system, that is, the first system or the second system can perform a certain operation by calling the shared hardware 130. The shared hardware 130 may include, but is not limited to: a vibration motor, a screen, a speaker, and a camera.

[0028] See also Figure 2 , Figure 2 The flowchart of the method for calling shared hardware provided by an embodiment of the present application is shown. The method can realize the sharing and on-demand calling of hardware by dual systems of electronic devices, reduce the hardware cost of electronic devices and improve the user experience. In a specific embodiment, the method for calling shared hardware is applied to Figure 10 The calling device 200 of the shared hardware and the electronic device 100 equipped with the calling device 200 of the shared hardware are shown. Figure 11 ). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it is understandable that the electronic device used in this embodiment may include a smart phone, a tablet computer, a wearable electronic device, etc., which is not limited here. In this embodiment, the electronic device includes a first processor, a second processor, and shared hardware for the first and second processing. The first processor is used to run the first system, and the second processor is used to run the second system. Figure 2 The process shown in FIG. 1 is described in detail. The method for calling the shared hardware may specifically include the following steps:

[0029] Step S110: When the shared hardware is controlled by the second system, a calling event for the shared hardware is detected.

[0030] In some embodiments, the memory space of the first system is larger than the memory space of the second system. For example, the read-only memory (ROM) space and random access memory (RAM) space of the first system are larger than the ROM space and RAM space of the second system. For example, the first system may be an Android system, and the second system may be an MCU system. The Android system has sufficient ROM space and RAM space, while the MCU system has very little ROM space and RAM space.

[0031] In some embodiments, the power consumption of the normal operation of the first system is higher than the power consumption of the normal operation of the second system, that is, under the same operating environment, the power consumption caused by the operation of the first system to the electronic device is higher than the power consumption caused by the operation of the second system to the electronic device. Based on this, in this embodiment, the shared hardware can be mainly mounted on the second processor running the second system, that is, the shared hardware can be mainly controlled by the second system with lower power consumption in normal operation to reduce the power consumption of the electronic device. Among them, the shared hardware may include a screen, a vibration motor, a speaker, a camera, etc., and the screen, vibration motor, speaker, camera, etc. can be mainly mounted on the second processor running the second system.

[0032] In some embodiments, since the operating system of the electronic device includes a first system and a second system, the operating system currently used by the electronic device may be the first system or the second system, without limitation herein. Specifically, when the operating system currently used by the electronic device is the first system, the second system may be in a dormant state or in a powered-off state; and when the operating system currently used by the electronic device is the second system, the first system may be in a dormant state or in a powered-off state, without limitation herein.

[0033] In this embodiment, it is possible to detect whether the operating system currently used by the electronic device is the first system or the second system. When it is detected that the operating system currently used by the electronic device is the second system, the calling event of the second system for the shared hardware can be detected until a calling event for the shared hardware is detected.

[0034] As a way, the electronic device can pre-set the state value corresponding to the operating system used. For example, the electronic device can pre-set that it is in a first state value when using the operating system as the first system, and pre-set that it is in a second state when using the operating system as the second system. Then, the state value of the electronic device can be detected, wherein, when the electronic device is detected to be in the first state value, it can be determined that the operating system of the electronic device is the first system, and when the electronic device is detected to be in the second state value, it can be determined that the operating system of the electronic device is the second system. As another way, the system desktop of the electronic device can be detected, and when it is detected that the system desktop of the electronic device is dominated by the first system (corresponding to the first system), it can be determined that the operating system of the electronic device is the first system, and when it is detected that the system desktop of the electronic device is dominated by the second system (corresponding to the second system), it can be determined that the operating system of the electronic device is the second system. Of course, this embodiment can also include other more ways to detect whether the operating system of the electronic device is the first system or the second system, which will not be repeated here.

[0035] In some embodiments, the shared hardware call event may be generated upon receiving a call request from an application, which may include game applications, audio applications, search applications, video applications, chat applications, etc., without limitation.

[0036] Step S120: When the calling event satisfies a preset calling event, the calling event is sent to the first system to instruct the first system to control the shared hardware to execute the calling event.

[0037] In some embodiments, the electronic device may pre-set and store a preset call event, which is used as a basis for determining the call event for the shared hardware. Therefore, in this embodiment, when a call event for the shared hardware is obtained, the call event may be compared with the preset call event to determine whether the call event meets the preset call event.

[0038] In some embodiments, the memory occupied space corresponding to the preset call event is greater than the space threshold. The space threshold can be determined based on the upper limit value of the memory space of the second processor, or based on the remaining memory space in the memory space of the second processor excluding the memory space occupied by necessary modules, etc., which is not limited here.

[0039] It is understandable that when it is determined that the call event does not meet the preset call event, it can be considered that the call event requires less memory space, that is, the memory occupied space corresponding to the call event is less than the space threshold. Since the memory space of the first system is larger than the memory space of the second system, since the call event requires less memory space, the memory space of the first system is sufficient to support the operation of the call event, and the memory space of the second system is sufficient to support the operation of the call event, the second system can control the shared hardware to execute the call event, that is, the operating system of the electronic device continues to remain the second system, thereby reducing the power consumption of the electronic device.

[0040] It is understandable that when it is determined that the call event meets the preset call event, it can be considered that the call event requires more memory space, that is, the memory occupied space corresponding to the call event is greater than the space threshold. Since the memory space of the first system is greater than the memory space of the second system, since the call event requires more memory space, the memory space of the first system is sufficient to support the operation of the call event, and the memory space of the second system is insufficient to support the operation of the call event, the call event can be sent to the first system to instruct the first system to control the shared hardware to execute the call event, that is, to switch the operating system of the electronic device from the second system to the first system to ensure the normal call of the shared hardware.

[0041] In some embodiments, when a call event for a shared event is obtained, the memory usage corresponding to the call event can be obtained, and the memory usage corresponding to the call event can be compared with a space threshold to determine whether the memory usage corresponding to the shared hardware is greater than the space threshold. If it is determined that the memory usage corresponding to the shared hardware is greater than the space threshold, then it can be determined that the call event meets the preset call event; if it is determined that the memory usage corresponding to the shared hardware is not greater than the space threshold, then it can be determined that the call event does not meet the preset call event.

[0042] For example, when the shared hardware is a vibration motor, when a call event for the vibration motor can be obtained, vibration information of the vibration motor can be obtained, and the memory occupied space corresponding to the call event can be obtained based on the vibration information of the vibration motor.

[0043] As a method, the call event can be sent to the first system through the SPI channel, and the first system can send the call event to the shared hardware through the gpio signal to enable the first system to control the shared hardware.

[0044] An embodiment of the present application provides a method for calling shared hardware. When the shared hardware is controlled by a second system, a call event for the shared hardware is detected. When the call event meets a preset call event, the call event is sent to the first system to instruct the first system to control the shared hardware to execute the call event. This allows the dual systems of an electronic device to share and call the hardware on demand, reducing the hardware cost of the electronic device and improving the user experience.

[0045] See also Figure 3 , Figure 3 The flowchart of the method for calling shared hardware provided by an embodiment of the present application is shown. The method is applied to an electronic device, which includes a first processor, a second processor, and shared hardware of the first processor and the second processor. The first processor is used to run the first system, and the second processor is used to run the second system. In this embodiment, the shared hardware includes a vibration motor. Figure 3 The process shown in FIG. 1 is described in detail. The method for calling the shared hardware may specifically include the following steps:

[0046] Step S210: When the shared hardware is controlled by the second system, a calling event for the shared hardware is detected.

[0047] The detailed description of step S210 can be found in step S110 and will not be repeated here.

[0048] Step S220: Acquire the vibration type of the vibration motor corresponding to the calling event.

[0049] In this embodiment, the shared hardware is a vibration motor.

[0050] In some embodiments, when the electronic device detects a call event for shared hardware, it can obtain the vibration type of the vibration motor corresponding to the call event. As one approach, when the electronic device detects a call event for the shared hardware, it can obtain identification information of the call event and, based on the identification information, obtain the vibration type of the vibration motor corresponding to the call event.

[0051] Step S230: When the vibration type of the vibration motor meets the preset vibration type, the calling event is sent to the first system to instruct the first system to control the shared hardware to execute the calling event.

[0052] In some embodiments, the electronic device may be pre-set and stored with a preset vibration type, which may be used as a basis for determining the vibration type of the vibration motor. Therefore, in this embodiment, when the vibration type of the vibration motor is obtained, the vibration type of the vibration motor may be compared with the preset vibration type to determine whether the vibration type of the vibration motor meets the preset vibration type.

[0053] When it is determined that the vibration type of the vibration motor meets the preset vibration type, the call event is determined to meet the preset call event, and the call event can be sent to the first system to instruct the first system to control the vibration motor to execute the call event. When it is determined that the vibration type of the vibration motor does not meet the preset vibration type, the call event is determined to not meet the preset call event, and the second system can continue to control the shared hardware.

[0054] As one approach, the preset vibration type includes customized linear motor vibration, wherein the customized linear motor vibration can be a self-defined, unconventional vibration.

[0055] In one embodiment of the present application, a method for calling shared hardware is provided. When the shared hardware is controlled by the second system, a call event for the shared hardware is detected, the vibration type of the vibration motor corresponding to the call event is obtained, and when the vibration type of the vibration motor meets the preset vibration type, the call event is sent to the first system to instruct the first system to control the shared hardware to execute the call event. Figure 2 The calling method of the shared hardware shown in the embodiment is also for when the shared hardware is a vibration motor, and the relationship between the calling event and the preset calling event is determined by the vibration type of the vibration motor, thereby improving the accuracy of the calling event judgment.

[0056] See also Figure 4 , Figure 4 The flowchart of the method for calling shared hardware provided by an embodiment of the present application is shown. The method is applied to an electronic device, which includes a first processor, a second processor, and shared hardware of the first processor and the second processor. The first processor is used to run the first system, and the second processor is used to run the second system. Figure 4 The process shown in FIG. 1 is described in detail. The method for calling the shared hardware may specifically include the following steps:

[0057] Step S310: When the shared hardware is controlled by the second system, a calling event for the shared hardware is detected.

[0058] Step S320: In response to the calling event, obtaining the memory occupied space corresponding to the calling event.

[0059] In this embodiment, when the electronic device detects a call event for shared hardware, it can respond to the call event and obtain the memory occupied space corresponding to the call event.

[0060] In some implementations, the call event may carry identification information. When the electronic device detects a call event for shared hardware, it may identify the call event to obtain the identification information corresponding to the call event, and based on the identification information corresponding to the call event, obtain the memory occupied space corresponding to the call event.

[0061] In some embodiments, when an electronic device detects a call event for shared hardware, it can obtain the triggering object of the call event and, based on the triggering object of the call event, obtain the memory usage corresponding to the call event. For example, in the case where the call event is triggered by an application, when the electronic device detects a call event for shared hardware, it can obtain the application that triggered the call event and, based on the application, obtain the memory usage corresponding to the call event.

[0062] In some embodiments, when an electronic device detects a call event for shared hardware, it can obtain call information for the call event and, based on the call information, obtain the memory usage corresponding to the call event. Specifically, when the shared hardware is a vibration motor, the call information corresponding to the call event can include: vibration duration, vibration frequency, vibration magnitude, etc.; when the shared hardware is a camera, the call information corresponding to the call event can include: shooting focal length, shooting duration, shooting range, etc.; when the shared hardware is a speaker, the call information corresponding to the call event can include: audio output parameters, etc., without limitation herein.

[0063] Step S330: When the memory occupied space is greater than the space threshold, the call event is sent to the first system to instruct the first system to control the shared hardware to execute the call event.

[0064] In some embodiments, the electronic device may pre-set and store a space threshold, wherein the space threshold is used as a basis for determining the memory usage corresponding to the call event. Therefore, in this embodiment, when the memory usage corresponding to the call event is obtained, the memory usage corresponding to the call event may be compared with the space threshold to determine whether the memory usage corresponding to the call event is greater than the space threshold.

[0065] When it is determined that the memory occupied space corresponding to the call event is less than or equal to the space threshold, it can be considered that the call event requires less memory space. Since the memory space of the first system is greater than the memory space of the second system, the call event requires less memory space. If the memory space of the first system is sufficient to support the operation of the call event, and the memory space of the second system is sufficient to support the operation of the call event, the second system can control the shared hardware to execute the call event, that is, the operating system of the electronic device continues to remain the second system, so as to reduce the power consumption of the electronic device.

[0066] Among them, when it is determined that the memory occupied space corresponding to the call event is greater than the space threshold, it can be considered that the call event requires more memory space. Since the memory space of the first system is greater than the memory space of the second system, since the call event requires more memory space, the memory space of the first system is sufficient to support the operation of the call event, and the memory space of the second system is insufficient to support the operation of the call event, the call event can be sent to the first system to instruct the first system to control the shared hardware to execute the call event, that is, to switch the operating system of the electronic device from the second system to the first system to ensure the normal call of the shared hardware.

[0067] As a method, the call event can be sent to the first system through the SPI channel, and the first system can send the call event to the shared hardware through the gpio signal to enable the first system to control the shared hardware.

[0068] In an embodiment of the present application, a method for calling shared hardware is provided. When the shared hardware is controlled by a second system, a call event for the shared hardware is detected. In response to the call event, the memory occupied space corresponding to the call event is obtained. When the memory occupied space is greater than a space threshold, the call event is sent to the first system to instruct the first system to control the shared hardware to execute the call event. Figure 2 The shared hardware calling method shown can also obtain the memory occupied space corresponding to the calling event. When the memory occupied space is greater than the space threshold, it is determined that the calling event meets the preset calling event, thereby improving the accuracy of the calling event judgment.

[0069] See also Figure 5 , Figure 5 The flowchart of the method for calling shared hardware provided by an embodiment of the present application is shown. The method is applied to an electronic device, which includes a first processor, a second processor and shared hardware. The first processor is used to run the first system, and the second processor is used to run the second system. In this embodiment, the shared hardware includes a vibration motor. Figure 5The process shown in FIG. 1 is described in detail. The method for calling the shared hardware may specifically include the following steps:

[0070] Step S410: When the shared hardware is controlled by the second system, a calling event for the shared hardware is detected.

[0071] The detailed description of step S410 can be found in step S110 and will not be repeated here.

[0072] Step S420: In response to the calling event, obtaining vibration information of the vibration motor corresponding to the calling event.

[0073] In this embodiment, the shared hardware is a vibration motor.

[0074] In some embodiments, when the electronic device detects a call event for shared hardware, it can respond to the call event and obtain motor vibration information corresponding to the call event. The motor vibration information may include vibration frequency, vibration magnitude, vibration duration, etc.

[0075] In some implementations, when the electronic device detects a call event for shared hardware, it may obtain an application corresponding to the call event and determine motor vibration information corresponding to the call event based on the application.

[0076] Step S430: Based on the vibration information of the vibration motor, obtain the memory occupied space corresponding to the calling event.

[0077] In some implementations, after obtaining the motor vibration information, the electronic device may obtain the memory occupied space corresponding to the call event based on the motor vibration information.

[0078] As an implementable manner, the memory occupied space corresponding to the call event may include a first memory occupied space and a second memory occupied space, wherein the first memory occupied space is greater than a space threshold, and the second memory occupied space is not greater than the space threshold. After obtaining the motor vibration information, the electronic device can determine, based on the motor vibration information, whether the memory occupied space corresponding to the call event is the first memory occupied space or the second memory occupied space. For example, after obtaining the motor vibration information, the electronic device can determine, based on the motor vibration information, whether the motor vibration information indicates complex customized linear motor vibration. If so, it can be determined that the memory occupied space corresponding to the call event is the first memory occupied space. If not, it can be determined that the memory occupied space corresponding to the call event is the second memory occupied space.

[0079] Step S440: When the memory occupied space is greater than the space threshold, the call event is sent to the first system to instruct the first system to control the shared hardware to execute the call event.

[0080] The detailed description of step S440 can be found in step S330 and will not be repeated here.

[0081] An embodiment of the present application provides a method for calling shared hardware. When the shared hardware is controlled by the second system, a call event for the shared hardware is detected. In response to the call event, motor vibration information corresponding to the call event is obtained. Based on the motor vibration information, the memory occupied space corresponding to the call event is obtained. When the memory occupied space is greater than a space threshold, the call event is sent to the first system to instruct the first system to control the shared hardware to execute the call event. Compared to Figure 2 The calling method of the shared hardware shown in the figure, the shared hardware provided in this embodiment also includes a vibration motor, and the memory occupied space corresponding to the mobilization event is determined based on the motor vibration information of the vibration motor, thereby improving the accuracy of the determined memory occupied space.

[0082] See also Figure 6 , Figure 6 The flowchart of the method for calling shared hardware provided by an embodiment of the present application is shown. The method is applied to an electronic device, which includes a first processor, a second processor and shared hardware. The first processor is used to run the first system, and the second processor is used to run the second system. In this embodiment, the first system is in a dormant state. Figure 6 The process shown in FIG. 1 is described in detail. The method for calling the shared hardware may specifically include the following steps:

[0083] Step S510: When the shared hardware is controlled by the second system, a calling event for the shared hardware is detected.

[0084] The detailed description of step S510 can be found in step S110 and will not be repeated here.

[0085] Step S520: When the calling event satisfies a preset calling event, the calling event is sent to the first system to wake up the first system and instruct the first system to control the shared hardware to execute the calling event.

[0086] In this embodiment, when the shared hardware is controlled by the second system, the first system may be in a dormant state. Furthermore, most modules of the first processor running the first system may be in a shut-down state, thereby reducing power consumption of the electronic device.

[0087] In some embodiments, when it is determined that the call event meets the preset call event, the call event can be sent to the first system, wherein the first system can be awakened upon receiving the call event and respond to the call event after awakening to control the shared hardware to execute the call event.

[0088] As an implementable method, when it is determined that the call event meets the preset call event, the second processor running the second system can generate a wake-up instruction, and send the wake-up instruction and the call event to the first processor running the first system through dual-core communication technology, so as to notify the first processor to wake up the first system and execute the call event after waking up. Accordingly, the first processor and the first system can enter the wake-up state in response to the wake-up instruction. At this time, the first system running on the first processor in the wake-up state can control the shared hardware to execute the call event. The wake-up state refers to the transition of the first processor from the sleep state to the normal working state; when the first system is in the sleep state, the first processor still remains powered on, and the first system can be restored to the working state without restarting.

[0089] Step S530: When the call event is executed, the shared hardware is switched from being controlled by the first system to being controlled by the second system.

[0090] In some embodiments, the electronic device can monitor the execution process of the call event, wherein, when it is monitored that the call event is completed, the shared hardware can be switched from being controlled by the first system to being controlled by the second system, that is, the operating system of the electronic device is switched from the first system to the second system, so that the operating system of the electronic device can be set to a lower power consumption operating system, thereby reducing the power consumption of the electronic device.

[0091] As an implementable manner, when the call event is executed, an instruction may be sent to the first system to instruct the first system to control the shared hardware.

[0092] See also Figure 7 , Figure 7 Shows the application Figure 6 The flowchart of the shared hardware calling method is shown in FIG. Figure 7 The process shown is described in detail, and the method may specifically include the following steps:

[0093] Step S531: When the calling event is completed, the remaining power of the electronic device is obtained.

[0094] In some embodiments, when it is determined that the call event has been completed, the remaining power of the electronic device can be obtained. As a method, the remaining power of the electronic device can be detected in real time in the background of the electronic device, or the remaining power of the electronic device can be detected every predetermined time (such as 5 minutes). The remaining power of the electronic device can also be obtained by performing image recognition on the display interface of the electronic device. The specific method for obtaining the remaining power is not limited here.

[0095] In some embodiments, the detection frequency of the remaining power of the electronic device can be determined based on the applications running on the electronic device, wherein the detection frequency when the electronic device runs a video application is higher than the detection frequency when the electronic device runs a text application.

[0096] In some embodiments, when it is determined that the call event is completed, it can be detected whether the electronic device is in a charging state, wherein, when it is detected that the electronic device is in a charging state, the shared hardware can be kept controlled by the first system, wherein, when it is detected that the electronic device is in a non-charging state, the remaining power of the electronic device can be obtained.

[0097] Step S532: When the remaining power is less than a preset power, the shared hardware is switched from being controlled by the first system to being controlled by the second system.

[0098] In some embodiments, the electronic device may be pre-set and store a preset power level, which may be set according to actual application requirements. The preset power level may vary depending on the application requirements. For example, the preset power level may be the minimum power level required to meet the normal operation of the electronic device for a preset duration. The preset power level is used as a basis for determining the remaining power of the electronic device. Therefore, in this embodiment, when obtaining the remaining power of the electronic device, the remaining power of the electronic device may be compared with the preset power level to determine whether the remaining power of the electronic device is less than the preset power level.

[0099] Among them, when it is determined that the remaining power of the electronic device is less than the preset power, it indicates that the remaining power of the electronic device is insufficient, and the shared hardware can be switched from being controlled by the first system to being controlled by the second system, that is, the operating system of the electronic device can be switched from the first system to the second system, so that when the remaining power of the electronic device is low, its operating system can always be in the second system with lower power consumption, so as to reduce the power consumption of the electronic device.

[0100] In some embodiments, after the operating system of the electronic device is switched from the first system to the second system, the remaining power of the electronic device can be detected. When it is detected that the remaining power of the electronic device is not less than a preset power or the electronic device starts to charge, it indicates that the remaining power of the electronic device is sufficient, and the shared hardware can be switched from being controlled by the second system to being controlled by the first system, that is, the operating system of the electronic device is switched from the second system to the first system.

[0101] Step S533: When the remaining power is greater than or equal to the preset power, the power reduction rate of the electronic device is obtained.

[0102] As a method, when it is determined that the remaining power of the electronic device is greater than or equal to the preset power, it indicates that the remaining power of the electronic device is sufficient, and the shared hardware can continue to be controlled by the first system.

[0103] As another approach, when it is determined that the remaining power of the electronic device is greater than or equal to a preset power level, it indicates that the remaining power of the electronic device is sufficient, and the power reduction rate of the electronic device can be obtained. In some embodiments, when it is determined that the remaining power of the electronic device is greater than or equal to the preset power level, the programs running in the foreground and background of the electronic device can be obtained, and the power reduction rate of the electronic device is obtained based on the programs running in the foreground and background of the electronic device. In some embodiments, when it is determined that the remaining power of the electronic device is greater than or equal to the preset power level, the model of the electronic device can be obtained, and the power reduction rate of the electronic device is determined based on the model of the electronic device.

[0104] Step S534: When the battery power decreases faster than a preset speed, the shared hardware is switched from being controlled by the first system to being controlled by the second system.

[0105] In some embodiments, the electronic device may be pre-set and stored with a preset speed, which may be set according to actual application requirements. The preset speed may vary depending on the application requirements. For example, the preset speed may be a maximum drop speed that satisfies the normal operation of the electronic device for a preset period of time at the remaining power level. The preset speed is used as a basis for determining the rate of decrease in power of the electronic device. Therefore, in this embodiment, when the electronic device obtains its power decrease speed, it may compare the power decrease speed with the preset speed to determine whether the power decrease speed is greater than the preset speed.

[0106] Among them, when it is determined that the power decline rate is greater than the preset speed, it indicates that the electronic device consumes power too quickly. In order to extend the battery life of the electronic device, the shared hardware can be switched from being controlled by the first system to being controlled by the second system, that is, the operating system of the electronic device can be switched from the first system to the second system, so that when the power of the electronic device declines faster, its operating system can always be in the second system with lower power consumption, thereby reducing the power consumption of the electronic device.

[0107] When it is determined that the power reduction speed is less than or equal to the preset speed, it indicates that the power consumption speed of the electronic device is slow, and the shared hardware can continue to be controlled by the first system.

[0108] Step S540: Control the first system to enter a dormant state.

[0109] In some embodiments, after the shared hardware is switched from being controlled by the first system to being controlled by the second system, the first system may be controlled to enter a dormant state to reduce power consumption of the electronic device. When the first system enters the dormant state, the first processor running the first system may shut down most modules to reduce power consumption of the electronic device.

[0110] An embodiment of the present application provides a method for calling shared hardware. When the shared hardware is controlled by the second system, a call event for the shared hardware is detected. When the call event meets the preset call event, the call event is sent to the first system to wake up the first system and instruct the first system to control the shared hardware to execute the call event. When the call event is completed, the shared hardware is switched from being controlled by the first system to being controlled by the second system, and the first system is controlled to enter a dormant state. Compared to Figure 2 The shared hardware calling method shown in this embodiment also switches the shared hardware back to control by the second system when the calling event is completed, and controls the first system to enter a dormant state, so as to reduce the power consumption of the electronic device and improve the battery life of the electronic device.

[0111] See also Figure 8 , Figure 8 The flowchart of the method for calling shared hardware provided by an embodiment of the present application is shown. The method is applied to an electronic device, which includes a first processor, a second processor, and shared hardware. The first processor is used to run a first system, and the second processor is used to run a second system. The memory space of the first system is larger than the memory space of the second system. In this embodiment, the first system is in a dormant state. Figure 8 The process shown in FIG. 1 is described in detail. The method for calling the shared hardware may specifically include the following steps:

[0112] Step S610: When the shared hardware is controlled by the second system, a calling event for the shared hardware is detected.

[0113] Step S620: When the calling event satisfies a preset calling event, the calling event is sent to the first system to instruct the first system to control the shared hardware to execute the calling event.

[0114] For the detailed description of steps S610 to S620 , please refer to steps S110 to S120 , which will not be repeated here.

[0115] Step S630: When the call event is completed, the call information of the shared hardware after the call event is determined based on the historical operation record of the electronic device.

[0116] In this embodiment, the electronic device can monitor the execution process of the call event, wherein, when it is monitored that the call event is completed, the historical operation record of the electronic device can be obtained, and the call information of the shared hardware after the call event can be determined based on the historical operation record of the electronic device.

[0117] In some embodiments, the electronic device may record its operating information during its operation and store the recorded operating information locally on the electronic device as a historical operating record. Therefore, when the call event is completed, the historical operating record can be obtained from the local device of the electronic device, and the call information of the shared hardware after the call event can be determined based on the historical operating record of the electronic device. The call information may include the application that called the shared hardware and may include the operating parameters of the shared hardware indicated by the call to the shared hardware.

[0118] As an implementable method, the historical operation record may include the order in which the electronic device runs applications and the time when the applications are run. When the call event is completed, the application corresponding to the call event and the time when the call event is completed can be obtained. Based on the historical operation record, the application corresponding to the call event and the time when the call event is completed, the application that the electronic device is about to run next is determined. Based on the application that the electronic device is about to run next, the call information of the shared hardware after the call event is determined.

[0119] Step S640: When the acquired calling information does not satisfy a preset calling event, the shared hardware is switched from being controlled by the first system to being controlled by the second system.

[0120] In some embodiments, the electronic device may pre-set and store a preset call event, wherein the preset call event is used as a basis for determining the call information. Therefore, in this embodiment, when the call information is obtained, the call information can be compared with the preset call event to determine whether the call information is greater than the preset call event.

[0121] It is understandable that when it is determined that the call information does not meet the preset call event, it can be considered that the memory space required by the application to be run next is less, that is, the memory occupied space corresponding to the call information is less than the space threshold. Since the memory space of the first system is larger than the memory space of the second system, and therefore, since the call information requires less memory space, if the memory space of the first system is sufficient to support the operation after the call event, and the memory space of the second system is sufficient to support the operation after the call event, then the second system can control the shared hardware to execute the operation after the call event, that is, the operating system of the electronic device continues to remain the second system, so as to reduce the power consumption of the electronic device.

[0122] It is understandable that when the call information is determined to satisfy a preset call event, it can be assumed that the application to be run subsequently requires a large amount of memory space, i.e., the memory usage corresponding to the call information is greater than the space threshold. Since the first system has more memory space than the second system, and since the call information requires more memory space, the memory space of the first system is sufficient to support the operation after the call event, while the memory space of the second system is insufficient to support the operation after the call event. Therefore, the shared hardware can be switched from being controlled by the first system to being controlled by the second system.

[0123] Step S650: Control the first system to enter a dormant state.

[0124] The detailed description of step S650 can be found in step S540 and will not be repeated here.

[0125] An embodiment of the present application provides a method for calling shared hardware. When the shared hardware is controlled by the second system, a call event for the shared hardware is detected. When the call event meets the preset call event, the call event is sent to the first system to wake up the first system and instruct the first system to control the shared hardware to execute the call event. When the call event is completed, the call information of the shared hardware after the call event is determined based on the historical operation record of the electronic device. When the call information does not meet the preset call event, the shared hardware is switched from being controlled by the first system to being controlled by the second system, and the first system is controlled to enter a dormant state. Compared to Figure 2The calling method of the shared hardware shown in the figure, this embodiment also predicts the next calling information of the shared hardware when the calling event is executed, and when it is predicted that the next calling information of the shared hardware does not meet the preset calling event, the shared hardware is switched back to be controlled by the second system, and the first system is controlled to enter a sleep state, so as to reduce the power consumption of the electronic device and improve the battery life of the electronic device.

[0126] See also Figure 9 , Figure 9 The flowchart of the method for calling shared hardware provided by an embodiment of the present application is shown. The method is applied to an electronic device, which includes a first processor, a second processor and shared hardware. The first processor is used to run a first system, and the second processor is used to run a second system. The memory space of the first system is larger than the memory space of the second system. Figure 9 The process shown in FIG. 1 is described in detail. The method for calling the shared hardware may specifically include the following steps:

[0127] Step S710: When the shared hardware is controlled by the second system, a calling event for the shared hardware is detected.

[0128] The detailed description of step S710 can be found in step S110 and will not be repeated here.

[0129] Step S720: Obtain the application corresponding to the calling event.

[0130] In some embodiments, when a call event for shared hardware is detected, the application corresponding to the call event can be obtained. As one approach, the call event for the shared hardware can be generated when a call request from an application is received. The application corresponding to the call event can be obtained by detecting the application that triggered the call event.

[0131] Step S730: When the application is a preset application, determining whether the calling event satisfies the preset calling event.

[0132] In some embodiments, the electronic device may pre-set and store an application as a preset application, wherein the preset application is used as a basis for determining the application corresponding to the call event. As an example, taking the shared hardware as a vibration motor as an example, the preset application may be a customized linear motor vibration application that needs to be replicated.

[0133] Therefore, in this embodiment, when the application corresponding to the call event is obtained, the application corresponding to the call event can be compared with the preset application to determine whether the call event satisfies the preset call event. If it is determined that the application corresponding to the call event is the preset application, then the call event can be determined to satisfy the preset call event. If it is determined that the application corresponding to the call event is not the preset application, then the call event can be determined to not satisfy the preset call event.

[0134] Step S740: When the calling event satisfies a preset calling event, the calling event is sent to the first system to instruct the first system to control the shared hardware to execute the calling event.

[0135] The detailed description of step S740 can be found in step S120 and will not be repeated here.

[0136] An embodiment of the present application provides a method for calling shared hardware. When the shared hardware is controlled by the second system, a call event for the shared hardware is detected, and the application corresponding to the call event is obtained. When the application is a preset application, it is determined that the call event meets the preset call event. When the memory occupied space is greater than the space threshold, the call event is sent to the first system to instruct the first system to control the shared hardware to execute the call event. Compared to Figure 2 The calling method of the shared hardware shown in this embodiment also determines the relationship between the calling event and the preset calling event based on the application corresponding to the calling event, thereby improving the efficiency and accuracy of judging the size of the memory occupied space.

[0137] See also Figure 10 , Figure 10 The module block diagram of the shared hardware calling device provided by the embodiment of the present application is shown. The shared hardware calling device 200 is applied to the above-mentioned electronic device, which includes a first processor, a second processor and shared hardware of the first processor and the second processor, the first processor is used to run the first system, and the second processor is used to run the second system, wherein the memory space of the first system is larger than the memory space of the second system. Figure 8 The block diagram shown in FIG. 1 is used to illustrate that the shared hardware calling device 200 includes: a calling event detection module 210 and a calling event sending module 220, wherein:

[0138] The calling event detection module 210 is configured to detect a calling event for the shared hardware when the shared hardware is controlled by the second system.

[0139] The calling event sending module 220 is configured to send the calling event to the first system when the calling event meets a preset calling event, so as to instruct the first system to control the shared hardware to execute the calling event.

[0140] Furthermore, the shared hardware includes a vibration motor, and the call event sending module 220 includes: a vibration type acquisition submodule and a first call event sending submodule, wherein:

[0141] The vibration type acquisition submodule is used to acquire the vibration type of the vibration motor corresponding to the calling event.

[0142] The first call event sending submodule is configured to send the call event to the first system when the vibration type of the vibration motor meets a preset vibration type, so as to instruct the first system to control the shared hardware to execute the call event.

[0143] Furthermore, the call event sending module 220 includes: a memory occupied space acquisition submodule and a second call event sending submodule, wherein:

[0144] The memory occupied space acquisition submodule is used to obtain the memory occupied space corresponding to the calling event in response to the calling event.

[0145] Furthermore, the shared hardware includes a vibration motor, and the memory occupied space acquisition submodule includes: a vibration information acquisition unit and a memory occupied space acquisition unit, wherein:

[0146] The vibration information acquiring unit is configured to acquire vibration information of the vibration motor corresponding to the calling event in response to the calling event.

[0147] The memory occupied space obtaining unit is configured to obtain the memory occupied space corresponding to the calling event based on the vibration information of the vibration motor.

[0148] The second call event sending submodule is configured to send the call event to the first system when the memory occupied space is greater than a space threshold, so as to instruct the first system to control the shared hardware to execute the call event.

[0149] Furthermore, the call event sending module 220 includes: a third call event sending submodule, wherein:

[0150] The third call event sending submodule is configured to send the call event to the first system when the call event meets a preset call event, so as to wake up the first system and instruct the first system to control the shared hardware to execute the call event.

[0151] Furthermore, the call event sending module 220 further includes: a system switching submodule and a sleep control submodule, wherein:

[0152] The system switching submodule is configured to switch the shared hardware from being controlled by the first system to being controlled by the second system when the call event is completed.

[0153] Furthermore, the system switching submodule includes: a remaining power acquisition unit and a first system switching unit, wherein:

[0154] The remaining power acquisition unit is used to acquire the remaining power of the electronic device when the calling event is completed.

[0155] The first system switching unit is configured to switch the shared hardware from being controlled by the first system to being controlled by the second system when the remaining power is less than a preset power.

[0156] Furthermore, the system switching submodule further includes: a power reduction speed acquisition unit and a second system switching unit, wherein:

[0157] The power reduction rate acquisition unit is used to acquire the power reduction rate of the electronic device when the remaining power is greater than or equal to the preset power.

[0158] The second system switching unit is configured to switch the shared hardware from being controlled by the first system to being controlled by the second system when the power reduction speed is greater than a preset speed.

[0159] Furthermore, the system switching submodule includes: a call information acquisition unit and a third system switching unit, wherein:

[0160] The calling information acquiring unit is configured to determine, when the calling event is completed, the calling information of the shared hardware after the calling event based on the historical operation record of the electronic device.

[0161] The third system switching unit is configured to switch the shared hardware from being controlled by the first system to being controlled by the second system when the acquired calling information does not satisfy a preset calling event.

[0162] The sleep control submodule is used to control the first system to enter a sleep state.

[0163] Furthermore, the shared hardware calling device 200 further includes: an application acquisition module and a calling event determination module, wherein:

[0164] The application acquisition module is used to acquire the application corresponding to the calling event.

[0165] The calling event determining module is configured to determine, when the application is a preset application, whether the calling event satisfies a preset calling event.

[0166] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0167] In several embodiments provided in this application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0168] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.

[0169] See also Figure 11 , which shows a structural block diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 can be an electronic device capable of running applications, such as a smartphone, a tablet computer, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more programs are configured to execute the method described in the aforementioned method embodiment.

[0170] The processor 110 may include one or more processing cores. The processor 110 utilizes various interfaces and circuits to connect various components within the electronic device 100. It executes instructions, programs, code sets, or instruction sets stored in the memory 120, and accesses data stored in the memory 120 to perform various functions and process data within the electronic device 100. Optionally, the processor 110 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 110 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing displayed content; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 110 and may be implemented separately via a communication chip.

[0171] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the electronic device 100 during use (such as a phone book, audio and video data, chat history data), etc.

[0172] See also Figure 12 , which shows a block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 300 stores program code, which can be called by a processor to execute the method described in the above method embodiment.

[0173] The computer-readable storage medium 300 can be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 300 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 300 has storage space for program code 310 for executing any of the method steps described above. These program codes can be read from or written to one or more computer program products. The program code 310 can be compressed, for example, in a suitable form.

[0174] In summary, the embodiments of the present application provide a method, apparatus, electronic device, and storage medium for calling shared hardware. The electronic device includes a first processor, a second processor, and shared hardware of the first and second processors. The first processor is used to run a first system, and the second processor is used to run a second system. When the shared hardware is controlled by the second system, a call event for the shared hardware is detected. When the call event meets a preset call event, the call event is sent to the first system to instruct the first system to control the shared hardware to execute the call event. This allows the electronic device's dual systems to share and call hardware on demand, reducing the hardware cost of the electronic device and improving the user experience.

[0175] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for calling shared hardware, characterized in that: Applied to an electronic device, the electronic device includes a first processor, a second processor, and shared hardware between the first and second processors, the first processor is used to run a first system, the second processor is used to run a second system, the shared hardware includes a vibration motor, and the memory space of the first system is larger than the memory space of the second system. The method includes: When the shared hardware is controlled by the second system, a call event for the shared hardware is detected; When the calling event satisfies a preset calling event, sending the calling event to the first system to instruct the first system to control the shared hardware to execute the calling event; When the calling event satisfies a preset calling event, sending the calling event to the first system to instruct the first system to control the shared hardware to execute the calling event includes: Obtaining the vibration type of the vibration motor corresponding to the call event; When the vibration type of the vibration motor meets the preset vibration type, the calling event is sent to the first system to instruct the first system to control the shared hardware to execute the calling event.

2. The method according to claim 1, characterized in that The memory occupied space corresponding to the preset call event is greater than the space threshold.

3. The method according to claim 1, characterized in that The first system is in a dormant state, and when the call event satisfies a preset call event, the call event is sent to the first system to instruct the first system to control the shared hardware to execute the call event, including: When the calling event meets a preset calling event, the calling event is sent to the first system to wake up the first system and instruct the first system to control the shared hardware to execute the calling event.

4. The method according to claim 3, characterized in that When the calling event satisfies a preset calling event, after sending the calling event to the first system to instruct the first system to control the shared hardware to execute the calling event, the method further includes: When the call event is executed, switching the shared hardware from being controlled by the first system to being controlled by the second system; Control the first system to enter a dormant state.

5. The method according to claim 4, characterized in that When the call event is executed, switching the shared hardware from being controlled by the first system to being controlled by the second system includes: When the call event is executed, obtaining the remaining power of the electronic device; When the remaining power is less than a preset power, the shared hardware is switched from being controlled by the first system to being controlled by the second system.

6. The method according to claim 5, characterized in that The method further comprises: When the remaining power is greater than or equal to the preset power, obtaining a power reduction rate of the electronic device; When the power reduction speed is greater than a preset speed, the shared hardware is switched from being controlled by the first system to being controlled by the second system.

7. The method according to claim 4, characterized in that When the call event is executed, switching the shared hardware from being controlled by the first system to being controlled by the second system includes: When the call event is completed, determining the call information of the shared hardware after the call event based on the historical operation record of the electronic device; When the acquired calling information does not satisfy a preset calling event, the shared hardware is switched from being controlled by the first system to being controlled by the second system.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Obtaining the application corresponding to the call event; When the application is a preset application, it is determined that the calling event satisfies the preset calling event.

9. The method according to any one of claims 1 to 7, characterized in that The power consumption of the first system is higher than the power consumption of the second system.

10. A shared hardware calling device, characterized in that: Applied to an electronic device, the electronic device comprising a first processor, a second processor, and shared hardware between the first and second processors, the first processor being configured to run a first system, the second processor being configured to run a second system, the shared hardware comprising a vibration motor, the memory space of the first system being larger than the memory space of the second system, the device comprising: a call event detection module, configured to detect a call event for the shared hardware when the shared hardware is controlled by the second system; A calling event sending module is used to obtain the vibration type of the vibration motor corresponding to the calling event; when the vibration type of the vibration motor meets the preset vibration type, the calling event is sent to the first system to instruct the first system to control the shared hardware to execute the calling event.

11. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory is coupled to the processor and stores instructions. When the instructions are executed by the processor, the processor performs the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Portable equipment task processing method and device as well as portable equipment

    CN102081553A