An information processing method, an electronic device, and a computer-readable storage medium
Patent Information
- Application Number
- CN202210768855.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2042-06-30
AI Technical Summary
[0003]为解决上述技术问题,本申请实施例期望提供一种信息处理方法、电子设备和计算机可读存储介质,解决了相关技术中的播放器申请唤醒锁的时间较长,存在其他程序趁机处理自己数据的情况较为严重,导致系统出现额外的消耗,拖慢前台程序的运行,同时也耗费了额外的电量的问题
[0034]The information processing method, electronic device, and computer-readable storage medium provided in the embodiments of this application obtain the state information of a target application. If the state information indicates that the target application is in a running state, the target service requested by the target application is released. If the state information indicates that the target application is in a running state, the target data of the target application is processed based on a second operating system in a first system state. The target service is released so that the first operating system can transition from the first system state to the second system state. The power consumption of the first operating system in the second system state is less than the power consumption of the first operating system in the first system state, and the power consumption of the second operating system in the first system state is less than the power consumption of the first operating system in the second system state. Thus, the target application is released. After requesting the target service, other applications on the electronic device cannot process data through the target service, thus preventing them from consuming the electronic device's resources. At the same time, releasing the target service puts the first operating system into a low-power second system state. In this case, the target data of the target application is processed by the second operating system, which has even lower power consumption than the first operating system in the first system state. This not only ensures the processing of the target data of the target application but also reduces the power consumption of the electronic device. This solves the problem in related technologies where the time for the player to request the wake-up lock is long, and other programs take the opportunity to process their own data, resulting in additional system consumption, slowing down the operation of foreground programs, and consuming extra power.
Smart Images

