Device resource management method and electronic device

CN122733489APending Publication Date: 2026-09-11HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510344131.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-03-11
Filing Date
2025-03-21
Publication Date
2026-09-11

AI Technical Summary

Benefits of technology

[0024] Thirdly, this application provides a computer-readable storage medium storing instructions that, when executed by a processor, can implement any of the possible implementations described in the first aspect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122733489A_ABST
    Figure CN122733489A_ABST
Patent Text Reader

Abstract

The application requests a device resource management method and electronic devices. Upon receiving a user input, the input peripheral can send an input event to the electronic device. When the electronic device receives an input event from the input peripheral, it can reduce the processor resources used by background applications, allowing more processor resources to be allocated to foreground applications. This improves the responsiveness of the electronic device to user actions on the input peripheral, enhancing the smoothness of the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese Patent Application No. 202510287183.8, filed with the Chinese Patent Office on March 11, 2025, entitled "Method for Equipment Resource Management and Electronic Equipment", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of terminal technology, and in particular to device resource management methods and electronic devices. Background Technology

[0003] With the development of smart home devices, televisions and other devices are becoming increasingly functional. For example, televisions can have applications (apps) installed, such as video playback, music playback, call, and conferencing apps, providing users with corresponding functions. Users can control the television using input devices such as remote controls. Improving the response speed of electronic devices to user input from these devices is a pressing issue that needs to be addressed. Summary of the Invention

[0004] This application provides a device resource management method and an electronic device. This method improves the smoothness of user experience by reducing the CPU resources used by background apps when the electronic device receives input events from input peripherals, thereby increasing the response speed to user operations on the input peripherals.

[0005] In a first aspect, this application provides a device resource management method, wherein a first device receives a first input event from a second device, the first input event being triggered by the second device in response to a first operation acting on the second device; according to the first input event, the first device reduces the processor resources occupied by background applications in the first device according to a first strategy, the background applications including a first group of applications and a second group of applications, the first group of applications including applications in the background that are calling preset resources of the first device, the second group of applications including applications in the background that are not calling preset resources, the first strategy including suppressing processor resources of the first group of applications, and / or freezing the second group of applications; the first device executes the operation corresponding to the first input event.

[0006] The first device can be a television. The second device can be a remote control, mouse, keyboard, mobile phone, etc.

[0007] The first input event type includes one or more of the following: input events corresponding to key presses, input events corresponding to touch operations, and input events corresponding to voice commands. The first operation can be referenced in this application. Figure 3A , Figure 3B , Figure 4B , Figure 4D , Figure 4FThe operation of the remote control is shown, or refer to this application. Figure 5D The instructions for using the phone are shown.

[0008] The first group of applications can be background applications that are perceptible to the user. The second group of applications can be background applications that are not perceptible to the user.

[0009] The preset resources of the first device may include, but are not limited to: audio output devices (e.g., speakers, earpieces), audio input devices (e.g., microphones), image acquisition devices (e.g., cameras), etc.

[0010] Upon receiving a first input event, the first device can determine the target application for processing the first input event and hand it over to the target application for processing. The target application can determine and execute the operation corresponding to the first input event, as detailed above. Figures 3A-3C , Figures 4A to 4G , Figures 5A-5E The scene shown.

[0011] As can be seen, the first device can reduce the CPU resources occupied by the background app by freezing and / or suppressing its CPU resources after receiving an input event, so that more CPU resources can be provided to the foreground app. In this way, the first device can improve the response speed to user operations on the input peripheral and enhance the smoothness of the user experience.

[0012] In conjunction with the first aspect, in some embodiments, the first group of applications includes a third group of applications and a fourth group of applications. Suppressing processor resources on the first group of applications may include suppressing the third group of applications by a first level of processor resources and suppressing the fourth group of applications by a second level of processor resources, wherein the fourth group of applications occupies fewer processor resources than the third group of applications. The third and fourth groups of applications are determined based on their application types. The application types of the third group of applications and the fourth group of applications are different.

[0013] As can be seen, the aforementioned processor resource grouping and suppression of the first group of background applications (i.e., user-perceptible applications) allows for more efficient allocation and utilization of CPU resources when the first device receives input events. This ensures the first device has more CPU resources to respond to input events promptly, while also reducing the impact of processor resource suppression on the operation of user-perceptible background applications. It avoids situations where the processor resources of one or more user-perceptible background applications are excessively suppressed, leading to lag and a negative impact on the user experience. Ultimately, this ensures that different user-perceptible applications can maintain background operation while consuming minimal CPU resources.

[0014] In conjunction with the first aspect, in some embodiments, processor resource suppression may include: reducing the CPU time slices provided to applications, and / or adjusting applications to run on CPU cores with lower computing power.

[0015] It can be seen that the first device suppresses the processor resources of background applications that can be perceived by the user. It can use a small amount of CPU resources to keep background apps that can be perceived by the user running, and can run foreground apps on CPU cores with higher computing power, and / or allocate more CPU time slices to foreground apps to improve their running speed.

[0016] In conjunction with the first aspect, in some embodiments, after the first device reduces the processor resources of background applications in the first device for more than a first duration according to the first strategy, the first device releases the suppression of processor resources on the first group of applications, and / or unfreezes the second group of applications.

[0017] As can be seen, the input event sent by the second device is a new event that the first device needs to process. If a background application in the first device consumes a large amount of CPU resources, the process used to process the input event may need to queue up and wait to acquire CPU resources, thus the electronic device may not be able to respond to the input event quickly. Therefore, the first device can manage the CPU resources used by the background application after receiving the input event. The first device can usually complete the input event sent by the corresponding input peripheral within a certain time period. After completing the input event, the first device can release the CPU resources occupied by the input event. In this way, the first device can release its control over the background application, increase the resources allocated to the background application, and improve the running efficiency of the background application.

[0018] In conjunction with the first aspect, in some embodiments, before the first device reduces the processor resources occupied by background applications in the first device according to the first strategy, the first device determines that the first input event satisfies a first condition, the first condition including a preset input event. For example, the preset input event may include, but is not limited to: input events corresponding to user operations on the directional keys on the remote control, input events corresponding to user operations on the confirmation key on the remote control, input events corresponding to user operations on the menu key on the remote control, input events corresponding to user operations on the voice key on the remote control, etc.

[0019] In conjunction with the first aspect, in some embodiments, the first device receives a second input event from the second device, the second input event being triggered by the second device in response to a second operation acting on the second device; based on the second input event, the second device reduces the processor resources occupied by background applications in the first device according to a second strategy; the first device executes the operation corresponding to the second input event.

[0020] The second strategy includes suppressing processor resources for the first group of applications and / or freezing the second group of applications. In the first strategy, the processor resource suppression level for the first group of applications includes a first-level suppression level; in the second strategy, the processor resource suppression level for the first group of applications includes a third-level suppression level. The processor resources used by the applications under the first-level processor resource suppression are different from those used under the third-level processor resource suppression. For example, the first group of applications includes a third group of applications and a fourth group of applications. In the first strategy, the first device can suppress the third group of applications under the first-level processor resource suppression and the fourth group of applications under the second-level processor resource suppression. In the second strategy, the first device can suppress the third group of applications under the third-level processor resource suppression and the fourth group of applications under the fourth-level processor resource suppression. The processor resources used by the third group of applications under the first-level processor resource suppression, the third group of applications under the third-level processor resource suppression, the fourth group of applications under the second-level processor resource suppression, and the fourth group of applications under the fourth-level processor resource suppression are all different.

