Target application protection methods, systems, computer devices and readable storage media

By setting protection priorities for the member login status application on smart TV terminals and optimizing system resource allocation, the problem of sluggish operation caused by insufficient computing resources was solved, thus improving the user experience.

CN116366922BActive Publication Date: 2025-11-14SHENZHEN SKYWORTH RGB ELECTRONICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211596985.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-12
Publication Date
2025-11-14
Estimated Expiration
2042-12-12

AI Technical Summary

Technical Problem

Due to limited computing resources, smart TV terminals cannot support the smooth operation of high-quality media resources when applications are logged in, resulting in a poor visual experience for users.

Method used

By increasing the protection priority of applications in the member login state, including scheduling priority and process priority, the system operating environment is optimized to ensure that applications can run smoothly in both the foreground and background environments.

Benefits of technology

It improved the smoothness of the member login status application, enhancing the user's visual experience and the usability of the TV terminal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116366922B_ABST
    Figure CN116366922B_ABST
Patent Text Reader

Abstract

This application relates to the field of television application technology, and provides a method, system, computer device, and readable storage medium for protecting a target application. It can improve the smoothness of application operation in a member-logged-in state on a television terminal, thereby enhancing user visual experience satisfaction. When applied to a television terminal, the method mainly includes: determining whether the target application is in a member-logged-in state; if the target application is in a member-logged-in state, increasing the protection priority of the target application, whereby the protection priority is used to determine the system operating environment of the target application on the television terminal; and optimizing the system operating environment of the target application on the television terminal according to the protection priority.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of television application technology, and in particular relates to target application protection methods, systems, computer devices and readable storage media. Background Technology

[0002] Currently, with the intelligent upgrade of televisions, numerous smart TV applications have been developed by developers. These applications include video and gaming applications, which can provide services to users through the large display screen of smart TVs, allowing users to enjoy a good visual experience.

[0003] As a television terminal that provides services to users, smart TVs need to focus on user experience. To achieve differentiated service experiences, smart TV applications offer tiered services, with various applications introducing membership systems. When a user purchases a membership for a particular application and is logged in, the smart TV can obtain higher-quality media resources from the application's servers to serve the user, thereby improving the user's visual experience satisfaction.

[0004] However, even if a smart TV obtains higher-quality media resources from the server of an application that is logged in as a member, if the TV terminal has limited computing resources and the application in the member-logged-in state does not have enough computing resources to support the operation of the higher-quality media resources, then the higher-quality media resources cannot run smoothly, making it difficult to improve the user's visual experience satisfaction. Summary of the Invention

[0005] The purpose of this application is to provide a method, system, computer device, and readable storage medium for protecting target applications, which can improve the smoothness of application operation in the member login state on television terminals and enhance the visual experience satisfaction of member users.

[0006] In a first aspect, this application provides a target application protection method, the method being applied to a television terminal, comprising:

[0007] Determine if the target application is in a member login state;

[0008] If the target application is in a member login state, the protection priority of the target application is increased. The protection priority is used to determine the system operating environment of the target application on the TV terminal.

[0009] The system operating environment of the target application on the television terminal is optimized according to the protection priority.

[0010] Optionally, the protection priority includes a scheduling priority, which is used to determine the utilization rate of the target application on the central processing unit of the television terminal;

[0011] The increase in the protection priority of the target application includes:

[0012] When the target application is running in the foreground environment of the TV terminal, the scheduling priority of the target application is increased, and the higher scheduling priority has a higher utilization rate of the central processing unit.

[0013] Optionally, the protection priority includes process priority, which is used to determine the ranking of the target application in the system process recycling order on the television terminal;

[0014] The increase in the protection priority of the target application includes:

[0015] When the target application is running in the background environment of the TV terminal, the process priority of the target application is increased, and the higher process priority has a later ranking in the system process recycling order.

[0016] Optionally, after the target application is in the member login state, the method further includes:

[0017] Add the name of the target application to the whitelist;

[0018] Receive a close operation on the target application in the whitelist;

[0019] The steps to increase the protection priority of the target application are stopped according to the shutdown operation.

[0020] Optionally, after adding the name of the target application to the whitelist, the method further includes:

[0021] Receive an exit signal, the exit signal containing information that the target application has changed from the member login state to the member exit state;

[0022] Based on the exit signal, the name of the target application is removed from the whitelist, triggering the step of stopping the execution of increasing the protection priority of the target application.

[0023] Optionally, the protection priority includes: process priority and scheduling priority. The scheduling priority is used to determine the CPU usage rate of the target application on the TV terminal, and the process priority is used to determine the ranking of the target application in the system process recycling order on the TV terminal. The whitelist includes: the name of the first target application, the name of the second target application, and the third target application is an application in the TV terminal that is not logged in as a member.

[0024] After adding the name of the target application to the whitelist, the method further includes:

[0025] When the foreground environment of the TV terminal switches from running the first target application to running the second target application, the first target application runs in the background environment of the TV terminal, the process priority of the first target application is increased, the scheduling priority of the first target application is decreased, and the scheduling priority of the second target application is increased.

[0026] When the foreground environment of the TV terminal switches from running the second target application to running the third target application, the second target application runs in the background environment of the TV terminal, the process priority of the second target application is increased, the scheduling priority of the second target application is decreased, and a warning message is issued. The warning message is used to warn the third target application that it is in an unprotected state.

[0027] When the foreground environment of the TV terminal switches from running the third target application to running the first target application, the third target application runs in the background environment of the TV terminal, thereby increasing the scheduling priority of the first target application.

[0028] Optionally, after increasing the scheduling priority of the target application, the method further includes:

[0029] The system has entered a monitoring mode, which limits the CPU usage of background processes that are not the target application.

[0030] Secondly, this application provides a target application protection system, which is applied to a television terminal and includes:

[0031] The judgment unit is used to determine whether the target application is in a member login state;

