OSD display method, device, equipment and medium based on multi-level cache

By adopting a multi-level cache structure in the OSD display system, the access speed of the transit cache is between memory and OSD display cache, and OSD resources are loaded in advance, solving the problem of difficult to balance response time and cost in the existing technology, realizing the implementation of the problem of Low-power, low-cost real-time OSD display.

CN114817084BActive Publication Date: 2024-11-15JI RUI ZHI YUAN (XIAMEN) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210443758.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-26
Publication Date
2024-11-15
Estimated Expiration
2042-04-26

AI Technical Summary

Technical Problem

The existing OSD display technology is difficult to balance response time and cost, especially when there is a lot of display resources, it requires a larger high-speed memory or OSD display cache, resulting in high power consumption and hardware costs.

Method used

Adopting a multi-level cache structure, OSD resources are loaded in advance through the transit cache, and the access speed of the transit cache is between memory and OSD display cache, reducing the space requirements of the cache and OSD display cache, achieving low power consumption and low cost Real-time OSD display.

Benefits of technology

It effectively reduces the power consumption and hardware cost of OSD display, and solves the real-time problem in complex OSD situations, achieving rapid response and resource conservation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114817084B_ABST
    Figure CN114817084B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of OSD display technology, and in particular to an OSD display method, device, equipment and medium based on multi-level cache, wherein the method comprises: loading an OSD resource index master table from a memory into a transfer cache; determining the ID of the OSD resource required for the current demand menu and the M-level associated menu based on the OSD display requirements of the OSD display system; loading the required OSD resources into the transfer cache without duplication and in a hierarchical manner based on the ID of the OSD resource required for the current demand menu and the M-level associated menu and the OSD resource index master table; responding to the OSD display instruction of the OSD display system, loading the OSD resource required for the current demand menu into the OSD display cache to realize display. The present invention can use less high-speed OSD display cache, and realize real-time OSD display with low power consumption and low cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of OSD display technology, and in particular to an OSD display method, device, electronic device and storage medium based on multi-level cache. Background Art

[0002] OSD (on-screen display) display technology responds to user operation instructions to display images or videos. To improve user experience, the response time should be as short as possible. However, in actual applications, in order to improve the response speed, when there are many display resource requirements, a larger high-speed memory or OSD display cache is required, which will increase power consumption and hardware costs.

[0003] Therefore, in order to balance the demand for real-time display and production cost, a low-power, low-cost OSD display method needs to be provided. Summary of the invention

[0004] In response to at least some of the above-mentioned shortcomings, the embodiments of the present invention provide an OSD display method, device, electronic device and storage medium based on multi-level cache, which can balance the demand for real-time display and production cost, use less high-speed OSD display cache and high-speed cache, and realize real-time OSD display with low power consumption and low cost.

[0005] In a first aspect, an embodiment of the present invention provides an OSD display method based on a multi-level cache, which is applied to an OSD display system; the OSD display system includes a memory, a transfer cache, an OSD display cache, and a display; wherein the memory stores OSD resources and an OSD resource index table for indexing all OSD resources; the transfer cache includes N-level caches, N is an integer greater than 1, and the access speed decreases from the first-level cache to the N-level cache, the access speed of the N-level cache is greater than the access speed of the memory, and the access speed of the first-level cache is less than the access speed of the OSD display cache; the display is used to display the OSD resources cached in the OSD display cache;

[0006] The method includes:

[0007] After the OSD display system is powered on, loading the OSD resource index summary table from the memory into the transfer cache;

[0008] Based on the OSD display requirements of the OSD display system, determine the IDs of OSD resources required for the current demand menu and M-level associated menus; wherein the i-th level associated menu is the menu reached by the current demand menu through i-th user operation instructions, 1≤i≤M=N-1;

[0009] Based on the IDs of the OSD resources required for the current demand menu and the M-level associated menu and the OSD resource index master table, the OSD resources required for use are loaded into the transfer cache in a hierarchical manner without duplication, so that the OSD resources required for the current demand menu are loaded into the first-level cache, and the OSD resources required for the M-level associated menu are loaded into the corresponding (i+1)-th-level cache according to the number of levels i of the associated menus;

[0010] In response to the OSD display instruction of the OSD display system, the OSD resources required for the current demand menu are loaded into the OSD display buffer to realize display.

[0011] Optionally, the step of loading the OSD resources required for use into the transfer cache in a hierarchical manner without duplication based on the IDs of the OSD resources required for the current demand menu and the M-level associated menu and the OSD resource index master table includes:

[0012] Determine whether the current transfer cache has OSD resources loaded, otherwise establish a corresponding OSD display resource index table for each level of cache;

[0013] Based on the ID of the OSD resource required for the current demand menu and the M-level associated menu and the index table of each OSD display resource, determine whether the OSD resource required for the current demand menu and the M-level associated menu is correspondingly loaded into the first-level cache to the N-th-level cache in a hierarchical manner; if the corresponding OSD resource is not loaded into the transfer cache, load it from the memory to the transfer cache based on the OSD resource index master table; if the corresponding OSD resource is loaded into the transfer cache but the hierarchical manner is wrong, change its loading position in the transfer cache;

[0014] After the loading or change is completed, the corresponding OSD display resource index table is updated.

[0015] Optionally, the determining whether the OSD resources required for the current demand menu and the M-level associated menu are correspondingly loaded into the first-level cache to the N-level cache in a hierarchical manner based on the IDs of the OSD resources required for the current demand menu and the M-level associated menu and the OSD display resource index tables includes:

[0016] Based on the IDs of the OSD resources required for the current demand menu and the M-level associated menus, a list of IDs of the N-level target resources is determined hierarchically; wherein the first-level target resources are the OSD resources required for the current demand menu, and the (i+1)-th-level target resources are the OSD resources required for all the i-th-level associated menus and not included in the first i-level target resources;

[0017] From level 1 to level N, the ID list of the target resource is matched with the corresponding OSD display resource index table;

[0018] When an OSD resource ID that exists in the ID list of the j-th level target resource but does not exist in the OSD display resource index table corresponding to the j-th level cache is matched, the OSD resource ID is retrieved from the OSD display resource index table corresponding to the (j+1)-th level to the N-th level cache; if the OSD resource ID is still not found, it is determined that the corresponding OSD resource is not loaded into the transit cache; if the OSD resource ID is retrieved, it is determined that the corresponding OSD resource is loaded into the transit cache but the classification is wrong;

[0019] When an OSD resource ID is matched that exists in the OSD display resource index table corresponding to the j-th level cache but does not exist in the ID list of the j-th level target resource, the OSD resource ID is retrieved from the ID list of the (j+1)-th level to the N-th level target resources; if the OSD resource ID is still not found, the corresponding OSD resource is deleted; if the OSD resource ID is retrieved, the loading position of the corresponding OSD resource in the transit cache is changed according to the level of the target resource.

[0020] Optionally, loading the OSD resource index summary table from the memory into the transit cache includes: loading the OSD resource index summary table from the memory into an Nth level cache.

[0021] Optionally, the responding to the OSD display instruction of the OSD display system to load the OSD resources required for the current demand menu into the OSD display buffer includes:

[0022] Based on the OSD display instruction, determine the OSD resources required for all currently required menus, and judge whether there are OSD resources that have not been loaded into the OSD display cache. If so, load the corresponding OSD resources from the first-level cache in the transit cache to the OSD display cache based on the OSD resource ID and the OSD display resource index table corresponding to the first-level cache.

[0023] In a second aspect, an embodiment of the present invention further provides an OSD display device based on a multi-level cache, which is applied to an OSD display system; the OSD display system includes a memory, a transfer cache, an OSD display cache and a display; wherein the memory stores OSD resources and an OSD resource index table for indexing all OSD resources; the transfer cache includes N-level caches, N is an integer greater than 1, and the access speed decreases from the first-level cache to the N-level cache, the access speed of the N-level cache is greater than the access speed of the memory, and the access speed of the first-level cache is less than the access speed of the OSD display cache; the display is used to display the OSD resources cached in the OSD display cache;

[0024] The device includes:

[0025] A first loading module, configured to load the OSD resource index table from the memory into the transfer buffer after the OSD display system is powered on;

[0026] A menu determination module, for determining the IDs of OSD resources required for the current demand menu and M-level associated menus based on the OSD display requirements of the OSD display system; wherein the i-th level associated menu is the menu reached by the current demand menu through i-th user operation instructions, 1≤i≤M=N-1;

[0027] The second loading module is used to load the required OSD resources into the transfer cache in a hierarchical manner without duplication based on the IDs of the OSD resources required for the current demand menu and the M-level associated menu and the OSD resource index master table, so that the OSD resources required for the current demand menu are loaded into the first-level cache, and the OSD resources required for the M-level associated menu are loaded into the corresponding (i+1)-th level cache according to the number of levels i of the associated menus;

