Memory management method, system and equipment for 8K set top box and storage medium

By optimizing the memory management method of 8K set-top boxes, adjusting process priorities based on memory status and application keep-alive quantity, the problem of poor stability of 8K set-top boxes is solved, and more efficient memory resource utilization and stability improvement is achieved.

CN120295754APending Publication Date: 2025-07-11SHENZHEN SKYWORTH SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510212118.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

When the existing 8K set-top box is working, a large number of application processes are resident in the background, resulting in large-scale memory resources consumed, poor stability, and prone to delay or crashes.

Method used

By obtaining memory status data and application keep-alive number every time the application is started, adjusting the target keep-alive number, generating instructions to the server to close application processes with lower importance, and freezing application processes according to application whitelist and crash rate in standby state, optimizing memory management.

Benefits of technology

Improve the stability of the 8K set-top box, ensure that the newly opened application has sufficient memory resources, reduce client load, and improve memory resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295754A_ABST
    Figure CN120295754A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of memory management, in particular to a memory management method and system of an 8K set top box, computer equipment and a storage medium. When an application program is opened each time, whether a client needs to release the memory or not is judged according to memory state data of the client, and when the client needs to release the memory, the client can release the memory according to the memory state data of the client; according to the method, the application keep-alive number of the client is adjusted in time to ensure that the newly opened application program has sufficient memory resources, and compared with the prior art, the purpose of improving the stability of the 8K set top box can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of memory management, and in particular, to a memory management method, system, computer device and storage medium for an 8K set-top box. Background Art

[0002] Android TV products are products developed based on the Android system, with multi-process concurrency, a large number of running applications, a large system, and high consumption of memory and EMMC (Embedded Multimedia Card, a standard for flash memory cards), such as devices like 8K set-top boxes.

[0003] When the existing 8K set-top box is working, many started application processes usually stay resident in the background, which leads to high consumption of system memory resources and CPU resources by the 8K set-top box. Only when the system memory of the 8K set-top box is too low, the centralized release mechanism of system processes will be triggered. However, when the system memory consumption is large, triggering the centralized release of system processes will further increase the pressure on the system memory, making the system prone to delays or crashes due to high load. Therefore, the existing 8K set-top boxes have poor stability. Summary of the Invention

[0004] Embodiments of the present invention provide a memory management method, system, computer device and storage medium for an 8K set-top box to solve the problem of poor stability of the 8K set-top box.

[0005] A memory management method for an 8K set-top box, applied to a client, includes: Whenever an application program is started, obtain the current memory status data of the client and the number of applications kept alive; Judge whether the client needs to release memory according to the memory status data; If the client needs to release memory, adjust the number of applications kept alive according to a preset unit quantity to obtain a target number of applications kept alive; Generate a first instruction based on the target number of applications kept alive and send the first instruction to the server, so that the server closes the application processes corresponding to the application programs with lower importance levels in the importance level list based on the target number of applications kept alive.

[0006] For the above memory management method of the 8K set-top box, optionally, the importance level list is obtained in the following manner: Obtain the application running duration of each application program in the client in real time; Sort the application programs according to the application running duration to obtain the application level of each application program; Send the application level to the server so that the server can generate or update the importance level corresponding to each application in the importance level list according to the application level.

[0007] The memory management method of the above 8K set-top box, optionally, further includes: Obtain the device status data of the client; If the device status data indicates that the client is in the standby state, obtain the preset application whitelist in the client; Generate a second instruction based on the application whitelist and send the second instruction to the server so that the server closes the application processes corresponding to all applications outside the application whitelist.

[0008] The memory management method of the above 8K set-top box, optionally, further includes: Obtain the crash rate of each application in the client; Determine whether the crash rate exceeds a preset crash threshold; If the crash rate exceeds the crash threshold, determine the application with the crash rate exceeding the crash threshold as the application to be frozen; Generate a third instruction based on the application to be frozen and send the third instruction to the server so that the server freezes the application process corresponding to the application to be frozen.

[0009] A memory management method of an 8K set-top box, applied to the server, includes: Receive the first instruction sent by the client and obtain the target keep-alive quantity from the first instruction; Obtain the importance level list corresponding to each application in the client, and trigger the driver to close the application processes corresponding to the applications with lower importance levels based on the importance level list.