[0032] An enhancement unit is configured to increase the protection priority of the target application if the target application is in a member login state, wherein the protection priority is used to determine the system operating environment of the target application on the TV terminal;

[0033] An optimization unit is used to optimize the system operating environment of the target application on the television terminal according to the protection priority.

[0034] Optionally, the protection priority includes a scheduling priority, which is used to determine the utilization rate of the target application on the central processing unit of the television terminal;

[0035] When the enhancement unit increases the protection priority of the target application, it is specifically used for:

[0036] When the target application is running in the foreground environment of the TV terminal, the scheduling priority of the target application is increased, and the higher scheduling priority has a higher utilization rate of the central processing unit.

[0037] Optionally, the protection priority includes process priority, which is used to determine the ranking of the target application in the system process recycling order on the television terminal;

[0038] When the enhancement unit increases the protection priority of the target application, it is specifically used for:

[0039] When the target application is running in the background environment of the TV terminal, the process priority of the target application is increased, and the higher process priority has a later ranking in the system process recycling order.

[0040] Optionally, the system further includes:

[0041] The addition unit is used to add the name of the target application to the whitelist;

[0042] A receiving unit is configured to receive a closing operation on the target application in the whitelist;

[0043] A stop unit is used to stop the execution of steps that increase the protection priority of the target application based on the shutdown operation.

[0044] Optionally, the system further includes:

[0045] The receiving unit is further configured to receive an exit signal, the exit signal containing information that the target application has changed from the member login state to the member exit state;

[0046] The deletion unit is used to delete the name of the target application from the whitelist according to the exit signal;

[0047] A triggering unit is used to trigger the cessation of the step of increasing the protection priority of the target application.

[0048] Optionally, the protection priority includes: process priority and scheduling priority. The scheduling priority is used to determine the CPU usage rate of the target application on the TV terminal, and the process priority is used to determine the ranking of the target application in the system process recycling order on the TV terminal. The whitelist includes: the name of the first target application, the name of the second target application, and the third target application is an application in the TV terminal that is not logged in as a member.

[0049] Optionally, the system further includes:

[0050] The enhancement unit is further configured to increase the process priority of the first target application when the foreground environment of the TV terminal switches from running the first target application to running the second target application, wherein the first target application runs in the background environment of the TV terminal.

[0051] A reduction unit is used to reduce the scheduling priority of the first target application;

[0052] The enhancing unit is also used to enhance the scheduling priority of the second target application;

[0053] The enhancement unit is further configured to increase the process priority of the second target application when the foreground environment of the television terminal switches from running the second target application to running the third target application, wherein the second target application runs in the background environment of the television terminal.

[0054] The reduction unit is further configured to reduce the scheduling priority of the second target application;

[0055] The warning unit is used to issue a warning message, which is used to warn the third target application that it is in an unprotected state.

[0056] The enhancement unit is further configured to increase the scheduling priority of the first target application when the foreground environment of the television terminal switches from running the third target application to running the first target application, wherein the third target application runs in the background environment of the television terminal.

[0057] Optionally, the system further includes:

[0058] The reminder unit is used to remind users that the application has entered the attention mode, which is used to limit the CPU usage of background processes that are not the target application.

[0059] Thirdly, this application provides a computer device, comprising:

[0060] Processor, memory, bus, input / output interfaces, network interfaces;

[0061] The processor is connected to the memory, the input / output interface, and the network interface via a bus;

[0062] The memory stores a program;

[0063] When the processor executes the program stored in the memory, it implements the target application protection method as described in any of the first aspects above.

[0064] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the target application protection method as described in any of the first aspects above.

[0065] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0066] The target application protection method provided in this application embodiment can be applied to television terminals. Since the system operating environment on a television terminal is subject to various constraints, and each constraint can be determined by the protection priority set by the system for each target application, the overall operating conditions of these constraints determine the current system operating environment. This system operating environment determines the smoothness of operation of each target application running on it. Different levels of smoothness are directly reflected in the television terminal's display; that is, users can perceive the smoothness of a target application's operation through visual experience. Poor smoothness leads to a poor visual experience. In other words, the television terminal system has protection priorities for each application. The television terminal system can determine the current system operating environment by comparing the protection priorities of each target application with those of other applications. The current system operating environment can affect the smoothness of operation of the target applications.

[0067] Therefore, in order to ensure better smooth operation of target applications in the member login state, i.e., to provide a better operating environment for eligible target applications, this embodiment first needs to confirm whether the target application is in the member login state. If it is in the member login state, the protection priority of the target application is increased. Then, the system on the TV terminal will re-determine the system operating environment that should be provided for the target application based on the increased protection priority. This optimizes the operating environment of the target application on the TV terminal, improves the smoothness of the target application running on it, and further brings a good visual experience and excellent TV terminal usage experience to users of target applications in the member login state. Attached Figure Description

[0068] Figure 1 A schematic flowchart of an embodiment of the protection method applied to the target of this application;

[0069] Figure 2 A schematic flowchart illustrating another embodiment of the protection method applied to the target of this application;

[0070] Figure 3 This is a schematic diagram of an embodiment of the protection system for the target application of this application;

[0071] Figure 4 This is a schematic diagram of another embodiment of the protection system for the target application of this application;

[0072] Figure 5 This is a schematic diagram of the structure of one embodiment of the computer device of this application. Detailed Implementation

[0073] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0074] The target application protection method provided in this application is applied to a television terminal. The television terminal system can be a Linux system, an Android system, an Android TV system, etc. To better understand the target application protection method provided in this application, some functions of the television terminal system are described below. Taking the Android system as an example, it has control groups (Cgroups). Control groups are also a function of the Linux kernel, used to limit, control, and isolate the resources of a process group. These resources can be CPU resources, memory resources, and disk I / O resources, etc. Cgroups has multiple subsystems: memory subsystem, CPU subsystem, CPUacct subsystem, NS subsystem, and Freezer subsystem. Cgroups can implement the following functions through each subsystem:

[0075] 1. Limiting the amount of resources a process group can use (Resource limiting). For example, the memory subsystem can set a memory usage limit for a process group. Once the process group has reached the memory limit and requests more memory, a memory cleanup step (OOM, out of memory) will be triggered.

[0076] 2. Prioritization of process groups. For example, the CPU subsystem can be used to allocate specific CPU resources to a process group (CPU share).

[0077] 3. Record the amount of resources used by a process group (English name: Accounting). For example, the cpuacct subsystem can be used to record the time a process group uses the central processing unit (English abbreviation: CPU).

[0078] 4. Isolation of process groups. For example, the ns subsystem allows different process groups to use different namespaces to achieve isolation. Different process groups have their own process, network, and file system mount spaces.

[0079] 5. Control over process groups. For example, the freezer subsystem can be used to suspend and resume process groups.

[0080] This embodiment uses an application installed on a television terminal as the target application. The operating environment of a television terminal is often constrained by many factors, such as the processing power of the television terminal's central processing unit, the storage space of its memory, the data transmission capabilities of its input / output ports, and the number of processes running on the system. These factors determine whether the television terminal's operating environment can smoothly run the target application.

[0081] The operating modes of processes in a television terminal system are mainly divided into six categories: foreground processes, visual processes, secondary service processes, background processes, content provisioning node processes, and empty processes. These six types of processes are described in detail below:

[0082] 1. Foreground Processes: These are the processes of the target application currently displayed on the screen and requiring processing, as well as some system processes. On a TV terminal system, when a target application is running in the foreground environment, if the user chooses to return to the main interface, the target application will run in the background environment; that is, the process of the target application will become a background process.

[0083] 2. Visible processes: Visible processes are processes that do not run in the foreground environment but are still visible to the user, such as input method-related processes.

[0084] 3. Secondary service processes: Some services that are currently running, such as dial-up related processes. Although these services are secondary service processes, they are still closely related to some system functions, and we often need to use them.

[0085] 4. Background process: This usually refers to the process of the target application that was started in the foreground environment but was not completely exited by the user, that is, the target application that was switched to run in the background environment.

[0086] 5. Content Provider Node Process: This is a process that does not have a program entity, but is used to provide content for other programs to use, such as calendar provider nodes and email provider nodes.

[0087] 6. Empty process: A process that does not need to be run or processed. For example, some programs will still leave an empty process in the process list after they exit. There is no data running in this process. Its purpose is often to improve the startup speed of the program next time or to record some historical information of the program.

[0088] To ensure the smooth operation of the target application on the television terminal system, i.e., to provide adequate protection for the target application, embodiments of this application provide a target application protection method. The method is described in detail below; please refer to [link to relevant documentation]. Figure 1 The method includes steps 101-103:

[0089] 101. Determine whether the target application is in a member login state. If the target application is in a member login state, proceed to step 102; otherwise, ignore this step.

[0090] This application embodiment applies to a television terminal, using the application installed on the television terminal as the target application. Since each target application needs to consider various adaptation issues such as user interface (UI) adaptation, operation adaptation, and function adaptation when developing for different terminal systems, the target application of this application can be downloaded and installed from the application collection provided on the television terminal. The application collection of the computer terminal can be named application market or application store in actual use. The target applications provided on it are developed for the system of the television terminal, and there will be no problems with the above-mentioned inappropriate adaptation. Moreover, the target application downloaded through the application collection has established a corresponding interface with the system of the television terminal, and the target application can communicate with the system of the television terminal.

[0091] When a user has a membership to a target application and logs into their membership account on that target application on the TV terminal, making the target application a logged-in user, the target application can promptly notify the TV terminal system of this logged-in status through synchronous calls, asynchronous calls, and callbacks. Similarly, when a user logs out of their membership account on the target application on the TV terminal system, or when the target application has a limited number of terminal logins enabled and the user logs in on another application, forcing the target application's membership account on the TV terminal to go offline (i.e., the target application is in a logged-out state), the target application immediately sends information containing this logged-out status to the TV terminal system.

[0092] After the target application sends the information containing the member login status or member logout status to the system of the TV terminal, the system can make the judgment in step 101. If the target application is in a member login status, then step 102 is executed; if the target application is in a non-member login status, then it is ignored.

[0093] In addition to the aforementioned method where the target application actively notifies the TV terminal system whether it is in a member login state, determining whether a target application is in a member login state can also be achieved by the TV terminal system actively querying whether the target application is in a member login state. However, the former method is more timely than the latter, and the former method of the target application notifying the system via asynchronous calls is faster and more resource-efficient. This application does not limit the method of obtaining member login and member logout states, as long as it enables the TV terminal to determine whether the target application is in a member login state.

[0094] 102. Increase the protection priority of the target application, wherein the protection priority is used to determine the system operating environment of the target application on the television terminal.

[0095] As can be seen from the above six types of processes, when the target application is running in the foreground environment, the central processing unit (CPU) not only needs to handle the work related to the process running the target application, but also the work of processes running other applications and the system's own processes. Therefore, each process needs to take turns using the CPU to handle related work. In other words, the processor's processing resources are limited. In order to prevent the system's operating environment from becoming too sluggish, the system sets corresponding scheduling priorities for each target application and other processes. The CPU allocates processing time according to its respective scheduling priority, that is, the scheduling priority determines the CPU's utilization rate.

[0096] In addition, the CPU needs to use memory to store the data for each task. However, memory size is limited. Therefore, the system also needs to consider whether the memory size can support the CPU in processing the related tasks of numerous processes. To this end, the system sets process priorities for each target application and other processes. Based on the process priority of each target application and the current total memory occupied by the system, it determines which processes need to be suspended or closed to ensure that target applications with higher priority can be retained, and the CPU continues to process the related processes of higher priority target applications.