[0028] The third loading module is used to respond to the OSD display instruction of the OSD display system, load the OSD resources required for the current demand menu into the OSD display buffer to realize display.

[0029] Optionally, the second loading module is used to perform the following operations:

[0030] Determine whether the current transfer cache has OSD resources loaded, otherwise establish a corresponding OSD display resource index table for each level of cache;

[0031] Based on the ID of the OSD resource required for the current demand menu and the M-level associated menu and the index table of each OSD display resource, determine whether the OSD resource required for the current demand menu and the M-level associated menu is correspondingly loaded into the first-level cache to the N-th-level cache in a hierarchical manner; if the corresponding OSD resource is not loaded into the transfer cache, load it from the memory to the transfer cache based on the OSD resource index master table; if the corresponding OSD resource is loaded into the transfer cache but the hierarchical manner is wrong, change its loading position in the transfer cache;

[0032] After the loading or change is completed, the corresponding OSD display resource index table is updated.

[0033] Optionally, the third loading module is used to perform the following operations:

[0034] Based on the OSD display instruction, determine the OSD resources required for all currently required menus, and judge whether there are OSD resources that have not been loaded into the OSD display cache. If so, load the corresponding OSD resources from the first-level cache in the transit cache to the OSD display cache based on the OSD resource ID and the OSD display resource index table corresponding to the first-level cache.

[0035] In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.

[0036] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method described in any embodiment of this specification.

[0037] The embodiment of the present invention provides an OSD display method, device, electronic device and storage medium based on multi-level cache. The present invention adopts multi-level cache to establish a transit data channel between a low-speed memory and a high-speed OSD display cache, pre-loads the current demand menu and its associated menus in a hierarchical manner, loads the OSD resources required for the current demand menu into the highest-speed cache in the multi-level cache, and loads the OSD resources required for the associated menu that is most likely to become the next demand menu into the second-highest-speed cache in the multi-level cache, and so on, thereby reducing the required OSD display cache and high-speed cache space, reducing power consumption and cost, and solving the problem of OSD display real-time performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 It is a flow chart of an OSD display method based on multi-level cache provided by an embodiment of the present invention;

[0040] Figure 2 It is a menu association diagram;

[0041] Figure 3 is a hardware architecture diagram of an electronic device provided by an embodiment of the present invention;

[0042] Figure 4The structure diagram of an OSD display device based on multi-level cache provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0044] As mentioned above, in actual applications, in order to improve the response speed, when there are many OSD display resource requirements, it is necessary to occupy a larger high-speed memory or OSD display cache, and the high-speed memory or OSD display cache has the problems of high power consumption and high hardware cost, and the larger the space required, the higher the cost. If a low-speed memory is used, when the OSD display resources are relatively complex, it is difficult to quickly load the corresponding OSD resources from the low-speed memory to the high-speed OSD display cache. At present, in addition to using a larger OSD display cache space, there is another way to divide the OSD resources into blocks and mark the frequently used blocks, load the frequently used blocks into the high-speed OSD display cache in advance, and then alias them into the video image, and output the aliased video. However, when there are many low-frequency OSD resource blocks, due to the slow access speed of the memory, it is also difficult to complete the loading of the required OSD resource blocks from the low-speed memory to the high-speed OSD display cache in real time.

[0045] The present invention uses a medium-speed transit cache (the access speed of the transit cache is greater than the access speed of the low-speed memory, but less than the access speed of the high-speed OSD display cache) to preload OSD resources that may be needed, thereby reducing the space of the high-speed OSD display cache required for display. However, when the OSD display is more complex, or the response speed requirement is high, the transit cache also needs to use a hardware cache with a higher speed and a larger space, and there will still be problems of high power consumption and high hardware cost. Therefore, the present invention uses a multi-level transit cache, which is loaded in a hierarchical manner according to the priority required for display, uses less high-speed OSD display cache space and high-speed cache, and displays the OSD in a low-cost, low-power manner; at the same time, it can solve the real-time problem in the case of complex OSD.

[0046] The specific implementation of the above concept is described below.