[0021] The second input event is of a different type than the first input event.

[0022] As can be seen, the first device can suppress processor resources of user-perceptible background applications at different levels based on different input events. This can improve the effectiveness of suppressing processor resources of background applications in different scenarios and better enhance the user experience of the first device.

[0023] Secondly, this application provides an electronic device. The electronic device may include a memory and a processor. The memory may be used to store a computer program. The processor may be used to invoke the computer program to execute any of the possible implementation methods described in the first aspect.

[0024] Thirdly, this application provides a computer-readable storage medium storing instructions that, when executed by a processor, can implement any of the possible implementations described in the first aspect.

[0025] Fourthly, this application provides a computer program product that may contain computer instructions that, when executed on a processor, can implement any of the possible implementation methods described in the first aspect.

[0026] Fifthly, this application provides a chip for use in an electronic device, the chip including one or more processors for invoking computer instructions to cause the electronic device to perform any of the possible implementation methods in the first aspect.

[0027] It is understood that the electronic device provided in the second aspect, the computer-readable storage medium provided in the third aspect, the computer program product provided in the fourth aspect, and the chip provided in the fifth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description

[0028] Figure 1 This is a schematic diagram of a communication system provided in an embodiment of this application;

[0029] Figure 2 This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application;

[0030] Figures 3A-3C This is a schematic diagram illustrating a scenario where some input peripherals, as provided in the embodiments of this application, send input events to a television.

[0031] Figures 4A to 4G This is a schematic diagram illustrating a scenario where other input peripherals, as provided in the embodiments of this application, send input events to a television.

[0032] Figures 5A-5E This is a schematic diagram illustrating a scenario where other input peripherals, as provided in the embodiments of this application, send input events to a television.

[0033] Figure 6 This is a flowchart of a device resource management method provided in an embodiment of this application;

[0034] Figure 7 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0035] Figure 8 This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0036] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "at least one" and "one or more" refer to one or more (including two). The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0037] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0038] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0039] Figure 1 A schematic diagram of a communication system provided in an embodiment of this application is shown as an example.

[0040] like Figure 1As shown, the communication system 10 may include electronic devices and input peripherals. Electronic devices may include devices such as televisions. Input peripherals may include, but are not limited to, remote controls, mice, keyboards, mobile phones, etc. Electronic devices may establish a communication connection with at least one input peripheral. The communication connection between the television and the input peripheral may include, but is not limited to, wireless connections such as Bluetooth, Wi-Fi, and near field communication (NFC), or wired connections.

[0041] Input peripherals are used to receive user input and send the corresponding input events to electronic devices. Electronic devices can then provide feedback based on these input events, responding to user actions on the input peripherals. In other words, users can control electronic devices, such as televisions, through input peripherals.

[0042] For example, a television is connected to a remote control. The remote control includes one or more buttons, such as directional buttons (left, right, up, and down), volume buttons (volume up and volume down), a home button, etc. When an operation on a button on the remote control is detected, the remote control can send an input event corresponding to the operated button to the television. In some embodiments, in response to an operation on the home button on the remote control, the remote control can send an input event corresponding to the home button to the television. The television can then display its home page based on the input event corresponding to the home button.

[0043] The television connects to a mouse and keyboard. The television can display the mouse cursor on its screen. In response to user actions involving mouse movement, the television can move the mouse cursor on its screen. In some embodiments, when a click on the left mouse button is detected, the mouse can send an input event corresponding to the left mouse button click to the television. The television can then display the control at the location of the mouse cursor as selected based on the input event from the left mouse button click. In some embodiments, when an action on one or more character keys on the keyboard is detected, the keyboard can send an input event corresponding to the pressed character key to the television. The television can then display the corresponding character in an input box based on the input event from the keyboard.

[0044] An electronic device may contain multiple apps. The lifecycle of an app can include creation state, destruction state, foreground state, and background state.

[0045] The creation status can represent the state of an electronic device opening an app and creating a process for that app.

[0046] The destroyed state indicates that an electronic device has closed an app and destroyed its process. When an app is in the destroyed state, the electronic device can reclaim the central processing unit (CPU) resources, memory resources, and other resources used by that app.

[0047] Foreground state refers to the state in which an app is running in the foreground on a TV. When an app is in the foreground state, the TV can display the app's user interface on the screen. Users can interact with the app in the foreground state through its user interface. An app in the foreground state can be called a foreground app.

[0048] Background state can include the state of an app after it is opened, before it enters the destroyed state, that is, the state of running in the background. An app in the background state can be called a background app. In some embodiments, the state of an app can switch between a foreground state and a background state. For example, if the electronic device displays the user interface of app 1 on the screen, then app 1 is in the foreground state. If the electronic device switches the content displayed on the screen from the user interface of app 1 to the user interface of app 2, then app 1 goes from the foreground state to the background state, and app 2 goes from the foreground state to the foreground state. Further, if the electronic device switches the content displayed on the screen from the user interface of app 2 to the user interface of app 1, then app 1 goes back to the foreground state, and app 2 goes into the background state.

[0049] Both foreground and background apps require CPU resources from electronic devices. These CPU resources are limited. When too many background apps are running, they consume a large amount of CPU resources, leaving insufficient resources for the foreground apps. This can cause the foreground apps to frequently lag. Furthermore, when an electronic device receives input events from external devices, there is a delay in its response. For example, after a user presses a button on a remote control, there may be a considerable wait before the device responds. This negatively impacts the user experience.

[0050] This application provides a device resource management method. This method can be applied to a communication system including electronic devices and input peripherals. The input peripherals can send input events to the electronic device based on user operations. Upon receiving an input event, the electronic device can reduce the CPU resources occupied by background apps. In some embodiments, the electronic device can identify user-perceptible apps and user-invisible apps in the background. Specifically, upon receiving an input event, the electronic device can freeze user-invisible apps in the background and suppress CPU resources allocated to user-perceptible apps.

[0051] It can be seen that after receiving an input event, electronic devices can reduce the CPU resources consumed by background apps by freezing and / or suppressing their CPU resources, thus freeing up more CPU resources for the foreground app. This improves the responsiveness of electronic devices to user actions on input devices, enhancing the smoothness of the user experience.

[0052] The device resource management method provided in this application will be specifically described using a television as an example in the subsequent embodiments.

[0053] Figure 2 An exemplary schematic diagram of the software structure of an electronic device provided in this application is shown.

[0054] like Figure 2 As shown, the software system of an electronic device can adopt a layered architecture, including an application layer, a framework layer, a system service layer, and a kernel layer. Layers can communicate with each other through software interfaces.

[0055] The application layer may include applications in electronic devices, such as desktops, cameras, smart home systems, photo galleries, etc. This application does not limit the applications in electronic devices.

[0056] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes predefined functions. For example, the framework layer may include an activity management service, a multi-modal input subsystem, a rendering service, a window management service, a plug-in management module, and an application grouping module.

[0057] The Activity Manager Service (AMS) is responsible for managing activities, including starting, switching, and scheduling components within the system, as well as managing and scheduling applications. AMS can be called by upper-layer applications to open the corresponding activity. In some embodiments, AMS can manage the lifecycle of apps on electronic devices.