[0097] In this embodiment, the protection priority can be the scheduling priority and process priority mentioned above, or it can be other levels of items used to improve the smoothness of the target application running on the TV terminal system. As long as the level of the item can be improved to optimize the system operating environment of the target application on the TV terminal, it can be used as the protection priority of this application embodiment. This embodiment does not limit it.

[0098] 103. Optimize the system operating environment of the target application on the television terminal according to the protection priority.

[0099] After step 102 increases the protection priority of the target application, and the system re-establishes the resource allocation in various aspects of the system operating environment based on the latest protection priority values ​​of each application, the re-established system operating environment is conducive to the smooth operation of the target application. The target application is in the optimized system operating environment and is protected.

[0100] The target application protection method provided in this application embodiment can be applied to television terminals. Since the system operating environment on a television terminal is subject to various constraints, and each constraint can be determined by the protection priority set by the system for each target application, the overall operating conditions of these constraints determine the current system operating environment. This system operating environment determines the smoothness of operation of each target application running on it. Different levels of smoothness are directly reflected in the television terminal's display; that is, users can perceive the smoothness of a target application's operation through visual experience. Poor smoothness leads to a poor visual experience. In other words, the television terminal system has protection priorities for each application. The television terminal system can determine the current system operating environment by comparing the protection priorities of each target application with those of other applications. The current system operating environment can affect the smoothness of operation of the target applications.

[0101] Therefore, in order to ensure better smooth operation of target applications in the member login state, i.e., to provide a better operating environment for eligible target applications, this embodiment first needs to confirm whether the target application is in the member login state. If it is in the member login state, the protection priority of the target application is increased. Then, the system on the TV terminal will re-determine the system operating environment that should be provided for the target application based on the increased protection priority. This optimizes the operating environment of the target application on the TV terminal, improves the smoothness of the target application running on it, and further brings a good visual experience and excellent TV terminal usage experience to users of target applications in the member login state.

[0102] Please see Figure 2Another embodiment of the target application protection method of this application applied to a television terminal includes steps 201-209:

[0103] 201. Determine whether the target application is in a member login state. If the target application is in a member login state, proceed to step 202; otherwise, ignore this step.

[0104] Step 201 and the aforementioned Figure 1 Step 101 in the corresponding embodiment is similar, and the details can be found in the foregoing content, which will not be repeated here.

[0105] 202. Add the name of the target application to the whitelist.

[0106] Since the target application in the member login state can run not only in the foreground environment but also in the background environment, and multiple applications and multiple target applications can run simultaneously in the background environment, in order to facilitate the system's protection of one or more target applications running in the foreground and background, this application embodiment establishes a whitelist, which adds the names of all target applications in the member login state running on the TV terminal system to the whitelist, so as to facilitate the system to implement real-time protection of target applications in the future.

[0107] As an example, a first target application in a member login state and a second target application in a member login state are running on the system of a TV terminal. A third target application is also installed on the system. The third target application is an application in a non-member login state on the TV terminal. The third target application can be an application with a member account but not in a member login state, or it can be an application without a member account. Then the whitelist records the names of the first target application and the second target application.

[0108] 203. Increase the protection priority of the target application, wherein the protection priority is used to determine the system operating environment of the target application on the television terminal.

[0109] The protection priority in this embodiment can be the scheduling priority and process priority mentioned above, or it can be other levels of items used to improve the smoothness of the target application running on the TV terminal system. As long as the level of the item can be improved to optimize the system operating environment of the target application on the TV terminal, it can be used as the protection priority of this application embodiment.

[0110] Since the scheduling priority in this embodiment is mainly used to protect target applications running in the foreground and in a member-logged-in state, so that the process tasks of the target applications are processed first, presenting users with a smooth running experience and a smooth visual experience, the process priority in this embodiment is mainly used to protect target applications running in the background and in a member-logged-in state. This ensures that the target application, when running in the background, will not be forced to terminate its service when the system starts memory cleanup due to excessive total memory usage. Even if it needs to be terminated, it will be later than other target applications that are not in a member-logged-in state. Therefore, the system of the TV terminal in this embodiment can use only the scheduling priority as the protection priority to achieve the foreground environment... In terms of system environment optimization, step 204 can be executed, step 205 can be skipped, and step 206 can be continued; alternatively, only process priority can be used as the protection priority to achieve system environment optimization in the background environment, i.e., step 204 can be skipped, and step 205 can be continued; or both scheduling priority and process priority can be used as protection priorities to simultaneously protect the target application running in both the foreground and background environments and in the member login state, i.e., after executing step 203, steps 204 and 205 can be executed, and steps 204 and 205 can be executed simultaneously without any order, or their order can be interchanged. This application embodiment does not impose any restrictions on this.

[0111] 204. When the target application is running in the foreground environment of the TV terminal, the scheduling priority of the target application is increased, and the higher scheduling priority has a higher utilization rate of the central processing unit.

[0112] That is, the protection priority in step 204 includes the scheduling priority, which is used to determine the CPU utilization rate of the target application on the television terminal. Increasing the scheduling priority can improve the CPU utilization rate of the target application, as described above. Figure 1 The description of scheduling priority in step 102 of the corresponding embodiment.

[0113] Using the Android system in the above example as the system of the TV terminal in this application embodiment, the TV terminal system in this application embodiment can modify the scheduling priority of the target application through the CPU subsystem in the Cgroups mentioned above. The scheduling priority in this application embodiment can be represented by the nice value on the Android system in the above example. The nice value ranges from -20 to 19. The smaller the value, the higher the scheduling priority. Each target application and other processes have their own nice value. When a target application divides its work tasks into one or more processes to execute the work tasks, the nice value of its processes is assigned the same nice value. That is, the scheduling priority of the process of the target application is consistent with the scheduling priority of the target application. The system can determine the CPU utilization rate of each target application based on its nice value. By reducing the nice value of the target application, for example, setting it to the lowest value, that is, -20, the target application can obtain the highest CPU utilization rate. Then, the system can redetermine the current system operating environment based on the increased scheduling priority. That is, compared with other target applications that are not in the member login state, the target application in the member login state obtains a higher CPU utilization rate. The target application is in a protected state.