[0047] An embodiment of the present invention provides an OSD display method based on multi-level cache, which is applied to an OSD display system; the OSD display system includes a memory, a transfer cache, an OSD display cache and a display; wherein the memory stores OSD resources and an OSD resource index master table for indexing all OSD resources; the transfer cache includes N levels of cache, N is an integer greater than 1, and the access speed decreases step by step from the first level cache to the Nth level cache, that is, the access speed of the first level cache is greater than the access speed of the second level cache, the access speed of the second level cache is greater than the access speed of the third level cache, and so on; the access speed of the Nth level cache (that is, the cache with the smallest access speed in the transfer cache) is greater than the access speed of the memory, and the access speed of the first level cache (that is, the cache with the largest access speed in the transfer cache) is less than the access speed of the OSD display cache; the display is connected to the OSD display cache, and is used to display the OSD resources cached in the OSD display cache.

[0048] Please refer to Figure 1 , the method comprising:

[0049] Step 100, after the OSD display system is powered on, the OSD resource index table is loaded from the memory into the transfer buffer;

[0050] Step 102, based on the OSD display requirements of the OSD display system, determine the IDs of OSD resources required for the current demand menu and M-level associated menus; wherein the i-th level associated menu is the menu reached by the current demand menu through i-th user operation instructions, 1≤i≤M=N-1;

[0051] Step 104, based on the IDs of the OSD resources required for the current demand menu and the M-level associated menus and the OSD resource index master table, the OSD resources required for the current demand menu and the M-level associated menus are loaded into the transfer cache in a hierarchical manner without duplication, so that the OSD resources required for the current demand menu are loaded into the first-level cache, and the OSD resources required for the M-level associated menu are loaded into the corresponding (i+1)-th-level cache according to the number of levels i of the associated menus;

[0052] Step 106, responding to the OSD display instruction of the OSD display system, loading the OSD resources required for the current demand menu into the OSD display buffer, and displaying them through the display.

[0053] In an embodiment of the present invention, the OSD resources required for the current demand menu and its multi-level associated menus are preloaded through a medium-speed transfer cache, and a quick response is made after receiving an OSD display instruction to perform real-time display. After step 106 is executed, the display is realized, and a new OSD display requirement is waited for. If a new OSD display requirement is obtained, such as receiving an OSD display requirement of the OSD display system, requiring the display of the next specified menu, then the process returns to step 102, determines the new current demand menu and its multi-level associated menus, and continues to preload the new current demand menu and associated menus. The present invention can use a small cache as the first-level cache, and the power consumption and cost of the required transfer cache are relatively low, which can save the high-speed OSD display cache space and cache space required for real-time display, and balance the demand for real-time OSD display with production costs. In order to effectively save cache space, reduce the space requirements of the first-level cache of the transfer cache for real-time display, and reduce the loading of redundant data, N is preferably greater than or equal to 3 and not more than 6.

[0054] Described below Figure 1 How the various steps are performed.

[0055] With respect to step 100, the OSD resource index table loaded into the transfer cache is used to index the locations of all OSD resources in the memory, and the OSD resource index table may include the ID of the OSD resource and the storage address of the OSD resource in the memory. To save cache space, the OSD resource index table is loaded from the memory into the transfer cache, including: loading the OSD resource index table from the memory into the Nth level cache in the transfer cache.

[0056] With respect to step 102, there is an association between the associated menu and the current demand menu, and the i-th level associated menu of the current demand menu is the menu that the current demand menu jumps to through i user operation instructions. The first-level associated menu includes the menu that the current demand menu jumps to through one user operation instruction, such as the parent menu, child menu and brother menu of the current demand menu. In a common embodiment, there are at most four first-level associated menus: a parent menu, a child menu and two brother menus (referred to as parent, child, left brother and right brother), which may respectively correspond to the up, down, left and right control keys of a remote control for obtaining user operation instructions. The second-level associated menu of the current demand menu is the menu that the current demand menu jumps to through 2 user operation instructions, and so on. Please refer to Figure 2 , Figure 2A menu association relationship is shown. Assume that the currently required menu is Menu 1. The first-level associated menus of Menu 1 include Menu 1 parent, Menu 1 child, Menu 1 left brother and Menu 1 right brother. The second-level associated menus of Menu 1 include the parent, child, left brother and right brother of Menu 1 parent, Menu 1 child, Menu 1 left brother and Menu 1 right brother. The third-level associated menus of Menu 1 include the parent, child, left brother and right brother of the sub-menu of Menu 1 child, etc.

[0057] The embodiment of the present invention pre-loads the OSD resources required for the multi-level associated menus in a hierarchical manner. When the user operation instruction indicates to switch to the next menu, the specified menu is within the range of the first-level associated menu set, thereby realizing the fast loading of the required OSD resources into the OSD display cache and reducing the required cache space.

[0058] Regarding step 104, the step further includes:

[0059] Step 104-0, determining whether the current transfer buffer has OSD resources loaded therein, if not, establishing a corresponding OSD display resource index table for each level of buffer;

[0060] Step 104-2, based on the ID of the OSD resource required for the current demand menu and the M-level associated menu and the index table of each OSD display resource, determine whether the OSD resource required for the current demand menu and the M-level associated menu is correspondingly loaded into the first-level cache to the N-th-level cache in a hierarchical manner; if the corresponding OSD resource is not loaded into the transfer cache, then load it from the memory to the transfer cache based on the OSD resource index master table; if the corresponding OSD resource is loaded into the transfer cache but the hierarchical manner is wrong, then change its loading position in the transfer cache;

[0061] Step 104-4, after the loading or change is completed, the corresponding OSD display resource index table is updated.

[0062] For the above step 104-0, if there are no OSD resources loaded in the current transfer cache, it indicates that the display system has just been powered on, and it is necessary to establish a corresponding OSD display resource index table for each level of cache in order to index the OSD resources loaded in each level of cache; if there are OSD resources loaded in the current transfer cache, it indicates that the display system has been working for a period of time and a corresponding OSD display resource index table has been established. The OSD display resource index table can be cached in a certain level of cache, such as the Nth level cache, or it can be cached hierarchically, that is, the OSD display resource index table corresponding to the first level cache is cached in the space of the first level cache, and the OSD display resource index table corresponding to the second level cache is cached in the space of the second level cache.

[0063] The above step 104-2 "based on the ID of the OSD resource required for the current demand menu and the M-level associated menu and the index table of each OSD display resource, determining whether the OSD resource required for the current demand menu and the M-level associated menu is correspondingly loaded into the first-level cache to the N-level cache in a hierarchical manner" further includes:

[0064] Step 104-2-0, based on the IDs of the OSD resources required for the current demand menu and the M-level associated menus, a list of IDs of N-level target resources is determined hierarchically; wherein the first-level target resources are the OSD resources required for the current demand menu, and the (i+1)-th-level target resources are the OSD resources required for all i-th-level associated menus and not included in the first i-th-level target resources;

[0065] Step 104-2-2, from level 1 to level N, respectively match the ID list of the target resource with the corresponding OSD display resource index table;

[0066] When an OSD resource ID that exists in the ID list of the j-th level target resource but does not exist in the OSD display resource index table corresponding to the j-th level cache is matched, the OSD resource ID is retrieved from the OSD display resource index table corresponding to the (j+1)-th level to the N-th level cache; if the OSD resource ID is still not found, it is determined that the corresponding OSD resource is not loaded into the transit cache; if the OSD resource ID is retrieved, it is determined that the corresponding OSD resource is loaded into the transit cache but the classification is wrong;

[0067] When an OSD resource ID is matched that exists in the OSD display resource index table corresponding to the j-th level cache but does not exist in the ID list of the j-th level target resource, the OSD resource ID is retrieved from the ID list of the (j+1)-th level to the N-th level target resources; if the OSD resource ID is still not found, the corresponding OSD resource is deleted; if the OSD resource ID is retrieved, the loading position of the corresponding OSD resource in the transit cache is changed according to the level of the target resource.

[0068] In the above embodiment, the ID list of the target resource is matched with the corresponding OSD display resource index table in a hierarchical manner. If it belongs to the ID list of the target resource, that is, the OSD resource is needed, but it is not in the cache of the corresponding level, there are two situations. One is that the OSD resource is not loaded into the transit cache, and the other is that the OSD resource is in the buffer of a higher level. It is necessary to load or change the specific hierarchical position of the OSD resource in the transit cache according to the situation, so that the OSD resource required for the menu specified by the user is more likely to exist in a higher-speed buffer space; further, if there is an OSD resource whose ID does not belong to the ID list of the target resource but is loaded in the cache of the corresponding level, it is necessary to change the specific hierarchical position of the OSD resource in the transit cache or delete it, thereby freeing up cache space and improving processing efficiency.

[0069] For step 106, further comprising:

[0070] Based on the OSD display instruction, determine the OSD resources required for all currently required menus, and judge whether there are OSD resources that have not been loaded into the OSD display cache. If so, load the corresponding OSD resources from the first-level cache in the transit cache to the OSD display cache based on the OSD resource ID and the OSD display resource index table corresponding to the first-level cache.