[0058] A multi-modal input subsystem can be used to support electronic devices in providing users with a variety of human-computer interaction methods. The multi-modal input subsystem can receive input events from input peripherals, perform unified operations such as conversion, normalization, and standardization on the input events, and then distribute the processed input events to the corresponding processing programs for further processing.

[0059] The render service can be used to render the user interface of each app in the application layer.

[0060] The Window Manager Service (WMS) is used to manage window programs. WMS can obtain the screen size, determine if a status bar is present, lock the screen, and capture screenshots, among other things.

[0061] The plugin management module can be used to manage one or more services in the framework layer. For example, the plugin management module can aggregate information reported by services such as AMS, multimodal input subsystem, RS, and WMS, and distribute the information to the associated modules for processing.

[0062] The application grouping module can be used to group apps in an electronic device according to a preset grouping strategy. This application embodiment does not limit the above grouping strategy.

[0063] In some embodiments, AMS can send the current lifecycle stage of an app on an electronic device to the plugin management module. The plugin management module can then send the app's lifecycle to the application grouping module.

[0064] In some embodiments, the multi-mode input subsystem can send input events from input peripherals to the plug-in management module. Upon receiving an input event, the plug-in management module can distribute the input event to the corresponding application in the application layer. In this way, the electronic device can respond to the input events from the input peripherals through the corresponding application. Furthermore, upon receiving an input event, the plug-in management module can also instruct the application grouping module to group the background applications in the electronic device.

[0065] The application grouping module can identify background apps based on their lifecycle, thus distinguishing between user-perceptible and user-invisible background apps. User-perceptible apps are those that the user is aware are running on their electronic device. For example, a music app running in the background. Because the electronic device plays music from the music app, the user is aware that the music app is running. User-invisible apps are those running on the electronic device, but the user cannot perceive whether they are still running in real time. For example, after a shopping app is switched from the foreground to the background, the user cannot perceive whether the shopping app is still running on the electronic device.

[0066] In some embodiments, the application grouping module can detect which background apps are using preset resources of the electronic device. Preset resources may include one or more of the following: audio output devices (e.g., speakers, earpieces), audio input devices (e.g., microphones), image capture devices (e.g., cameras), etc. It is understood that both audio output devices and image capture devices are output devices of the electronic device. An app calling an audio output device for audio output can be perceived by the user in real time. For example, in a scenario where an electronic device is running a music app in the background and playing music through an audio output device, although the user cannot perceive that the electronic device is running a music app from the interface displayed on the electronic device, they can perceive that the electronic device is running a music app by hearing the music playing. An app calling an audio input device for audio capture can also be perceived by the user. For example, in a scenario where an electronic device is running a recording app in the background and recording through an audio input device, the electronic device can display a prompt that the recording app is using the audio input device. Thus, the user can perceive that the electronic device is running a recording app based on the prompt that the recording app is using the audio input device. An app calling an image capture device to take pictures can also be perceived by the user. For example, when a background app uses the camera to take a picture, the electronic device can display a notification indicating that the background app is using the camera. This way, the user is aware that the relevant background app is running based on the notification.

[0067] This application does not limit the type of the aforementioned preset resources. The preset resources may include resources installed within the electronic device, such as audio output devices, audio input devices, and image acquisition devices built into the electronic device, or resources not integrated with the electronic device, such as external audio output devices, audio input devices, and image acquisition devices connected to the electronic device.

[0068] The application grouping module can identify background apps that are calling preset resources of the electronic device as apps that are perceptible to the user, and identify background apps that are not calling preset resources of the electronic device as apps that are not perceptible to the user.

[0069] The system service layer comprises the core capabilities of the system, providing services to applications through the framework layer. The system service layer may include a resource scheduling service (RSS). RSS can be used to allocate CPU resources to apps on electronic devices according to preset resource management policies.

[0070] The aforementioned preset resource management strategies may include: freezing background apps that are not perceptible to the user, and suppressing CPU resources for background apps that are perceptible to the user.

[0071] Freezing an app means temporarily suspending the provision of CPU, memory, and other resources necessary for the app to run. During the frozen period, the app will not perform any operations. Freezing one or more background apps can reduce the likelihood of them competing for CPU resources. This allows the electronic device to allocate more CPU resources to the foreground app, improving the smoothness of the device's operation.

[0072] Suppressing CPU resources for an app can include one or more of the following: switching the app to run on a CPU core with lower computing power, reducing the length and / or number of CPU time slices allocated to the app, etc. In some embodiments, CPU cores can include large cores, medium cores, and small cores. Large cores have higher computing power than medium cores. Medium cores have higher computing power than small cores.

[0073] The kernel layer is the layer between hardware and software. It can include hardware drivers and the operating system kernel. Besides providing hardware drivers, the kernel layer also supports functions such as memory management and system process management. The kernel layer can include a CPU set (CPUSET) and a CPU controller (CPUCTL). The CPUSET can be used to limit the application to run on specific CPU cores. The CPUCTL can be used to control the CPU usage of an application, such as the length and / or number of CPU time slices allocated to the application, and the CPU frequency when the application is running on the CPU.

[0074] In some embodiments, after the application grouping module determines the user-perceptible and user-invisible apps in the background app, it can send the application grouping results to the RSS. The RSS can then use the CPUSET and CPUCTL functions in the kernel layer to manage CPU resources for different application groups based on the application grouping results. Specifically, the RSS can freeze user-invisible apps. The RSS can also use CPUSET to switch user-perceptible apps to run on CPU cores with lower computing power, such as running them on medium or small cores. Furthermore, the RSS can use CPUCTL to reduce the length and / or number of time slices allocated to user-perceptible apps.

[0075] In some embodiments, RSS can manage CPU resource groups. RSS can send CPU resource group information to the kernel layer. The kernel layer can allocate CPU resources to applications in an electronic device according to the CPU resource groups. Different CPU resource groups can obtain different amounts of CPU resources. RSS can instruct the kernel layer to adjust the amount of CPU resources allocated to an application by modifying the CPU resource group in which the application resides. After receiving the application grouping result sent by the application grouping module, RSS can adjust the CPU resource group of background apps. For example, RSS can move apps that are imperceptible to the user to the CPU resource group of frozen apps, and move apps that are perceptible to the user to the CPU resource group that receive less CPU resources. In this way, the kernel layer can freeze apps that are imperceptible to the user based on the CPU resource groups and suppress the CPU resources of apps that are perceptible to the user.

[0076] In this way, electronic devices can use a small amount of CPU resources to keep background apps running in a way that is perceptible to the user, while running foreground apps on CPU cores with higher computing power, and / or allocating more CPU time slices to foreground apps to improve their running speed.

[0077] In some embodiments, the application grouping module can also group user-perceptible apps in the background app, dividing the user-perceptible apps into multiple different groups. Based on the above grouping of user-perceptible apps, RSS can apply different levels of CPU resource suppression to different groups. Different levels of CPU resource suppression can represent different amounts of allocated CPU resources. This application embodiment does not limit the level of CPU resource suppression described above.