[0114] To alert the user that a target application currently running in the foreground is under protection, the system can display a text notification on the screen. The text can be arbitrary, as long as it conveys the message that the system is currently protecting the target application. Taking the first target application as an example, when the target application is running in the foreground environment of the TV terminal, increasing the scheduling priority of the target application will trigger a notification that it has entered a monitoring mode. This monitoring mode is used to limit the CPU usage of background processes that are not the target application.

[0115] The following is an example of the focus mode. The smoothness of the target application running on the TV terminal is affected not only by the CPU utilization rate but also by the number of CPU cores allocated to it. To rationally allocate CPU resources on the TV terminal, the system continuously monitors the percentage of total CPU cores currently in use to determine its workload level, dividing it into four levels: over 90% utilization is considered busy, 60%-90% is considered busy, 30%-60% is considered normal, and 0-30% is considered idle. Taking a quad-core CPU as an example, when the CPU reaches a busy state, all background processes not related to the target application will be suspended. The system can then... The Freezer subsystem in Cgroups implements application suspension. After suspension, no processes are running in the background environment, and processes running in the foreground environment can obtain the maximum number of CPU cores. When the CPU is busy, the system limits all background processes that are not the target application to use a maximum of half a CPU core for processing. When the CPU is in normal state, the system limits all background processes that are not the target application to use a maximum of one CPU core. When the CPU is idle, the system does not perform any additional processing and lifts the restrictions on all applications, that is, there is no restriction on the number of CPU cores used by processes running in the background environment.

[0116] The attention mode in this embodiment can better ensure that the target application in the member login state receives preferential resource allocation, so that the target application can achieve the best running smoothness in the foreground environment. After entering this mode, the user is reminded so that the user is aware that the system running environment has changed in a timely manner.

[0117] 205. When the target application is running in the background environment of the TV terminal, the process priority of the target application is increased, and the higher process priority has a later ranking in the system process recycling order.

[0118] That is, the protection priority in step 205 includes process priority. The process priority is used to determine the ranking of the system process recycling order of the target application on the TV terminal. The process priority is described in detail below, taking the Android system mentioned above as the system of the TV terminal of this application.

[0119] In Android, the memory subsystem in Cgroups monitors the memory usage of each process in real time. If the set limit is exceeded, a recycling mechanism is activated. This mechanism is called lowmemorykiller in programming languages. It is a recycling mechanism triggered based on memory threshold levels. When the available memory of the system is low, it will selectively recycle processes and clean them up. If the process is an application running in the background, the application will also be closed. When the user runs the application in the foreground again, it will be like reopening the application. That is, the previous work tasks are not continued, and all work tasks need to be recreated.

[0120] To protect target applications running in the background and in a logged-in state, preventing them from being reclaimed while running in the background, and ensuring that their processes continue to execute or are only paused until they are reopened, allowing for a smooth switch back to the target application, saving users time in adjusting the application, quickly achieving the user's intended use, and reducing other operation time, the system of this embodiment sets process priorities for each target application and other processes, and achieves smooth operation by increasing the process priority of target applications. It should be noted that when a target application is running, it divides its tasks into one or more processes, and the process priority set for the target application is also assigned to its processes; that is, the process priority of the target application's processes is consistent with the process priority of the target application itself. The protection principle is explained in detail below.

[0121] When the TV terminal system is running, if it detects that memory usage has exceeded the limit and a memory reclamation mechanism needs to be activated, the system needs to reclaim memory according to the priority of each process. As an example, the memory limit for triggering the reclamation mechanism is divided into six levels: 400MB, 300MB, 200MB, 100MB, 50MB, and 6.28MB. The oom_adj parameter in the Android system is used to represent process priority; the smaller the oom_adj value, the higher the process priority. Its value range can be 0-15. For example, for the six types of processes mentioned above, for the foreground... The oom_adj value of a process is set to 0, the oom_adj value of a visible process is set to 1, the oom_adj value of a secondary service process is set to 2, the oom_adj value of a background process is set to a value between 3 and 7, the oom_adj value of a content provider node process is set to a value between 8 and 14, and the oom_adj value of an empty process is set to 15. Processes with higher oom_adj values ​​are reclaimed first. For example, if the memory usage reaches 200 MB, processes with oom_adj values ​​greater than 7 need to be reclaimed.

[0122] To protect target applications running in the background and in a logged-in state, their original oom_adj parameter should be set to 7. This parameter is now changed to 2 or another value less than 7. This increases the process priority of the target application. When the system initiates the memory reclamation mechanism, it will be reclaimed later than other target applications running in the background. Furthermore, if it doesn't reach the corresponding memory limit, it won't face reclamation at all. The target application is protected, and when the user reopens it, they can continue performing a previous task without re-entering the application, providing a smooth switching experience.

[0123] Additionally, in the example above, the oom_adj value of the target application running in the background and in member login state is set to 2. If two or more target applications are running in the background and need to be recycled at the same time, since their process priorities are the same, it is unclear which will be recycled first. To avoid this situation and to more objectively judge the recycling order of each target application based on memory usage, a further scoring system can be implemented. Specifically, the system will score each process based on its oom_adj value and the amount of memory it occupies, resulting in oom_score_adj. That is, even if different applications have the same oom_adj value, their oom_score_adj scores will often be different. The system determines the recycling order of each application's process based on its oom_score_adj value.

[0124] The above steps 204 and 205 respectively introduced the principle of how to protect the target application by increasing its scheduling priority and / or process priority. The following provides a detailed description of its application methods and specific implementation scenarios.