[0071] In the above embodiment, when the menu changes, if the OSD resources used in the previous menu are the same as the OSD resources required for the current menu, there is no need to load the OSD resources into the OSD display cache again, which is also beneficial to improving processing efficiency.

[0072] Furthermore, for the OSD display cache, the OSD resources not required for the currently required menu may be periodically cleared to release space in time.

[0073] like Figure 3 , Figure 4 As shown, an embodiment of the present invention provides an OSD display device based on a multi-level cache. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 3 As shown in FIG. 1 , a hardware architecture diagram of an electronic device in which an OSD display device based on a multi-level cache is provided in an embodiment of the present invention is provided. Figure 3 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 4As shown, as a device in a logical sense, it is formed by the CPU of the electronic device in which it is located reading the corresponding computer program in the non-volatile memory into the internal memory for execution. This embodiment provides an OSD display device based on multi-level cache, which is applied to an OSD display system; the OSD display system includes a memory, a transfer cache, an OSD display cache and a display; wherein the memory stores OSD resources and an OSD resource index summary table for indexing all OSD resources; the transfer cache includes N levels of cache, N is an integer greater than 1, and the access speed decreases step by step from the 1st level cache to the Nth level cache, the access speed of the Nth level cache is greater than the access speed of the memory, and the access speed of the 1st level cache is less than the access speed of the OSD display cache; the display is used to display the OSD resources cached in the OSD display cache;

[0074] The device includes:

[0075] A first loading module 401 is used to load the OSD resource index table from the memory into the transfer buffer after the OSD display system is powered on;

[0076] The menu determination module 402 is used to determine the ID of the OSD resource required for the current demand menu and M-level associated menus based on the OSD display requirements of the OSD display system; wherein the i-th level associated menu is the menu reached by the current demand menu through the i-th user operation instruction jump, 1≤i≤M=N-1;

[0077] The second loading module 403 is used to load the OSD resources required for the current demand menu and the M-level associated menu into the transfer cache in a hierarchical manner without duplication based on the IDs of the OSD resources required for the current demand menu and the M-level associated menu and the OSD resource index master table, so that the OSD resources required for the current demand menu are loaded into the first-level cache, and the OSD resources required for the M-level associated menu are loaded into the corresponding (i+1)-th-level cache according to the number of levels i of the associated menus;

[0078] The third loading module 404 is used to respond to the OSD display instruction of the OSD display system, load the OSD resources required for the current demand menu into the OSD display buffer to realize display.

[0079] In an embodiment of the present invention, the first loading module 401 can be used to execute step 100 in the above method embodiment, the menu determination module 402 can be used to execute step 102 in the above method embodiment, the second loading module 403 can be used to execute step 104 in the above method embodiment, and the third loading module 404 can be used to execute step 106 in the above method embodiment.

[0080] Furthermore, the second loading module 403 is used to perform the following operations:

[0081] Determine whether the current transfer cache has OSD resources loaded, otherwise establish a corresponding OSD display resource index table for each level of cache;

[0082] Based on the ID of the OSD resource required for the current demand menu and the M-level associated menu and the index table of each OSD display resource, determine whether the OSD resource required for the current demand menu and the M-level associated menu is correspondingly loaded into the first-level cache to the N-th-level cache in a hierarchical manner; if the corresponding OSD resource is not loaded into the transfer cache, load it from the memory to the transfer cache based on the OSD resource index master table; if the corresponding OSD resource is loaded into the transfer cache but the hierarchical manner is wrong, change its loading position in the transfer cache;

[0083] After the loading or change is completed, the corresponding OSD display resource index table is updated.

[0084] Further, the determining whether the OSD resources required for the current demand menu and the M-level associated menu are correspondingly loaded into the first-level cache to the N-level cache in a hierarchical manner based on the ID of the OSD resources required for the current demand menu and the M-level associated menu and the OSD display resource index table includes:

[0085] Based on the IDs of the OSD resources required for the current demand menu and the M-level associated menus, a list of IDs of the N-level target resources is determined hierarchically; wherein the first-level target resources are the OSD resources required for the current demand menu, and the (i+1)-th-level target resources are the OSD resources required for all the i-th-level associated menus and not included in the first i-level target resources;

[0086] From level 1 to level N, the ID list of the target resource is matched with the corresponding OSD display resource index table;

[0087] When an OSD resource ID that exists in the ID list of the j-th level target resource but does not exist in the OSD display resource index table corresponding to the j-th level cache is matched, the OSD resource ID is retrieved from the OSD display resource index table corresponding to the (j+1)-th level to the N-th level cache; if the OSD resource ID is still not found, it is determined that the corresponding OSD resource is not loaded into the transit cache; if the OSD resource ID is retrieved, it is determined that the corresponding OSD resource is loaded into the transit cache but the classification is wrong;

