Display area content updating method and device based on table template, electronic equipment and storage medium
By dividing the display area of the LED screen into cells in the table template, and determining the corresponding cell identifiers to be updated based on the sub-region to be updated, and directly updating the corresponding cell data, the problem of regenerating and drawing the entire display area when updating local content in the existing technology is solved, and faster and more efficient content updates are achieved.
Patent Information
- Application Number
- CN202411781675.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-18
AI Technical Summary
When the prior art updates the local content of the LED screen, it is necessary to regenerate and draw the content of the entire display area, resulting in a lot of time consumption and causing lag or black screen.
By dividing the display area into cells in the table template and determining the corresponding cell identification to be updated based on the sub-region to be updated, the corresponding cell data is directly updated, thereby realizing the update of local content without redrawing the entire display area.
Improve the efficiency of content updates, avoiding the problems of time waste, lag or black screen, and making the update process faster and more efficient.
Smart Images

Figure CN119647440A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for updating content in a display area based on a table template. Background Art
[0002] At present, when displaying content on an LED screen, some key lines are used to assist in displaying the content in order to better display it. If you want to update the local content displayed on the entire LED screen, the existing technology requires that all the displayed content be regenerated, and then texture drawing and rendering are performed again. However, this method takes a lot of time, especially when there is less content to be updated and too much overall display content. This method of regenerating and drawing all will cause the LED display screen to appear obvious freezes due to the long time consumed, or even a black screen visible to the naked eye. Summary of the invention
[0003] The present invention provides a display area content updating method, device, electronic device and storage medium based on a table template, which can complete the updating of the display content of the sub-area to be updated from a local dimension, avoid redrawing the display content of the entire display area, and make the content updating efficiency faster and more efficient.
[0004] In a first aspect, the present invention provides a method for updating content in a display area based on a table template, comprising:
[0005] Determine the cells to be updated corresponding to the sub-areas to be updated in the display area in the table template; wherein the display area is divided according to the cells contained in the table template, so that the sub-areas obtained after the display area is divided correspond to the cells in the table template one by one; and the sub-areas in the display area are used for content display;
[0006] Determine the to-be-updated cell identifier corresponding to the to-be-updated cell in the table template;
[0007] The display content of the sub-area to be updated is updated based on the to-be-updated cell identifier.
[0008] In a second aspect, the present invention further provides a display area content updating device based on a table template, comprising:
[0009] A to-be-updated cell determination module is used to determine the to-be-updated cell corresponding to the to-be-updated sub-region in the display area in the table template; wherein the display area is divided according to the cells contained in the table template, so that the sub-regions obtained after the display area is divided correspond to the cells in the table template one by one; and the sub-regions in the display area are used for content display;
[0010] A module for determining a cell identifier to be updated, used to determine a cell identifier to be updated corresponding to the cell to be updated in the table template;
[0011] The display content updating module is used to update the display content of the sub-area to be updated based on the cell identifier to be updated.
[0012] In a third aspect, an embodiment of the present invention further provides an electronic device, including:
[0013] one or more processors;
[0014] a storage device for storing one or more programs,
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the display area content updating method based on the table template as provided in any embodiment of the present invention.
[0016] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute a display area content updating method based on a table template as provided in any embodiment of the present invention.
[0017] The technical solution provided by the present invention determines the cells to be updated corresponding to the sub-areas to be updated in the table template in the display area; wherein the display area is divided according to the cells contained in the table template, so that the sub-areas obtained after the display area is divided correspond to the cells in the table template one by one; the sub-areas in the display area are used for content display; the cell identifiers to be updated corresponding to the cells to be updated in the table template are determined; and the display content of the sub-areas to be updated is updated based on the cell identifiers to be updated. With the solution of the present invention, the display area is divided according to the cells contained in the table template, so that when the display content of the display area is updated, the cell identifiers to be updated corresponding to the sub-areas to be updated are directly locked, and the data corresponding to the cells to be updated are updated, thereby completing the update of the display content of the sub-areas to be updated from a local dimension. In this way, the redrawing of the display content of the entire display area is avoided, making the content update efficiency faster and more efficient, without wasting much drawing time, and avoiding the generation of black screen problems.
[0018] The above invention content is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages and aspects of the embodiments of the present invention will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0020] Figure 1 It is a flow chart of a method for updating content in a display area based on a table template provided in an embodiment of the present invention;
[0021] Figure 2 This is a schematic diagram of setting an initial cell identifier for each cell in a table template provided by an embodiment of the present application;
[0022] Figure 3 It is a flow chart of another method for updating content in a display area based on a table template provided by an embodiment of the present invention;
[0023] Figure 4 It is a structural schematic diagram of a display area content updating device based on a table template provided by an embodiment of the present invention;
[0024] Figure 5It is a structural schematic diagram of an electronic device for implementing a method for updating content in a display area based on a table template provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0026] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0027] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0028] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0029] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0030] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0031] Figure 1The present invention provides a flowchart of a method for updating the content of a display area based on a table template. The present invention is applicable to the case of updating the content displayed on an LED screen. The method can be executed by a display area content updating device based on a table template. The display area content updating device based on a table template can be implemented in the form of software and / or hardware, and is generally integrated on any electronic device with a network communication function, which can be a mobile terminal, a PC or a server, etc. Figure 1 As shown, the display area content updating method based on the table template of the embodiment of the present invention may include the following process:
[0032] S110. Determine the cells to be updated in the table template corresponding to the sub-areas to be updated in the display area; wherein the display area is divided according to the cells contained in the table template, so that the sub-areas obtained after the display area is divided correspond to the cells in the table template one by one; and the sub-areas in the display area are used for content display.
[0033] The display area is an area where content can be displayed. For example, the display area can be an area in an LED screen where content can be displayed. The sub-area to be updated is an area in the display area where the displayed content needs to be updated. The sub-area to be updated can be a part of the display area or the entire display area. The sub-area to be updated can be determined based on actual needs. The table template is a pre-set template, which is specifically presented as a table structure and style. The table template has different rows and columns, and each cell is formed between the rows and columns.
[0034] Specifically, the display area can be divided according to the cells included in the table template, so that the sub-areas obtained after the display area is divided correspond to the cells in the table template. For example, if the table template is a 9*6 table, that is, it has 9 rows and 6 columns, then after the display area is divided according to the cells included in the 9*6 table template, the display area will also be divided into 9*6 sub-areas, and each sub-area corresponds to each cell in the table template. For example, the sub-area in the first row and second column of the display area corresponds to the cell in the first row and second column of the table template; the sub-area in the fifth row and fifth column of the display area corresponds to the cell in the fifth row and fifth column of the table template, etc. After division, each sub-area in the display area can be used to display content. For example, the displayed content can be text, pictures, numbers, etc.
[0035] It should be noted that the table template used for reference to divide the display area can be pre-set based on the size ratio of the display area, so that the length-to-width ratio of the table template is the same as the length-to-width ratio of the display area, thereby making it more reasonable and reliable when dividing the display area according to the table template.
[0036] As an optional but non-limiting implementation, the process of determining the table template may include the following steps A1-A4:
[0037] Step A1: Divide the table template into cells based on preset rules; wherein the preset rules include the number of rows and columns into which the table is divided, and the width information and height information of the divided cells.
[0038] Among them, the preset rules are the division rules for what style of cells the table template is divided into, and the preset rules include the number of rows and columns into which the table is divided, and the width information and height information of the divided cells. The total number of cells that can be divided can be determined based on the number of rows and columns. The width information and height information of the divided cells can reflect the height information of a row of cells and the width information of a column of cells, wherein the width information and height information of the divided cells can be in the form of a ratio. The preset rules can be differentiated based on actual scenario requirements.
[0039] For example, after creating a table template with the same aspect ratio as the display area, the preset rule can be set to: divide into 2 rows and 2 columns, the ratio of the width information of the cells in the first column to the width information of the cells in the second column is 5:4, and the height information of the cells in each row is consistent. This means that for the table template, 2 rows are divided in the vertical direction, and the spacing between the two divided rows is equal; 2 columns are divided in the horizontal direction, and the ratio between the two divided columns is 5:4. Then, based on such preset rules, the table template can be divided to divide 4 cells that meet the requirements.
[0040] It should be noted that the process of dividing the table template into multiple cells can be divided into equal intervals or non-equal intervals, which needs to be determined based on the specific requirements in the preset rules. However, it is necessary to ensure that the height information between the cells in each row is consistent, and the width information between the cells in each column is consistent.
[0041] Step A2: Set the initial cell identifier for each cell in the table template in turn according to the default encoding rule.
[0042] The coding rule reflects the way or combination order in which the cell identification is set for each cell. For example, the default coding rule may be to set the cell identification for the cell according to the row number information and column number information of the cell. Then, according to this default coding rule, the cell identification of the cell at the 1st row and 1st column may be "1-1", the cell identification of the cell at the 1st row and 2nd column may be "1-2", the cell identification of the cell at the 2nd row and 1st column may be "2-1", and the cell identification of the cell at the 2nd row and 2nd column may be "2-2". Figure 2 As shown, Figure 2 It is a schematic diagram of setting an initial cell identifier for each cell in a table template provided in an embodiment of the present application.
[0043] Therefore, the cell identifiers of the cells in the table template may be set in sequence according to the default encoding rules, and the cell identifiers obtained in this process may be used as the initial cell identifiers of the cells.
[0044] Step A3: receiving configuration operations for at least two cells of the same type, wherein the configuration operations are used to modify the configurations of at least two cells of the same type to have the same cell identifier as the final cell identifier; the display contents of the sub-regions corresponding to the cells of the same type are completely consistent.
[0045] Among them, the configuration operation can be initiated by the user, and the configuration operation is used to modify the cell identification information configuration of at least two cells of the same type to the same cell identification. If the display contents between the sub-areas corresponding to at least two cells are completely consistent, that is, the display contents of these sub-areas on the display area are completely consistent, then these corresponding cells are cells of the same type. For example, the word "Platform" in "Platform 1" and "Platform 2" in the display information on the LED screen in the waiting hall; for another example, the words "year", "month", "day" and so on when displaying time information on the LED display screen. It can be seen that the cells in the table template corresponding to these sub-areas of the display area with exactly the same display contents can be judged to belong to the same type of cells. The same type of cells will only be generated when there are at least two cells.
[0046] Specifically, for at least two cells of the same type, the cell identifiers of the at least two cells of the same type can be modified to the same cell identifier based on the configuration operation, and used as the final cell identifier of these cells of the same type. The modified cell identifier can be one selected from the initial cell identifiers corresponding to each cell of the same type; or it can be a newly created cell identifier, and the newly created cell identifier is different from the initial cell identifiers of all cells in the table template.
[0047] It should be noted that at least two cells with completely identical display contents between the sub-regions corresponding to the cells are a group of similar cells, while different groups of similar cells will be formed between the cells of the table template. The display contents of the sub-regions corresponding to the similar cells belonging to the same group are completely identical, while the display contents of the sub-regions corresponding to the similar cells belonging to different groups are inconsistent. At the same time, when the initial cell identification of the similar cells is configured and modified, the modification should be made between the similar cells of the same group. Between the similar cells of different groups, the final cell identification after modification should also avoid conflicts with the existing cell identification. In this way, it can be ensured that the same cell identification can be used between the similar cells, and can also be distinguished from other cell identifications.
[0048] Step A4: Associating each cell with corresponding cell identification information.
[0049] After the identification of the same type of cells is configured and modified, each cell can be associated with the corresponding final cell identification information. After the association, each cell has its own corresponding cell identification.
[0050] S120: Determine the to-be-updated cell identifier corresponding to the to-be-updated cell in the table template.
[0051] Specifically, since the cell to be updated corresponding to the sub-area to be updated in the display area in the table template has been determined, it is equivalent to knowing the row information and column information of the cell to be updated in the entire table template, and then the cell identifier to be updated corresponding to the cell to be updated in the table template can be determined based on the row information and column information of the cell to be updated in the entire table template.
[0052] It should be noted that the above solution may determine at least one cell to be updated based on the new sub-region. When determining the identifier of the cell to be updated, the corresponding cell identifier to be updated is determined for each cell to be updated.
[0053] S130: Update the display content of the sub-area to be updated based on the identifier of the cell to be updated.
[0054] After determining the identity of the cell to be updated, it is equivalent to locking the cell display data corresponding to the cells that need to be updated. Among them, the cell display data is essentially the data content that needs to be displayed in the sub-area corresponding to the cell. Then, when the display content of the sub-area to be updated is updated, the latest cell display data corresponding to the cell to be updated can be called based on the updated cell, so as to realize the update of the display content of the sub-area to be updated.
[0055] The technical solution provided by the present invention determines the cells to be updated corresponding to the sub-areas to be updated in the table template in the display area; wherein the display area is divided according to the cells contained in the table template, so that the sub-areas obtained after the display area is divided correspond to the cells in the table template one by one; the sub-areas in the display area are used for content display; the cell identifiers to be updated corresponding to the cells to be updated in the table template are determined; and the display content of the sub-areas to be updated is updated based on the cell identifiers to be updated. With the solution of the present invention, the display area is divided according to the cells contained in the table template, so that when the display content of the display area is updated, the cell identifiers to be updated corresponding to the sub-areas to be updated are directly locked, and the data corresponding to the cells to be updated are updated, thereby completing the update of the display content of the sub-areas to be updated from a local dimension. In this way, the redrawing of the display content of the entire display area is avoided, making the content update efficiency faster and more efficient, without wasting much drawing time, and avoiding the generation of black screen problems.
[0056] Figure 3 This is a flow chart of another method for updating the content of a display area based on a table template provided by an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of updating the display content of the sub-area to be updated based on the to-be-updated cell identifier in the above embodiment on the basis of the technical solution of the above embodiment. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 3 As shown, the display area content updating method based on the table template of the embodiment of the present invention may include the following process:
[0057] S310. Determine the cells to be updated in the table template corresponding to the sub-areas to be updated in the display area; wherein the display area is divided according to the cells contained in the table template, so that the sub-areas obtained after the display area is divided correspond to the cells in the table template one by one; and the sub-areas in the display area are used for content display.
[0058] S320: Determine the to-be-updated cell identifier corresponding to the to-be-updated cell in the table template.
[0059] S330. Search the key pool for the corresponding cell display data to be updated based on the cell identifier to be updated, wherein the key pool is used to store the corresponding relationship between each cell identifier and the cell display data, as well as each cell display data.
[0060] Among them, the key pool is used to store the correspondence between each cell identifier and the cell display data, as well as to store each cell display data. Among them, the cell display data is essentially the data content that needs to be displayed in the sub-area corresponding to the cell. For example, the data stored in the key pool can be "cell position: first row, first column; cell identifier: 1-1; cell display data: data a", etc. It should be noted that the cell display data corresponding to each cell stored in the key pool are all the latest display data. Specifically, the cell display data in the key pool can be updated based on the data update request, so that each sub-area of the display area has updated data before the corresponding cell display data is called through the key pool.
[0061] Specifically, after the identifier of the cell to be updated is determined, the corresponding cell display data to be updated can be searched in the key pool based on the identifier of the cell to be updated.
[0062] S340: overwrite the cell display data originally stored corresponding to the cell to be updated in the table template in the memory based on the cell display data to be updated.
[0063] Specifically, the memory stores the cell display data corresponding to each cell of the table template. After determining the cell display data to be updated, that is, determining the latest data to be displayed corresponding to the cell to be updated, the cell display data originally stored in the memory corresponding to the relevant cell to be updated can be overwritten. After overwriting, the cell display data stored in the memory related to the cell to be updated will all be the latest cell display data.
[0064] As an optional but non-limiting implementation, overwriting the cell display data originally stored corresponding to the cell to be updated in the table template in the memory based on the cell display data to be updated includes the following steps B1-B3:
[0065] Step B1: Determine the relative position of the cell to be updated in the table template; wherein the cell display data corresponding to each cell in the table template is stored in a continuous address section in the memory according to a preset order.
[0066] The relative position is the position of the cell to be updated in the table template, and can be determined based on the row information and column information of the cell to be updated.
[0067] At the same time, the cell display data corresponding to each cell in the table template is stored in a continuous address in the memory in a preset order. The preset order can be that each row is processed in order from left to right, and different rows are processed row by row. For example, when storing the cell display data of each cell of the table template in the memory, for each cell in the first row, it can be stored in sequence from left to right. After all the cells in the first row are stored, the storage of each cell in the second row begins. For each cell in the second row, it continues to be stored in sequence from left to right... and so on, the cell display data of all cells in the table template can be stored. In addition, this cell display data is stored in a continuous address in the memory.
[0068] Step B2: Based on the relative position, the storage address of the cell display data of the first cell in the table template and the storage space size of each cell display data, determine the physical address corresponding to the cell to be updated.
[0069] The first cell in the table template can be determined based on the preset order in which the cell display data of each cell is stored in the memory. For example, referring to the above example of the preset order, the first cell in the corresponding table template is the cell in the first row and the first column. The storage space size of each cell display data can be fixed and the same, for example, the storage space of each cell display data can be set to 4 bytes.
[0070] Specifically, the storage address of the cell display data of the first cell can be determined based on the starting address allocated when the table template is stored in the memory, and the relative position information can essentially reflect the cell number of the cell to be updated when it is stored in the memory, and also determines the storage space size of each cell display data. Then, the physical address corresponding to the cell to be updated can be determined based on the relative position, the storage address of the cell display data of the first cell in the table template, and the storage space size of each cell display data.
[0071] Step B3: Based on the physical address, the cell display data originally stored in the memory corresponding to the cell to be updated is overwritten and replaced with the cell display data to be updated.
[0072] After the physical address corresponding to the cell to be updated in the memory is determined, the cell display data originally stored corresponding to the cell to be updated in the memory can be overwritten and replaced with the cell display data to be updated based on the physical address.
[0073] S350 , performing texture drawing and displaying on the display content of the sub-area to be updated based on the covered cells to be updated.
[0074] After the cell display data stored in the memory of the cell to be updated is updated, that is, after the display data of the cell to be updated is updated in the memory, since the display data of the cell to be updated corresponding to the sub-area to be updated has been updated in the memory, when the display content of the sub-area to be updated is displayed, the display data of the cell to be updated in the memory can be called, and the texture of the cell display data to be updated can be drawn. After the drawing is completed, it can be displayed as the display content of the sub-area to be updated, thereby realizing the update of the content of the display area.
[0075] As an optional but non-limiting implementation, before updating the display content of the sub-area to be updated based on the to-be-updated cell identifier, the display area content updating method based on the table template of this embodiment further includes the following steps C1-C3:
[0076] Step C1: receiving an update request for a sub-region to be updated in the display region, wherein the update request includes an identifier of a cell to be updated and display data of the cell to be updated.
[0077] Specifically, the update request for the sub-area to be updated in the display area can be initiated by the user to update the display content of the display area. The update request includes the cell identifier to be updated and the cell display data to be updated. For example, the update request can be: update the content corresponding to the cell with the cell identifier "1-2" and modify the cell display data to data d.
[0078] Specifically, after receiving an update request for a sub-region to be updated in the display region, it can be parsed that the update request contains a cell identifier to be updated and display data of the cell to be updated.
[0079] Step C2: Based on the identifier of the cell to be updated, search the key pool for the original corresponding cell display data of the cell to be updated.
[0080] Specifically, based on the identifier of the cell to be updated contained in the parsed update request, a search can be performed in the key pool to find all cells with the same identifier as the cell to be updated, and the cells found are the determined cells to be updated. It should be noted that the cell to be updated found can be a unique cell with the same identifier as the cell to be updated, or it can be at least two cells with the same identifier as the cell to be updated. Such at least two cells are the same type of cells mentioned above, and these same type of cells have the same cell identifier. If such a cell of the same type is found, it means that the same content needs to be updated for these cells of the same type.
[0081] After determining the cell to be updated, the original corresponding cell display data of the cell to be updated can be searched in the key pool.
[0082] Step C3: Replace the original corresponding cell display data of the cell based on the cell display data to be updated.
[0083] Specifically, according to the updated cell display data parsed from the update request, the original corresponding cell display data of the cell can be replaced. After the replacement is completed, all relevant information stored in the key pool can be the latest information, so that when the display content of the sub-area to be updated is updated later, the key pool can be used as a reference to find the latest data from the key pool.
[0084] As an optional but non-limiting implementation method, after receiving an update request for a sub-area to be updated in the display area, the display area content update method based on a table template of this embodiment also includes: based on the identifier of the cell to be updated in the update request, adding one to the number label of the cell to be updated; wherein the number label is used to reflect the number of times the cell is updated.
[0085] Specifically, each cell in the key pool has a timestamp, which is used to reflect the number of times the cell has been updated. Each time an update request is received, the timestamp corresponding to the cell to be updated found can be incremented based on the cell identifier to be updated in the update request.
[0086] As an optional but non-limiting implementation, searching the key pool for the corresponding to-be-updated cell display data based on the to-be-updated cell identifier may include the following steps D1-D3:
[0087] Step D1: When the display content in the display area is refreshed, it is determined whether the timestamp of each cell in the key pool at the current moment is the same as the timestamp at the last refresh.
[0088] Specifically, the display content of the display area can be refreshed according to a fixed period, for example, the screen can be refreshed at a period of 1 second. When the display content of the display area is refreshed, it can be determined whether the number of times labels of each cell in the key pool at the current moment are the same as the number of times labels at the last screen refresh.
[0089] Step D2: If there are cells with different values, the cells with different values are used as cells to be updated, and the cell display data corresponding to the cells to be updated are called from the key pool to update the display content of the display area.
[0090] Specifically, if the value of the number of cells' labels is different, it means that before the current screen refresh, the cell display data of some cells in the key pool has changed. In this case, when the screen is refreshed, the updated content needs to be updated in the display area. Specifically, cells with different values can be used as cells to be updated, and the latest cell display data corresponding to the cells to be updated can be called from the key pool to update the display content of the display area.
[0091] Step D3: If the values of each cell are the same, the display area continues to display the display content after the last screen refresh.
[0092] Specifically, if the timestamps of each cell have the same value, it means that no data change has been sent between the current screen refresh and the last screen refresh, and the display area can continue to display the content after the last screen refresh.
[0093] The technical solution provided by the present invention determines the cell to be updated corresponding to the sub-area to be updated in the display area in the table template; wherein the display area is divided according to the cells contained in the table template, so that the sub-areas obtained after the display area is divided correspond to the cells in the table template one by one; the sub-areas in the display area are used for content display; the cell identifier to be updated corresponding to the cell to be updated in the table template is determined; the corresponding cell display data to be updated is searched in the key pool based on the cell identifier to be updated; the cell display data originally stored corresponding to the cell to be updated in the table template in the memory is overwritten based on the cell display data to be updated; the display content of the sub-area to be updated is textured and displayed based on the overwritten cell to be updated. With the solution of the present invention, the display area is divided according to the cells contained in the table template, so that when the display content of the display area is updated, the cell identifier to be updated corresponding to the sub-area to be updated is directly locked, so that the cell display data to be updated can be determined from the key pool, and the original cell display data is overwritten and textured and displayed, so as to achieve the update of the display content of the sub-area to be updated from a local dimension. This avoids redrawing the display content of the entire display area, making the content update efficiency faster and more efficient, without wasting too much drawing time, and also avoiding the occurrence of black screen problems.
[0094] Figure 4The present invention provides a schematic diagram of a display area content updating device based on a table template according to an embodiment of the present invention. The present invention is applicable to the case of updating the display content of an LED screen. The display area content updating device based on a table template can be implemented in the form of software and / or hardware, and is generally integrated in any electronic device with a network communication function, such as a mobile terminal, a PC or a server. Figure 4 As shown, the display area content updating device based on the table template of the embodiment of the present invention may include a to-be-updated cell determination module 410, a to-be-updated cell identification determination module 420 and a display content updating module 430. Among them:
[0095] The to-be-updated cell determination module 410 is used to determine the to-be-updated cell corresponding to the to-be-updated sub-region in the display area in the table template; wherein the display area is divided according to the cells contained in the table template, so that the sub-regions obtained after the display area is divided correspond to the cells in the table template one by one; and the sub-regions in the display area are used for content display;
[0096] A to-be-updated cell identifier determining module 420 is used to determine a to-be-updated cell identifier corresponding to the to-be-updated cell in the table template;
[0097] The display content updating module 430 is used to update the display content of the sub-region to be updated based on the identifier of the cell to be updated.
[0098] As an optional but non-limiting implementation, the display content update module 430 includes a data search unit, a data overlay unit and a data drawing unit.
[0099] A data search unit, used for searching the corresponding cell display data to be updated in the key pool based on the cell identifier to be updated, wherein the key pool is used for storing the corresponding relationship between each cell identifier and the cell display data, as well as each cell display data;
[0100] A data overwriting unit, used for overwriting the cell display data originally stored corresponding to the cell to be updated in the table template in the memory based on the cell display data to be updated;
[0101] The data drawing unit is used to perform texture drawing and display on the display content of the sub-area to be updated based on the covered cells to be updated.
[0102] As an optional but non-limiting implementation, the data overwriting unit includes a relative position determination subunit, a physical address determination subunit and a data overwriting subunit.
[0103] A relative position determination subunit, used to determine the relative position of the to-be-updated cell in the table template; wherein the cell display data corresponding to each cell in the table template is stored in a continuous address section in the memory in a preset order;
[0104] A physical address determination subunit, used to determine the physical address corresponding to the cell to be updated based on the relative position, the storage address of the cell display data of the first cell in the table template, and the storage space size of each cell display data;
[0105] The data overwriting subunit is used to overwrite and replace the cell display data originally stored corresponding to the cell to be updated in the memory with the cell display data to be updated based on the physical address.
[0106] As an optional but non-limiting implementation method, the display area content updating device based on the table template of an embodiment of the present invention also includes a key pool update module, which is specifically used to: receive an update request for a sub-area to be updated in the display area, the update request including a cell identifier to be updated and cell display data to be updated; search the key pool for the cell display data originally corresponding to the cell to be updated based on the cell identifier to be updated; and replace the cell display data originally corresponding to the cell based on the cell display data to be updated.
[0107] As an optional but non-limiting implementation method, the display area content updating device based on the table template of an embodiment of the present invention also includes a number label processing module, which is used to add one to the number label of the cell to be updated based on the identifier of the cell to be updated in the update request; wherein the number label is used to reflect the number of times the cell is updated.
[0108] As an optional but non-limiting implementation method, the key pool update module is used to search the corresponding cell display data to be updated in the key pool based on the cell identifier to be updated, specifically including: when the display content of the display area is refreshed, determine whether the number label of each cell in the key pool at the current moment is the same as the number label at the last screen refresh; if there are cells with different values, the cells with different values are used as cells to be updated, and the cell display data corresponding to the cell to be updated is called from the key pool to update the display content of the display area; if the values of each cell are the same, the display area continues to display the display content after the last screen refresh.
[0109] As an optional but non-limiting implementation method, the display area content updating device based on the table template of an embodiment of the present invention also includes a table template determination module, which is specifically used to: divide the table template into individual cells based on preset rules; wherein the preset rules include the number of rows and columns of the table division, and the width information and height information of the divided cells; set an initial cell identification for each cell in the table template in turn according to the default encoding rules; receive a configuration operation on at least two similar cells, the configuration operation is used to modify the at least two similar cell configurations to the same cell identification, and use it as the final cell identification; the display content between the sub-areas corresponding to the similar cells is completely consistent; and associate each cell with the corresponding cell identification information.
[0110] The technical solution provided by the present invention is a to-be-updated cell determination module, which is used to determine the to-be-updated cell corresponding to the to-be-updated sub-area in the display area in the table template; wherein the display area is divided according to the cells contained in the table template, so that the sub-areas obtained after the display area is divided correspond to the cells in the table template one by one; the sub-areas in the display area are used for content display; the to-be-updated cell identification determination module is used to determine the to-be-updated cell identification corresponding to the to-be-updated cell in the table template; the display content update module is used to update the display content of the to-be-updated sub-area based on the to-be-updated cell identification. With the solution of the present invention, the display area is divided according to the cells contained in the table template, so that when the display content of the display area is updated, the to-be-updated cell identification corresponding to the to-be-updated sub-area is directly locked, and the data corresponding to the to-be-updated cell is updated, thereby completing the update of the display content of the to-be-updated sub-area from a local dimension. In this way, the redrawing of the display content of the entire display area is avoided, so that the content update efficiency is faster and more efficient, without wasting more drawing time, and the generation of black screen problems can be avoided.
[0111] The display area content updating device based on a table template provided in the embodiment of the present invention can be used to execute the display area content updating method based on a table template, and has corresponding functional modules and beneficial effects for executing the display area content updating method based on a table template.
[0112] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.
[0113] Figure 5A schematic diagram of the structure of an electronic device for implementing a method for updating content in a display area based on a table template provided by an embodiment of the present invention. Figure 5 , which shows a schematic diagram of the structure of an electronic device 510 suitable for implementing an embodiment of the present invention. The terminal device in the embodiment of the present invention may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0114] like Figure 5 As shown, the electronic device 510 includes at least one processor 511, and a memory connected to the at least one processor 511 in communication, such as a read-only memory (ROM) 512, a random access memory (RAM) 513, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 511 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 512 or the computer program loaded from the storage unit 518 to the random access memory (RAM) 513. In the (RAM) 513, various programs and data required for the operation of the electronic device 510 can also be stored. The processor 511, (ROM) 512 and (RAM) 513 are connected to each other via a bus 514. An input / output (I / O) interface 515 is also connected to the bus 514.
[0115] A number of components in the electronic device 510 are connected to the I / O interface 515, including: an input unit 516, such as a keyboard, a mouse, etc.; an output unit 517, such as various types of displays, speakers, etc.; a storage unit 518, such as a disk, an optical disk, etc.; and a communication unit 519, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 519 allows the electronic device 510 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0116] The processor 511 may be any general and / or dedicated processing component with processing and computing capabilities. Some examples of the processor 511 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 511 executes the display area content update method based on the table template provided in any embodiment of the present invention.
[0117] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the display area content update method based on the table template shown in the flowchart. When the computer program is executed by a processing device, the above functions defined in the display area content update method based on the table template of the embodiment of the present invention are executed.
[0118] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0119] The electronic device provided in the embodiment of the present invention and the display area content updating method based on the table template provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0120] An embodiment of the present invention provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the display area content updating method based on a table template provided in the above embodiment is implemented.
[0121] It should be noted that the computer-readable medium of the present invention can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0122] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0123] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0124] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0125] The units involved in the embodiments of the present invention may be implemented by software or hardware, wherein the name of a unit does not limit the unit itself in some cases.
[0126] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0127] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0128] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the disclosure scope involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.
[0129] In addition, although each operation is described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present invention. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0130] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for updating content in a display area based on a table template, characterized in that: The method comprises: Determine the cells to be updated corresponding to the sub-areas to be updated in the display area in the table template; wherein the display area is divided according to the cells contained in the table template, so that the sub-areas obtained after the display area is divided correspond to the cells in the table template one by one; and the sub-areas in the display area are used for content display; Determine the to-be-updated cell identifier corresponding to the to-be-updated cell in the table template; The display content of the sub-area to be updated is updated based on the to-be-updated cell identifier.
2. The method according to claim 1, characterized in that: The updating of the display content of the sub-region to be updated based on the to-be-updated cell identifier includes: Searching for corresponding cell display data to be updated in a key pool based on the cell identifier to be updated, wherein the key pool is used to store the corresponding relationship between each cell identifier and the cell display data, as well as each cell display data; Overwriting the cell display data originally stored corresponding to the cell to be updated in the table template in the memory based on the cell display data to be updated; The display content of the sub-area to be updated is textured and displayed based on the covered cells to be updated.
3. The method according to claim 2, characterized in that The overwriting of the cell display data originally stored corresponding to the cell to be updated in the table template based on the cell display data to be updated includes: Determine the relative position of the cell to be updated in the table template; wherein the cell display data corresponding to each cell in the table template is stored in a continuous address section in the memory according to a preset order; Determine the physical address corresponding to the cell to be updated based on the relative position, the storage address of the cell display data of the first cell in the table template, and the storage space size of each cell display data; Based on the physical address, the cell display data originally stored corresponding to the cell to be updated in the memory is overwritten and replaced with the cell display data to be updated.
4. The method according to claim 2, characterized in that: Before updating the displayed content of the sub-region to be updated based on the to-be-updated cell identifier, the method further includes: Receive an update request for a sub-region to be updated in the display region, wherein the update request includes an identifier of a cell to be updated and display data of the cell to be updated; Based on the to-be-updated cell identifier, searching the key pool for the cell display data originally corresponding to the to-be-updated cell; The cell display data originally corresponding to the cell is replaced based on the cell display data to be updated.
5. The method according to claim 4, characterized in that After receiving an update request for a sub-area to be updated in the display area, the method further includes: Based on the to-be-updated cell identifier in the update request, adding one to the number tag of the to-be-updated cell; The number label is used to reflect the number of times the cell is updated.
6. The method according to claim 5, characterized in that Searching the key pool for corresponding to-be-updated cell display data based on the to-be-updated cell identifier includes: When the display content of the display area is refreshed, it is determined whether the timestamp of each cell in the key pool at the current moment is the same as the timestamp at the last refresh; If there are cells with different values, the cells with different values are used as cells to be updated, and the cell display data corresponding to the cells to be updated are called from the key pool to update the display content of the display area; If the values of each cell are the same, the display area continues to display the display content after the last screen refresh.
7. The method according to claim 1, characterized in that The process of determining the form template includes: Dividing the table template into cells based on preset rules; wherein the preset rules include the number of rows and columns into which the table is divided, and the width information and height information of the divided cells; According to the default coding rules, set the initial cell identifier for each cell in the table template in turn; Receiving a configuration operation for at least two cells of the same type, wherein the configuration operation is used to modify the configuration of the at least two cells of the same type to have the same cell identifier as a final cell identifier; and display contents of the sub-regions corresponding to the cells of the same type are completely consistent; Associate each cell with corresponding cell identification information.
8. A display area content updating device based on a table template, characterized in that: The device comprises: A to-be-updated cell determination module is used to determine the to-be-updated cell corresponding to the to-be-updated sub-region in the display area in the table template; wherein the display area is divided according to the cells contained in the table template, so that the sub-regions obtained after the display area is divided correspond to the cells in the table template one by one; and the sub-regions in the display area are used for content display; A module for determining a cell identifier to be updated, used to determine a cell identifier to be updated corresponding to the cell to be updated in the table template; The display content updating module is used to update the display content of the sub-area to be updated based on the cell identifier to be updated.
9. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the display area content updating method based on the table template as described in any one of claims 1 to 7.
10. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the display area content updating method based on the table template as described in any one of claims 1 to 7 when executed by a computer processor.