[0078] For example, the application grouping module can also categorize apps from those perceptible to the user into regular background apps and unimportant background apps based on parameters such as app type. Regular background apps can include apps that perform computational tasks in the background, such as artificial intelligence (AI) assistants. Unimportant background apps can include apps that perform download tasks in the background. The application grouping module can send information about regular and unimportant background apps to the RSS feed. The RSS feed can apply different levels of CPU resource suppression to regular and unimportant background apps. Specifically, the RSS feed can allocate fewer CPU resources to unimportant background apps than to regular background apps. For example, the CPU cores running an unimportant background app may have less computing power than those running a regular background app. Unimportant background apps may also receive fewer CPU time slices than regular background apps.

[0079] The above embodiments for grouping background apps are merely illustrative examples of this application. This application does not limit the methods for grouping background apps.

[0080] The following example, a television, illustrates some scenarios where input peripherals send input events to electronic devices, as provided in the embodiments of this application.

[0081] Figures 3A-3C An exemplary diagram illustrates a scenario where some input peripherals send input events to a television.

[0082] like Figure 3A As shown, the input peripherals connected to the television may include a remote control 300. The remote control 300 may be a button remote control.

[0083] The remote control 300 may include multiple physical buttons, such as: power button 301, start / stop demonstration button 302, screen layout switch button 303, up arrow button 304, left arrow button 305, down arrow button 306, right arrow button 307, confirm button 308, back button 309, menu button 310, call button 311, mute button 312, volume button 313, hang up button 314, delete button 315, and character key display area 316.

[0084] The power button 301 can be used to turn the TV on or off.

[0085] The Start / Stop Presentation key 302 can be used to start or stop a screen presentation when making a call or joining a conference on the TV.

[0086] The screen layout switch key 303 can be used to switch screen layouts.

[0087] The up arrow key (304), left arrow key (305), down arrow key (306), and right arrow key (307) are all directional buttons.

[0088] The confirmation button 308 can be used to confirm the current selection.

[0089] The back button 309 can be used to return to the previous page.

[0090] Menu key 310 can be used to display the TV's menu page.

[0091] The call key 311 can be used to initiate a call or start a meeting.

[0092] The mute button 312 can be used to turn the TV's microphone on or off.

[0093] Volume keys 313 can be used to control the volume of the television. Volume keys 313 may include volume up keys and volume down keys. For example, the volume up keys may be located in the upper half of the volume keys 313; the volume down keys may be located in the lower half of the volume keys 313.

[0094] The hang-up button 314 can be used to hang up a phone call or end a meeting.

[0095] The delete key 315 can be used to delete the entered content.

[0096] The character key display area 316 may include multiple keys for inputting numbers, symbols, and other characters.

[0097] The buttons described above are merely illustrative examples and should not be construed as limiting the scope of this application. The remote control 300 may also include more or fewer buttons.

[0098] In response to a button press on the remote control 300, the remote control 300 can send a corresponding input event to the television.

[0099] like Figure 3A As shown, the television can display a video playback interface 320. The video playback interface 320 may include playback controls 321, playback progress indication information 322, and total video duration 323. The video in the video playback interface 320 is currently paused. The playback controls 321 can be used to play the video. The playback progress indication information 322 can be used to indicate the current playback duration of the video. For example, the playback progress indication information 322 is... Figure 3A The "03:12" shown indicates that the video is currently playing up to 3 minutes and 12 seconds. The total video duration of 323 can be used to indicate the total duration of the video.

[0100] In some embodiments, in a scenario where a video playback interface 320 is displayed on a television, pressing the right directional button 307 on the remote control 300 can be used to fast-forward the currently playing video. In response to... Figure 3A As shown in the diagram, pressing the right directional key 307 allows the remote control 300 to send an input event corresponding to the right directional key 307 to the television. This input event can be used to indicate that the right directional key 307 has been pressed. Optionally, the input event may include information such as the number of times the right directional key 307 has been pressed and / or the duration of the press.

[0101] When the TV receives an input event corresponding to the right directional key 307, it can pass the input event to the video app displaying the video playback interface 320 for processing. The video app can determine that the operation corresponding to the input event is a video fast-forward operation, and then fast-forward the currently playing video for a preset duration. For example, the preset duration can be 10 seconds. In some embodiments, the preset duration of video fast-forward can be determined based on the number of times the right directional key 307 is pressed and / or the duration of the press.

[0102] like Figure 3B As shown, based on the input event corresponding to the right arrow key 307, the TV can fast-forward the currently playing video and adjust the content of the playback progress indicator information 322. Figure 3B In the image, playback progress indicator 322 is "03:22", indicating that the video is currently playing at 3 minutes and 22 seconds. (Compare...) Figure 3A and Figure 3B It can be seen that the television has fast-forwarded the currently playing video by 10 seconds.

[0103] In some embodiments, in a scenario where a video playback interface 320 is displayed on a television, pressing the confirmation button 308 on the remote control 300 can be used to play or pause the currently playing video on the television. In response to... Figure 3B As shown in the diagram, pressing the confirmation key 308 allows the remote control 300 to send an input event corresponding to the confirmation key 308 to the television. This input event can be used to indicate that the confirmation key 308 has been pressed.

[0104] When the TV receives an input event corresponding to the confirmation key 308, it can pass the input event to the video app for processing. The video app can determine that the operation corresponding to the input event is a video playback operation, and then change the video playback status from paused to resumed.

[0105] like Figure 3C As shown, based on the input event corresponding to the confirmation key 308, the TV can continue playing the video and... Figure 3B The playback control 321 shown has changed to Figure 3C The pause playback control 324 is shown. The pause playback control 324 can be used to pause video playback.

[0106] In addition to the input events corresponding to the right directional key 307 and the confirmation key 308, the remote control 300 can also send corresponding input events to the TV in response to the pressing of other keys.

[0107] As can be seen, the input events received by the TV from the input peripheral can include input events indicating that a button has been pressed, i.e., the input events corresponding to the buttons. The input events corresponding to the buttons can include one or more of the following: the number of times the button was pressed, the duration of the button press, etc. Furthermore, under different foreground apps, the input event corresponding to the same button can trigger the TV to perform different operations. The TV can execute the operations corresponding to the input events sent by the remote control 300 through the foreground app.

[0108] Figures 4A to 4G An exemplary diagram illustrates a scenario where other input peripherals send input events to a television.

[0109] like Figure 4A As shown, the input peripherals connected to the television may include a remote control 400. The remote control 400 can provide one or more of the following functions: button pressing function, touch operation function, pointing cursor operation function, voice control function, etc. The remote control 400 may be called a smart remote control, pointing remote control, voice remote control, touch remote control, etc.

[0110] The remote control 400 may include: a home button 401, a power button 402, a touch button 403, a back button 404, a voice button 405, a menu button 406, and volume buttons 407. The power button 402, back button 404, menu button 406, and volume buttons 407 can all refer to the aforementioned... Figure 3A The description of the remote control 300 shown.

[0111] The home button 401 can be used to display the TV's home page.

[0112] The touch button 403 may include directional buttons (i.e., up, down, left, and right arrow keys) capable of receiving press operations, and an confirmation button 403A. The area where the touch button 403 is located can be a touch area. A touch sensor may be provided on the touch button 403 for detecting touch operations, such as swiping operations. That is, users can both press the buttons on the touch button 403 and perform touch operations on the touch button 403.

[0113] The voice button 405 can be used to activate the microphone of the remote control 400 for voice recording. For example, a user can press and hold the voice button 405 and speak a voice command. The remote control 400 can then send the recorded voice command to the television. The television can then execute the operation corresponding to the voice command.