[0125] The whitelist includes: the name of the first target application, the name of the second target application (both are in member login state), and the third target application (applications not in member login state on the TV terminal). When the foreground environment of the TV terminal switches from running the first target application to running the second target application (i.e., the second target application is running in the foreground environment), the system will increase the scheduling priority of the second target application to provide smooth operation. Since the first target application was previously running in the foreground environment and is also in member login state, the system has entered the attention mode and issued a prompt indicating that it has entered the attention mode. After entering the attention mode, the system will limit the number of CPU cores used by the processes of non-foreground target applications running in the background environment according to the current CPU core usage, to ensure that the CPU mainly serves the target application running in the foreground environment and improve its smooth operation. Now, switching to the third target application... If two target applications are running in the foreground, the system can continue to maintain the focus mode without needing to remind the user to enter focus mode again. Meanwhile, if the first target application is not exited by the user, but another target application is selected to run in the foreground, or the user returns to the main interface of the TV terminal and opens the second target application, then the first target application is now running in the background environment of the TV terminal. Since the first target application was originally running in the foreground, its scheduling priority has been increased. Now, it is necessary to reduce the scheduling priority of the first target application to the background environment. Simultaneously, to protect the process of the first target application from being reclaimed while running in the background, its process priority needs to be increased to ensure it is in a later queue for reclamation.

[0126] When the foreground environment of the TV terminal switches from running the second target application to running the third target application, the second target application runs in the background environment of the TV terminal. In order to protect the second target application, it is now necessary to increase the process priority of the second target application and decrease its scheduling priority to the scheduling priority of the target application running in the background environment, and issue a warning message. The warning message is used to warn the third target application that it is in an unprotected state, for example, to prompt the user that they have exited the watch mode. The system will no longer give priority to the third target application running in the foreground environment, that is, the third target application is not protected.

[0127] When the foreground environment of the TV terminal switches from running the third target application to running the first target application, the third target application runs in the background environment of the TV terminal. Since the third target application is not a target application in the member login state, the system does not change its protection priority at all. However, the first target application is a target application in the member login state, so it is necessary to increase the scheduling priority of the first target application to provide it with a higher CPU utilization rate, so that it can run smoothly in the foreground environment. At the same time, in order to further provide foreground resources to the first target application, the system can enter the attention mode and issue a prompt to the user that the current system environment has entered the attention mode. The system will limit the number of CPU cores used by the processes of non-foreground target applications running in the background environment according to the current CPU core utilization, so as to ensure that the CPU mainly serves the first target application running in the foreground environment and improves its running smoothness.

[0128] The above embodiments only list the names of the first target application and the second target application in the whitelist. This is only one application scenario. In actual applications, the whitelist may also contain the names of one or more target applications. As long as the target application is in a member login state, it can be recorded in the whitelist. The system can decide whether to increase the protection priority for the target application based on whether its name is in the whitelist.

[0129] 206. Receive a shutdown operation for the target application in the whitelist.

[0130] In order to provide users with flexible services, respect users' personal choices, or enable users to choose not to protect a target application that is logged in as a member according to their current needs without changing the system operating environment, this embodiment can receive the closing operation in real time during all steps, that is, it does not limit the specific order of implementation of step 206.

[0131] For example, when a user launches the first target application and runs it in the foreground, the system provides configuration options. The text prompts can be varied, as long as they indicate whether the user can choose to terminate the increased protection priority for the first target application, such as whether to terminate system environment optimization. Also, when the first target application is opened, the system enters the monitoring mode, and a pop-up window can be used to notify the user that the monitoring mode has been entered, allowing the user to choose whether to terminate the monitoring mode. Furthermore, to prevent the pop-up window from constantly obstructing the user's view or adding extra steps to the user's operation, the display time of the pop-up window can be set. For example, if the user does not make a choice within 10 seconds, the system can default to monitoring mode, and the pop-up prompt message will automatically close.

[0132] 207. Stop the step of increasing the protection priority of the target application according to the shutdown operation.

[0133] The protection priority can be the scheduling priority and / or process priority mentioned above. After receiving the shutdown operation, the step of increasing the protection priority of the target application can be stopped. That is, the operation of step 204 and / or step 205 can be stopped or not executed. Similarly, if the user chooses not to enter the attention mode, the resource tilt protection measures of the system for the target application running in the foreground environment in the attention mode will be stopped, and the normal system running environment will be switched.

[0134] 208. Receive an exit signal, the exit signal containing information that the target application has changed from the member login state to the member exit state.

[0135] In practical applications, if a user logs in to the target application on a TV terminal with their membership account and then logs out, or if the target application's membership account can be logged in on multiple terminals with a limit on the number of terminals that can be logged in simultaneously, and the membership account on the TV terminal is forced offline—for example, in a certain video application where a user purchases a membership account but is only allowed to log in on one terminal at a time—if the user logs in to the membership account on the TV terminal and then logs in to the same membership account on a mobile terminal, then the membership login status of the application on the TV terminal changes to a membership logout status.

[0136] 209. Based on the exit signal, delete the name of the target application from the whitelist, triggering the step of stopping the execution of increasing the protection priority of the target application.

[0137] When a target application changes from a member logged-in state to a member logged-out state, its name is removed from the whitelist, and the TV terminal system no longer protects it. Regardless of whether its operating environment is in the foreground or background, its protection priority will not be changed. That is, the operation content of steps 203-205 will stop, and the target application will no longer be in a protected state. If the whitelist contains the names of other target applications, the system will only protect the recorded target applications.

