Display method and display device of menu bar, electronic equipment and readable medium
By dividing the index storage area and the font storage area in the memory, and using the index buffer memory to read data in time, the problem of low memory utilization caused by multiple memories is solved, and efficient data reading and flexible storage are realized during menu bar display.
Patent Information
- Application Number
- CN202411962859.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, the memory utilization rate is low due to the use of multiple memories for menu bar display.
By dividing multiple storage units in the preset memory into an index storage area and a font storage area according to the index data corresponding to the target menu bar to be displayed, the index data is read to the index buffer memory when the shadowing area is removed, and matching font data is read from the font storage area during the display area to generate video data.
It effectively avoids data reading conflicts caused by the storage of index data and font data in the same memory when displaying the target menu bar, and improves the memory usage rate and storage flexibility for different menu bar data.
Smart Images

Figure CN119847390A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method for displaying a menu bar, a display device, an electronic device, and a readable medium. Background Art
[0002] The menu bar refers to an interface element on a display device that is used to adjust or configure display parameters or perform preset operations.
[0003] If a menu bar needs to be displayed, usually, in order to avoid read conflicts, multiple memories are needed to store the relevant information required for the menu bar. Since the amount of data of the relevant information required by different menu bars is different, if it is stored in different memories, it is necessary to ensure that the memory of each memory is sufficient under extreme circumstances, which results in low memory utilization. Summary of the invention
[0004] To this end, the present disclosure provides a method for displaying a menu bar, a display device, an electronic device, and a readable medium to solve the problem of low memory utilization caused by using multiple memories for menu bar display in the prior art.
[0005] In order to achieve the above-mentioned object, the present disclosure provides a method for displaying a menu bar in a first aspect, the method comprising:
[0006] According to the index data corresponding to the target menu bar to be displayed and the data amount of the font data, a plurality of storage units included in the preset memory are divided into an index storage area for storing the index data and a font storage area for storing the font data;
[0007] storing the index data and the character library data in the index storage area and the character library storage area respectively;
[0008] When the display stage of the preset display device is in the blanking area, the index data stored in the index storage area is read into the index buffer memory;
[0009] When the display stage of the preset display device is in the display area, font data matching the index data is read from the font storage area according to the index data stored in the index buffer memory; video data corresponding to the target menu bar is generated according to the font data matching the index data, so as to display the target menu bar in the preset display device according to the video data.
[0010] In an optional implementation, the preset memory includes: a static random access memory; the plurality of storage units contained in the preset memory are divided into an index storage area for storing the index data and a font storage area for storing the font data according to the index data corresponding to the target menu bar to be displayed and the data amount of the font data, including:
[0011] Determine the regional position relationship between the index storage area and the font storage area; determine the regional capacity of the index storage area according to the data volume of the index data, and determine the first address of the storage unit corresponding to the index storage area in the preset memory according to the regional capacity of the index storage area and the regional position relationship;
[0012] According to the data volume of the font data, the area capacity of the font storage area is determined; according to the area capacity of the font storage area and the first address of the storage unit corresponding to the index storage area, the second address of the storage unit corresponding to the font storage area in the preset memory is determined.
[0013] In an optional implementation, the index buffer memory includes a first-in-first-out cache queue, the shadow elimination area includes a horizontal shadow elimination area and a vertical shadow elimination area, and when the display stage of the preset display device is in the shadow elimination area, reading the index data stored in the index storage area to the index buffer memory includes:
[0014] Determining a target shadow elimination area from the horizontal shadow elimination area and the vertical shadow elimination area according to the queue capacity of the first-in-first-out cache queue;
[0015] When the display phase of the preset display device is in the target blurring area, the index data stored in the index storage area is read into the first-in-first-out cache queue.
[0016] In an optional implementation, the font data includes a plurality of characters arranged in a preset character order, the target menu bar is composed of target characters corresponding to a plurality of menu bar positions, the index data is multiple, each index data includes the character order of the target characters corresponding to any menu bar position, then reading the font data matching the index data in the font storage area according to the index data stored in the index buffer memory includes:
[0017] Determining the number of storage units corresponding to one character in the character library data according to the amount of character data corresponding to one character in the character library data and the storage space corresponding to each storage unit in the character library storage area;
[0018] For any index data, determining a relative storage address corresponding to the target character according to the number of storage units and the character order of the target characters included in the index data;
[0019] The target character matching the index data is read from the font storage area in the preset memory according to the relative storage address corresponding to the target character and the second address of the storage unit corresponding to the font storage area.
[0020] In an optional implementation, the method further includes:
[0021] Dividing the remaining storage units contained in the preset memory except the index storage area and the character library storage area into an index cache area;
[0022] When the display stage of the preset display device is in the vertical blanking area, the index update data corresponding to the update menu bar to be displayed is stored in the index cache area; based on the DMA controller, the index update data corresponding to the index cache area is read to the index storage area.
[0023] In an optional implementation, before storing the index update data corresponding to the update menu bar to be displayed in the index cache area, the method further includes:
[0024] Comparing the data volume of the index update data with the area capacity of the index cache area and the area capacity of the index storage area respectively;
[0025] When the data volume of the index update data is larger than the area capacity of the index cache area and / or the data volume of the index update data is larger than the area capacity of the index storage area, the capacity ratio among the area capacities of the index cache area, the index storage area and the font storage area is adjusted so that the data volume of the index update data is less than or equal to the area capacity of the index cache area and the area capacity of the index storage area.
[0026] In an optional implementation, reading the index update data corresponding to the index cache area into the index storage area includes:
[0027] comparing the sum of the data amounts of the index update data and the index data with the area capacity corresponding to the index storage area;
[0028] In the case where the total amount of data is greater than the area capacity corresponding to the index storage area, after clearing the index data of the index storage area, reading the index update data into the index storage area;
[0029] When the total amount of data is less than or equal to the area space of the index storage area, the index update data is read into an empty storage unit in the index storage area.
[0030] A second aspect of the present disclosure provides a menu bar display device, the device comprising:
[0031] A region control unit, for dividing a plurality of storage units contained in a preset memory into an index storage region for storing the index data and a font storage region for storing the font data according to the index data and the data amount of the font data corresponding to the target menu bar to be displayed;
[0032] A storage control unit, used for storing the index data and the character library data in the index storage area and the character library storage area respectively;
[0033] An index reading unit, used for reading the index data stored in the index storage area into the index buffer memory when the display stage of the preset display device is in the blanking area;
[0034] A character library reading unit, configured to read character library data matching the index data in the character library storage area according to the index data stored in the index buffer memory when the display stage of the preset display device is in the display area;
[0035] The character library processing unit is used to generate video data corresponding to the target menu bar according to the character library data matching the index data read by the character library reading unit, so as to display the target menu bar on the preset display device according to the video data.
[0036] A third aspect of the present disclosure provides an electronic device, including:
[0037] one or more processors;
[0038] A storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for displaying the above-mentioned menu bar;
[0039] One or more I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.
[0040] A fourth aspect of the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein the program implements the method for displaying the above-mentioned menu bar when executed by a processor.
[0041] The present disclosure has the following advantages:
[0042] In the disclosed embodiment, when storing index data and font data corresponding to the target menu bar, the plurality of storage units contained in the preset memory can be divided into an index storage area and a font storage area according to the data amount of the index data and the font data, so as to store data according to the divided areas, so that the index data and the font data can share the same memory, and when the display phase of the preset display device is in the blanking area, the index data stored in the index storage area will be read into the index buffer memory, so that when the display phase of the preset display device is in the display area, the font data matching the index data will be read from the font storage area according to the index data stored in the index buffer memory, and the video data corresponding to the target menu bar will be generated according to the font data matching the index data, so as to display the target menu bar.
[0043] It can be seen that the embodiment of the present disclosure can flexibly divide the index storage area and the font storage area in the preset memory according to the data volume of the index data and the font data, and the embodiment of the present disclosure sets an index buffer memory, and reads the index data stored in the index storage area to the index buffer memory in the blanking area, and reads the font data matching the index data from the font storage area according to the index data stored in the index buffer memory in the display area, thereby effectively avoiding the data reading conflict problem caused by storing the index data and the font data in the same memory when the target menu bar is displayed, thereby improving the utilization rate of the memory when the menu bar is displayed and the storage flexibility of the index data and font data corresponding to different menu bars. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are used to provide further understanding of the present disclosure and constitute a part of the specification. They are used to explain the present disclosure together with the following detailed description, but do not constitute a limitation of the present disclosure.
[0045] Figure 1 A flowchart of a method for displaying a menu bar provided by an embodiment of the present disclosure;
[0046] Figure 2 A schematic diagram of storage area division in an embodiment of the present disclosure;
[0047] Figure 3 A block diagram of a menu bar display device provided in an embodiment of the present disclosure;
[0048] Figure 4 A block diagram of a menu bar display device provided in an embodiment of the present disclosure;
[0049] Figure 5 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0050] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.
[0051] As used in this disclosure, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0052] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure.As used in the present disclosure, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0053] When the terms “comprising” and / or “made of…” are used in the present disclosure, it specifies the existence of the stated features, integers, steps, operations, elements and / or components, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0054] The embodiments described in the present disclosure may be described with reference to plan views and / or cross-sectional views by way of ideal schematic views of the present disclosure. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.
[0055] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as those commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined in this disclosure.
[0056] In the related art, when a menu bar is displayed, in order to avoid read conflicts, multiple memories are needed to store the relevant information required for the menu bar. Since different menu bars have different display styles, the amount of data required for the relevant information is also different. In order to ensure product compatibility, the storage capacity of each memory must be as large as possible, resulting in low memory utilization.
[0057] In view of this, the embodiments of the present disclosure provide a method for displaying a menu bar, a display device, an electronic device and a readable medium, which can flexibly divide an index storage area and a font storage area in a preset memory according to the data volume of the index data and the font data. In addition, the embodiments of the present disclosure set an index buffer memory, and read the index data stored in the index storage area to the index buffer memory in the shadow elimination area, and read the font data matching the index data from the font storage area according to the index data stored in the index buffer memory in the display area, thereby effectively avoiding the data reading conflict problem caused by storing the index data and the font data in the same memory when the target menu bar is displayed, thereby improving the utilization rate of the memory when the menu bar is displayed and the storage flexibility of the index data and font data corresponding to different menu bars.
[0058] In a first aspect, an embodiment of the present disclosure provides a method for displaying a menu bar. Figure 1 A flowchart of a method for displaying a menu bar provided in an embodiment of the present disclosure, referring to Figure 1 , the method comprising:
[0059] Step S110: according to the index data corresponding to the target menu bar to be displayed and the data amount of the font data, a plurality of storage units included in the preset memory are divided into an index storage area for storing the index data and a font storage area for storing the font data.
[0060] The target menu bar to be displayed refers to an interface element for providing application function access, command options and other related functions. The target menu bar may include multiple menu items to facilitate user interaction with the application.
[0061] In order to realize the display of the target menu bar, the index data and the font data corresponding to the target menu bar need to be stored.
[0062] Font data refers to a data set of multiple text characters, which may include Chinese characters, letters, and other symbols. Index data is used to define the specific structure of the target menu bar, such as the menu bar position and the display characters corresponding to the menu bar position, so that when the menu bar is displayed, the font data of different menu bar positions can be located according to the index data.
[0063] The preset memory is used to store the index data and the font data corresponding to the target menu bar. The preset memory is any editable memory, such as a random access memory, which is not limited in the embodiment of the present disclosure.
[0064] In the disclosed embodiment, since the index data and the font data need to be stored in the same preset memory, it is necessary to divide the multiple storage units contained in the preset memory into an index storage area for storing the index data and a font storage area for storing the font data.
[0065] The index storage area and the font storage area correspond to different storage units, and the area sizes of the index storage area and the font storage area can be dynamically adjusted according to the number of storage units corresponding to them.
[0066] For different target menu bars, the corresponding index data and font data may have different data volumes. For example, some menu bars have less index data and more font data, while some menu bars have more index data and less font data.
[0067] Therefore, the disclosed embodiment divides the storage area of multiple storage units contained in the preset memory according to the index data and the data amount of the font data corresponding to the target menu bar, so that for a menu bar with less index data and more font data, the index storage area can be reduced and the font storage area can be increased; for a menu bar with more index data and less font data, the index storage area can be increased and the font storage area can be reduced, thereby realizing flexible storage of index data and font data for target menu bars of different styles.
[0068] Step S120: storing the index data and the character library data in the index storage area and the character library storage area respectively.
[0069] When storing index data and font data, in order to improve the utilization rate of the storage area, it is necessary to store the index data and font data sequentially starting from the starting storage unit corresponding to the index storage area and the font storage area.
[0070] Exemplarily, the storage unit addresses corresponding to the index storage area are 0001 to 0010, and the storage unit addresses corresponding to the font storage area are 0011 to 0016. Therefore, when storing index data and font data, index data A, index data B, and index data C can be stored sequentially starting from the storage unit corresponding to address 0001, and character 1, character 2, and character 3 contained in the font data can be stored sequentially starting from the storage unit corresponding to address 0011.
[0071] It should be noted that since there may be a mismatch in data flow speed when storing data, when writing index data and font data to the index storage area and font storage area in the preset memory respectively, the index data and font data can be first stored in the preset buffer memory, and then the index data and font data in the preset buffer memory are sequentially read to the index storage area and font storage area to achieve orderly storage of the index data and font data.
[0072] Step S130: when the display stage of the preset display device is in the blanking area, the index data stored in the index storage area is read into the index buffer memory.
[0073] The preset display device refers to a display device used to display the target menu bar, and the display stage of the preset display device includes two areas: a blanking area and a display area. The blanking area refers to an area used to transmit control information, auxiliary information and other related information during the transmission of the video signal. The display area refers to an area actually used to display the image.
[0074] When the display stage of the preset display device is in the blanking area, no data will be displayed in the preset display device. Only when the display stage of the preset display device is in the display area, the picture will be displayed on the preset display device.
[0075] Specifically, it can be determined whether the display phase of the preset display device is in the blanking area or the display area according to a video data enable (VDE) signal.
[0076] It should be noted that in the embodiment of the present disclosure, since the index data and the font data are stored in the same memory, when the menu bar is displayed, there will be a problem of conflict in reading the index data and the font data, resulting in display abnormality.
[0077] In order to avoid the above-mentioned data reading conflict problem, an index buffer memory is set up, so that when the display phase of the preset display device is in the blanking area, the index data stored in the index storage area is read into the index buffer memory. When the display phase is in the display area, the font data is read from the font storage area of the preset memory according to the index data stored in the index buffer memory to display the menu bar, thereby realizing time-sharing and partitioned reading of index data and font data, and effectively avoiding the data reading conflict problem.
[0078] It should also be noted that the memory type and storage capacity of the index buffer memory can be adaptively set according to actual needs, and the embodiments of the present disclosure do not limit this.
[0079] In an optional implementation, the index buffer memory includes a first-in-first-out cache queue, so that the index data can be output sequentially according to the reading order of the index data, thereby ensuring the data orderliness of the index data.
[0080] Step S140: When the display stage of the preset display device is in the display area, read the font data matching the index data from the font storage area according to the index data stored in the index buffer memory; generate the video data corresponding to the target menu bar according to the font data matching the index data, so as to display the target menu bar in the preset display device according to the video data.
[0081] The character library data matched by the index data refers to the target character indicated by the index data in the character library data. Since the character library data is a data set consisting of multiple characters, and the index data is used to indicate the display character corresponding to the menu bar position, the character corresponding to the menu bar position indicated by the index data can be read from the character library storage area according to the index data.
[0082] Among them, the video data corresponding to the target menu bar refers to the video signal corresponding to the target menu bar. The target menu bar is displayed in the preset display device in the form of video frames. Therefore, after reading the font data matching the index data, it is necessary to generate the corresponding video signal based on the font data before the target menu bar can be displayed on the preset display device.
[0083] Specifically, when generating video data corresponding to the target menu bar based on the font data matching the index data, the font data needs to be decompressed into a font video signal, thereby superimposing the font video signal with the basic video signal of the preset display device to form video data with the target menu bar. Finally, the preset display device realizes the target menu bar display based on the video data.
[0084] In the disclosed embodiment, the index storage area and the font storage area can be flexibly divided in the preset memory according to the data volume of the index data and the font data. In addition, the disclosed embodiment sets an index buffer memory, and reads the index data stored in the index storage area to the index buffer memory in the blanking area, and reads the font data matching the index data from the font storage area according to the index data stored in the index buffer memory in the display area, thereby effectively avoiding the data reading conflict problem caused by storing the index data and the font data in the same memory when the target menu bar is displayed, thereby improving the memory utilization rate when the menu bar is displayed and the storage flexibility of the index data and font data corresponding to different menu bars.
[0085] In addition, those skilled in the art may also make various modifications and variations to the method disclosed herein:
[0086] In an optional implementation, the preset memory includes: a static random access memory; according to the index data corresponding to the target menu bar to be displayed and the data volume of the font data, a plurality of storage units contained in the preset memory are divided into an index storage area for storing the index data and a font storage area for storing the font data, including: determining the regional position relationship between the index storage area and the font storage area; determining the regional capacity of the index storage area according to the data volume of the index data, and determining the first address of the storage unit corresponding to the index storage area in the preset memory according to the regional capacity and the regional position relationship of the index storage area; determining the regional capacity of the font storage area according to the data volume of the font data, and determining the second address of the storage unit corresponding to the font storage area in the preset memory according to the regional capacity of the font storage area and the first address of the storage unit corresponding to the index storage area.
[0087] Among them, Static Random Access Memory (SRAM) is a random access memory with a fast data storage speed, which can realize fast storage and access to index data and font data.
[0088] The regional position relationship between the index storage area and the character library storage area is used to characterize the adjacent relationship and address size relationship between the index storage area and the character library storage area. The adjacent relationship is used to characterize whether the index storage area and the character library storage area are adjacent and the number of interval storage units when they are not adjacent.
[0089] For example, the first address of the storage unit corresponding to the index storage area needs to be smaller than the second address of the storage unit corresponding to the character library storage area, and the index storage area is adjacent to the character library storage area.
[0090] For another example, the first address of the storage unit corresponding to the index storage area must be greater than the second address of the storage unit corresponding to the character library storage area, and there must be at least one storage unit between the index storage area and the character library storage area.
[0091] The regional capacity of the index storage area and the regional capacity of the font storage area are used to represent the number of storage units corresponding to the index storage area and the number of storage units corresponding to the font storage area.
[0092] Since the data volume of each storage unit in the preset memory is the same, the area capacity of the index storage area and the font storage area can be determined according to the data volume of the index data and the data volume of the font data.
[0093] For example, the data volume of the index data is 5 bytes, and the data volume that can be stored in each storage unit is 2 bytes. Therefore, the index storage area requires at least 3 storage units to store the index data.
[0094] Therefore, according to the area capacity of the index storage area, the first address of the storage unit corresponding to the index storage area in the preset memory can be determined.
[0095] The first address specifically includes a first starting address of a starting storage unit of the index storage area and a first ending address of a tail storage unit of the index storage area.
[0096] If the index storage area is located above the font storage area, that is, the area address of the index storage area is smaller than the area address of the font storage area, then the starting address of the preset memory can be used as the first starting address of the index storage area, and the first ending address of the index storage area can be determined based on the area capacity of the index storage area.
[0097] If the index storage area is located below the font storage area, that is, the area address of the index storage area is greater than the area address of the font storage area, then the end address of the preset memory can be used as the first end address of the index storage area, and the first starting address of the index storage area can be determined based on the area capacity of the index storage area.
[0098] The second address specifically includes a second starting address of a starting storage unit of the character library storage area and a second ending address of a last storage unit of the character library storage area.
[0099] The second address needs to be determined according to the area capacity of the character library storage area and the first address of the storage unit corresponding to the index storage area.
[0100] Specifically, the address interval between the second address and the first address can be determined based on the adjacent relationship and address size relationship between the index storage area and the character storage area, and then the second address of the storage unit corresponding to the character storage area in the preset memory can be determined based on the address interval, the area capacity of the character storage area and the first address.
[0101] For example, if the address size relationship is that the area address of the index storage area is smaller than the area address of the character storage area, and the adjacent relationship is that there must be two storage units between the index storage area and the character storage area, then the second starting address of the character storage area can be determined based on the first ending address of the index storage area and the adjacent relationship, and the second ending address of the character storage area can be determined based on the second starting address and the area capacity of the character storage area.
[0102] For another example, if the address size relationship is that the area address of the index storage area is larger than the area address of the character storage area, and the adjacent relationship is that there must be two storage units between the index storage area and the character storage area, then the second end address of the character storage area can be determined based on the first starting address of the index storage area and the adjacent relationship, and the second starting address of the character storage area can be determined based on the second end address and the area capacity of the character storage area.
[0103] It can be seen that in the embodiment of the present disclosure, by determining the regional position relationship between the index storage area and the character library storage area, the addresses of the storage units corresponding to the index storage area and the character library storage area are determined according to the data volume of the index data and the character library data and the regional position relationship, thereby realizing flexible regional division of the index storage area and the character library storage area.
[0104] In an optional implementation, in order to improve the storage efficiency of the index buffer memory for index data, the index data stored in the index storage area may be read through a first-in-first-out cache queue, and the data reading phase of the index data may be determined according to the queue capacity.
[0105] Correspondingly, the index buffer memory includes a first-in-first-out cache queue, and the shadow elimination area includes a horizontal shadow elimination area and a vertical shadow elimination area. When the display stage of the preset display device is in the shadow elimination area, the index data stored in the index storage area is read into the index buffer memory, including: determining the target shadow elimination area from the horizontal shadow elimination area and the vertical shadow elimination area according to the queue capacity of the first-in-first-out cache queue; when the display stage of the preset display device is in the target shadow elimination area, the index data stored in the index storage area is read into the first-in-first-out cache queue.
[0106] The horizontal blanking area h_blank refers to the time period when the electron gun returns to the left end after scanning a row of pixels from left to right. The vertical blanking area v_blank refers to the time period when the scanning point returns from the lower right corner to the upper left corner after scanning a frame of data, preparing to start a new frame scan.
[0107] Therefore, the horizontal blanking zone only requires the electron gun to move back and forth once within a line, while the vertical blanking zone requires the electron gun to move back and forth once across the entire screen height. The duration of the horizontal blanking zone is usually shorter than that of the vertical blanking zone.
[0108] The horizontal blanking signal and the vertical blanking signal can be used to further distinguish whether the display stage of the preset display device is in the horizontal blanking area or the vertical blanking area.
[0109] If the duration of the shadow elimination zone is longer, the amount of data that the first-in-first-out cache queue needs to cache in the shadow elimination zone increases. Therefore, it is necessary to determine the target shadow elimination zone from the horizontal shadow elimination zone and the vertical shadow elimination zone based on the queue capacity of the first-in-first-out cache queue.
[0110] The target elimination area is an interval for reading index data into a first-in-first-out cache queue.
[0111] In an optional implementation, in order to improve the accuracy of determining the target vanishing zone, the queue capacity threshold can be determined based on the vanishing time corresponding to the vertical vanishing zone. When the queue capacity of the first-in-first-out cache queue is greater than the queue capacity threshold, the vertical vanishing zone is determined as the target vanishing zone. When the queue capacity of the first-in-first-out cache queue is less than or equal to the queue capacity threshold, the horizontal vanishing zone is determined as the target vanishing zone.
[0112] Thus, when the display stage of the preset display device is in the target blurring zone, the index data stored in the index storage area is read into the first-in-first-out cache queue to avoid excessive amount of index data cached in the first-in-first-out cache queue, resulting in queue overflow and other abnormalities.
[0113] In an optional implementation, the font data includes multiple characters arranged in a preset character order, the target menu bar is composed of target characters corresponding to multiple menu bar positions, there are multiple index data, each index data includes the character order of the target characters corresponding to any menu bar position, and according to the index data stored in the index buffer memory, the font data matching the index data is read in the font storage area, including: determining the number of storage units corresponding to a character in the font data according to the amount of character data corresponding to a character in the font data and the storage space corresponding to each storage unit in the font storage area; for any index data, determining the relative storage address corresponding to the target character according to the number of storage units and the character order of the target characters included in the index data; reading the target character matching the index data from the font storage area in the preset memory according to the relative storage address corresponding to the target character and the second address of the storage unit corresponding to the font storage area.
[0114] The preset character sequence can be adaptively set according to actual application needs, for example, referring to the character sequence specified by the ASCII code.
[0115] The menu bar position refers to the display position of the menu bar with display characters. For example, the target menu bar includes multiple menu items, and the position of each menu item may include position 1, position 2, position 3, etc. from left to right.
[0116] Thus, there is a corresponding character at each menu bar position. For example, the characters corresponding to positions 1 to 3 of menu item 1 are "select", "item", and "one" respectively. Therefore, menu item 1 will be displayed as "Option One".
[0117] Correspondingly, for each menu bar position, corresponding index data is set to indicate the character order of the target character corresponding to that menu bar position. This character order is used to represent the arrangement order of the target character when arranged in a preset character order in the font data.
[0118] For example, the font data includes characters "A", "B", "C" arranged in a preset character order. The character orders of characters "A", "B", "C" can be 1, 2, 3.
[0119] According to the amount of character data corresponding to a character and the storage space corresponding to each storage unit in the font storage area, the number of storage units required for storing a character can be determined. For example, the amount of character data corresponding to a character is 2 bytes, and the storage space corresponding to each storage unit in the font storage area is 1 byte. Thus, a character needs to be stored in 2 storage units.
[0120] Since the font data is sequentially stored in the font storage area, after determining the number of storage units corresponding to a character, the relative storage address corresponding to the target character can be determined according to the character order of the target character included in the index data, that is, the address offset of the target character relative to the second starting storage address of the font storage area.
[0121] Furthermore, according to the relative storage address corresponding to the target character and the second address of the storage unit corresponding to the font storage area, the target character matching the index data can be read from the font storage area in the preset memory.
[0122] For example, the second starting storage address of the storage unit corresponding to the font storage area is added to the relative storage address to obtain the absolute address of the target character. According to the absolute address of the target character, the target character matching the index data is read from the font storage area.
[0123] In the embodiments of the present disclosure, by calculating the relative storage address of the target character in the font storage area based on the number of storage units corresponding to a character in the font data and the character order of the target character, and reading the target character according to the relative storage address, accurate reading of the target character is achieved, and storing the address information of the character in the index data is avoided, improving the storage efficiency.
[0124] In an optional implementation, in order to update the menu bar, it is necessary to divide an index cache area in a preset memory, so that when the display stage of the preset display device is in the vertical blanking area, the index update data corresponding to the updated menu bar to be displayed is stored in the index cache area, and the index update data corresponding to the index cache area is read to the index storage area, so as to display the updated menu bar in the next frame display screen of the preset display device.
[0125] Correspondingly, the menu bar display method also includes: dividing the remaining storage units contained in the preset memory except the index storage area and the font storage area into an index cache area; when the display stage of the preset display device is in the vertical blanking area, storing the index update data corresponding to the updated menu bar to be displayed in the index cache area; based on the DMA controller, reading the index update data corresponding to the index cache area to the index storage area.
[0126] The index cache area refers to a storage area for caching index update data. The remaining storage units are storage units in the preset memory that are not divided into storage areas, so the remaining storage units can be directly divided into index cache areas.
[0127] The index update data refers to the index data corresponding to the updated menu bar, which is different from the index data corresponding to the target menu bar, so as to achieve the replacement of the menu bar style.
[0128] It should be noted that since the amount of index update data may be large, it may not be possible to move it through the MCU within one blanking period. Therefore, it is necessary to divide the index cache area to temporarily store the index update data. In addition, the index data cannot be changed during the display of the menu bar, otherwise it will cause the menu bar display to be incorrect within one frame.
[0129] Therefore, in the embodiment of the present disclosure, when the display stage of the preset display device is in the vertical blanking area, the index update data is stored in the index cache area, and accordingly, the index update data corresponding to the index cache area is synchronously read to the index storage area based on the DMA controller.
[0130] Among them, the DMA controller (Direct Memory Access Controller) can realize direct memory access of data and improve the data transmission efficiency of index data.
[0131] Thus, the index buffer memory can read the index update data stored in the index storage area. Accordingly, when the display stage of the preset display device is in the display area, the font data matching the index update data can be read from the font storage area according to the index update data stored in the index buffer memory, so as to display the updated menu bar in the preset display device, effectively avoiding the menu bar tearing phenomenon generated within one frame.
[0132] In the disclosed embodiment, when the menu bar needs to be updated, the index update data corresponding to the menu bar is stored in the index cache area when in the vertical blur area, and the index update data stored in the index cache area is read to the index storage area, thereby avoiding the menu bar tearing phenomenon caused by displaying different menu bar styles above and below in the same frame when updating the index.
[0133] In an optional implementation, since the amount of index data corresponding to different menu bars is different, when the area capacity of the index storage area and the index cache area is less than the amount of index update data, it is necessary to adjust the capacity ratio between the area capacity of the index cache area, the index storage area and the font storage area to avoid abnormal display of the update menu bar.
[0134] Correspondingly, before storing the index update data corresponding to the update menu bar to be displayed in the index cache area, it also includes: comparing the data volume of the index update data with the regional capacity of the index cache area and the regional capacity of the index storage area respectively; when the data volume of the index update data is greater than the regional capacity of the index cache area, and / or the data volume of the index update data is greater than the regional capacity of the index storage area, adjusting the capacity ratio between the regional capacities of the index cache area, the index storage area and the font storage area, so that the data volume of the index update data is less than or equal to the regional capacity of the index cache area and the regional capacity of the index storage area.
[0135] Specifically, the capacity ratio among the area capacities of the index cache area, the index storage area and the font storage area may be adjusted by adjusting the number of storage units corresponding to the index cache area, the index storage area and the font storage area.
[0136] In an optional implementation, in order to improve the efficiency of adjusting the capacity ratio among the regional capacities of the index cache area, the index storage area and the font storage area, the capacity ratio among the regional capacities of the index cache area, the index storage area and the font storage area can be adjusted according to the regional position relationship among the index cache area, the index storage area and the font storage area.
[0137] Accordingly, the capacity ratio among the area capacities of the index cache area, the index storage area, and the font storage area is adjusted as follows:
[0138] In the case where the index storage area and the index cache area are adjacent areas, determine whether to allocate empty storage units of the font storage area based on the total area capacity of the index storage area and the index cache area and the data volume of the index update data; if so, determine the allocation number of empty storage units to be allocated to the font storage area, allocate the empty storage units corresponding to the allocation number in the font storage area to the merged area corresponding to the index storage area and the index cache area, and adjust the first address of the storage unit corresponding to the index storage area and the third address of the storage unit corresponding to the index cache area in the merged area after the allocation of the storage unit based on the data volume of the index update data; if not, adjust the first address of the storage unit corresponding to the index storage area and the third address of the storage unit corresponding to the index cache area based on the data volume of the index update data.
[0139] In the case where the index storage area and the index cache area are non-adjacent areas, determine a first number of empty storage cells required for the index storage area and a second number of empty storage cells required for the index cache area; determine the address offset and the address offset direction of the storage cell of the font data in the font storage area based on the first number, the second number and the third number of empty storage cells in the font storage area; adjust the address of the storage cell of the font data according to the address offset and the address offset direction; update the first address of the storage cell corresponding to the index storage area, the second address of the storage cell corresponding to the font storage area and the third address of the storage cell corresponding to the index cache area based on the adjusted address of the storage cell of the font data.
[0140] The third address of the storage unit corresponding to the index cache area includes a third starting address of the starting storage unit of the index cache area and a third ending address of the ending storage unit of the index cache area.
[0141] The storage unit of the font data refers to the storage unit in the font storage area that actually stores the font data, that is, a non-empty storage unit.
[0142] When the index storage area and the index cache area are adjacent areas, in order to avoid adjusting the storage units of the font data, it is necessary to determine whether the sum of the area capacities of the index storage area and the index cache area is greater than or equal to the data volume of the index update data*2. Only when it is less than that, it is determined that an empty storage unit of the font storage area needs to be allocated.
[0143] Furthermore, when it is necessary to allocate empty storage units in the font storage area, it is necessary to determine the allocation quantity of the empty storage units to be allocated in the font storage area, which is the sum of the allocation quantities required by the index storage area and the index cache area.
[0144] Furthermore, since the font storage area is not the middle area, the allocated number of storage units in the font storage area needs to be allocated to the merged area corresponding to the index storage area and the index cache area, and the merged area includes the overall area space of the index storage area and the index cache area. Therefore, after being allocated to the merged area, the first address of the storage unit corresponding to the index storage area in the merged area and the third address of the storage unit corresponding to the index cache area are adjusted according to the amount of index update data.
[0145] For example, the area positions of the storage areas in the preset memory are index storage area, index cache area, and font storage area from top to bottom. The capacity of each area is 5 storage units, 5 storage units, and 15 storage units, respectively, and the font storage area includes 6 empty storage units.
[0146] The index update data requires 6 storage units, so it is determined that the number of empty storage units that need to be allocated to the character storage area is 2. The 2 empty storage units are allocated to the index storage area and the merged area corresponding to the index cache area through the character storage area, that is, the original number of storage units in the merged area is 10, and the number of storage units after allocation is 12. Therefore, according to the data volume of the index update data, the merged area after the storage units are allocated is redivided into an index storage area containing 6 storage units and an index cache area, and the first address of the storage unit corresponding to the index storage area and the third address of the storage unit corresponding to the index cache area are updated.
[0147] When there is no need to allocate an empty storage unit in the font storage area, it is only necessary to adjust the first address of the storage unit corresponding to the index storage area and the third address of the storage unit corresponding to the index cache area according to the data amount of the index update data.
[0148] For example, the area capacities corresponding to the index storage area and the index cache area are 6 storage units and 3 storage units respectively, while the index update data requires 4 storage units. Therefore, the storage units of the index storage area can be allocated to the index cache area by reducing the first end address of the storage units corresponding to the index storage area and increasing the third start address of the storage units corresponding to the index cache area.
[0149] In addition, when the index storage area and the index cache area are non-adjacent areas, the index storage area and the index cache area are separated by the font storage area. Figure 2 This is a schematic diagram of the storage area division in the preset memory, refer to Figure 2 The storage space of the preset memory is, from top to bottom, an index storage area, a font storage area, and an index cache area.
[0150] Based on the first number of empty storage cells required for the index storage area, the second number of empty storage cells required for the index cache area, and the third number of empty storage cells in the font storage area, the address offset and the address offset direction of the storage cell of the font data in the font storage area can be determined, and the address of the storage cell of the font data can be adjusted according to the address offset and the address offset direction.
[0151] For example, the index storage area requires 2 empty storage units, the index cache area requires 1 empty storage unit, and the font storage area has 4 empty storage units. If the index storage area is located above the font storage area, the storage unit of the font data in the font storage area only needs to be shifted downward by two storage units as a whole, so as to obtain the address of the storage unit of the adjusted font data. For example, the starting address of the original font storage area is 0010, the ending address is 0018, and the address of the storage unit of the adjusted font data is 0012 to 0020.
[0152] Furthermore, according to the adjusted address of the storage unit of the font data, the first address of the storage unit corresponding to the index storage area, the second address of the storage unit corresponding to the font storage area, and the third address of the storage unit corresponding to the index cache area are updated.
[0153] For example, the second address of the storage unit corresponding to the character storage area can be updated according to the address of the storage unit of the adjusted character data and the number of empty storage units required by the index cache area; the first end address of the storage unit corresponding to the index storage area can be updated according to the second start address of the storage unit corresponding to the updated character storage area; and the third start address of the storage unit corresponding to the index cache area can be updated according to the second end address of the storage unit corresponding to the updated character storage area.
[0154] Exemplarily, the original first address is 0001 to 0010, the second address is 0011 to 0030, the third address is 0031 to 0041, and, in the second address, the storage unit of the font data corresponds to the address 0011 to 0020. Then, after the storage unit of the font data is shifted downward by two addresses, and 2 storage units are allocated to the index storage area, and 1 storage unit is allocated to the index cache area, the updated second address can be 0013 to 0029, wherein the storage unit of the updated font storage corresponds to the address 0013 to 0022, the updated first address can be 0001 to 0012, and the updated third address can be 0030 to 0041.
[0155] In the disclosed embodiment, according to the regional position relationship among the index cache area, the index storage area and the font storage area, regional capacity allocation is preferentially performed based on the storage units between the index storage area and the index cache area, so that the regional capacity of the updated index storage area and the index cache area can be greater than the data volume of the index data. When the sum of the regional capacities of the index storage area and the index cache area cannot meet the allocation requirements, capacity allocation is performed based on the storage units of the font storage area, thereby avoiding frequent adjustments to the font data storage and improving the efficiency of regional capacity adjustment.
[0156] In an optional implementation, the index update data corresponding to the index cache area is read into the index storage area, including: comparing the total data volume of the index update data and the index data with the area capacity corresponding to the index storage area; when the total data volume is greater than the area capacity corresponding to the index storage area, after clearing the index data of the index storage area, the index update data is read into the index storage area; when the total data volume is less than or equal to the area space of the index storage area, the index update data is read into an empty storage unit in the index storage area.
[0157] Among them, when the total data volume of the index update data and the index data is greater than the area capacity corresponding to the index storage area, in order to enable the index update data to be effectively stored, the index data in the index storage area needs to be cleared, and then the index update data is read into the index storage area. When the total data volume of the index update data and the index data is less than the area capacity corresponding to the index storage area, the index update data can be directly read into the empty storage unit in the index storage area.
[0158] In the disclosed embodiment, when the index storage area is capable of accommodating both index update data and index data, the index update data can be directly stored in an empty storage unit of the index storage area. When the storage capacity of the index storage area is insufficient, the index data needs to be cleared before the index update data is read into the index storage area to improve the data storage efficiency of the index data.
[0159] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0160] In a second aspect, an embodiment of the present disclosure provides a display device for a menu bar. Figure 3 A block diagram of a menu bar display device provided in an embodiment of the present disclosure, referring to Figure 3 , the device comprises:
[0161] The area control unit 31 is used to divide the plurality of storage units contained in the preset memory into an index storage area for storing the index data and a font storage area for storing the font data according to the index data and the data amount of the font data corresponding to the target menu bar to be displayed;
[0162] A storage control unit 32, used to store the index data and the character library data in the index storage area and the character library storage area respectively;
[0163] An index reading unit 33 is used to read the index data stored in the index storage area into the index buffer memory when the display stage of the preset display device is in the blanking area;
[0164] The character library reading unit 34 is used to read the character library data matching the index data in the character library storage area according to the index data stored in the index buffer memory when the display stage of the preset display device is in the display area;
[0165] The character library processing unit 35 is used to generate video data corresponding to the target menu bar according to the character library data matching the index data read by the character library reading unit, so as to display the target menu bar on the preset display device according to the video data.
[0166] Specifically, before the menu bar is displayed, the required font data and index data are stored in a preset memory through the storage control unit 32; during the display process, the index data is first stored in the index buffer memory, and then the font data is retrieved and decompressed according to the index data to form menu bar video data, and the target menu bar is displayed in the preset display device.
[0167] In an optional implementation, the area control unit 31 is further used to divide the remaining storage units contained in the preset memory except the index storage area and the character library storage area into index cache areas;
[0168] The storage control unit 32 is further used to store the index update data corresponding to the update menu bar to be displayed in the index cache area when the display stage of the preset display device is in the vertical blanking area;
[0169] The menu bar display device also includes a DMA controller for reading index update data corresponding to the index cache area into the index storage area.
[0170] Figure 4A block diagram of a menu bar display device provided in an embodiment of the present disclosure, referring to Figure 4 During the display process, if the menu bar style needs to be changed, the data is first stored in the index cache area in the preset memory through the storage control unit 32, and then the data is moved to the index storage area through the DMA controller in the elimination area to realize the change of the menu bar style.
[0171] In an optional implementation, the preset memory includes: a static random access memory; the plurality of storage units contained in the preset memory are divided into an index storage area for storing the index data and a font storage area for storing the font data according to the index data corresponding to the target menu bar to be displayed and the data amount of the font data, including:
[0172] Determining a regional position relationship between the index storage area and the character library storage area;
[0173] Determine the area capacity of the index storage area according to the data volume of the index data, and determine the first address of the storage unit corresponding to the index storage area in the preset memory according to the area capacity of the index storage area and the area position relationship;
[0174] According to the data volume of the font data, the area capacity of the font storage area is determined; according to the area capacity of the font storage area and the first address of the storage unit corresponding to the index storage area, the second address of the storage unit corresponding to the font storage area in the preset memory is determined.
[0175] In an optional implementation, the index buffer memory includes a first-in-first-out cache queue, the shadow elimination area includes a horizontal shadow elimination area and a vertical shadow elimination area, and when the display stage of the preset display device is in the shadow elimination area, reading the index data stored in the index storage area to the index buffer memory includes:
[0176] Determining a target shadow elimination area from the horizontal shadow elimination area and the vertical shadow elimination area according to the queue capacity of the first-in-first-out cache queue;
[0177] When the display phase of the preset display device is in the target blurring area, the index data stored in the index storage area is read into the first-in-first-out cache queue.
[0178] In an optional implementation, the font data includes a plurality of characters arranged in a preset character order, the target menu bar is composed of target characters corresponding to a plurality of menu bar positions, the index data is multiple, each index data includes the character order of the target characters corresponding to any menu bar position, then reading the font data matching the index data in the font storage area according to the index data stored in the index buffer memory includes:
[0179] Determining the number of storage units corresponding to one character in the character library data according to the amount of character data corresponding to one character in the character library data and the storage space corresponding to each storage unit in the character library storage area;
[0180] For any index data, determining a relative storage address corresponding to the target character according to the number of storage units and the character order of the target characters included in the index data;
[0181] The target character matching the index data is read from the font storage area in the preset memory according to the relative storage address corresponding to the target character and the second address of the storage unit corresponding to the font storage area.
[0182] Before storing the index update data corresponding to the update menu bar to be displayed in the index cache area, the device is further used to:
[0183] Comparing the data volume of the index update data with the area capacity of the index cache area and the area capacity of the index storage area respectively;
[0184] When the data volume of the index update data is larger than the area capacity of the index cache area and / or the data volume of the index update data is larger than the area capacity of the index storage area, the capacity ratio among the area capacities of the index cache area, the index storage area and the font storage area is adjusted so that the data volume of the index update data is less than or equal to the area capacity of the index cache area and the area capacity of the index storage area.
[0185] In an optional implementation, reading the index update data corresponding to the index cache area into the index storage area includes:
[0186] comparing the sum of the data amounts of the index update data and the index data with the area capacity corresponding to the index storage area;
[0187] In the case where the total amount of data is greater than the area capacity corresponding to the index storage area, after clearing the index data of the index storage area, reading the index update data into the index storage area;
[0188] When the total amount of data is less than or equal to the area space of the index storage area, the index update data is read into an empty storage unit in the index storage area.
[0189] In the menu bar display device provided by the embodiment of the present disclosure, the data space of each group of data can be allocated by software after the hardware is solidified. It adopts an editable memory allocation technology, and stores the menu bar index data and the font data in a memory by configuring the base address of the index storage area and the font storage area, so that the hardware module realizes the display of the target menu bar based on these data. It realizes the storage and display of menu bars of different styles by reasonably allocating the data space of each group of data, reduces the size of the required memory, and improves the utilization rate of the memory. Compared with the common products on the market, it avoids the problem of insufficient memory due to excessive amount of a single group of data, thus failing to display.
[0190] The functions or modules included in the device provided in the embodiments of the present disclosure can be used to execute the method described in the first aspect of the method embodiment above. Its specific implementation and technical effects can be referred to the description of the method embodiment above. For the sake of brevity, they will not be repeated here.
[0191] It should be noted that all modules involved in this embodiment are logic modules. In practical applications, a logic unit may be a physical unit, or a part of a physical unit, or may be implemented as a combination of multiple physical units. In addition, in order to highlight the innovative part of the present disclosure, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by the present disclosure, but this does not mean that there are no other units in this embodiment.
[0192] Reference Figure 5 , an embodiment of the present disclosure provides an electronic device, comprising:
[0193] One or more processors 501;
[0194] A memory 502, on which one or more programs are stored, when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned menu bar display methods;
[0195] One or more I / O interfaces 503 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.
[0196] Among them, the processor 501 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 502 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 503 is connected between the processor 501 and the memory 502, and can realize information interaction between the processor 501 and the memory 502, including but not limited to a data bus (Bus), etc.
[0197] In some embodiments, the processor 501 , the memory 502 , and the I / O interface 503 are connected to each other through a bus, and further connected to other components of the computing device.
[0198] This embodiment also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the menu bar display method provided in this embodiment is implemented. To avoid repeated description, the specific steps of the menu bar display method are not repeated here.
[0199] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the invented method described above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0200] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0201] Those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present embodiment and to form different embodiments.
[0202] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and substance of the present disclosure, and these modifications and improvements are also considered to be within the scope of protection of the present disclosure.
Claims
1. A method for displaying a menu bar, characterized in that: The method comprises: According to the index data corresponding to the target menu bar to be displayed and the data amount of the font data, a plurality of storage units included in the preset memory are divided into an index storage area for storing the index data and a font storage area for storing the font data; storing the index data and the character library data in the index storage area and the character library storage area respectively; When the display stage of the preset display device is in the blanking area, the index data stored in the index storage area is read into the index buffer memory; When the display stage of the preset display device is in the display area, font data matching the index data is read from the font storage area according to the index data stored in the index buffer memory; video data corresponding to the target menu bar is generated according to the font data matching the index data, so as to display the target menu bar in the preset display device according to the video data.
2. The method for displaying a menu bar according to claim 1, characterized in that: The preset memory includes: a static random access memory; according to the index data corresponding to the target menu bar to be displayed and the data amount of the font data, a plurality of storage units contained in the preset memory are divided into an index storage area for storing the index data and a font storage area for storing the font data, including: Determining a regional position relationship between the index storage area and the character library storage area; Determine the area capacity of the index storage area according to the data volume of the index data, and determine the first address of the storage unit corresponding to the index storage area in the preset memory according to the area capacity of the index storage area and the area position relationship; According to the data volume of the font data, the area capacity of the font storage area is determined; according to the area capacity of the font storage area and the first address of the storage unit corresponding to the index storage area, the second address of the storage unit corresponding to the font storage area in the preset memory is determined.
3. The method for displaying a menu bar according to claim 1, characterized in that: The index buffer memory includes a first-in-first-out cache queue, the shadow elimination area includes a horizontal shadow elimination area and a vertical shadow elimination area, and when the display stage of the preset display device is in the shadow elimination area, reading the index data stored in the index storage area into the index buffer memory includes: Determining a target shadow elimination area from the horizontal shadow elimination area and the vertical shadow elimination area according to the queue capacity of the first-in-first-out cache queue; When the display phase of the preset display device is in the target blurring area, the index data stored in the index storage area is read into the first-in-first-out cache queue.
4. The method for displaying a menu bar according to claim 2, characterized in that: The character library data includes a plurality of characters arranged in a preset character sequence, the target menu bar is composed of target characters corresponding to a plurality of menu bar positions, the index data is a plurality of data, each index data includes a character sequence of target characters corresponding to any menu bar position, then the character library data matching the index data is read in the character library storage area according to the index data stored in the index buffer memory, including: Determining the number of storage units corresponding to one character in the character library data according to the amount of character data corresponding to one character in the character library data and the storage space corresponding to each storage unit in the character library storage area; For any index data, determining a relative storage address corresponding to the target character according to the number of storage units and the character order of the target characters included in the index data; The target character matching the index data is read from the font storage area in the preset memory according to the relative storage address corresponding to the target character and the second address of the storage unit corresponding to the font storage area.
5. The method for displaying a menu bar according to claim 1, characterized in that: The method further comprises: Dividing the remaining storage units contained in the preset memory except the index storage area and the character library storage area into an index cache area; When the display stage of the preset display device is in the vertical blanking area, the index update data corresponding to the update menu bar to be displayed is stored in the index cache area; based on the DMA controller, the index update data corresponding to the index cache area is read to the index storage area.
6. The method for displaying a menu bar according to claim 5, characterized in that: Before storing the index update data corresponding to the update menu bar to be displayed in the index cache area, the method further includes: Comparing the data volume of the index update data with the area capacity of the index cache area and the area capacity of the index storage area respectively; When the data volume of the index update data is larger than the area capacity of the index cache area and / or the data volume of the index update data is larger than the area capacity of the index storage area, the capacity ratio among the area capacities of the index cache area, the index storage area and the font storage area is adjusted so that the data volume of the index update data is less than or equal to the area capacity of the index cache area and the area capacity of the index storage area.
7. The method for displaying a menu bar according to claim 5, characterized in that: The reading of the index update data corresponding to the index cache area into the index storage area includes: comparing the sum of the data amounts of the index update data and the index data with the area capacity corresponding to the index storage area; In the case where the total amount of data is greater than the area capacity corresponding to the index storage area, after clearing the index data of the index storage area, reading the index update data into the index storage area; When the total amount of data is less than or equal to the area space of the index storage area, the index update data is read into an empty storage unit in the index storage area.
8. A menu bar display device, characterized in that: The device comprises: A region control unit, for dividing a plurality of storage units contained in a preset memory into an index storage region for storing the index data and a font storage region for storing the font data according to the index data and the data amount of the font data corresponding to the target menu bar to be displayed; A storage control unit, used for storing the index data and the character library data in the index storage area and the character library storage area respectively; An index reading unit, used for reading the index data stored in the index storage area into the index buffer memory when the display stage of the preset display device is in the blanking area; A character library reading unit, configured to read character library data matching the index data in the character library storage area according to the index data stored in the index buffer memory when the display stage of the preset display device is in the display area; The character library processing unit is used to generate video data corresponding to the target menu bar according to the character library data matching the index data read by the character library reading unit, so as to display the target menu bar on the preset display device according to the video data.
9. An electronic device, characterized in that: include: one or more processors; A storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7; One or more I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.
10. A computer readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 7.