[0010] The memory management method of the above 8K set-top box, optionally, further includes: Receive the second instruction sent by the client and obtain the application whitelist from the second instruction; Trigger the driver to close the application processes corresponding to the applications outside the application whitelist.

[0011] The memory management method of the above 8K set-top box, optionally, further includes: Receive the third instruction sent by the client and obtain the application to be frozen from the third instruction; Trigger the driver to freeze the application process corresponding to the application to be frozen.

[0012] A memory management system for an 8K set-top box, the memory management system of the 8K set-top box includes a client and a server, The client, whenever starting an application, obtains the current memory status data of the client and the number of applications kept alive; determines whether the client needs to release memory according to the memory status data; if the client needs to release memory, adjusts the number of applications kept alive according to a preset unit quantity to obtain a target number of applications kept alive; generates a first instruction based on the target number of applications kept alive, and sends the first instruction to the server; The server, receives the first instruction sent by the client, and obtains the target number of applications kept alive from the first instruction; obtains the importance level list corresponding to each application program in the client, and triggers the driver to close the application processes corresponding to the application programs with lower importance levels based on the importance level list.

[0013] An 8K set-top box, includes a memory, a processor, and a computer program stored in the memory and executable on the processor, when the processor executes the computer program, it implements the memory management method of the 8K set-top box described in any one of the above.

[0014] A computer-readable storage medium, the computer-readable storage medium stores a computer program, when the computer program is executed by a processor, it implements the memory management method of the 8K set-top box described in any one of the above.

[0015] The above-mentioned memory management method, system, computer device and storage medium of the 8K set-top box, this method, whenever starting an application, obtains the current memory status data of the client and the number of applications kept alive; determines whether the client needs to release memory according to the memory status data; if the client needs to release memory, adjusts the number of applications kept alive according to a preset unit quantity to obtain a target number of applications kept alive, generates a first instruction based on the target number of applications kept alive, and sends the first instruction to the server, so that the server closes the application processes corresponding to the application programs with lower importance levels in the importance level list based on the target number of applications kept alive. It can be seen that in the present invention, every time an application is opened, it is judged whether the client needs to release memory according to the memory status data of the client. When the client needs to release memory, the number of applications kept alive by the client is adjusted in time to ensure that there are sufficient memory resources for the newly opened application. Compared with the prior art, the purpose of improving the stability of the 8K set-top box can be achieved. In addition, in the present invention, the step of closing the application process corresponding to the application program is transferred from the client to the server, which can further reduce the load of the client and is conducive to the efficient utilization of the memory resources of low-capacity memory devices. Description of the Drawings

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments of the present invention. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0017] Figure 1 It is a schematic diagram of an application environment of the memory management method of an 8K set-top box in an embodiment of the present invention; Figure 2 It is a flowchart of the memory management method of an 8K set-top box in an embodiment of the present invention; Figure 3 It is another flowchart of the memory management method of an 8K set-top box in an embodiment of the present invention; Figure 4 It is another flowchart of the memory management method of an 8K set-top box in an embodiment of the present invention; Figure 5 It is another flowchart of the memory management method of an 8K set-top box in an embodiment of the present invention; Figure 6 It is another flowchart of the memory management method of an 8K set-top box in an embodiment of the present invention; Figure 7 It is another flowchart of the memory management method of an 8K set-top box in an embodiment of the present invention; Figure 8 It is another flowchart of the memory management method of an 8K set-top box in an embodiment of the present invention; Figure 9 It is a schematic diagram of an 8K set-top box in an embodiment of the present invention. Detailed implementation manners

[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.

[0019] It should be understood that when used in the specification and appended claims of the present invention, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0020] It should also be understood that the term "and / or" as used in the specification and appended claims of the present invention refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0021] As used in the specification and appended claims of the present invention, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" depending on the context. Similarly, the phrases "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" depending on the context.

[0022] In addition, in the description of the specification and appended claims of the present invention, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0023] Reference to "one embodiment" or "some embodiments" or the like described in the specification of the present invention means that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the present invention. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0024] An embodiment of the present invention provides a memory management method for an 8K set-top box. The memory management method for the 8K set-top box can be applied in the Figure 1 application environment as shown. Specifically, the memory management method for the 8K set-top box is applied in a memory management system of the 8K set-top box. The memory management system of the 8K set-top box includes a Figure 1 client and a server as shown. The client communicates with the server through a network for the purpose of improving the stability of the 8K set-top box. Among them, the client is also called the user side, which refers to a program that provides local services corresponding to the server side. The client can be installed on but not limited to various personal computers, 8K set-top boxes, laptop computers, smart phones, tablet computers, and portable wearable devices. The server side can be implemented by an independent server or a server cluster composed of multiple servers.

