Set top box system memory management method and device, equipment and medium

By dynamically adjusting the level and position of the resource cache list items of the set-top box system, the problem of excessive release of cache resources in the browser due to excessive memory pressure is solved, the browser loading efficiency is improved, and unnecessary network downloading and rendering steps are avoided.

CN118708358APending Publication Date: 2024-09-27FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410929359.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

In set-top box systems, cache resources are excessively released due to excessive memory pressure when the browser is running. As a result, the browser needs to re-run network downloads, image decoding, image rendering and other steps to load previously visited pages, which reduces operating efficiency.

Method used

By obtaining the remaining memory of the set-top box system, when the remaining memory is less than or equal to the threshold, the system release level is determined, and the level in the resource cache list is dynamically adjusted. The level and position of the cache list items are adjusted based on the visibility and reuse times of the page elements. , to release cache resources in a targeted manner.

Benefits of technology

It effectively reduces the impact on the operating efficiency of the set-top box system, avoids unnecessary network downloads and repeated rendering steps, and improves the loading efficiency of the browser.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708358A
    Figure CN118708358A
Patent Text Reader

Abstract

The invention discloses a set top box system memory management method, device and equipment and a medium, and belongs to the technical field of memory management. The memory management method for the set top box system comprises the following steps: acquiring the residual memory of the set top box system; when the remaining memory is smaller than or equal to a first threshold value, determining a system release level corresponding to the remaining memory; determining a target cache list item of which the grade is less than or equal to a system release grade in the resource cache list, and when the browser page is reused, dynamically adjusting the grade of the cache list item in the resource cache list corresponding to the browser page; the cache resources corresponding to the target cache list item are released, a multi-stage memory management strategy is adopted, the cache resources are released in a targeted mode according to the memory occupation condition, and the influence on the operating efficiency of a set top box system is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of memory management, and in particular to a set-top box system memory management method, device, equipment and computer-readable storage medium. Background Art

[0002] With the continuous development of interactive network television (Internet Protocol TV, IPTV) services, the pages used to present services are becoming more and more complex. On embedded platforms such as set-top boxes where hardware resources are relatively tight, as the browser continues to run for an extended period of time, the memory space occupied by the browser cache resources will continue to rise, and the program will become more and more stuck. When the memory space resources cannot be applied for, the program will eventually run abnormally until it crashes. In the related art, when the browser is running, if the memory pressure of the set-top box system is too large, all cache resources that exceed the threshold are directly released to relieve the memory pressure. However, blindly releasing too many cache resources will cause the browser to re-perform network downloading, picture decoding, image rendering and other steps when loading previously visited pages, resulting in reduced operating efficiency. Summary of the invention

[0003] The present application provides a set-top box system memory management method, device, equipment and computer-readable storage medium, which can solve the technical problem in the prior art that all cache resources exceeding a threshold are directly released, causing the browser to re-perform network downloading, image decoding, image rendering and other steps when loading a page that has been visited before, resulting in reduced operating efficiency.

[0004] In a first aspect, an embodiment of the present application provides a set-top box system memory management method, the set-top box system memory management method comprising:

[0005] Get the remaining memory of the set-top box system;

[0006] When the remaining memory is less than or equal to a first threshold, determining a system release level corresponding to the remaining memory;

[0007] Determine a target cache list item in the resource cache list whose rank is less than or equal to the system release rank, wherein when the browser page is reused, dynamically adjust the rank of the cache list item in the resource cache list corresponding to the browser page;

[0008] Releases the cache resources corresponding to the target cache list item.

[0009] In combination with the first aspect, in one implementation, when a browser page is reused, the level of a cache list item in a resource cache list corresponding to the browser page is dynamically adjusted, including:

[0010] When the browser page is reused, obtain the page element visibility and level in the cache list item from the resource cache list corresponding to the browser page;

[0011] When the page element visibility is visible and the level is high, keep the level;

[0012] When the page element visibility is invisible and the level is medium, keep the level;

[0013] When the page element visibility is invisible and the level is low, adjust the level to medium.