[0114] In some embodiments, the remote control 400 may include modules such as an accelerometer, a gyroscope, an ultrawideband (UWB) module, an ambient light sensor, and an infrared sensor. Based on these modules, the remote control 400 can cooperate with a camera on a television to provide a pointing cursor operation function. Specifically, by locating the posture and control positions of the remote control 400, the television can determine the pointing position of the remote control 400. The television can then display a pointing cursor on the screen based on the pointing position of the remote control 400. The display position of the pointing cursor on the screen can change according to the pointing position of the remote control 400.

[0115] like Figure 4A As shown, the television can display a pointing cursor 413 on the screen. Users can move the pointing cursor 413 to the target location on the television screen by adjusting the pointing position of the remote control 400. Based on the pointing cursor 413, users can precisely point to and select targets on the television using the remote control 400, performing operations such as tapping, skipping, circling, dragging, and swiping, without having to switch between icons step by step.

[0116] like Figure 4A As shown, the TV can display a homepage 410. The homepage 410 may include an application selection area 411 and a display area 412. The application selection area 411 may include application options corresponding to applications installed on the TV, such as Game Center option 411A, All Applications option 411B, etc. The display area 412 can be used to display information about the application corresponding to the selected application option in the application selection area 411. For example, when Game Center option 411A is selected, the TV can display information about the Game Center app in the display area 412.

[0117] like Figure 4B As shown, in response to a right-swipe operation on touch button 403, remote control 400 can send an input event corresponding to the right-swipe operation to the television. The input event corresponding to the right-swipe operation can be used to indicate that a right-swipe operation has been performed on the touch area of ​​the remote control 400. Optionally, the input event corresponding to the right-swipe operation may include one or more of the following: the swipe speed and swipe distance.

[0118] When the TV receives an input event corresponding to a right swipe operation, it can delegate the input event to the desktop app displayed on the homepage 410 for processing. The desktop app can determine that the operation corresponding to the input event is to switch between selected application options in the application selection area 411.

[0119] like Figure 4C As shown, according to Figure 4BThe input event corresponding to the right swipe operation shown indicates that the TV can switch the selected application option to the next application option after Game Center option 411A, namely All Applications option 411B. Furthermore, when All Applications option 411B is selected, the TV can display it in display area 412. Figure 4C The image shows information about all the application management apps.

[0120] like Figure 4D As shown, in response to a press of the confirmation button 403A, the remote control 400 can send an input event corresponding to the confirmation button 403A to the TV. Upon receiving the input event corresponding to the confirmation button 403A, the TV can delegate the input event to the desktop app for processing. Figure 4D In the image, the cursor 413 is positioned where video option 411C is located. The desktop app can determine that the input event corresponding to the confirmation key 403A is used to select the target pointed to by the cursor, namely video option 411C.

[0121] like Figure 4E As shown, based on the input event corresponding to the confirmation key 403A, the TV can switch the selected application option to video option 411C. In this way, the user can use the pointing cursor operation function provided by the remote control 400 to complete the skipping operation, skipping the application options between all application options 411B and video option 411C, and directly switching the selected application option from all application options 411B to video option 411C.

[0122] like Figure 4F As shown, in response to pressing the voice button 405, the remote control 400 can activate its microphone. While holding down the voice button 405, the user can speak a voice command. For example, the voice command could be "Play TV series AA". The remote control 400 can generate a corresponding input event based on the collected voice command. The input event corresponding to the voice command can include the content of the voice command. The remote control 400 can send the input event corresponding to the voice command to the television.

[0123] When the TV receives an input event corresponding to a voice command, it can wake up the voice assistant app and pass the input event to the voice assistant app to execute the operation corresponding to the voice command. For example, if the voice command is "Play TV series AA," the TV can open the video app through the voice assistant app and play TV series AA. Figure 4G As shown, the TV can display the playback interface for the TV series AA.

[0124] As can be seen, the input events received by the TV from the input peripheral can include: input events corresponding to touch operations and input events corresponding to voice commands. Input events corresponding to touch operations can include one or more of the following: the direction of the touch operation, the speed of the touch operation, the distance of the touch operation, etc. Input events corresponding to voice commands can include the content of the voice command. The TV can execute operations corresponding to different types of input events through the foreground app.

[0125] Figures 5A-5E An exemplary diagram illustrates a scenario where other input peripherals send input events to a television.

[0126] In some embodiments, the input peripheral connected to the TV may include a mobile phone. Users can control the TV via their mobile phones.

[0127] like Figure 5A As shown, mobile phone 500 can display desktop 510. Desktop 510 can include a Smart Life APP icon 511. In response to an operation on the Smart Life APP icon 511, mobile phone 500 can open the Smart Life APP and display... Figure 5B The user interface shown is 520.

[0128] like Figure 5B As shown, the user interface 520 may include a TV card 521. In response to an operation on the TV card 521, the mobile phone 500 may display... Figure 5C The user interface shown is 530.

[0129] like Figure 5C As shown, the user interface 530 may include controls for setting up the television, such as a photo wall control 531, a remote control control 532, a call control 533, a mirror control 534, an image setting control 535, and a sound setting control 536.

[0130] The photo wall control 531 can be used to upload photos from a mobile phone 500 to a TV. Once uploaded, the photos can be viewed on the TV.

[0131] The call control 533 can be used to make voice / video calls to a TV via a phone app.

[0132] The mirror control 534 can be used to synchronously display the content of the TV screen on the screen of the mobile phone 500, making it convenient for users to control the TV on the mobile phone 500.

[0133] The image settings control 535 can be used to set the image mode of the TV and adjust the screen brightness.

[0134] The sound settings control 536 can be used to set the sound effect mode of the TV and adjust the volume of the TV.

[0135] Remote control control 532 can be used to set mobile phone 500 as a remote control. (In response to...) Figure 5C The operation of the remote control control 532 shown can be displayed on the mobile phone 500. Figure 5D The user interface shown is 540.

[0136] like Figure 5D As shown, the user interface 540 may include a remote control icon 541. The remote control icon 541 can be used to switch the type of remote control the mobile phone 500 is used for. For example, the mobile phone 500 can be set as a traditional button remote control, or it can be set as a touch remote control.

[0137] The user interface 540 may also include multiple virtual remote control buttons, such as a control center button 542, a screenshot button 543, a power button 544, a touch button 545, a back button 546, a home button 547, volume buttons 548, and a menu button 549. The power button 544, back button 546, home button 547, volume buttons 548, and menu button 549 can be referenced in the preceding descriptions of remote control 300 or remote control 400.

[0138] Control Center button 542 can be used to open the TV's control center.

[0139] The screenshot key 543 can be used to capture images of the TV screen.

[0140] The touch button 545 may include directional keys (i.e., up directional key 545A, left directional key 545B, down directional key 545C, and right directional key 545D) and an confirmation key 545E. In some embodiments, the mobile phone 500 can recognize user operations performed on the directional keys or the confirmation key 545E, such as single-click, double-click, long-press, etc. The area where the touch button 545 is located can be a touch area. The mobile phone 500 can detect swipe operations performed on the area where the touch button 545 is located and generate an input event corresponding to the swipe operation. The input event corresponding to the swipe operation can be referred to the description in the foregoing embodiments. The mobile phone 500 can send the input event corresponding to the swipe operation to the television.