[0025] In one embodiment, as Figure 2 shown, a memory management method for an 8K set-top box is provided, and this method is applied inFigure 1 Taking the client in [it] as an example for illustration, the steps are as follows: S201: Whenever an application is started, obtain the current memory status data of the client and the number of applications kept alive.

[0026] Among them, the client is an 8K set-top box. The number of applications kept alive refers to the number of applications that the client allows to stay resident in the background. The memory status data refers to the status data of the system memory of the client. The system memory can be Random Access Memory (RAM). The memory status data includes the remaining memory data and the memory consumption data of the client.

[0027] S202: Determine whether the client needs to release memory according to the memory status data.

[0028] If the client needs to release memory, adjust the number of applications kept alive according to a preset unit quantity to obtain the target number of applications kept alive. If the client does not need to release memory, the process ends.

[0029] In a specific implementation, in this embodiment, the memory difference can be calculated based on the remaining memory data and the memory consumption data, and it is determined whether the memory difference is less than a preset difference threshold. If the memory difference is less than the difference threshold, it is determined that the client needs to release memory. On the contrary, if the memory difference is greater than or equal to the difference threshold, it is determined that the client does not need to release memory.

[0030] S203: If the client needs to release memory, adjust the number of applications kept alive according to a preset unit quantity to obtain the target number of applications kept alive.

[0031] In one implementation manner, the number of applications kept alive in this embodiment can correspond to the number of applications started in the background of the client. When a new application is started on the client and when the client closes a running application, the number of applications kept alive is adjusted according to a preset unit quantity to obtain the target number of applications kept alive. When a new application is started on the client, if the client needs to release memory, one unit quantity is reduced based on the number of applications kept alive to obtain the target number of applications kept alive. If the client does not need to release memory, one unit quantity is increased based on the number of applications kept alive to obtain the target number of applications kept alive.

[0032] In another implementation, the number of applications to be kept alive in this embodiment can be preset. When the client starts a new application, if the client needs to free up memory and the number of applications running in the background of the client reaches the number of applications to be kept alive, then one unit quantity is subtracted from the number of applications to be kept alive to obtain the target number of applications to be kept alive; if the client does not need to free up memory and the number of applications running in the background of the client does not reach the number of applications to be kept alive, then one unit quantity is added to the number of applications to be kept alive to obtain the target number of applications to be kept alive; if the client needs to free up memory and the number of applications running in the background of the client does not reach the number of applications to be kept alive, then one unit quantity is subtracted from the actual number of applications running in the background of the client to obtain the target number of applications to be kept alive.

[0033] For example, taking the case where there are 3 applications in the running state in the background of the client as an example, at this time the number of applications to be kept alive of the client is 3. When the client wants to start the 4th application, if the client needs to free up memory, then 1 is subtracted from the number of applications to be kept alive to obtain the target number of applications to be kept alive. That is to say, the target number of applications to be kept alive is 2.

[0034] S204: Generate a first instruction based on the target number of applications to be kept alive and send the first instruction to the server so that the server closes the application processes corresponding to the applications with lower importance levels in the importance level list based on the target number of applications to be kept alive.

[0035] In a specific implementation, the client and the server in this embodiment can establish an inter - call relationship through the AIDL framework, thereby enabling the client and the server to achieve inter - process communication (IPC). The client sends the first instruction to the server through inter - process communication so that the server can obtain the target number of applications to be kept alive according to the first instruction, and then according to the target number of applications to be kept alive and in accordance with the importance level list, closes the application processes corresponding to the applications running in the background of the client from high to low until the number of applications running in the background of the client reaches the target number of applications to be kept alive, completing the release of the client's memory. It can be understood that after the client's memory is released, the client has sufficient memory space. At this time, the application to be opened can be started. After the application is started, the number of applications to be kept alive of the client is updated according to the number of applications currently running in the background of the client.