[0014] In combination with the first aspect, in one implementation, after the step of dynamically adjusting the level of the cache list item in the resource cache list corresponding to the browser page when the browser page is reused, the method further includes:

[0015] Record the number of browser page reuses;

[0016] When the number of browser page reuses reaches a second threshold or a multiple of the second threshold, determine the cache list item with a medium level in the resource cache list corresponding to the browser page, downgrade its level to low, and adjust it to a position before and adjacent to the first cache list item with a low level starting from the header of the resource cache list.

[0017] In combination with the first aspect, in one implementation, the method further includes:

[0018] For cache list items whose page element visibility is visible and whose level is high, after maintaining the level, the cache list items are adjusted to a position after the header of the resource cache list and adjacent to it;

[0019] For cache list items whose page element visibility is invisible and whose level is medium, after maintaining the level, the cache list item's position in the resource cache list is maintained;

[0020] For cache list items whose page element visibility is invisible and whose level is low, after adjusting the level to medium, the cache list items are adjusted to a position before and adjacent to the first cache list item with a medium level starting from the header of the resource cache list.

[0021] In combination with the first aspect, in one implementation, determining a target cache list item in a resource cache list whose level is less than or equal to a system release level includes:

[0022] Start searching from the end of each resource cache list, determine the level of each cache list item one by one, and use the cache list item with a level less than or equal to the system release level as the target cache list item; among which, the position of the cache list item in the resource cache list is arranged in descending order of level.

[0023] In a second aspect, an embodiment of the present application provides a set-top box system memory management device, the set-top box system memory management device comprising:

[0024] An acquisition module, used to acquire the remaining memory of the set-top box system;

[0025] A first determining module, configured to determine a system release level corresponding to the remaining memory when the remaining memory is less than or equal to a first threshold;

[0026] A second determination module is used to determine a target cache list item in the resource cache list whose level is less than or equal to the system release level, wherein when the browser page is reused, the level of the cache list item in the resource cache list corresponding to the browser page is dynamically adjusted;

[0027] The release module is used to release the cache resources corresponding to the target cache list item.

[0028] In conjunction with the second aspect, in one implementation, the set-top box system memory management device further includes an adjustment module, and the adjustment module is specifically configured to:

[0029] When the browser page is reused, obtain the page element visibility and level in the cache list item from the resource cache list corresponding to the browser page;

[0030] When the page element visibility is visible and the level is high, keep the level;

[0031] When the page element visibility is invisible and the level is medium, keep the level;

[0032] When the page element visibility is invisible and the level is low, adjust the level to medium.

[0033] In conjunction with the second aspect, in one implementation, the adjustment module is further configured to:

[0034] When the browser page is reused, obtain the page element visibility and level in the cache list item from the resource cache list corresponding to the browser page;

[0035] When the page element visibility is visible and the level is high, the cache list item is adjusted to a position after the header of the resource cache list and adjacent to it;

[0036] When the page element visibility is invisible and the level is medium, the cache list item is kept in the resource cache list;

[0037] When the page element visibility is invisible and the level is low, the cache list item is adjusted to a position before and adjacent to the first cache list item with a level of medium starting from the head of the resource cache list.

[0038] In a third aspect, an embodiment of the present application provides a set-top box system memory management device, the set-top box system memory management device comprising a processor, a memory, and a set-top box system memory management program stored on the memory and executable by the processor, wherein when the set-top box system memory management program is executed by the processor, the steps of the set-top box system memory management method as described in any one of the first aspects are implemented.

[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a set-top box system memory management program is stored, wherein when the set-top box system memory management program is executed by a processor, the steps of the set-top box system memory management method as described in any one of the first aspects are implemented.

[0040] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:

[0041] By acquiring the remaining memory of the set-top box system; when the remaining memory is less than or equal to a first threshold, determining the system release level corresponding to the remaining memory; further determining a target cache list item in the resource cache list whose level is less than or equal to the system release level, wherein, when a browser page is reused, dynamically adjusting the level of the cache list item in the resource cache list corresponding to the browser page; then releasing the cache resources corresponding to the target cache list item, adopting a multi-level memory management strategy, and releasing the cache resources in a targeted manner according to the memory occupancy, thereby reducing the impact on the operating efficiency of the set-top box system. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is a flow chart of the first embodiment of the set-top box system memory management method of the present application;

[0043] Figure 2 A schematic diagram of the structure of a resource cache list provided for an embodiment of the present application;

[0044] Figure 3 This is a functional module diagram of an embodiment of a set-top box system memory management device of the present application;

[0045] Figure 4 This is a schematic diagram of the hardware structure of a set-top box system memory management device involved in the embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0048] In a first aspect, an embodiment of the present application provides a set-top box system memory management method.