[0138] The target application protection method in this embodiment provides users with flexible options. Protection is implemented when the target application is in a logged-in state. If the user chooses not to perform protection steps, the protection measures can be omitted. This embodiment can provide corresponding protection for target applications running in both foreground and background environments. When the target application is running in the foreground, its smooth operation and higher CPU utilization can be ensured by increasing its scheduling priority. The system also provides a focus mode selection, which increases the restriction on the number of CPU cores used by background processes to ensure that the target application running in the foreground environment receives more CPU cores for processing, thus improving the protection of the target application. To improve the processing speed and smoothness of the target application, this implementation also provides the option to disable the focus mode. Users can also choose not to enter focus mode based on their actual usage. When the target application is running in the background, its process priority can be increased to ensure that it remains protected in the recycling mechanism. That is, when the background process is recycled to release memory usage, the target application may be recycled later or not at all, so that the process running in the background can continue or be paused instead of being cleaned up. When the user runs the target application in the foreground, they can immediately return to the previous interface or a certain task state, resulting in a smooth user experience.

[0139] The above embodiments describe a target application protection method applied to a television terminal. The following describes the target application protection system of this application applied to a television terminal. Please refer to [link to relevant documentation]. Figure 3 An embodiment of a target application protection system applied to a television terminal includes:

[0140] The judgment unit 301 is used to determine whether the target application is in a member login state;

[0141] The enhancement unit 302 is used to increase the protection priority of the target application according to the operating environment of the target application if the target application's member status is in the member login state. The protection priority is used to determine the system operating environment of the target application on the TV terminal.

[0142] The optimization unit 303 is used to optimize the system operating environment of the target application on the television terminal according to the protection priority.

[0143] The operation performed by the target application protection system applied to the television terminal in this application is the same as described above. Figure 1 The operations performed in the embodiments are similar and will not be described again here.

[0144] Please see Figure 4 Another embodiment of a target application protection system applied to a television terminal includes:

[0145] The judgment unit 401 is used to determine whether the target application is in a member login state;

[0146] The enhancement unit 402 is used to increase the protection priority of the target application if the target application is in a member login state. The protection priority is used to determine the system operating environment of the target application on the TV terminal.

[0147] The optimization unit 403 is used to optimize the system operating environment of the target application on the television terminal according to the protection priority.

[0148] Optionally, the protection priority includes a scheduling priority, which is used to determine the utilization rate of the target application on the central processing unit of the television terminal;

[0149] When the enhancement unit 402 enhances the protection priority of the target application, it is specifically used for:

[0150] When the target application is running in the foreground environment of the TV terminal, the scheduling priority of the target application is increased, and the higher scheduling priority has a higher utilization rate of the central processing unit.

[0151] Optionally, the protection priority includes process priority, which is used to determine the ranking of the target application in the system process recycling order on the television terminal;

[0152] When the enhancement unit 402 enhances the protection priority of the target application, it is specifically used for:

[0153] When the target application is running in the background environment of the TV terminal, the process priority of the target application is increased, and the higher process priority has a later ranking in the system process recycling order.

[0154] Optionally, the system further includes:

[0155] Adding unit 404 is used to add the name of the target application to the whitelist;

[0156] The receiving unit 405 is used to receive a closing operation on the target application in the whitelist;

[0157] Stop unit 406 is used to stop the execution of the step of increasing the protection priority of the target application according to the shutdown operation.

[0158] Optionally, the system further includes:

[0159] The receiving unit 405 is also configured to receive an exit signal, the exit signal containing information that the target application has changed from the member login state to the member exit state;

[0160] The deletion unit 407 is used to delete the name of the target application from the whitelist according to the exit signal;

[0161] Triggering unit 408 is used to trigger the cessation of the step of increasing the protection priority of the target application.

[0162] Optionally, the protection priority includes: process priority and scheduling priority. The scheduling priority is used to determine the CPU usage rate of the target application on the TV terminal, and the process priority is used to determine the ranking of the target application in the system process recycling order on the TV terminal. The whitelist includes: a first target application, a second target application, and a third target application that is an application in the TV terminal that is not logged in as a member.

[0163] Optionally, the system further includes:

[0164] The enhancement unit 402 is further configured to increase the process priority of the first target application when the foreground environment of the TV terminal switches from running the first target application to running the second target application, wherein the first target application runs in the background environment of the TV terminal.

[0165] The reduction unit 409 is used to reduce the scheduling priority of the first target application;

[0166] The enhancing unit 402 is also used to enhance the scheduling priority of the second target application;

[0167] The enhancement unit 402 is further configured to increase the process priority of the second target application when the foreground environment of the TV terminal switches from running the second target application to running the third target application, wherein the second target application runs in the background environment of the TV terminal.

[0168] The reduction unit 409 is also used to reduce the scheduling priority of the second target application;

[0169] Warning unit 410 is used to issue warning information, which is used to warn the third target application that it is in an unprotected state;

[0170] The enhancement unit 402 is further configured to increase the scheduling priority of the first target application when the foreground environment of the television terminal switches from running the third target application to running the first target application, with the third target application running in the background environment of the television terminal.

[0171] Optionally, the system further includes:

[0172] The reminder unit 411 is used to remind that the application has entered the attention mode. The attention mode is used to limit the proportion of CPU usage by background processes that are not the target application.

[0173] The operation performed by the target application protection system applied to the television terminal in this application is the same as described above. Figure 2 The operations performed in the embodiments are similar and will not be described again here.

[0174] The computer device according to embodiments of this application is described below. Please refer to... Figure 5 One embodiment of the computer device in this application includes:

[0175] The computer device 500 may include one or more central processing units (CPUs) 501 and memory 502, wherein the memory 502 stores one or more application programs or data. The memory 502 may be volatile or persistent storage. The program stored in the memory 502 may include one or more modules, each module including a series of instruction operations on the computer device. Furthermore, the processor 501 may be configured to communicate with the memory 502 and execute the series of instruction operations stored in the memory 502 on the computer device 500. The computer device 500 may also include one or more network interfaces 503, one or more input / output interfaces 504, and / or one or more operating systems, such as Windows Server, Mac OS, Unix, Linux, FreeBSD, etc. The processor 501 can execute the aforementioned... Figures 1 to 2 The specific operations performed in the illustrated embodiment will not be described in detail here.