[0036] In summary, for the memory management method of the above 8K set-top box, when starting an application each time, the current memory status data of the client and the number of applications to be kept alive are obtained; it is determined whether the client needs to release memory according to the memory status data; if the client needs to release memory, the number of applications to be kept alive is adjusted according to a preset unit quantity to obtain a target number of applications to be kept alive, a first instruction is generated based on the target number of applications to be kept alive, and the first instruction is sent to the server so that the server closes the application processes corresponding to the applications with a lower importance level in the importance level list based on the target number of applications to be kept alive. It can be seen that in the present invention, each time an application is opened, it is determined whether the client needs to release memory according to the memory status data of the client. When the client needs to release memory, the number of applications to be kept alive of the client is adjusted in a timely manner to ensure that the newly opened application has sufficient memory resources. Compared with the prior art, the purpose of improving the stability of the 8K set-top box can be achieved.

[0037] In one embodiment, as Figure 3 shown, the importance level list in this embodiment is obtained in the following manner: S301: Obtain the application running duration of each application in the client in real time.

[0038] Among them, the application running duration of the application in this embodiment may be the running duration of the application in the past period of time (such as one week, one month, etc.). The running duration of each application from startup to shutdown in the past period of time is accumulated to obtain the application running duration of each application.

[0039] In a specific implementation, in this embodiment, the startup time and shutdown time of the application can be obtained by reading the running status log of each application, so as to obtain the application running duration of each application.

[0040] S302: Sort the applications according to the application running duration to obtain the application level of each application.

[0041] It can be understood that in this embodiment, the applications can be sorted according to the length of the application running duration. The longer the application running duration, the higher the application level of the application, and the shorter the application running duration, the lower the application level of the application. Thus, the application level of each application can be obtained.

[0042] S303: Send the application level to the server so that the server generates or updates the importance level corresponding to each application in the importance level list according to the application level.

[0043] In one implementation, in this embodiment, after sending the application level to the server, the server can generate a new importance level list based on the application level of the application program. That is to say, the application level of the application program is the new importance level list.

[0044] For example, taking the application level of the application program as "(Application A, Level 1), (Application B, Level 2), and (Application C, Level 3)" as an example, then the generated importance level list is shown in Table 1: Table 1 Thus, the server can generate or update the importance level corresponding to each application program in the importance level list according to the application level.

[0045] In another implementation, in this embodiment, the application levels of each application program can be added to the importance levels of each application program in the importance level list to obtain the new importance level of each application program, and then generate the importance level list.

[0046] For example, referring to Table 1 for the importance level list, it can be known that the importance levels of each application program are "(Application A, Level 1), (Application B, Level 2), and (Application C, Level 3)". Based on the application level of the application program being "(Application B, Level 1), (Application C, Level 2), and (Application A, Level 3)", adding the application levels and importance levels of each application program, we get "(Application A, Level 4), (Application B, Level 3), and (Application C, Level 5)". Then, the generated importance level list is shown in Table 2: Table 2 Thus, the server can generate or update the importance level corresponding to each application program in the importance level list according to the application level.

[0047] In one embodiment, as Figure 4 shown, the memory management method of the 8K set-top box disclosed in this embodiment further includes the following steps: S401: Obtain the device status data of the client.

[0048] Among them, the device status quantity includes the data on whether the client is in the standby state.

[0049] In a specific implementation, in this embodiment, it can be judged whether the client is in the standby state by reading the system log of the client. If the device status data indicates that the client is in the standby state, obtain the preset application whitelist in the client. If the device status data indicates that the client is not in the standby state, the process ends.

[0050] S402: If the device status data indicates that the client is in the standby state, obtain the preset application whitelist in the client.

[0051] The application whitelist refers to the applications that must be retained when the client is in the standby state, or the applications that are preset to be specified for retention when the client is in the standby state. That is to say, except for the applications in the application whitelist, all other applications running in the background of the client need to be closed.

[0052] S403: Generate a second instruction based on the application whitelist and send the second instruction to the server so that the server closes the application processes corresponding to all applications other than the application whitelist.

[0053] After receiving the second instruction, the server obtains the application whitelist from the second instruction, and then closes the application processes corresponding to all applications other than the application whitelist according to the application whitelist.

[0054] In summary, in this embodiment, by closing the application processes corresponding to all applications other than the application whitelist in the client according to the application whitelist when the client enters the standby state, it is possible to release the client memory while achieving the purpose of reducing the power consumption of the client.