[0049] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the set-top box system memory management method of the present application. Figure 1 As shown, the set-top box system memory management method includes:

[0050] Step 110, obtaining the remaining memory of the set-top box system;

[0051] In specific implementation, the remaining memory of the set-top box system can be obtained by actively querying the memory information of the set-top box system or by passively receiving the memory information sent by the set-top box system. The real-time memory situation of the set-top box system can be comprehensively judged by comparing the remaining memory with the first threshold.

[0052] Step 120: When the remaining memory is less than or equal to a first threshold, determine a system release level corresponding to the remaining memory;

[0053] It can be understood that when the remaining memory is greater than the first threshold, it indicates that the set-top box system currently has no memory pressure and there is no need to release cache resources; when the remaining memory is less than or equal to the first threshold, it indicates that the set-top box system currently has memory pressure and cache resources need to be released.

[0054] Among them, the level of system release level can be flexibly divided according to actual needs, and this application does not make specific restrictions on this. Exemplarily, this application sets the system release level to three levels: low, medium, and high. The higher the level, the more cache resources need to be released. When the remaining memory is less than or equal to the first threshold value and greater than the second value, that is, the remaining memory belongs to the numerical interval formed by the numerical value between the first threshold value and the second value, the system release level corresponding to the remaining memory is low; when the remaining memory is less than or equal to the second value and greater than the third value, that is, the remaining memory belongs to the numerical interval formed by the numerical value between the second value and the third value, the system release level corresponding to the remaining memory is medium; when the remaining memory is less than or equal to the third value, that is, the remaining memory belongs to the numerical interval formed by the numerical value between the third value and zero, and the system release level corresponding to the remaining memory is high. Among them, the third value is less than the second value, and the second value is less than the first threshold.

[0055] In a specific implementation, after obtaining the remaining memory, when the remaining memory is less than or equal to the first threshold, the target value interval to which the remaining memory belongs is determined, and then the system release level corresponding to the target value interval is determined.

[0056] Step 130: determining a target cache list item in the resource cache list whose level is less than or equal to the system release level, wherein when the browser page is reused, dynamically adjusting the level of the cache list item in the resource cache list corresponding to the browser page;

[0057] Different types of cache resources constitute their own resource cache lists. The types of cache resources include but are not limited to js files, image files, bitmaps generated after image decoding, textures rendered by screens, etc. The resource cache list includes at least one cache list item, and one cache list item corresponds to one cache resource. Figure 2 A schematic diagram of the structure of a resource cache list provided by an embodiment of the present application. Figure 2 It can be seen that the resource cache list consists of a header, a footer, and several cache list items. Each cache list item stores the previous item address, the next item address, the page element, the page element visibility, the level, the resource cache start address, the resource cache length, the actual resource cache memory usage, etc. It should be noted that the positions of the cache list items in the resource cache list in this application are arranged in descending order of level.

[0058] In specific implementation, when the system release level is low, the cache list items with low levels in the resource cache list are determined as target cache list items; when the system release level is medium, the cache list items with medium and low levels in the resource cache list are determined as target cache list items; when the system release level is high, all cache list items in the resource cache list are determined as target cache list items.

[0059] The browser page is reused, which can be understood as the browser page is loaded again. When the browser page is reused, the browser parses the page code, first identifies the invisible elements in the browser page, and then identifies the elements other than the invisible elements in the browser page as visible elements in the browser page. Determine whether there is a page visible element record corresponding to the browser page; when there is a page visible element record corresponding to the browser page, update the page visible element record based on the identified visible elements; and at the same time update the page element visibility of the cache list item record in the resource cache list corresponding to the browser page, the page element visibility is visible (true) or invisible (false).