Figure CN115167655B_ABST
Abstract
Description
Technical Field
[0001] This application relates to information determination techniques in the field of computers, and more particularly to an information processing method, electronic device, and computer-readable storage medium. Background Technology
[0002] Currently, some background programs in the Android system take advantage of other programs requesting a wake lock to process their own data. This is especially true when playing music through the Android system's media player, which usually requests a wake lock to keep the system awake so that the music can continue playing in the background. However, the media player takes a long time to request a wake lock, which makes it more likely that other programs will take the opportunity to process their own data. This results in additional system consumption, slows down the operation of foreground programs, and also consumes extra battery power. Summary of the Invention
[0003] To address the aforementioned technical problems, this application aims to provide an information processing method, an electronic device, and a computer-readable storage medium. These solutions resolve the issues in related technologies where the time required for a player to request a wake-up lock is long, leading to situations where other programs take the opportunity to process their own data, resulting in additional system consumption, slowing down the operation of foreground programs, and wasting extra power.
[0004] The technical solution of this application is implemented as follows:
[0005] An information processing method, the method comprising:
[0006] Obtain the status information of the target application;
[0007] If the status information indicates that the target application is in a running state, the target service requested by the target application is released; wherein, the target service is released so that the first operating system can enter the second system state from the first system state, and the power consumption of the first operating system in the second system state is less than the power consumption of the first operating system in the first system state.
[0008] If the status information indicates that the target application is in a running state, the target data of the target application is processed based on the second operating system in the first system state, and the power consumption of the second operating system in the first system state is less than the power consumption of the first operating system in the second system state.
[0009] In the above scheme, the first operating system and the second operating system are operating systems that run based on a virtual machine monitor, and the first operating system and the second operating system share the hardware resources of the electronic device.
[0010] In the above scheme, the step of "if the status information indicates that the target application is in a running state" includes:
[0011] If the target file corresponding to the target application in the electronic device is invoked, the status information indicates that the target application is in a running state.
[0012] In the above scheme, before releasing the target service requested by the target application, the following steps are also included:
[0013] The first operating system, in its first system state, retrieves the operation file corresponding to the target application from the target file and stores the operation file in the target storage area of the electronic device; wherein the target storage area is a storage area accessible to both the first operating system and the second operating system.
[0014] Accordingly, the processing of the target application's target data based on the second operating system in the first system state includes:
[0015] The second operating system, which is in the first system state, retrieves the operation file from the target storage area and processes the target data based on the operation file to obtain the processed target data.
[0016] The method in the above scheme further includes:
[0017] The first operating system, in its first system state, carries the first storage location of the operation file in the target storage area and the identifier of the operation file in a first interrupt signal, and sends the first interrupt signal to the second operating system.
[0018] Accordingly, obtaining the operation file from the target storage area includes:
[0019] The first storage location and the identifier are determined from the first interrupt signal by the second operating system, which is in the first system state;
[0020] The operation file corresponding to the identifier is obtained from the first storage location of the target storage area by the second operating system in the first system state.
[0021] In the above scheme, obtaining the operation file corresponding to the target application from the target file includes:
[0022] The operation file is obtained from the target file by the processor of the electronic device via the first virtual processor.
[0023] In the above scheme, processing the target data based on the operation file includes:
[0024] The target data is processed by the processor based on the operation file via a second virtual processor.
[0025] The method in the above scheme further includes:
[0026] The processed target data is stored in the target storage area of the electronic device through the second operating system, which is in the first system state.
[0027] The target service is awakened, and the processed target data is retrieved from the target storage area through the first operating system in the first system state, and the processed target data is displayed.
[0028] In the above scheme, after storing the processed target data to the target storage area of the electronic device, it further includes:
[0029] The processed target data is carried in a second interrupt signal at a second storage location in the target storage area, and the second interrupt signal is sent to the first operating system.
[0030] Accordingly, obtaining the processed target data from the target storage area includes:
[0031] Determine the second storage location from the second interrupt signal;
[0032] The processed target data is obtained from the second storage location in the target storage area.
[0033] A computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the information processing method described above.
[0034] The information processing method, electronic device, and computer-readable storage medium provided in the embodiments of this application obtain the state information of a target application. If the state information indicates that the target application is in a running state, the target service requested by the target application is released. If the state information indicates that the target application is in a running state, the target data of the target application is processed based on a second operating system in a first system state. The target service is released so that the first operating system can transition from the first system state to the second system state. The power consumption of the first operating system in the second system state is less than the power consumption of the first operating system in the first system state, and the power consumption of the second operating system in the first system state is less than the power consumption of the first operating system in the second system state. Thus, the target application is released. After requesting the target service, other applications on the electronic device cannot process data through the target service, thus preventing them from consuming the electronic device's resources. At the same time, releasing the target service puts the first operating system into a low-power second system state. In this case, the target data of the target application is processed by the second operating system, which has even lower power consumption than the first operating system in the first system state. This not only ensures the processing of the target data of the target application but also reduces the power consumption of the electronic device. This solves the problem in related technologies where the time for the player to request the wake-up lock is long, and other programs take the opportunity to process their own data, resulting in additional system consumption, slowing down the operation of foreground programs, and consuming extra power. Attached Figure Description
[0035] Figure 1 A flowchart illustrating an information processing method provided for an embodiment of this application;
[0036] Figure 2 A flowchart illustrating another information processing method provided for an embodiment of this application;
[0037] Figure 3 A flowchart illustrating yet another information processing method provided in an embodiment of this application;
[0038] Figure 4 A flowchart illustrating an information processing method provided for another embodiment of this application;
[0039] Figure 5 A flowchart illustrating an information processing method applied to a music player, as provided in an embodiment of this application;
[0040] Figure 6 This is a schematic diagram of the structure of an electronic device provided as an embodiment of this application. Detailed Implementation
[0041] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0042] Embodiments of this application provide an information processing method applied in an electronic device, with reference to... Figure 1 As shown, the method includes the following steps:
[0043] Step 101: Obtain the status information of the target application.
[0044] In this embodiment, the target application can be any media player. Generally, the target application is an application within an electronic device. In one feasible approach, the target application can be a media player corresponding to playback software, a media player included in applications such as instant messaging programs or information sharing programs, or a dedicated music player. This embodiment does not limit the specific application to these limitations. The status information represents the state of the target application, which may include running, paused, stopped, and destroyed states. If the target application's status information is running, it indicates that the target application is currently running in the foreground and can interact with the user. If the target application's status information is paused, it indicates that the target application has been overwritten by another program but still maintains contact with the manager, although it cannot interact with the user. If the target application's status information is stopped, it indicates that the target application has been overwritten by another program and is in a stopped state. If the target application's status information is destroyed, it indicates that the target application has been reclaimed by the system.
[0045] Step 102: If the status information indicates that the target application is in a running state, release the target service requested by the target application.
[0046] Specifically, the target service is released so that the first operating system can transition from the first system state to the second system state, and the power consumption of the first operating system in the second system state is less than the power consumption of the first operating system in the first system state.
[0047] In this embodiment, the target service requested by the target application is used to prevent the system from being in a sleep state, i.e., to prevent the system from being in a wake-up state. The first system state is a wake-up state, and the second system state is a sleep state. The first operating system can be a physical operating system, i.e., the operating system of the electronic device itself. Releasing the target service is to cause the first operating system to enter a sleep state. Since the power consumption of the first operating system in a wake-up state is greater than that in a sleep state, releasing the target service can reduce the power consumption of the electronic device. In one feasible approach, the target service can be a wakelock. In this case, releasing the wakelock can cause the system to enter a sleep state, and after releasing the wakelock, the background application cannot use the wakelock to process data, and therefore cannot consume resources on the electronic device.
[0048] Step 103: If the status information indicates that the target application is in a running state, process the target data of the target application based on the second operating system in the first system state.
[0049] The power consumption of the second operating system in the first system state is less than the power consumption of the first operating system in the second system state.
[0050] In this embodiment, the second operating system can be a virtual operating system, that is, a virtual operating system created on the electronic device, which can interact with the first operating system. The target data is the data that the target application currently needs to process. If the target application is a media player, then the target data is the data that currently needs to be decoded and mixed with sound effects.
[0051] In this embodiment of the application, since other programs need to be executed through the physical operating system of the electronic device when executing data, the information processing method provided in this embodiment of the application processes the target data of the target application through the second operating system that is in the awake state when the first operating system enters the hibernation state. The second operating system is a virtual operating system, that is, the target data is processed through the virtual operating system. Therefore, it can prevent other programs in the electronic device from consuming the resources of the electronic device, which would lead to the slow running speed of the foreground program and the consumption of power. This ensures the normal operation of the electronic device and reduces the power consumption of the electronic device.
[0052] The information processing method provided in the embodiments of this application obtains the state information of the target application. If the state information indicates that the target application is in a running state, the target service requested by the target application is released. If the state information indicates that the target application is in a running state, the target data of the target application is processed based on the second operating system in the first system state. Releasing the target service allows the first operating system to transition from the first system state to the second system state. The power consumption of the first operating system in the second system state is less than that of the first operating system in the first system state, and the power consumption of the second operating system in the first system state is less than that of the first operating system in the second system state. Thus, after releasing the target service requested by the target application, other applications in the electronic device cannot process data through the target service, thereby preventing the consumption of electronic device resources. Simultaneously, releasing the target service puts the first operating system in the low-power second system state. In this case, the target data of the target application is processed by the second operating system in the first system state, which has even lower power consumption than the first operating system in the second system state. This not only ensures the processing of the target data of the target application but also reduces the power consumption of the electronic device. This solves the problem in related technologies where the time for a player to request a wake-up lock is long, allowing other programs to take the opportunity to process their own data, resulting in additional system consumption, slowing down the operation of foreground programs, and consuming extra power.
[0053] Based on the foregoing embodiments, embodiments of this application provide an information processing method, referring to... Figure 2 As shown, the method includes the following steps:
[0054] Step 201: The electronic device obtains the status information of the target application.
[0055] Step 202: The electronic device obtains the operation file corresponding to the target application from the target file through the first operating system in the first system state, and stores the operation file to the target storage area of the electronic device.
[0056] The target storage area is a storage area that can be accessed by both the first and second operating systems.
[0057] In this embodiment, the first operating system in the first system state refers to the first operating system being in a woken-up state. The target file can be a file library of an electronic device, and the operation file can be a file selected from the target file that is related to the target application; if the target application is a media player, then the target file can be a codec library, and the operation file can be a file related to the codec algorithm. The target storage area is a storage area that can be accessed by both the first and second operating systems, i.e., a shared storage area; in one feasible approach, the target storage area can be the storage area where the .so file is located, and the .so file can be used to store the operation file, i.e., to store the codec algorithm.
[0058] In one feasible approach, when the first operating system runs the target application, it can call the codec library, obtain the operation file from the codec library, and store the operation file in a fixed format in the target storage area so that the second operating system can obtain the operation file and further process the target data based on the operation file.
[0059] In step 202, the operation file corresponding to the target application can be obtained from the target file by the electronic device using the processor of the electronic device via the first virtual processor.
[0060] In this embodiment of the application, a virtual central processing unit (CPU) can be used by the processor of the electronic device to perform the operation of obtaining an operation file from the target file. That is, the first operating system can run on the first virtual processor to obtain the operation file and reduce the power consumption of the electronic device. The first virtual processor can be a virtual CPU obtained by mapping through a physical central processing unit (CPU).
[0061] It should be noted that the first operating system can only obtain the operation file from the target file when it is in a wake-up state.
[0062] Step 203: If the target file corresponding to the target application in the electronic device is called, the electronic device determines that the status information indicates that the target application is in a running state and releases the target service requested by the target application.
[0063] Specifically, the target service is released so that the first operating system can transition from the first system state to the second system state, and the power consumption of the first operating system in the second system state is less than the power consumption of the first operating system in the first system state.
[0064] In this embodiment, if the target file corresponding to the target application in the electronic device is called, that is, the codec library corresponding to the player in the electronic device is called, it is determined that the target application is in a running state. Since the target application only calls the codec library when it is in a running state, it can be directly determined that the target application is in a running state when the codec library corresponding to the player is called. In this case, in order to prevent other programs from secretly using the resources of the electronic device, the target service requested by the target application can be released, so that the first operating system is in a dormant state, thereby reducing the power consumption of the electronic device.
[0065] Step 204: If the target file corresponding to the target application in the electronic device is called, the electronic device determines that the status information indicates that the target application is in a running state, and obtains the operation file from the target storage area through the second operating system in the first system state, and processes the target data based on the operation file to obtain the processed target data.
[0066] The power consumption of the second operating system in the first system state is less than the power consumption of the first operating system in the second system state; the first operating system and the second operating system are operating systems running based on a virtual machine monitor, and the first operating system and the second operating system share the hardware resources of the electronic device.
[0067] In one feasible approach, a second operating system can be created on a virtual machine using a virtual machine monitor (VMM). The VMM can be a hypervisor. Furthermore, the hypervisor can map a physical CPU to a virtual CPU, and run both the first and second operating systems on the virtual CPU. Although both the first and second operating systems run on the virtual CPU, the functions handled by the first and second operating systems differ. The first operating system primarily retrieves operation files and stores them in the target storage area, while the second operating system primarily processes target data based on the operation files. Moreover, the power consumption of the virtual CPU allocated to the second operating system can be less than that allocated to the virtual CPU of the first operating system. The virtual CPU allocated to the second operating system can be a second virtual processor, and the virtual CPU allocated to the first operating system can be a first virtual processor. In other words, the power consumption of the first virtual processor is greater than that of the second virtual processor, further reducing the power consumption of the electronic device.
[0068] In this embodiment, when the target application is running, the first operating system, which is in a wake-up state, can obtain the operation file corresponding to the target application and store the operation file in the target storage area. Then, the target service is released, and the first operating system is put into a dormant state. Then, the second operating system obtains the operation file from the target storage area and processes the target data according to the operation file. In this way, by obtaining the operation file through the first operating system and processing the target data based on the operation file through the second operating system, not only can other programs occupy the resources of the electronic device, but the power consumption of the electronic device when processing the target data can also be reduced.
[0069] In step 204, the target data is processed based on the operation file. This can be achieved by using a second virtual processor to process the target data based on the operation file.
[0070] In this embodiment, the operation of processing target data based on an operation file can be performed by a second virtual processor using the processor of an electronic device. The second virtual processor can be a virtual CPU. It should be noted that the second virtual processor is a low-power processor to further reduce operating power consumption.
[0071] It should be noted that the descriptions of the same steps and contents as in other embodiments in this embodiment can be found in the descriptions in other embodiments, and will not be repeated here.
[0072] The information processing method provided in the embodiments of this application releases the target service requested by the target application, so that other applications in the electronic device cannot process data through the target service, and thus cannot consume the resources of the electronic device. At the same time, releasing the target service will put the first operating system into a low-power second system state. In this case, the target data of the target application is processed by the second operating system, which has even lower power consumption than the first operating system in the first system state. This not only ensures the processing of the target data of the target application, but also reduces the power consumption of the electronic device. It solves the problem in the related technology that the time for the player to request the wake-up lock is long, and other programs take the opportunity to process their own data, resulting in additional system consumption, slowing down the operation of the foreground program, and consuming additional power.
[0073] Based on the foregoing embodiments, embodiments of this application provide an information processing method, referring to... Figure 3 As shown, the method includes the following steps:
[0074] Step 301: The electronic device obtains the status information of the target application.
[0075] Step 302: The electronic device obtains the operation file corresponding to the target application from the target file through the first operating system in the first system state, and stores the operation file to the target storage area of the electronic device.
[0076] The target storage area is a storage area that can be accessed by both the first and second operating systems.
[0077] Step 303: The electronic device, through the first operating system in the first system state, carries the first storage location of the operation file in the target storage area and the identifier of the operation file in the first interrupt signal, and sends the first interrupt signal to the second operating system.
[0078] In this embodiment, the first storage location is the storage location of the operation file in the target storage area. The identifier of the operation file is used to uniquely identify the operation file. The first interrupt signal is used to instruct the second operating system to retrieve the operation file from the target storage area and process the target data based on the operation file; the first interrupt signal can be an interrupt request.
[0079] In this embodiment, since communication between virtual machines is generally triggered by virtual interrupts, and both the first and second operating systems run on virtual CPUs, communication between them also needs to be triggered by virtual interrupts. It should be noted that different interrupt signals do not necessarily need to be distinguished by different types of virtual interrupts. After an interrupt is triggered, the reason for the interrupt can be checked in the shared target storage area; that is, if the interrupt signal is used to request encoding / decoding operations, then the second operating system, upon receiving the interrupt signal, can obtain the specific data required for encoding / decoding from the target storage area.
[0080] It should be noted that the first operating system, in a wake-up state, acquires the operation file, stores the operation file in the target storage area, and notifies the second operating system through the first interrupt signal.
[0081] It should be noted that steps 302 to 303 are all performed by the processor of the electronic device through the first virtual processor.
[0082] Step 304: If the target file corresponding to the target application in the electronic device is called, the electronic device determines that the status information indicates that the target application is in a running state and releases the target service requested by the target application.
[0083] Specifically, the target service is released so that the first operating system can transition from the first system state to the second system state, and the power consumption of the first operating system in the second system state is less than the power consumption of the first operating system in the first system state.
[0084] Step 305: If the target file corresponding to the target application in the electronic device is called, the electronic device determines that the status information indicates that the target application is in a running state, and determines the first storage location and identifier from the first interrupt signal through the second operating system in the first system state.
[0085] In this embodiment of the application, since the first interrupt signal carries the identifier of the first storage location and the operation file, the second operating system can determine the first storage location and the identifier through the first interrupt signal after receiving the first interrupt signal.
[0086] Step 306: The electronic device obtains the operation file corresponding to the identifier from the first storage location of the target storage area through the second operating system in the first system state.
[0087] In this embodiment of the application, after determining the first storage location and the identifier, the second operating system can directly obtain the operation file corresponding to the identifier from the first storage location of the target storage area in order to process the target data.
[0088] Step 307: The electronic device processes the target data based on the operation file to obtain the processed target data.
[0089] The power consumption of the second operating system in the first system state is less than the power consumption of the first operating system in the second system state; the first operating system and the second operating system are operating systems running based on a virtual machine monitor, and the first operating system and the second operating system share the hardware resources of the electronic device.
[0090] In this embodiment, the operation of the second operating system in processing target data based on the operation file is similar to the operation of other operating systems in the prior art in processing target data based on the operation file, and will not be described again in this embodiment.
[0091] It should be noted that steps 305 to 307 are all performed by the processor of the electronic device through the second virtual processor.
[0092] Based on the foregoing embodiments, in other embodiments of this application, reference is made to... Figure 3 As shown, the information processing method may also include the following steps:
[0093] Step 308: The electronic device stores the processed target data to the target storage area of the electronic device through the second operating system in the first system state.
[0094] In this embodiment, the second operating system can store the processed target data in the target storage area, so that the first operating system can subsequently retrieve the processed target data from the target storage area and display it.
[0095] Step 309: The electronic device wakes up the target service, and through the first operating system in the first system state, retrieves the processed target data from the target storage area and displays the processed target data.
[0096] In this embodiment, since the first operating system is in a dormant state, it is necessary to wake up the target service so that the first operating system can enter the wake-up state from the dormant state in order to obtain the processed target data from the target storage area and display it. In one feasible way, if the target application is a player and the target data is unprocessed music data, then the processed music data obtained by the first operating system is the decoded and mixed music, and the music can be played directly.
[0097] In other embodiments of this application, step 310 may be performed after step 308.
[0098] Step 310: The electronic device carries the processed target data in the second storage location of the target storage area in the second interrupt signal, and sends the second interrupt signal to the first operating system.
[0099] In this embodiment, the second storage location is the storage location of the processed target data in the target storage area. The second interrupt signal is used to inform the first operating system that the target data has been processed. After storing the processed target data in the target storage area, the second operating system can carry the storage location of the processed target data in the second interrupt signal and send it to the first operating system, so that the first operating system can obtain the processed target data according to the second interrupt signal.
[0100] In this case, obtaining the processed target data from the target storage area in step 309 can be achieved through the following steps:
[0101] Step A: The electronic device determines the second storage location from the second interrupt signal.
[0102] In this embodiment of the application, since the second interrupt signal carries the storage location of the processed target data (i.e., the second storage location), the first operating system can directly determine the second storage location from the second interrupt signal when it is in the wake-up state.
[0103] Step B: The electronic device retrieves the processed target data from the second storage location of the target storage area.
[0104] In this embodiment of the application, after obtaining the second storage location, the first operating system can directly obtain the processed target data from the target storage area based on the second storage location.
[0105] It should be noted that in the information processing method provided in this application embodiment, the first operating system is only in a wake-up state in two situations: acquiring and storing the operation file to the target storage area, and acquiring and displaying the processed target data from the target storage area. When the second operating system processes the target data, it is in a sleep state. Therefore, the time that the first operating system is in a wake-up state is short, and other programs cannot take the opportunity to process their own data. Thus, it can prevent other programs from occupying the resources of the electronic device, thereby not affecting the foreground program.
[0106] like Figure 4 As shown, an electronic device can use a hypervisor to map its physical CPU to a virtual CPU and create a second operating system on the virtual CPU. Both the first and second operating systems can run on the virtual CPU. The power consumption of the virtual CPU where the second operating system resides is lower than that of the virtual CPU where the first operating system resides, further reducing power consumption. When the target application in the first operating system is running, the first operating system can retrieve the operation file from the target file corresponding to the target application and store it in the target storage area. Then, the target service is released, causing the first operating system to enter a sleep state from the wake-up state. Next, the second operating system retrieves the operation file from the target storage area, processes the target data based on the operation file, obtains the processed target data, and stores it in the target storage area. Then, the first operating system triggers the target service, enters a wake-up state from the sleep state, retrieves the processed target data from the target storage area, and displays it.
[0107] The information processing method provided in this application embodiment can be applied to music players, such as... Figure 5 As shown, when the music player is running, the first operating system determines the decoding algorithm and the decoding buffer (i.e., the target storage area), then stores the decoding algorithm in the decoding buffer and sends a first interrupt signal to the second operating system. The first operating system then releases the wakelock and enters a sleep state. The second operating system, having decoding capabilities, retrieves the decoding algorithm from the decoding buffer after receiving the first interrupt signal, and decodes the data using a decoding application to obtain the decoded and mixed data. It then stores the decoded and mixed data in the decoding buffer and sends a second interrupt signal to the first operating system. Upon receiving the second interrupt signal, the first operating system wakes up the wakelock and enters a wake-up state, then writes the decoded and mixed data to the Advanced Digital Signal Processor (ADSP) and plays it.
[0108] It should be noted that the descriptions of the same steps and contents as in other embodiments in this embodiment can be found in the descriptions in other embodiments, and will not be repeated here.
[0109] The information processing method provided in the embodiments of this application releases the target service requested by the target application, so that other applications in the electronic device cannot process data through the target service, and thus cannot consume the resources of the electronic device. At the same time, releasing the target service will put the first operating system into a low-power second system state. In this case, the target data of the target application is processed by the second operating system, which has even lower power consumption than the first operating system in the first system state. This not only ensures the processing of the target data of the target application, but also reduces the power consumption of the electronic device. It solves the problem in the related technology that the time for the player to request the wake-up lock is long, and other programs take the opportunity to process their own data, resulting in additional system consumption, slowing down the operation of the foreground program, and consuming additional power.
[0110] Based on the foregoing embodiments, embodiments of this application provide an electronic device that can be applied to... Figures 1-3 In the information processing method provided in the corresponding embodiment, refer to Figure 6 As shown, the electronic device 4 may include: a processor 41 and a memory 42, wherein:
[0111] Processor 41 is used to obtain the state information of the target application from memory 42;
[0112] The processor 41 is further configured to release the target service requested by the target application if the state information indicates that the target application is in a running state; wherein, the target service is released so that the first operating system can enter the second system state from the first system state, and the power consumption of the first operating system in the second system state is less than the power consumption of the first operating system in the first system state.
[0113] The processor 41 is also configured to process the target data of the target application based on the second operating system in the first system state if the state information indicates that the target application is in a running state, wherein the power consumption of the second operating system in the first system state is less than the power consumption of the first operating system in the second system state.
[0114] In other embodiments of this application, the processor 41 may also execute the information processing program in the memory 42 to implement the following steps: the first operating system and the second operating system are operating systems that run based on a virtual machine monitor, and the first operating system and the second operating system share the hardware resources of the electronic device.
[0115] In other embodiments of this application, the processor 41 is configured to execute the information processing program in the memory 42 if the state information indicates that the target application is in a running state, to perform the following steps:
[0116] If the target file corresponding to the target application in the electronic device is called, the status information indicates that the target application is in a running state.
[0117] In other embodiments of this application, the processor 41 is used to execute the information processing program in the memory 42 to release the target service of the target application request, and may also implement the following steps:
[0118] The first operating system, in its first system state, retrieves the operation file corresponding to the target application from the target file and stores the operation file in the target storage area of the electronic device; wherein, the target storage area is a storage area that can be accessed by both the first and second operating systems.
[0119] Accordingly, in other embodiments of this application, the processor 41 is used to execute the information processing program in the memory 42 to process the target data of the target application based on the second operating system in the first system state, in order to implement the following steps:
[0120] The second operating system, which is in the first system state, retrieves the operation file from the target storage area and processes the target data based on the operation file to obtain the processed target data.
[0121] In other embodiments of this application, the processor 41, when executing the information processing program in the memory 42, may also perform the following steps:
[0122] The first operating system, which is in the first system state, carries the first storage location of the operation file in the target storage area and the identifier of the operation file in the first interrupt signal, and sends the first interrupt signal to the second operating system.
[0123] Accordingly, in other embodiments of this application, the processor 41 is used to execute the information processing program in the memory 42 to retrieve the operation file from the target storage area to implement the following steps:
[0124] The first storage location and identifier are determined from the first interrupt signal by the second operating system, which is in the first system state.
[0125] Using a second operating system in the first system state, the operation file corresponding to the identifier is obtained from the first storage location of the target storage area.
[0126] In other embodiments of this application, the processor 41 is used to execute the information processing program in the memory 42 to obtain the operation file corresponding to the target application from the target file, so as to implement the following steps:
[0127] The first virtual processor uses the processor of the electronic device to obtain the operation file from the target file.
[0128] In other embodiments of this application, the processor 41 is used to execute the information processing program in the memory 42 to process target data based on an operation file, in order to implement the following steps:
[0129] The target data is processed by the processor based on the operation file via a second virtual processor.
[0130] In other embodiments of this application, the processor 41, when executing the information processing program in the memory 42, may also perform the following steps:
[0131] The processed target data is stored in the target storage area of the electronic device through the second operating system, which is in the first system state.
[0132] The target service is awakened, and the processed target data is retrieved from the target storage area through the first operating system in the first system state, and the processed target data is displayed.
[0133] In other embodiments of this application, the processor 41 is used to execute the information processing program in the memory 42 to store the processed target data to the target storage area of the electronic device, and may also implement the following steps:
[0134] The processed target data is carried in the second interrupt signal at the second storage location in the target storage area, and the second interrupt signal is sent to the first operating system.
[0135] Accordingly, the processed target data is retrieved from the target storage area, including:
[0136] Determine the second storage location from the second interrupt signal;
[0137] Retrieve the processed target data from the second storage location of the target storage area.
[0138] It should be noted that the specific implementation process of the steps executed by the processor in this embodiment can be referred to Figures 1-3 The implementation process of the information processing method provided in the corresponding embodiments will not be described in detail here.
[0139] The electronic device provided in this application embodiment, after releasing the target service requested by the target application, prevents other applications in the electronic device from processing data through the target service, thus preventing them from consuming the electronic device's resources. At the same time, releasing the target service puts the first operating system into a low-power second system state. In this case, the target data of the target application is processed by the second operating system, which has even lower power consumption than the first operating system in the first system state. This not only ensures the processing of the target data of the target application but also reduces the power consumption of the electronic device. This solves the problem in related technologies where the time for the player to request the wake-up lock is long, and other programs take the opportunity to process their own data, resulting in additional system consumption, slowing down the operation of the foreground program, and consuming additional power.
[0140] Based on the foregoing embodiments, embodiments of this application provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to achieve the following: Figures 1-3 The corresponding embodiments provide the steps of the information processing method.
[0141] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0142] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0143] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0144] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0145] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.
Claims
1. An information processing method, the method comprising: Obtain the status information of the target application; If the status information indicates that the target application is in a running state, the target service requested by the target application is released; wherein, releasing the target service enables the first operating system to enter the second system state from the first system state, preventing background applications from processing data through the target service; the power consumption of the first operating system in the second system state is less than the power consumption of the first operating system in the first system state. If the status information indicates that the target application is in a running state, the target data of the target application is processed based on the second operating system in the first system state, and the power consumption of the second operating system in the first system state is less than the power consumption of the first operating system in the second system state.
2. The method according to claim 1, wherein the first operating system and the second operating system are operating systems running on a virtual machine monitor, and the first operating system and the second operating system share the hardware resources of the electronic device.
3. The method according to claim 2, wherein if the status information indicates that the target application is in a running state, it includes: If the target file corresponding to the target application in the electronic device is invoked, the status information indicates that the target application is in a running state.
4. The method according to claim 3, further comprising, before releasing the target service requested by the target application: The first operating system, in its first system state, retrieves the operation file corresponding to the target application from the target file and stores the operation file in the target storage area of the electronic device; wherein the target storage area is a storage area accessible to both the first operating system and the second operating system. Accordingly, the processing of the target application's target data based on the second operating system in the first system state includes: The second operating system, which is in the first system state, retrieves the operation file from the target storage area and processes the target data based on the operation file to obtain the processed target data.
5. The method according to claim 4, further comprising: The first operating system, in its first system state, carries the first storage location of the operation file in the target storage area and the identifier of the operation file in a first interrupt signal, and sends the first interrupt signal to the second operating system. Accordingly, obtaining the operation file from the target storage area includes: The first storage location and the identifier are determined from the first interrupt signal by the second operating system, which is in the first system state; The operation file corresponding to the identifier is obtained from the first storage location of the target storage area by the second operating system in the first system state.
6. The method according to claim 4, wherein obtaining the operation file corresponding to the target application from the target file includes: The operation file is obtained from the target file by the processor of the electronic device via the first virtual processor.
7. The method according to claim 4, wherein processing the target data based on the operation file includes: The target data is processed by the processor based on the operation file via a second virtual processor.
8. The method according to claim 4, further comprising: The processed target data is stored in the target storage area of the electronic device through the second operating system, which is in the first system state. The target service is awakened, and the processed target data is retrieved from the target storage area through the first operating system in the first system state, and the processed target data is displayed.
9. The method according to claim 8, further comprising, after storing the processed target data to the target storage area of the electronic device: The processed target data is carried in a second interrupt signal at a second storage location in the target storage area, and the second interrupt signal is sent to the first operating system. Accordingly, obtaining the processed target data from the target storage area includes: Determine the second storage location from the second interrupt signal; The processed target data is obtained from the second storage location in the target storage area.
10. An electronic device, the electronic device comprising: Processor and memory; The processor is used to obtain the state information of the target application from the memory; The processor is further configured to release the target service requested by the target application if the state information indicates that the target application is in a running state; wherein, releasing the target service enables the first operating system to enter a second system state from a first system state, preventing background applications from processing data through the target service; the power consumption of the first operating system in the second system state is less than the power consumption of the first operating system in the first system state. The processor is further configured to process the target data of the target application based on a second operating system in a first system state if the state information indicates that the target application is in a running state, wherein the power consumption of the second operating system in the first system state is less than the power consumption of the first operating system in the second system state.
Citation Information
Patent Citations
Terminal equipment management method, terminal equipment and device
CN109189196A
System control method and device, wearable equipment and storage medium
CN114647300A