[0055] In one embodiment, as Figure 5 shown, the memory management method of the 8K set-top box disclosed in this embodiment further includes the following steps: S501: Obtain the crash rate of each application in the client.

[0056] The crash rate refers to the ratio of the number of application crashes to the number of application openings within a certain period of time for an application.

[0057] In a specific implementation, in this embodiment, the number of application crashes and the number of application openings of an application can be recorded through buried points. Buried points are performed in the startup process of the application to record and accumulate the number of application openings once each time the application goes through the startup process. Buried points are performed in the crash handling process of the application to record and accumulate the number of application crashes once each time the application goes through the crash handling process. Divide the recorded and accumulated number of application crashes by the recorded and accumulated number of application openings to obtain the crash rate of the application.

[0058] S502: Determine whether the crash rate exceeds the preset crash threshold.

[0059] S503: If the crash rate exceeds the crash threshold, determine the application with a crash rate exceeding the crash threshold as the application to be frozen.

[0060] S504: Generate a third instruction based on the application to be frozen, and send the third instruction to the server so that the server freezes the application process corresponding to the application to be frozen.

[0061] If the crash rate of an application exceeds the crash threshold, it indicates that the application starts and shuts down frequently. During the frequent start-up and shutdown process, a large amount of memory resources will be occupied. Therefore, if the crash rate exceeds the crash threshold, the application with a crash rate exceeding the crash threshold can be determined as the application to be frozen. Then, a third instruction is generated based on the application to be frozen and sent to the server so that the server freezes the application process corresponding to the application to be frozen. That is to say, since the application is difficult to run normally, it is chosen to directly freeze the application, which can not only prevent the application from occupying a large amount of memory resources during the frequent start-up and shutdown process, but also improve the user experience of using the client, which is beneficial to improving user satisfaction.

[0062] In one embodiment, as Figure 6 shown, a memory management method for an 8K set-top box is provided. Taking the method applied to the Figure 1 server as an example, the steps are as follows: S601: Receive the first instruction sent by the client and obtain the target keep-alive quantity from the first instruction.

[0063] S602: Obtain the importance level list corresponding to each application in the client, and trigger the driver to close the application processes corresponding to the applications with lower importance levels based on the importance level list, so that the applications with the target keep-alive quantity remaining in the client are in the running state.

[0064] Among them, in this embodiment, the server and the driver implement cross-process communication through the Socket communication mechanism.

[0065] In a specific implementation, after receiving the first instruction, the server in this embodiment obtains the importance level list from the AMS module, and triggers the LMK module of the driver to close the application processes corresponding to the applications with lower importance levels based on the importance level list, so that the applications with the target keep-alive quantity remaining in the client are in the running state.

[0066] In one embodiment, as Figure 7 shown, the memory management method for the 8K set-top box in this embodiment further includes the following steps: S701: Receive the second instruction sent by the client and obtain the application whitelist from the second instruction.

[0067] S702: Trigger the driver to close the application processes corresponding to the applications outside the application whitelist.

[0068] In a specific implementation, after receiving the second instruction, the server in this embodiment obtains the application whitelist from the second instruction, and triggers the LMK module of the driver side to close the application processes corresponding to the applications outside the application whitelist based on the application whitelist.

[0069] In one embodiment, as Figure 8 shown, the memory management method of the 8K set-top box in this embodiment further includes the following steps: S801: Receive a third instruction sent by the client, and obtain the application to be frozen from the third instruction.

[0070] S802: Trigger the driver side to freeze the application process corresponding to the application to be frozen.

[0071] In a specific implementation, after receiving the third instruction, the server in this embodiment obtains the application to be frozen from the third instruction, and triggers the LMK module of the driver side to freeze the application process corresponding to the application to be frozen based on the application to be frozen.

[0072] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0073] In one embodiment, a memory management system for an 8K set-top box is provided. The memory management system for the 8K set-top box corresponds one-to-one with the memory management method of the 8K set-top box in the above embodiment. As Figure 1 shown, the memory management system for the 8K set-top box includes a client and a server. The detailed description of each functional module is as follows: The client, whenever starting an application program, obtains the current memory status data of the client and the number of applications kept alive; determines whether the client needs to release memory according to the memory status data; if the client needs to release memory, adjusts the number of applications kept alive according to a preset unit quantity to obtain a target number of applications kept alive; generates a first instruction based on the target number of applications kept alive, and sends the first instruction to the server; The server, receives the first instruction sent by the client, and obtains the target number of applications kept alive from the first instruction; obtains the importance level list corresponding to each application program in the client, and triggers the driver side to close the application processes corresponding to the application programs with lower importance levels based on the importance level list.