[0060] Furthermore, for each visible element in the updated page visible element record, determine whether it needs to load cache resources; when cache resources need to be loaded, determine whether there is a first cache list item corresponding to the cache resource in the set-top box system; when there is a first cache list item corresponding to the cache resource, combine the page element visibility and level recorded in the first cache list item, dynamically adjust the level of the first cache list item and the position of the first cache list item in the resource cache list, and obtain the corresponding cache resource based on the page elements stored in the first cache list item.

[0061] Among them, the method of identifying invisible elements in the browser page is: combining the Cascading Style Sheet (CSS) and the analysis of the HTML file, the coordinates of the page elements can be obtained. If the elements are beyond the screen and need to be scrolled to display, they are currently invisible; in addition, by analyzing and comparing the size and position of adjacent page elements, it can be determined whether some elements are blocked by other elements. The blocked elements are also invisible; finally, if the attributes of some elements are set to transparent, they are also invisible. It should be noted that the visible elements and invisible elements in the browser page are all changing. For example, when the browser page was loaded last time, the invisible page elements identified may become visible when the browser page is loaded next time; when the browser page was loaded last time, the visible page elements identified may become invisible when the browser page is loaded next time.

[0062] When the first cache list item corresponding to the cache resource does not exist, a new first cache list item is created in the resource cache list corresponding to the cache resource, wherein the first cache list item includes a level, wherein the level is determined based on the visibility of the page element, and the position of the first cache list item in the cache list is determined based on the level. When the page element visibility is visible, the level of the first cache list item is set to high; when the page element visibility is not visible, the level of the first cache list item is set to medium; when the level is high, the first cache list item is positioned at the front in the cache list; when the level is medium, the first cache list item is positioned behind the cache list item with a high level in the cache list.

[0063] When there is no first cache list item corresponding to the cache resource, a new resource cache list corresponding to the cache resource is created, and a new first cache list item is created in the new resource cache list, wherein the first cache list item includes a level, and the level is determined based on page element visibility.

[0064] This application continuously adjusts the level of cache list items according to the frequency of cache resource use, changes in page element visibility, etc.

[0065] Step 140: Release the cache resources corresponding to the target cache list item.

[0066] Furthermore, after the target cache list item is determined, the cache resource corresponding to the target cache list item is released to relieve the memory pressure of the set-top box system.

[0067] In this embodiment, the remaining memory of the set-top box system is obtained; when the remaining memory is less than or equal to a first threshold, the system release level corresponding to the remaining memory is determined; further, a target cache list item in the resource cache list whose level is less than or equal to the system release level is determined, wherein when a browser page is reused, the level of the cache list item in the resource cache list corresponding to the browser page is dynamically adjusted; then, the cache resources corresponding to the target cache list item are released, and a multi-level memory management strategy is adopted to release cache resources in a targeted manner according to memory occupancy, thereby reducing the impact on the operating efficiency of the set-top box system.

[0068] Furthermore, in one embodiment, when a browser page is reused, the level of the cache list item in the resource cache list corresponding to the browser page is dynamically adjusted, including:

[0069] Step 210: When the browser page is reused, obtain the page element visibility and level in the cache list item from the resource cache list corresponding to the browser page;

[0070] In specific implementation, when a browser page is reused, the visibility and level of the page elements in the cache list items are obtained from the resource cache list corresponding to the browser page, so that the level of the cache list items in the resource cache list corresponding to the browser page can be dynamically adjusted based on the visibility and level of the page elements.

[0071] Step 220: When the page element visibility is visible and the level is high, maintain the level; when the page element visibility is invisible and the level is medium, maintain the level; when the page element visibility is invisible and the level is low, adjust the level to medium.