[0088] When an OSD resource ID is matched that exists in the OSD display resource index table corresponding to the j-th level cache but does not exist in the ID list of the j-th level target resource, the OSD resource ID is retrieved from the ID list of the (j+1)-th level to the N-th level target resources; if the OSD resource ID is still not found, the corresponding OSD resource is deleted; if the OSD resource ID is retrieved, the loading position of the corresponding OSD resource in the transit cache is changed according to the level of the target resource.

[0089] Furthermore, the third loading module 404 is used to perform the following operations:

[0090] Based on the OSD display instruction, determine the OSD resources required for all currently required menus, and judge whether there are OSD resources that have not been loaded into the OSD display cache. If so, load the corresponding OSD resources from the first-level cache in the transit cache to the OSD display cache based on the OSD resource ID and the OSD display resource index table corresponding to the first-level cache.

[0091] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on an OSD display device based on a multi-level cache. In other embodiments of the present invention, an OSD display device based on a multi-level cache may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0092] The information interaction, execution process and other contents between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For the specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.

[0093] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, an OSD display method based on multi-level cache in any embodiment of the present invention is implemented.

[0094] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes an OSD display method based on multi-level cache in any embodiment of the present invention.

[0095] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.

[0096] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0097] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0098] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0099] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0100] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical factors in the process, method, article or device including the elements.

[0101] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An OSD display method based on multi-level cache, characterized in that: Applicable to an OSD display system; the OSD display system comprises a memory, a transfer cache, an OSD display cache and a display; wherein the memory stores OSD resources and an OSD resource index master table for indexing all OSD resources; the transfer cache comprises N-level caches, N being an integer greater than 1, and the access speed decreases gradually from the first-level cache to the N-level cache, the access speed of the N-level cache is greater than the access speed of the memory, and the access speed of the first-level cache is less than the access speed of the OSD display cache; the display is used to display the OSD resources cached in the OSD display cache; The method includes: After the OSD display system is powered on, loading the OSD resource index summary table from the memory into the transfer cache; Based on the OSD display requirements of the OSD display system, determine the IDs of OSD resources required for the current demand menu and M-level associated menus; wherein the i-th level associated menu is the menu reached by the current demand menu through i-th user operation instructions, 1≤i≤M=N-1; Based on the IDs of the OSD resources required for the current demand menu and the M-level associated menu and the OSD resource index master table, the OSD resources required for use are loaded into the transfer cache in a hierarchical manner without duplication, so that the OSD resources required for the current demand menu are loaded into the first-level cache, and the OSD resources required for the M-level associated menu are loaded into the corresponding (i+1)-th-level cache according to the number of levels i of the associated menus; In response to the OSD display instruction of the OSD display system, the OSD resources required for the current demand menu are loaded into the OSD display buffer to realize display.

2. The method according to claim 1, characterized in that The step of loading the OSD resources required for the current demand menu and the M-level associated menu into the transfer cache in a hierarchical manner without duplication based on the ID of the OSD resources required for the current demand menu and the M-level associated menu and the OSD resource index master table comprises: Determine whether the current transfer cache has OSD resources loaded, otherwise establish a corresponding OSD display resource index table for each level of cache; Based on the ID of the OSD resource required for the current demand menu and the M-level associated menu and the index table of each OSD display resource, determine whether the OSD resource required for the current demand menu and the M-level associated menu is correspondingly loaded into the first-level cache to the N-th-level cache in a hierarchical manner; if the corresponding OSD resource is not loaded into the transfer cache, load it from the memory to the transfer cache based on the OSD resource index master table; if the corresponding OSD resource is loaded into the transfer cache but the hierarchical manner is wrong, change its loading position in the transfer cache; After the loading or change is completed, the corresponding OSD display resource index table is updated.