[0141] In some embodiments, in response to Figure 5D As shown, when the confirmation key 545E is clicked, the mobile phone 500 can generate an input event corresponding to the confirmation key 545E and send the input event corresponding to the confirmation key 545E to the TV.

[0142] The TV is currently displaying homepage 550. Homepage 550 can be found in the previous section. Figure 4A The homepage 410 is shown. When an input event corresponding to the confirmation key 545E is received, the TV can delegate the input event to the desktop APP displaying the homepage 550 for processing. Figure 5DIn the homepage 550, all application options 551 are currently selected. The desktop app can determine that the input event corresponding to the confirmation key 545E is used to open the all application management app.

[0143] like Figure 5E As shown, based on the input event corresponding to the confirmation key 545E, the TV can open the All Applications Management App and display the user interface 560. The user interface 560 can include the identifiers of all applications installed on the TV.

[0144] As can be seen, mobile phone 500 can be used as a remote control. When mobile phone 500 is in remote control mode, it can send corresponding input events to the TV based on received operations on the virtual remote control buttons. For details, please refer to the previous description of remote control 300 or remote control 400 sending input events to the TV.

[0145] In some embodiments, in non-remote control mode, after receiving a user operation for controlling the television, the mobile phone 500 can send a corresponding input event to the television. For example, in response to... Figure 5C By operating the mirror control 534 shown, the mobile phone 500 can display a mirrored version of the television screen. This mirrored content is synchronized with the content displayed on the television screen. When a user operation is detected on component 1 within the mirrored content, the mobile phone 500 can send an input event to the television indicating that a user operation has occurred on component 1. This input event can include the type of user operation performed on user 1. Thus, the television can respond to the user operation on component 1 based on the received input event.

[0146] The above is merely an exemplary description of the input peripheral and the input events sent by the input peripheral in the embodiments of this application, and should not be construed as limiting this application.

[0147] Figure 6 A flowchart of a device resource management method provided in an embodiment of this application is illustrated.

[0148] S611: The electronic device parses the product configuration file to obtain the resource management policy.

[0149] Electronic devices can be devices such as televisions that can be controlled by input peripherals.

[0150] In some embodiments, the product profile may include resource management policies corresponding to input events received by the electronic device from input peripherals. Optionally, different input events may correspond to different resource management policies. For example, in the resource management policy corresponding to input event 1, the level of processor resource suppression for user-perceptible applications in the background is level 1. In the resource management policy corresponding to input event 2, the level of processor resource suppression for user-perceptible applications in the background is level 2. Compared to level 1, the application receives fewer processor resources under level 2 processor resource suppression. For example, compared to level 1, the application receives fewer CPU time slices under level 2 processor resource suppression, and / or runs on a CPU core with lower computing power.

[0151] The above resource management strategies are merely illustrative examples of this application and do not constitute a limitation thereof.

[0152] Product configuration files can be pre-installed in electronic devices, or they can be obtained by the electronic devices from servers or other devices.

[0153] In some embodiments, electronic devices can parse product configuration files through a resource scheduling service. This application does not limit the method used to parse product configuration files.

[0154] S612, The input peripheral receives the user's operation.

[0155] User operations can include actions performed on input peripherals and used to control the operation of electronic devices.

[0156] In some embodiments, the input peripheral is provided with buttons, and the user operation received by the input peripheral can be a pressing operation on the buttons. Alternatively, the input peripheral is provided with a touch area, and the user operation received by the input peripheral can be a touch operation on the touch area. Alternatively, the input peripheral is provided with a voice button, and the user operation received by the input peripheral can be a long press of the voice button and the issuance of a voice command. The scenarios for the input peripheral receiving user operations can be referred to the foregoing. Figures 3A-3C , Figures 4A to 4G The scene shown Figures 5A-5E The scenario is shown. This application embodiment does not limit the type of user operation received by the input peripheral.

[0157] S613, Input peripherals send input events based on user operations.

[0158] The types of input events may include, but are not limited to: input events corresponding to key presses, input events corresponding to touch operations, input events corresponding to voice commands, and other input events that users use to operate electronic devices.

[0159] S614. In the background application of electronic device testing, there are user-perceptible applications and user-insensitive applications.

[0160] In some embodiments, when an input event is received from an input peripheral, the electronic device can traverse background applications and determine user-aware and user-invisible applications within the background applications. The method for identifying user-aware and user-invisible applications can be found in the description of the foregoing embodiments, and will not be repeated here.

[0161] Optionally, when an input event is received from an input peripheral, the electronic device can determine whether the input event is a preset input event. If the received input event is a preset input event, the electronic device does not need to execute steps S614 and S615. If the received input event is not a preset input event, the electronic device can execute steps S614 and S615. For example, the preset input event may include one or more of the following: an input event corresponding to a user operation on the power button on the remote control, an input event corresponding to a user operation on the volume buttons on the remote control, an input event corresponding to a user operation on the character keys on the remote control used for character input, etc. This application embodiment does not limit the preset input event.

[0162] In some embodiments, the product configuration file may include the aforementioned preset input events. The electronic device can determine the preset input events by parsing the product configuration file, and then determine whether the received input event is a preset input event.

[0163] S615. According to the resource management strategy, the electronic device freezes applications that are not perceptible to the user in the background and suppresses processor resources for applications that are perceptible to the user in the background.

[0164] In some embodiments, the resource management strategy may further include a duration for controlling the CPU resources of background applications. Specifically, upon receiving an input event, the electronic device may freeze background applications that are not perceived by the user for a preset duration, and suppress the processor resources of background applications that are perceived by the user for the same preset duration. After controlling the CPU resources of background applications for the preset duration, the electronic device may unfreeze the background applications that are not perceived by the user and remove the processor resource suppression from the background applications that are perceived by the user. This application embodiment does not limit the value of the preset duration. For example, the preset duration may be 5 seconds or 10 seconds, etc.

[0165] For example, before receiving an input event, an electronic device might be running both user-aware and user-unaware applications in the background, with the user-aware applications running on the device's high-performance cores. The device can freeze the user-unaware background applications for 10 seconds after receiving the input event and switch the user-aware background applications to run on the low-performance cores. This allows the device to significantly reduce CPU resources allocated to background applications during those 10 seconds, freeing up more CPU resources for foreground applications to respond quickly to input events. After 10 seconds, the device can unfreeze the user-unaware background applications and switch the user-aware background applications back to the high-performance cores. This allows the user-unaware background applications to resume running, while the user-aware background applications regain access to more CPU resources, improving performance and providing a smoother user experience.

[0166] Understandably, input events sent by peripheral devices represent new events that electronic devices need to process. If background applications within the electronic device consume significant CPU resources, the process handling that input event may need to queue to acquire CPU resources, potentially causing the electronic device to fail to respond quickly. Therefore, upon receiving an input event, the electronic device can manage the CPU resources used by background applications. The electronic device can typically complete the input event sent by the corresponding peripheral device within a certain timeframe. After completing the input event, the electronic device can release the CPU resources occupied by that input event. This allows the electronic device to de-manage background applications, increasing the resources allocated to them and improving their operational efficiency.

[0167] In some embodiments, different input events can correspond to the same resource management strategy. Input events corresponding to different buttons are considered different input events. For example, the input event corresponding to the OK button on a remote control is different from the input event corresponding to the Home button. Different types of input events are also considered different input events. For example, the input event corresponding to the OK button on a remote control is different from the input event corresponding to a left swipe operation on the touch area.