[0072] It can be understood that the browser page is reused, which indicates that the browser page is a page that has been visited before. Therefore, it is necessary to increase the level of the cache list item with a low level in the cache list corresponding to the browser page to reduce the probability of the corresponding cache resource being released. When the browser loads a page that has been visited before, it reduces the steps of re-downloading the network, decoding pictures, rendering images, etc., thereby improving operating efficiency.

[0073] In this embodiment, when a browser page is reused, the visibility and level of the page element in the cache list item are obtained from the resource cache list corresponding to the browser page. When the page element visibility is visible and the level is high, the level is maintained; when the page element visibility is invisible and the level is medium, the level is maintained; when the page element visibility is invisible and the level is low, the level is adjusted to medium. This solves the technical problem in the related art that when the browser loads a page that has been visited before, the corresponding cache resources are blindly released, resulting in the need to re-perform network downloading, picture decoding, image rendering and other steps, thereby reducing the operating efficiency.

[0074] Furthermore, in one embodiment, after the step of dynamically adjusting the level of the cache list item in the resource cache list corresponding to the browser page when the browser page is reused, the method further includes:

[0075] Step 310, record the number of times the browser page is reused;

[0076] Step 320: When the number of times the browser page is reused reaches the second threshold or a multiple of the second threshold, determine the cache list item with a medium level in the resource cache list corresponding to the browser page, downgrade its level to low, and adjust it to a position before and adjacent to the first cache list item with a low level starting from the header of the resource cache list.

[0077] Exemplarily, the second threshold is 3.

[0078] When a browser page is loaded for the first time, the level of the cache list items in the resource cache list corresponding to the browser page is determined based on the page element visibility. When the page element visibility is visible, the level is set to high; when the page element visibility is invisible, the level is set to medium. That is, the resource cache list may only contain two types of cache list items, the first is a cache list item with visibility of visible and a high level; the second is a cache list item with visibility of invisible and a medium level.

[0079] When the browser page is loaded for the second time, that is, when it is reused for the first time, the number of times the browser page is reused is recorded as 1, and the level of the cache list item in the resource cache list corresponding to the browser page is dynamically adjusted, including: keeping the first level unchanged and the second level unchanged.

[0080] When the browser page is loaded for the third time, that is, reused for the second time, the number of times the browser page is reused is recorded as 2, and the levels of the cache list items in the resource cache list corresponding to the browser page are dynamically adjusted, including: keeping the first level unchanged and the second level unchanged.

[0081] When the browser page is loaded for the fourth time, that is, it is reused for the third time, the browser page reuse count is recorded as 3 times. At this time, the browser page reuse count reaches the second threshold of 3 times, and the level of the second cache list item with medium level is downgraded to low, and it is adjusted to a position before and adjacent to the first cache list item with low level starting from the header of the resource cache list.

[0082] When the browser page is loaded for the fifth time, there are two types of cache list items in the resource cache list, one is a cache list item with visibility being visible and a high level, and the other is a cache list item with visibility being invisible and a low level. Dynamically adjusting the level of the cache list items in the resource cache list corresponding to the browser page includes: keeping the level of the cache list item with visibility being visible and a high level unchanged, and increasing the level of the cache list item with visibility being invisible and a low level to medium.

[0083] When the browser page is loaded for the sixth time, the level is adjusted in the same way as when the browser page is loaded for the second time; when the browser page is loaded for the seventh time (the browser page is reused for the sixth time, which is a multiple of the second threshold), the level is adjusted in the same way as when the browser page is loaded for the fourth time; when the browser page is loaded for the eighth time, the level is adjusted in the same way as when the browser page is loaded for the second time...and so on and so forth. No further details will be given here.

[0084] In this embodiment, by recording the number of times a browser page is reused; then when the number of times a browser page is reused reaches a second threshold or a multiple of the second threshold, a cache list item with a medium level in the resource cache list corresponding to the browser page is determined, its level is downgraded to a low level, and it is adjusted to a position before and adjacent to the first cache list item with a low level starting from the header of the resource cache list, so that when the number of times a browser page is reused reaches the second threshold or a multiple of the second threshold, cache resources that are not frequently used are comprehensively and actively downgraded and their position in the resource cache list is moved backward.

[0085] Furthermore, in one embodiment, the method further includes:

[0086] For cache list items whose page element visibility is visible and whose level is high, after maintaining the level, the cache list items are adjusted to a position after the header of the resource cache list and adjacent to it;

[0087] For cache list items whose page element visibility is invisible and whose level is medium, after maintaining the level, the position of the cache list item in the resource cache list is maintained;

[0088] For cache list items whose page element visibility is invisible and whose level is low, after adjusting the level to medium, the cache list items are adjusted to a position before and adjacent to the first cache list item with a medium level starting from the header of the resource cache list.

[0089] In specific implementation, when a browser page is reused, after dynamically adjusting the level of the cache list item in the resource cache list corresponding to the browser page, the position of the cache list item in the resource cache list is also dynamically adjusted according to the level change, so that the cache list items are arranged in order from high to low level. Among them, the lower the level, the closer to the end of the resource cache list, indicating that the possibility of being released is greater.

[0090] For example, it is assumed that the resource cache list includes 10 cache list items, 3 cache list items with high page element visibility, 3 cache list items with medium page element visibility, and 4 cache list items with low page element visibility. First, for the 3 cache list items with high page element visibility, after maintaining the levels, these 3 cache list items are adjusted one by one to the position after the header of the resource cache list and adjacent to the header; then, for the 3 cache list items with medium page element visibility, after maintaining the levels, the positions of the cache list items in the resource cache list remain unchanged; then, for the 4 cache list items with low page element visibility, after adjusting the levels to medium, the cache list items are adjusted one by one to the position before and adjacent to the first cache list item with medium level from the header of the resource cache list.

[0091] In this embodiment, for cache list items whose page element visibility is visible and whose level is high, after maintaining the level, the cache list items are adjusted to a position after the header of the resource cache list and adjacent to it; for cache list items whose page element visibility is invisible and whose level is medium, after maintaining the level, the position of the cache list items in the resource cache list is maintained; for cache list items whose page element visibility is invisible and whose level is low, after adjusting the level to medium, the cache list items are adjusted to a position before the first cache list item with a medium level from the header of the resource cache list and adjacent to it, so that after dynamically adjusting the level of the cache list items in the resource cache list corresponding to the browser page, the position of the cache list items in the resource cache list is also dynamically adjusted, so that the cache list items are arranged in order from high to low level, and further, when it is necessary to release the cache resources, the target cache list items with a level less than or equal to the system release level can be quickly locked, thereby improving the operating efficiency of the set-top box system.

[0092] Further, in one embodiment, determining a target cache list item in the resource cache list whose level is less than or equal to the system release level includes:

[0093] Start searching from the end of each resource cache list, determine the level of each cache list item one by one, and use the cache list item with a level less than or equal to the system release level as the target cache list item; among which, the position of the cache list item in the resource cache list is arranged in descending order of level.

[0094] In specific implementation, because the positions of cache list items in the resource cache list are arranged in order from high to low, therefore, starting from the end of each resource cache list, determining the level of each cache list item one by one, and taking the cache list items with a level less than or equal to the system release level as the target cache list items, the efficiency of determining the target cache list items can be improved. For example: there are 100 cache list items in the resource cache list, of which 40 cache list items have a high level, 40 cache list items have a medium level, and 20 cache list items have a low level. When the system release level is low, starting from the end of the resource cache list, determining the level of each cache list item one by one, the 20 cache list items with a low level can be quickly identified.

[0095] In this embodiment, the search starts from the end of each resource cache list, the level of each cache list item is determined one by one, and the cache list item with a level less than or equal to the system release level is used as the target cache list item, which can improve the efficiency of determining the target cache list item.

[0096] In a second aspect, an embodiment of the present application also provides a set-top box system memory management device.

[0097] In one embodiment, referring to Figure 3 , Figure 3 This is a functional module diagram of an embodiment of the set-top box system memory management device of the present application. Figure 3 As shown, the set-top box system memory management device 300 includes:

[0098] An acquisition module 310 is used to acquire the remaining memory of the set-top box system;

[0099] A first determining module 320, configured to determine a system release level corresponding to the remaining memory when the remaining memory is less than or equal to a first threshold;