3. The method according to claim 2, characterized in that The step of determining whether the OSD resources required for the current demand menu and the M-level associated menu are correspondingly loaded into the first-level cache to the N-level cache in a hierarchical manner based on the ID of the OSD resources required for the current demand menu and the M-level associated menu and the OSD display resource index table comprises: Based on the IDs of the OSD resources required for the current demand menu and the M-level associated menus, a list of IDs of the N-level target resources is determined hierarchically; wherein the first-level target resources are the OSD resources required for the current demand menu, and the (i+1)-th-level target resources are the OSD resources required for all the i-th-level associated menus and not included in the first i-level target resources; From level 1 to level N, the ID list of the target resource is matched with the corresponding OSD display resource index table; When an OSD resource ID that exists in the ID list of the j-th level target resource but does not exist in the OSD display resource index table corresponding to the j-th level cache is matched, the OSD resource ID is retrieved from the OSD display resource index table corresponding to the (j+1)-th level to the N-th level cache; if the OSD resource ID is still not found, it is determined that the corresponding OSD resource is not loaded into the transit cache; if the OSD resource ID is retrieved, it is determined that the corresponding OSD resource is loaded into the transit cache but the classification is wrong; When an OSD resource ID is matched that exists in the OSD display resource index table corresponding to the j-th level cache but does not exist in the ID list of the j-th level target resource, the OSD resource ID is retrieved from the ID list of the (j+1)-th level to the N-th level target resources; if the OSD resource ID is still not found, the corresponding OSD resource is deleted; if the OSD resource ID is retrieved, the loading position of the corresponding OSD resource in the transit cache is changed according to the level of the target resource.

4. The method according to claim 1, characterized in that: Loading the OSD resource index summary table from the memory into the transfer cache includes: loading the OSD resource index summary table from the memory into the Nth level cache.

5. The method according to claim 1, characterized in that The step of responding to the OSD display instruction of the OSD display system and loading the OSD resources required for the current demand menu into the OSD display buffer comprises: Based on the OSD display instruction, determine the OSD resources required for all currently required menus, and judge whether there are OSD resources that have not been loaded into the OSD display cache. If so, load the corresponding OSD resources from the first-level cache in the transit cache to the OSD display cache based on the OSD resource ID and the OSD display resource index table corresponding to the first-level cache.

6. An OSD display device based on multi-level cache, characterized in that: Applicable to an OSD display system; the OSD display system comprises a memory, a transfer cache, an OSD display cache and a display; wherein the memory stores OSD resources and an OSD resource index master table for indexing all OSD resources; the transfer cache comprises N-level caches, N being an integer greater than 1, and the access speed decreases gradually from the first-level cache to the N-level cache, the access speed of the N-level cache is greater than the access speed of the memory, and the access speed of the first-level cache is less than the access speed of the OSD display cache; the display is used to display the OSD resources cached in the OSD display cache; The device includes: A first loading module, configured to load the OSD resource index table from the memory into the transfer buffer after the OSD display system is powered on; A menu determination module, for determining the IDs of OSD resources required for the current demand menu and M-level associated menus based on the OSD display requirements of the OSD display system; wherein the i-th level associated menu is the menu reached by the current demand menu through i-th user operation instructions, 1≤i≤M=N-1; The second loading module is used to load the required OSD resources into the transfer cache in a hierarchical manner without duplication based on the IDs of the OSD resources required for the current demand menu and the M-level associated menu and the OSD resource index master table, so that the OSD resources required for the current demand menu are loaded into the first-level cache, and the OSD resources required for the M-level associated menu are loaded into the corresponding (i+1)-th level cache according to the number of levels i of the associated menus; The third loading module is used to respond to the OSD display instruction of the OSD display system, load the OSD resources required for the current demand menu into the OSD display buffer to realize display.

7. The device according to claim 6, characterized in that The second loading module is used to perform the following operations: Determine whether the current transfer cache has OSD resources loaded, otherwise establish a corresponding OSD display resource index table for each level of cache; Based on the ID of the OSD resource required for the current demand menu and the M-level associated menu and the index table of each OSD display resource, determine whether the OSD resource required for the current demand menu and the M-level associated menu is correspondingly loaded into the first-level cache to the N-th-level cache in a hierarchical manner; if the corresponding OSD resource is not loaded into the transfer cache, load it from the memory to the transfer cache based on the OSD resource index master table; if the corresponding OSD resource is loaded into the transfer cache but the hierarchical manner is wrong, change its loading position in the transfer cache; After the loading or change is completed, the corresponding OSD display resource index table is updated.

8. The device according to claim 6, characterized in that The third loading module is used to perform the following operations: Based on the OSD display instruction, determine the OSD resources required for all currently required menus, and judge whether there are OSD resources that have not been loaded into the OSD display cache. If so, load the corresponding OSD resources from the first-level cache in the transit cache to the OSD display cache based on the OSD resource ID and the OSD display resource index table corresponding to the first-level cache.

9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 5.