[0168] For example, input event 11 and input event 12 are different input events. When input event 11 is received, the electronic device can freeze applications that are not perceived by the user in the background and suppress processor resources at level 1 for applications that are perceived by the user in the background. When input event 12 is received, the electronic device can freeze applications that are not perceived by the user in the background and suppress processor resources at level 1 for applications that are perceived by the user in the background.

[0169] In some embodiments, different input events can correspond to different resource management strategies. The electronic device can determine the resource management strategy corresponding to different input events based on the product configuration file. For example, input event 1 and input event 2 are different types of input events. When input event 1 is received, the electronic device can freeze applications in the background that are not perceived by the user, and suppress the processor resources of applications in the background that are perceived by the user at level 1. When input event 2 is received, the electronic device can freeze applications in the background that are not perceived by the user, and suppress the processor resources of applications in the background that are perceived by the user at level 2. Level 1 and Level 2 can be referred to the description in the foregoing embodiments.

[0170] In some embodiments, when an input event is received, the electronic device, in addition to identifying user-aware and user-invisible applications from background applications, can further divide the user-aware applications into multiple groups. For example, the electronic device can divide user-aware applications into multiple groups based on the application type. This application embodiment does not limit the method of application grouping described above. Different groups within user-aware applications can correspond to different resource management strategies. The electronic device can determine the resource management strategy corresponding to different groups based on the product configuration file.

[0171] For example, an electronic device can determine that user-perceptible applications may include group 1 and group 2. In addition to freezing user-insensitive applications, the electronic device can also suppress processor resources at level 1 for group 1 and at level 2 for group 2. This application embodiment does not limit the aforementioned group 1 and group 2. For example, group 1 may be a group containing ordinary background applications. Group 2 may be a group containing unimportant background applications. Not limited to group 1 and group 2, user-perceptible applications in the background can also be divided into more groups.

[0172] The aforementioned approach of grouping and suppressing processor resources for user-perceptible background applications allows for more efficient allocation and utilization of CPU resources when the electronic device receives input events. This ensures that the electronic device has more CPU resources to respond to input events promptly and reduces the impact of processor resource suppression on the operation of user-perceptible background applications. It prevents situations where the processor resources of one or more user-perceptible background applications are excessively suppressed, leading to lag and a negative impact on the user experience. Ultimately, this approach ensures that different user-perceptible applications consume minimal CPU resources while maintaining background operation.

[0173] S616, The electronic device performs the operation corresponding to the input event.

[0174] Upon receiving an input event, the electronic device can identify the target application for handling the input event and then pass the input event to the target application for processing. The target application can determine and execute the operation corresponding to the input event, as detailed above. Figures 3A-3C , Figures 4A to 4G , Figures 5A-5E The scene shown.

[0175] Step S616 can be executed synchronously with steps S614 and S615 above.

[0176] As demonstrated by the methods described above, electronic devices can temporarily manage background applications after receiving input events from peripheral devices, reducing the CPU resources consumed by these applications. This allows the electronic device to allocate more CPU resources to the foreground app, thereby improving the response speed to input events and enhancing the smoothness of the user experience.

[0177] Figure 7 An exemplary schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application is shown.

[0178] like Figure 7 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0179] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0180] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0181] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0182] The processor 110 may also include a memory for storing instructions and data. In some examples, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or is recurring. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0183] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback.

[0184] The charging management module 140 receives charging input from a charger, which can be a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0185] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.

[0186] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0187] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0188] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.

[0189] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0190] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering.

[0191] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0192] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0193] The ISP is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye.

[0194] Camera 193 is used to capture still images or videos. In some embodiments, electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0195] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0196] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0197] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0198] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0199] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0200] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, audio module 170 may be located in processor 110, or some functional modules of audio module 170 may be located in processor 110. Speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Receiver 170B, also called a "handset," is used to convert audio electrical signals into sound signals. Microphone 170C, also called a "microphone" or "microphone," is used to convert sound signals into electrical signals. Headphone jack 170D is used to connect wired headphones.

[0201] The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, gravity sensors, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, angle sensors, etc.

[0202] Buttons 190 include a power button, volume buttons, etc. Motor 191 can generate vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, and also to indicate messages, missed calls, notifications, etc.

[0203] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and detach from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The electronic device 100 interacts with the network through the SIM card to achieve functions such as calls and data communication. In some examples, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be removed from it.

[0204] The structures of input peripherals and electronic devices such as televisions involved in this application can all refer to the structure of the above-mentioned electronic device 100.

[0205] The electronic device provided in this application embodiment can run an operating system (OS). This operating system can be various operating systems currently used in the industry, such as HarmonyOS, an operating system developed based on OpenHarmony; or other operating systems, for example... The iOS mobile operating system; it can also refer to various open-source operating systems or their derivatives, such as Linux OS, and other embedded operating systems; it can also be a future type of operating system, such as an AI operating system based on artificial intelligence. An operating system is a set of interconnected system software programs that manage and control the operation of electronic devices, utilize and run hardware and software resources, and provide public services to organize user interaction. The operating system occupies a pivotal position in electronic devices, connecting to the physical hardware layer below and providing a runtime environment for application software above.

[0206] An operating system typically includes a kernel layer, a middleware layer, and an application layer. The application layer includes applications, which can include system applications and third-party applications. The middleware layer is a suite of software, or frameworks, that provides various services to application developers, such as databases, multimedia, and graphics, or capabilities like distributed scheduling and system expansion. For example, the middleware layer can also be broadly divided into a framework layer and / or a system service layer. The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The system service layer includes the system's core capabilities, providing services to applications through the framework layer. The kernel layer is the layer between hardware and software. The kernel layer can include hardware drivers and the operating system kernel. In addition to providing hardware drivers, the kernel layer also supports functions such as memory management and system process management.

[0207] The electronic devices we use in our daily lives come in various types and forms, and are applied in a wide range of scenarios. Therefore, based on the different forms and functions of electronic devices, different application scenarios, and different user needs, the operating systems used in these devices may also differ. These operating systems share commonalities but also have their own unique characteristics. Different operating systems affect user experience, application ecosystem, and system performance. The basic functions implemented by the electronic device provided in this application can be implemented using a general-purpose operating system or a dedicated operating system. To more clearly illustrate the implementation of the embodiments of this application under a specific operating system, the architecture of HarmonyOS is shown below. Those skilled in the art can deduce the implementation of the embodiments of this application under other specific operating systems, such as... Implementation under the operating system.

[0208] Figure 8 An exemplary schematic diagram of the software structure of an electronic device provided in an embodiment of this application is shown.

[0209] like Figure 8 As shown, the software architecture of an electronic device can be divided into several layers. In some embodiments, from bottom to top, these layers are: kernel layer, system service layer, framework layer, and application layer. The layers communicate with each other through software interfaces. System functions can be tailored, added, or combined at the subsystem granularity in different device deployment scenarios, and each subsystem can also be tailored, added, or combined at the functional granularity.

[0210] The Kernel Abstraction Layer (KAL) provides basic kernel capabilities to upper layers by shielding the differences between multiple kernels, including but not limited to process / thread management, memory management, file system, network management, and peripheral device management.

[0211] Kernel Subsystem: Supports the selection of a suitable OS kernel for different resource-constrained devices, including but not limited to Linux kernel, HarmonyOS kernel, LiteOS, etc.