[0100] The second determination module 330 is used to determine a target cache list item in the resource cache list whose level is less than or equal to the system release level, wherein when the browser page is reused, the level of the cache list item in the resource cache list corresponding to the browser page is dynamically adjusted;

[0101] The release module 340 is used to release the cache resource corresponding to the target cache list item.

[0102] Furthermore, in one embodiment, the set-top box system memory management device further includes an adjustment module, and the adjustment module is specifically used to:

[0103] When the browser page is reused, obtain the page element visibility and level in the cache list item from the resource cache list corresponding to the browser page;

[0104] When the page element visibility is visible and the level is high, keep the level;

[0105] When the page element visibility is invisible and the level is medium, keep the level;

[0106] When the page element visibility is invisible and the level is low, adjust the level to medium.

[0107] In conjunction with the second aspect, in one implementation, the adjustment module is further configured to:

[0108] For cache list items whose page element visibility is visible and whose level is high, after maintaining the level, the cache list items are adjusted to a position after the header of the resource cache list and adjacent to it;

[0109] For cache list items whose page element visibility is invisible and whose level is medium, after maintaining the level, the position of the cache list item in the resource cache list is maintained;

[0110] For cache list items whose page element visibility is invisible and whose level is low, after adjusting the level to medium, the cache list items are adjusted to a position before and adjacent to the first cache list item with a medium level starting from the header of the resource cache list.

[0111] Furthermore, in one embodiment, the set-top box system memory management device further includes a record adjustment module, and the record adjustment module is specifically used to:

[0112] Record the number of browser page reuses;

[0113] When the number of browser page reuses reaches a second threshold or a multiple of the second threshold, determine the cache list item with a medium level in the resource cache list corresponding to the browser page, downgrade its level to low, and adjust it to a position before and adjacent to the first cache list item with a low level starting from the header of the resource cache list.

[0114] Further, in one embodiment, the second determining module is specifically configured to:

[0115] Start searching from the end of each resource cache list, determine the level of each cache list item one by one, and use the cache list item with a level less than or equal to the system release level as the target cache list item; among which, the position of the cache list item in the resource cache list is arranged in descending order of level.

[0116] Among them, the functional implementation of each module in the above-mentioned set-top box system memory management device corresponds to each step in the above-mentioned set-top box system memory management method embodiment, and its functions and implementation processes are no longer repeated here.

[0117] In a third aspect, an embodiment of the present application provides a set-top box system memory management device, which may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.

[0118] Reference Figure 4 , Figure 4 The hardware structure diagram of the set-top box system memory management device involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the set-top box system memory management device may include a processor, a memory, a communication interface, and a communication bus.

[0119] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0120] The communication interface includes input / output (I / O) interface, physical interface and logical interface, etc., which are used to realize the interconnection of devices inside the set-top box system memory management device, and the interface used to realize the interconnection between the set-top box system memory management device and other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.

[0121] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0122] The processor can be a general-purpose processor, and the general-purpose processor can call the set-top box system memory management program stored in the memory, and execute the set-top box system memory management method that the embodiment of the application provides. For example, the general-purpose processor can be a central processing unit (central processing unit, CPU). Wherein, the method performed when the set-top box system memory management program is called can refer to each embodiment of the set-top box system memory management method of the application, and will not repeat them here.

[0123] Those skilled in the art will understand that Figure 4The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0124] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.

[0125] The computer-readable storage medium of the present application stores a set-top box system memory management program, wherein when the set-top box system memory management program is executed by a processor, the steps of the set-top box system memory management method as described above are implemented.

[0126] Among them, the method implemented when the set-top box system memory management program is executed can refer to the various embodiments of the set-top box system memory management method of the present application, and will not be repeated here.

[0127] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0128] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0129] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0130] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0131] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0133] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A set-top box system memory management method, characterized in that: The set-top box system memory management method comprises: Get the remaining memory of the set-top box system; When the remaining memory is less than or equal to a first threshold, determining a system release level corresponding to the remaining memory; Determine a target cache list item in the resource cache list whose rank is less than or equal to the system release rank, wherein when the browser page is reused, dynamically adjust the rank of the cache list item in the resource cache list corresponding to the browser page; Releases the cache resources corresponding to the target cache list item.