[0074] For the specific limitations of the memory management system of the 8K set-top box, reference can be made to the limitations of the memory management method of the 8K set-top box in the above text, which will not be elaborated here. Each module in the memory management system of the above 8K set-top box can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so as to facilitate the processor to call and execute the operations corresponding to the above modules.

[0075] In one embodiment, an 8K set-top box is provided, and its internal structure diagram can be as Figure 9 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it realizes a memory management method of an 8K set-top box.

[0076] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it realizes the memory management method of the 8K set-top box in the above embodiment.

[0077] In one embodiment, a computer-readable storage medium is provided. A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor, it realizes the memory management method of the 8K set-top box in the above embodiment.

[0078] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. This computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above various methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0079] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.

[0080] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention and should all be included in the protection scope of the present invention.

Claims

1. A memory management method for an 8K set-top box, characterized in that, Applied to the client, including: Whenever an application is launched, obtain the current memory status data and the number of applications kept alive of the client; Judge whether the client needs to release memory according to the memory status data; If the client needs to release memory, adjust the number of applications kept alive according to a preset unit quantity to obtain a target number of applications kept alive; Generate a first instruction based on the target number of applications kept alive and send the first instruction to the server, so that the server closes the application processes corresponding to the applications with lower importance levels in the importance level list based on the target number of applications kept alive.

2. The memory management method of the 8K set-top box according to claim 1, characterized in that, The importance level list is obtained in the following way: Obtain the application running duration of each application in the client in real time; Sort the applications according to the application running duration to obtain the application level of each application; Send the application level to the server, so that the server generates or updates the importance level corresponding to each application in the importance level list according to the application level.

3. The memory management method of the 8K set-top box according to claim 1, characterized in that, Also includes: Obtain the device status data of the client; If the device status data indicates that the client is in the standby state, obtain the preset application whitelist in the client; Generate a second instruction based on the application whitelist and send the second instruction to the server, so that the server closes the application processes corresponding to all applications outside the application whitelist.

4. The memory management method of the 8K set-top box according to claim 1, characterized in that, Also includes: Obtain the crash rate of each application in the client; Judge whether the crash rate exceeds a preset crash threshold; If the crash rate exceeds the crash threshold, determine the application with the crash rate exceeding the crash threshold as the application to be frozen; Generate a third instruction based on the application to be frozen and send the third instruction to the server, so that the server freezes the application process corresponding to the application to be frozen.

5. A memory management method for an 8K set-top box, characterized in that, Applied to the server, including: Receive the first instruction sent by the client and obtain the target number of applications kept alive from the first instruction; Obtain the importance level list corresponding to each application in the client, and trigger the driver to close the application processes corresponding to the applications with lower importance levels based on the importance level list.

6. The memory management method of the 8K set-top box according to claim 5, characterized in that, Also includes: Receive the second instruction sent by the client and obtain the application whitelist from the second instruction; Trigger the driver to close the application processes corresponding to the applications outside the application whitelist.

7. The memory management method of the 8K set-top box according to claim 5, characterized in that Also includes: Receive the third instruction sent by the client and obtain the application to be frozen from the third instruction; Trigger the driver to freeze the application process corresponding to the application to be frozen.

8. A memory management system for an 8K set-top box, characterized in that, The memory management system of the 8K set-top box includes a client and a server, The client, whenever an application is launched, obtains the current memory status data and the number of applications kept alive of the client; Judge whether the client needs to release memory according to the memory status data; If the client needs to release memory, adjust the number of applications to be kept alive according to a preset unit quantity to obtain a target number of applications to be kept alive; Generate a first instruction based on the target number of applications to be kept alive and send the first instruction to the server; The server receives the first instruction sent by the client and obtains the target number of applications to be kept alive from the first instruction; Obtain a list of importance levels corresponding to each of the application programs in the client, and trigger the driver to close the application processes corresponding to the application programs with lower importance levels based on the list of importance levels.

9. An 8K set-top box, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the memory management method of the 8K set-top box according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the memory management method of the 8K set-top box according to any one of claims 1 to 7.