[0212] Driver Subsystem: The driver framework is the foundation for the open system hardware ecosystem, providing unified peripheral access capabilities and a framework for driver development and management. The driver framework includes: display drivers, camera drivers, audio drivers, Bluetooth drivers, sensor drivers, etc.

[0213] The system service layer comprises the core capabilities of the system, providing services to applications through the framework layer. This layer includes, but is not limited to, the following subsystems:

[0214] The system's basic capability subsystems provide fundamental capabilities for the operation, scheduling, and migration of distributed applications across multiple devices. For example, they may include distributed soft bus, distributed data management, distributed task scheduling, compiler / runner, and resource scheduling services. They may also include multi-modal input subsystem, graphics subsystem, security subsystem, and AI subsystem.

[0215] Basic software service subsystems: provide common and general software services; for example, event notification subsystem, telephone service subsystem, multimedia subsystem, etc.

[0216] Enhanced software service subsystem suite: Provides differentiated capability-enhancing software services for different devices; for example, it may include proprietary business subsystems for smart screens, wearable devices, and IoT devices.

[0217] Hardware service subsystem set: provides hardware services; for example, it may include location service subsystem, user IAM (Identity and Access Management) subsystem, wearable proprietary hardware service subsystem, biometric identification, IoT proprietary hardware service subsystem, etc.

[0218] Distributed task scheduling enables distributed service management (discovery, synchronization, registration, and invocation), supporting remote startup, remote invocation, remote connection, and migration of applications across devices.

[0219] Distributed data management enables data synchronization, data storage, data sharing, and data access across all scenarios and devices.

[0220] The distributed soft bus provides communication-related capabilities for seamless interconnection between multiple devices, including: WLAN service capabilities, Bluetooth service capabilities, soft bus, inter-process communication RPC (Remote Procedure Call) and other communication capabilities.

[0221] A compiler / runner is a unified compilation and runtime platform designed to support the joint compilation and execution of multiple programming languages ​​and multiple chip platforms. For example, a compiler / runner could be the ArkCompiler.

[0222] Resource scheduling services can be used to manage and schedule CPU resources in electronic devices. The resource scheduling service can be referenced from the preceding text. Figure 2 Introduction.

[0223] The multimodal input subsystem integrates input from multiple dimensions. Specifically, the multimodal input subsystem receives input events from peripheral devices such as remote controls, keyboards, mice, touchscreens, and touchpads based on the kernel subsystem and driver framework. After normalizing and standardizing the input events, it distributes them to the UI framework module. The UI framework module encapsulates the events and forwards them to the application, or distributes the events to the application through other interfaces.

[0224] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. Examples include the UI framework module (which provides a complete infrastructure for UI development, including UI functionalities such as components, layouts, animations, and interactive events, as well as real-time interface preview tools), the user application framework, the Ability framework (an Ability is a lightweight application; the Ability framework schedules and manages the operation and lifecycle of Abilities), and activity management services. Different devices may have different operating systems, and therefore support different APIs. The activity management service can be referenced above. Figure 2 Introduction.

[0225] The HarmonyOS API is a series of open capabilities provided to support HarmonyOS application development. The HarmonyOS API can be set at the framework layer or independently of the framework layer. Examples include: Audio API (audio service), Push API (push service), and Account API (account service).

[0226] The application layer can include applications in electronic devices, including but not limited to: desktop, control bar, settings, contacts, phone, camera, social, travel, gallery, smart living, etc.

[0227] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.

[0228] This application also provides a computer program product, including a computer program that, when run on a processor, can implement the steps in the various method embodiments described above.

[0229] This application also provides a chip system, which includes a processing circuit and an interface circuit. The interface circuit receives code instructions and transmits them to the processing circuit. The processing circuit executes the code instructions to enable the chip system to implement the steps of any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.

[0230] It is understood that the user interfaces described in the embodiments of this application are merely example interfaces and do not constitute a limitation on the solution of this application. In other embodiments, the user interface may adopt different interface layouts, may include more or fewer controls, and may add or remove other functional options, as long as they are based on the same inventive concept provided in this application, they are all within the protection scope of this application.

[0231] It should be noted that, without causing contradictions or conflicts, any feature in any embodiment of this application, or any part of any feature, can be combined, and the combined technical solution is also within the scope of the embodiments of this application.

[0232] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for managing equipment resources, characterized in that, The method includes: The first device receives a first input event from the second device, the first input event being triggered by the second device in response to a first operation performed on the second device; Based on the first input event, the first device reduces the processor resources occupied by background applications in the first device according to the first strategy. The background applications include a first group of applications and a second group of applications. The first group of applications includes applications that are calling preset resources of the first device in the background applications. The second group of applications includes applications that are not calling preset resources in the background applications. The first strategy includes suppressing the processor resources of the first group of applications and / or freezing the second group of applications. The first device executes the operation corresponding to the first input event.

2. The method according to claim 1, characterized in that, The first group of applications includes the third group of applications and the fourth group of applications. The process of suppressing processor resources for the first group of applications includes: The third group of applications is subjected to a first-level processor resource suppression, and the fourth group of applications is subjected to a second-level processor resource suppression, wherein the fourth group of applications occupies less processor resources than the third group of applications.

3. The method according to claim 2, characterized in that, The third and fourth groups of applications are determined based on the type of application.

4. The method according to any one of claims 1-3, characterized in that, The processor resource suppression includes: reducing the CPU time slices provided to the first group of applications, and / or adjusting the first group of applications to run on CPU cores with lower computing power.

5. The method according to any one of claims 1-4, characterized in that, After the first device reduces the processor resources of background applications in the first device according to the first strategy for a period exceeding a first duration, the method further includes: The first device releases the processor resource suppression on the first group of applications, and / or unfreezes the second group of applications.

6. The method according to any one of claims 1-5, characterized in that, Before the first device reduces the processor resources occupied by background applications in the first device according to the first strategy, the method further includes: The first device determines that the first input event satisfies a first condition, the first condition including a preset input event.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: The first device receives a second input event from the second device, the second input event being triggered by the second device in response to a second operation performed on the second device; Based on the second input event, the second device reduces the processor resources occupied by background applications in the first device according to the second strategy; The first device performs the operation corresponding to the second input event.

8. The method according to claim 7, characterized in that, The second strategy includes suppressing processor resources for the first group of applications and / or freezing the second group of applications; In the first strategy, the processor resource suppression level for the first group of applications includes a first level; in the second strategy, the processor resource suppression level for the first group of applications includes a third level; the processor resources occupied by the application under the first level of processor resource suppression are different from the processor resources occupied by the application under the third level of processor resource suppression.

9. The method according to claim 7 or 8, characterized in that, The first input event and the second input event are of different types.

10. The method according to any one of claims 1-9, characterized in that, The first input event type includes one or more of the following: input event corresponding to a button, input event corresponding to a touch operation, and input event corresponding to a voice command.

11. The method according to any one of claims 1-10, characterized in that, The first device is a television.

12. An electronic device, characterized in that, The electronic device includes a memory and a processor, wherein the memory is used to store a computer program; the processor executes the computer program to implement the method of any one of claims 1-11.

13. A computer-readable storage medium storing instructions, characterized in that, When the instructions are executed by the processor, they implement the method of any one of claims 1-11.

14. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, implement the method of any one of claims 1-11.