[0176] This application embodiment also provides a computer storage medium for storing computer software instructions used for the aforementioned target application protection method, including a program designed to execute the target application protection method, which can be performed as described above. Figure 1 or Figure 2 The target application protection method described in the document.

[0177] In the several embodiments provided in this application, those skilled in the art should understand that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.

[0178] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold as an independent product...

[0179] Alternatively, it can be stored in a computer-readable storage medium when in use. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage...

[0180] Storage media include: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks or optical disks, and other media that can store program code.

[0181] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for protecting a target application, characterized in that, The method is applied to a television terminal and includes: Determine if the target application is in a member login state; If the target application is in a member login state, the protection priority of the target application is increased. The protection priority is used to determine the system operating environment of the target application on the TV terminal. Optimize the system operating environment of the target application on the television terminal according to the protection priority; After the target application is in the member login state, the method further includes: Add the name of the target application to the whitelist; Receive a close operation on the target application in the whitelist; The steps to increase the protection priority of the target application are stopped according to the shutdown operation; The protection priority includes: process priority and scheduling priority. The scheduling priority is used to determine the CPU usage rate of the target application on the TV terminal, and the process priority is used to determine the ranking of the target application in the system process recycling order on the TV terminal. The whitelist includes: the name of the first target application, the name of the second target application, and the third target application is an application in the TV terminal that is not logged in as a member. After adding the name of the target application to the whitelist, the method further includes: When the foreground environment of the TV terminal switches from running the first target application to running the second target application, the first target application runs in the background environment of the TV terminal, the process priority of the first target application is increased, the scheduling priority of the first target application is decreased, and the scheduling priority of the second target application is increased. When the foreground environment of the TV terminal switches from running the second target application to running the third target application, the second target application runs in the background environment of the TV terminal, the process priority of the second target application is increased, the scheduling priority of the second target application is decreased, and a warning message is issued. The warning message is used to warn the third target application that it is in an unprotected state. When the foreground environment of the TV terminal switches from running the third target application to running the first target application, the third target application runs in the background environment of the TV terminal, thereby increasing the scheduling priority of the first target application.

2. The target application protection method according to claim 1, characterized in that, The protection priority includes a scheduling priority, which is used to determine the utilization rate of the target application on the central processing unit of the television terminal; The increase in the protection priority of the target application includes: When the target application is running in the foreground environment of the TV terminal, the scheduling priority of the target application is increased, and the higher scheduling priority has a higher utilization rate of the central processing unit.

3. The target application protection method according to claim 1 or 2, characterized in that, The protection priority includes process priority, which is used to determine the ranking of the target application in the system process recycling order on the television terminal; The increase in the protection priority of the target application includes: When the target application is running in the background environment of the TV terminal, the process priority of the target application is increased, and the higher process priority has a later ranking in the system process recycling order.

4. The target application protection method according to claim 1, characterized in that, After adding the name of the target application to the whitelist, the method further includes: Receive an exit signal, the exit signal containing information that the target application has changed from the member login state to the member exit state; Based on the exit signal, the name of the target application is removed from the whitelist, triggering the step of stopping the execution of increasing the protection priority of the target application.

5. The target application protection method according to claim 2, characterized in that, After increasing the scheduling priority of the target application, the method further includes: The system has entered a monitoring mode, which limits the CPU usage of background processes that are not the target application.

6. A target application protection system, characterized in that, Applied to television terminals, including: The judgment unit is used to determine whether the target application is in a member login state; The enhancement unit is used to increase the protection priority of the target application according to the operating environment of the target application if the target application's member status is in the member login state. The protection priority is used to determine the system operating environment of the target application on the TV terminal. The optimization unit is used to optimize the system operating environment of the target application on the television terminal according to the protection priority; The system also includes: The addition unit is used to add the name of the target application to the whitelist; A receiving unit is configured to receive a closing operation on the target application in the whitelist; A stop unit is configured to stop the execution of steps that increase the protection priority of the target application based on the shutdown operation; The protection priority includes: process priority and scheduling priority. The scheduling priority is used to determine the CPU usage rate of the target application on the TV terminal, and the process priority is used to determine the ranking of the target application in the system process recycling order on the TV terminal. The whitelist includes: the name of the first target application, the name of the second target application, and the third target application is an application in the TV terminal that is not logged in as a member. The enhancement unit is further configured to increase the process priority of the first target application when the foreground environment of the TV terminal switches from running the first target application to running the second target application, wherein the first target application runs in the background environment of the TV terminal. A reduction unit is used to reduce the scheduling priority of the first target application; The enhancing unit is also used to enhance the scheduling priority of the second target application; The enhancement unit is further configured to increase the process priority of the second target application when the foreground environment of the television terminal switches from running the second target application to running the third target application, wherein the second target application runs in the background environment of the television terminal. The reduction unit is further configured to reduce the scheduling priority of the second target application; The warning unit is used to issue a warning message, which is used to warn the third target application that it is in an unprotected state. The enhancement unit is further configured to increase the scheduling priority of the first target application when the foreground environment of the television terminal switches from running the third target application to running the first target application, wherein the third target application runs in the background environment of the television terminal.

7. A computer device, characterized in that, include: Processor, memory, bus, input / output interfaces, network interfaces; The processor is connected to the memory, the input / output interface, and the network interface via a bus; The memory stores a program; When the processor executes the program stored in the memory, it implements the target application protection method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the target application protection method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Task scheduling method and device, computer readable storage medium and mobile terminal

    CN107391198A

  • Application program running method and device, storage medium and terminal

    CN113127094A

  • Application program management method and device, readable medium, electronic equipment and product

    CN114995972A