2. The set-top box system memory management method according to claim 1, characterized in that: When a browser page is reused, the level of the cache list item in the resource cache list corresponding to the browser page is dynamically adjusted, including: When the browser page is reused, obtain the page element visibility and level in the cache list item from the resource cache list corresponding to the browser page; When the page element visibility is visible and the level is high, keep the level; When the page element visibility is invisible and the level is medium, keep the level; When the page element visibility is invisible and the level is low, adjust the level to medium.

3. The set-top box system memory management method according to claim 2, characterized in that: After the step of dynamically adjusting the level of the cache list item in the resource cache list corresponding to the browser page when the browser page is reused, the method further includes: Record the number of browser page reuses; When the number of browser page reuses reaches a second threshold or a multiple of the second threshold, determine the cache list item with a medium level in the resource cache list corresponding to the browser page, downgrade its level to low, and adjust it to a position before and adjacent to the first cache list item with a low level starting from the header of the resource cache list.

4. The set-top box system memory management method according to claim 3, characterized in that: The method further comprises: For cache list items whose page element visibility is visible and whose level is high, after maintaining the level, the cache list items are adjusted to a position after the header of the resource cache list and adjacent to it; For cache list items whose page element visibility is invisible and whose level is medium, after maintaining the level, the cache list item's position in the resource cache list is maintained; For cache list items whose page element visibility is invisible and whose level is low, after adjusting the level to medium, the cache list items are adjusted to a position before and adjacent to the first cache list item with a medium level starting from the header of the resource cache list.

5. The set-top box system memory management method according to claim 1, characterized in that: Determine the target cache list items in the resource cache list whose level is less than or equal to the system release level, including: Start searching from the end of each resource cache list, determine the level of each cache list item one by one, and use the cache list item with a level less than or equal to the system release level as the target cache list item; among which, the position of the cache list item in the resource cache list is arranged in descending order of level.

6. A set-top box system memory management device, characterized in that: The set-top box system memory management device comprises: An acquisition module, used to acquire the remaining memory of the set-top box system; A first determining module, configured to determine a system release level corresponding to the remaining memory when the remaining memory is less than or equal to a first threshold; A second determination module is used to determine a target cache list item in the resource cache list whose level is less than or equal to the system release level, wherein when the browser page is reused, the level of the cache list item in the resource cache list corresponding to the browser page is dynamically adjusted; The release module is used to release the cache resources corresponding to the target cache list item.

7. The set-top box system memory management device according to claim 6, characterized in that: The set-top box system memory management device further includes an adjustment module, which is specifically used for: When the browser page is reused, obtain the page element visibility and level in the cache list item from the resource cache list corresponding to the browser page; When the page element visibility is visible and the level is high, keep the level; When the page element visibility is invisible and the level is medium, keep the level; When the page element visibility is invisible and the level is low, adjust the level to medium.

8. The set-top box system memory management device according to claim 7, characterized in that: The adjustment module is also used for: When the browser page is reused, obtain the page element visibility and level in the cache list item from the resource cache list corresponding to the browser page; When the page element visibility is visible and the level is high, the cache list item is adjusted to a position after the header of the resource cache list and adjacent to it; When the page element visibility is invisible and the level is medium, the cache list item is kept in the resource cache list; When the page element visibility is invisible and the level is low, the cache list item is adjusted to a position before and adjacent to the first cache list item with a level of medium starting from the head of the resource cache list.

9. A set-top box system memory management device, characterized in that: The set-top box system memory management device comprises a processor, a memory, and a set-top box system memory management program stored in the memory and executable by the processor, wherein when the set-top box system memory management program is executed by the processor, the steps of the set-top box system memory management method as described in any one of claims 1 to 5 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a set-top box system memory management program, wherein when the set-top box system memory management program is executed by a processor, the steps of the set-top box system memory management method according to any one of claims 1 to 5 are implemented.