Table presentation method and device, equipment and storage medium

By creating tables on the electronic artboard and updating the table line position in real time using the table memory model, the problem of inefficient table updates in the existing technology is solved, and more efficient table management and updates are achieved.

CN119886077APending Publication Date: 2025-04-25GUANGZHOU SHIZHEN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311337581.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art is less efficient when updating tables, resulting in inefficient cell position determination and table update.

Method used

By creating a table on the canvas interface of the electronic artboard and detecting the movement of the target line in real time, the table memory model is used to obtain the new position of the target line and update the table line position with consistent attributes to achieve efficient update of the table.

Benefits of technology

Improves the efficiency of table updates, reduces the repetition of cell position calculations, and improves the efficiency and accuracy of creating and managing tables on electronic artboards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886077A_ABST
    Figure CN119886077A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a table presentation method, device and equipment and a storage medium, and the scheme comprises the steps that a table is created on a canvas interface of an electronic drawing board, and the table is configured with a plurality of row lines and a plurality of column lines which are arranged according to a determinant; when it is detected that a target line moves, a target position after the target line moves and a table memory model of the table are obtained, and the attribute of the target line can be a row line or a column line; according to the table memory model and the target position, updating the position of a table line of which the attribute is consistent with that of the target line in the table to obtain an updated table; and controlling the electronic drawing board to present the updated table. By means of the method, unified calculation and management of the attributes of the table in the electronic drawing board are achieved through the table memory model, the situation that other models conduct repeated calculation on the attributes of the table is avoided, and the table updating efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a table presentation method, device, equipment and storage medium. Background Art

[0002] In the collaborative drawing board, users can use the table component set in the collaborative drawing board to build a self-typesetting table with information blocks such as sticky notes and text boxes. The table contains multiple cells, each of which can hold different information blocks.

[0003] In the related art, each cell is configured with a corresponding cell external storage model, and the cell location, width calculation, and height calculation all rely on the cell external storage model. When the position of a cell changes, the collaborative drawing board can locate the position of the cell according to the cell external storage model of each cell, thereby updating the table. Since each cell relies on its own cell external storage model to calculate its position individually, this will cause multiple cells to repeatedly calculate the same row and column values. For example, when the position of cells in the same column changes, each cell in the same column will operate individually according to the same column value, resulting in low efficiency in determining the cell position, which in turn leads to low efficiency in updating the table. Summary of the invention

[0004] An object of an embodiment of the present invention is to provide a table presentation method, apparatus, device and storage medium, so as to solve the technical problem of low efficiency in updating tables in related technologies.

[0005] In a first aspect, an embodiment of the present invention provides a table presentation method, comprising:

[0006] Creating a table on the canvas interface of the electronic drawing board, wherein the table is configured with a plurality of row lines and a plurality of column lines arranged in a determinant;

[0007] When detecting that the target line moves, obtaining the target position after the target line moves and the table memory model of the table, wherein the attribute of the target line may be a row line or a column line;

[0008] According to the table memory model and the target position, updating the position of the table line whose attribute is consistent with the target line in the table to obtain an updated table;

[0009] The electronic drawing board is controlled to present the updated table.

[0010] In combination with the first aspect, in a possible implementation method, updating the position of the table line whose attributes are consistent with the target line in the table according to the table memory model and the target position to obtain an updated table includes: obtaining the table position information of the table on the canvas interface according to the table memory model; and updating the position of the table line whose attributes are consistent with the target line in the table according to the table position information and the target position to obtain an updated table.

[0011] In combination with the first aspect, in a possible implementation method, the position of the table line whose attributes are consistent with the target line is updated in the table according to the table position information and the target position to obtain an updated table, including: according to the target position, determining a reference table line whose position needs to be updated in the table, the attributes of the reference table line are consistent with the attributes of the target line, and the position of the reference table line before being updated is an initial position; updating the position of the reference table line according to the table position information, the target position and the initial position of the reference table line to obtain an updated table.

[0012] In combination with the first aspect, in a possible implementation, determining in the table, based on the target position, a reference table line whose position needs to be updated includes: selecting a table line located on a specified side of the target position as the reference table line whose position needs to be updated.

[0013] In combination with the first aspect, in a possible implementation method, updating the position of the reference table line according to the table position information, the target position and the initial position of the reference table line to obtain an updated table includes: determining the moving direction of the target line; calculating the new position of the reference table line according to the moving direction, the table position information, the target position and the initial position of the reference table line; obtaining the initial position of a fixed table line, the fixed table line being a table line in the table whose position does not need to be updated; updating the table according to the initial position of the fixed table line and the new position of the reference table line to obtain an updated table.

[0014] In combination with the first aspect, in a possible implementation method, calculating the new position of the reference table line based on the moving direction, the table position information, the target position and the initial position of the reference table line includes: calculating the difference between the target position after the target line moves and the initial position of the target line before the target line moves to obtain an offset distance; calculating the new position of the reference table line based on the moving direction, the table position information, the offset distance and the initial position of the reference table line.

[0015] In combination with the first aspect, in a possible implementation method, the calculation of the new position of the reference table line based on the moving direction, the table position information, the offset distance and the initial position of the reference table line includes: if the moving direction is a first preset horizontal direction, the table position information is added to the initial position of the reference table line and then the offset distance is subtracted to obtain the new position of the reference table line; if the moving direction is a second preset horizontal direction, the table position information is added to the initial position of the reference table line and then the offset distance is added to obtain the new position of the reference table line, and the second preset horizontal direction is opposite to the first preset horizontal direction; if the moving direction is a first preset vertical direction, the table position information is added to the initial position of the reference table line and then the offset distance is subtracted to obtain the new position of the reference table line; if the moving direction is a second preset vertical direction, the table position information is added to the initial position of the reference table line and then the offset distance is added to obtain the new position of the reference table line, and the second preset vertical direction is opposite to the first preset vertical direction.

[0016] In a second aspect, an embodiment of the present invention provides a table presentation device, which is applied to an electronic drawing board, including:

[0017] A creating unit, configured to create a table on a canvas interface of the electronic drawing board, wherein the table is configured with a plurality of row lines and a plurality of column lines arranged in a determinant;

[0018] An acquisition unit, used for acquiring a target position after the target line moves and a table memory model of the table when detecting that the target line moves, wherein the attribute of the target line may be a row line or a column line;

[0019] An updating unit, configured to update the position of a table line having an attribute consistent with the target line in the table according to the table memory model and the target position, to obtain an updated table;

[0020] A control unit is used to control the electronic drawing board to present the updated table.

[0021] In a third aspect, an embodiment of the present invention provides an electronic drawing board, comprising: a display panel for displaying a display screen in the electronic drawing board; a camera module for capturing the display screen; a microphone array for capturing voice information; a memory; and a processor, respectively communicatively connected to the display panel, the camera module, the microphone array and the memory, wherein the processor is used to execute one or more computer programs stored in the memory, and when the processor executes the one or more computer programs, the electronic drawing board implements the table presentation method as described in any one of claims 1 to 7.

[0022] In a fourth aspect, a computer device is provided, comprising a memory and one or more processors, wherein the memory is connected to the one or more processors, and the one or more processors are used to execute one or more computer programs stored in the memory, and when the one or more processors execute the one or more computer programs, the computer device implements the method described in the first aspect.

[0023] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method as described in the first aspect.

[0024] In the scheme implemented by the above table presentation method, device, equipment and storage medium, a table is first created on the canvas interface of the electronic drawing board, wherein the table is configured with multiple row lines and multiple column lines arranged according to the determinant, and then, when the target line is detected to move, the target position after the target line moves and the table memory model of the table are obtained, and the attribute of the target line can be a row line or a column line, and then, according to the table memory model and the target position, the position of the table line whose attribute is consistent with the target line is updated in the table to obtain the updated table, and finally, the electronic drawing board is controlled to present the updated table. This method detects the movement of the target line in the table in real time, and further obtains the position of each row and column line in the table after the target line moves through the table memory model and the corresponding position of the target line, that is, the unified calculation and management of multiple row lines and multiple column lines in the table is realized through the table memory model, and the corresponding position and width and height of all row lines and column lines in the table can be obtained, so as to solve the problem of low efficiency in updating tables in related technologies and improve the efficiency and accuracy of creating and managing tables on electronic drawing boards. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0026] Figure 1A is a hardware architecture diagram of an electronic drawing board in one embodiment of the present invention;

[0027] Figure 1B It is a schematic diagram of a table in one embodiment of the present invention;

[0028] Figure 2is a flowchart of a table presentation method in one embodiment of the present invention;

[0029] Figure 3 This is a schematic diagram of creating a table in one embodiment of the present invention;

[0030] Figure 4 is a structural schematic diagram of a table presentation device in one embodiment of the present invention;

[0031] Figure 5 It is a schematic diagram of the structure of an electronic device in one embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0033] It should be noted that, if there is no conflict, the various features in the embodiments of the present invention can be combined with each other, all within the scope of protection of the present invention. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in the present invention do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0034] The technical solution of this application can be applied to various conference scenarios, such as remote conferences, etc.

[0035] The technical solution of the present application can be specifically applied to an electronic drawing board, wherein the electronic drawing board can be a flat-panel device with multifunctional imaging functions such as display, broadcasting, and recording, and can specifically be a TV screen, a display, and an electronic whiteboard, etc. For ease of understanding, the electronic drawing board of the present application is first introduced.

[0036] See also Figure 1A , Figure 1A A schematic diagram of the hardware structure of an electronic drawing board provided in an embodiment of the present application is shown in FIG. Figure 1AAs shown, the electronic drawing board 10 includes a display panel 101, a microphone array 102, a camera module 103, a processor 104 and a memory 105. The display panel 101 is used to display various displayable images collected by the electronic drawing board; the microphone array 102 is used to locate the sound source information in the scene and calculate the sound source orientation angle. The layout of the microphone array 102 can be a linear array, a planar array, or a stereo array; the camera module 103 includes at least one camera, which is mainly used to obtain scene images or video streams. It can be a fixed-focus camera, a zoom camera, or a combination of the two; the processor 104 and the memory 105 are devices for storing and processing various sensor signals, such as processing audio information collected by the microphone array 102, or processing video information collected by the camera.

[0037] Among them, Figure 1B As shown, the display panel 101 displays a canvas interface, in which a custom table can be created, such as Figure 1B As shown in the figure, a 2*2 table is created. The table contains 2 rows and 2 columns. Each row is assigned a default row height and each column is assigned a default column width. It can be divided into 4 cells in total. Each cell has an independent row and column identifier. The row identifier increases from left to right and the column identifier increases from top to bottom. For example, cell A in the first row and first column is (1,1), cell B is (1,2), cell C is (2,1), and cell D is (2,2).

[0038] In view of this, the present application proposes a table presentation method to solve the above problem, which is described in detail below.

[0039] See also Figure 2 , Figure 2 A flowchart of a table presentation method provided by an embodiment of the present invention, the method comprising the following steps:

[0040] S10. Creating a table on the canvas interface of the electronic drawing board, wherein the table is configured with a plurality of row lines and a plurality of column lines arranged in a determinant.

[0041] The canvas is a container that carries image pixels in the electronic drawing board, and its basic attribute is the size of the area, so that the images on each layer in the electronic drawing board can be overlapped to form the entire picture and presented on the canvas.

[0042] Among them, in the table configuration, multiple rows and columns are arranged according to the determinant, and multiple cells are formed according to the multiple rows and columns. Since the cell has no creation entry, only the table has a creation entry, when the table is created, the cell will be created synchronously according to the number of rows and columns of the created table, which can be as follows Figure 3As shown in the figure, the table contains multiple cells. For example, a 2*2 table is created, the width of each cell is 2, the height is 1, and the width and height are adjustable. In the figure, the horizontal coordinate of the first column line is 0, that is, the horizontal coordinate of 0 represents the first column line; the horizontal coordinate of the second column line is 2, that is, the horizontal coordinate of 2 represents the second column line; the horizontal coordinate of the third column line is 4, that is, the horizontal coordinate of 4 represents the third column line; the vertical coordinate of the first row line is 0, that is, the vertical coordinate of 0 represents the first row line; the vertical coordinate of the second row line is 1, that is, the vertical coordinate of 1 represents the second row line; the vertical coordinate of the third row line is 2, that is, the vertical coordinate of 2 represents the third row line; then the position of the cell in the first row and first column is (0,0), the position of the cell in the first row and second column is (2,0), and so on. The specific coordinates are as follows Figure 3 The row and column coordinate values ​​are shown in the middle mark.

[0043] Among them, in the above arrangement according to determinants, the number of determinants can be set by the user or directly created according to a preset number. After the number of determinants is created, the height and width corresponding to the determinant can be the preset table width and height or the user can adjust the width and height of the created table by himself, which is not limited here.

[0044] Among them, the above-mentioned multiple row lines and column lines can be moved in the canvas through movement instructions. The moving range cannot exceed the area of ​​​​the created table and can only be moved inside the table. The above-mentioned movement instructions can be obtained by users on the canvas.

[0045] It can be seen that the layout in the form of determinants in this method can keep the cell size and position in the created table consistent, making the arrangement of the table more organized, and the row and column lines arranged in the form of determinants help to separate and organize data, providing better visualization effects.

[0046] S20, when detecting that the target line moves, obtaining the target position of the target line after the movement and the table memory model of the table, wherein the attribute of the target line may be a row line or a column line.

[0047] The movement of the target line may be achieved by changing the position of the row line or column line by dragging, adjusting or other methods.

[0048] Among them, the above-mentioned table memory model is a data structure that can be operated by the program side, that is, data that can be operated from the user dimension. For example, the model can include the position setting of the table, the setting of the length, width and height, and the setting of editing operations such as deleting and adding cells in the table.

[0049] For example, the table memory model may include the following: inserting columns with optional specified positions and quantities, updating the width of specified columns, deleting columns, inserting rows with optional specified positions and quantities, updating the height of specified rows, deleting rows, inserting rows or columns according to type, setting column alignment, setting row alignment, moving columns, moving rows, etc., and no unique limitation is made here.

[0050] Based on the contents in the table memory model above, you can perform the following operations: inserting and deleting rows and columns, updating the width and height of rows and columns, setting the alignment of columns and rows, and moving columns and rows, etc., without any limitation here.

[0051] Among them, in the prior art, the cells formed in the table have their own cell external storage model. The purpose of the cell external storage model is to define the data structure of the table that is finally stored in the database in the collaborative canvas. The data structure includes defining how many rows and columns the table consists of, row id, and column id.

[0052] The attribute of the target line may be a row line or a column line. When the target line is a row line, it is represented as a horizontal line in the table; when the target line is a column line, it is represented as a vertical line in the table.

[0053] Once the movement of the target line is detected, the table memory model obtains the new position coordinates of the target line after the movement, and these coordinates represent the new horizontal position (if it is a row line) or the new vertical position (if it is a column line) of the target line.

[0054] Among them, in this scheme, since row lines and column lines may have different characteristics and behaviors, it is necessary to determine whether the attribute of the target line to be moved is a row line or a column line. For example, when the target line is a row line, the target position to be changed is the target row with the row line mark, and each corresponding cell in the target row must change position, thereby forming a new cell. The new cell only changes position, but the size of the cell itself remains unchanged, which can ensure the consistency of the table layout without misalignment or confusion, and ensure that when a new element is placed in the cell, the size will not increase or decrease with the change of position, resulting in the problem of layout misalignment of the new element.

[0055] It can be seen that by obtaining the new position of the target line, the table memory model can automatically update the position of the cell corresponding to each row and column line in the table, avoiding repeated calculation of the position through the cell's own model, thereby saving power consumption of the electronic drawing board.

[0056] S30. According to the table memory model and the target position, the position of the table line whose attributes are consistent with the target line is updated in the table to obtain an updated table.

[0057] Among them, according to the table memory model, according to the target position, the attribute corresponding to the target position is updated to obtain the new attribute of the updated target position, which can be the moved row or column. Further, the position of the corresponding table line is changed according to the moved row or column to obtain the updated table.

[0058] Among them, by traversing all rows and columns in the table, an updated table can be obtained, that is, the position, width, height, etc. of the cell do not depend on its own external storage model, but are uniformly calculated and managed in the memory model of the table. According to the characteristics of the table, the width of the cell is the width of the column it is in, the height of the cell is the height of the row it is in, the x-axis position of the cell is the x-axis position of the column it is in, and the y-axis position of the cell is the y-axis position of the row it is in. It only takes one loop through all the columns to calculate the x-axis positions of all the columns, and it only takes one loop through all the rows to calculate the y-axis positions of all the rows.

[0059] In the specific implementation, in the figure, the upper left corner of the table is used as the starting point, and a two-dimensional coordinate system is established at any point on the canvas to obtain the (X, Y) of the upper left corner of the table, and then all the row lines and column lines in the table are traversed in turn to obtain the updated table position.

[0060] It can be seen that updating the position of the table line according to the table memory model and the target position avoids repeated calculation of the position through the cell's own model, saves the power consumption of the electronic drawing board, and improves the efficiency and accuracy of creating and managing tables on the electronic drawing board.

[0061] S40: Control the electronic drawing board to present the updated table.

[0062] Among them, the updated table only has a change in position, and the size of each cell formed by each row and column in the table remains unchanged. That is, the lines or borders in the table have changed in position, but the width and height of each cell remain unchanged. After the table is re-layouted, the relative position relationship between cells is adjusted, but the size (width and height) of the cell will not change.

[0063] For example, a 2x2 table is created with 4 cells, where each cell has equal width and height of 100 pixels respectively, and the border of the first column is moved 20 pixels to the right to make more room for the content of the first column. In this case, the width of the cell remains 100 pixels, but the left border of the first column will be moved 20 pixels to the right to accommodate the content.

[0064] It can be seen that the content in the table does not need to be resized or rearranged. The layout can be changed by simply moving the position of the table lines, which helps to maintain the consistency and readability of the table.

[0065] This method detects in real time when a target line in a table moves, and further obtains the position of each row and column line in the table after the target line moves through the table memory model and the corresponding position of the target line. That is, the table memory model is used to achieve unified calculation and management of multiple row lines and multiple column lines in the table, and the corresponding positions and widths and heights of all row lines and column lines in the table can be obtained, thereby solving the problem of low efficiency in updating tables in related technologies and improving the efficiency and accuracy of creating and managing tables on electronic drawing boards.

[0066] In one embodiment, updating the position of the table line whose attributes are consistent with the target line in the table according to the table memory model and the target position to obtain the updated table includes: obtaining the table position information of the table on the canvas interface according to the table memory model; and updating the position of the table line whose attributes are consistent with the target line in the table according to the table position information and the target position to obtain the updated table.

[0067] Among them, the above-mentioned table position information represents the actual position of the table on the canvas interface, including the starting point coordinates of the table (usually the upper left corner) and the size of the table (width and height). The (X, Y) coordinate information of the upper left corner of the table can be obtained by establishing a two-dimensional coordinate system at any point in the canvas interface.

[0068] Among them, according to the table position information and the target position, all rows and columns in the table are traversed to obtain an updated table, that is, the position, width, height, etc. of the cell do not depend on its own external storage model, but are uniformly calculated and managed in the memory model of the table. According to the characteristics of the table, the width of the cell is the width of the column it is in, the height of the cell is the height of the row it is in, the x-axis position of the cell is the x-axis position of the column it is in, and the y-axis position of the cell is the y-axis position of the row it is in. It only takes one loop through all the columns to calculate the x-axis positions of all the columns, and it only takes one loop through all the rows to calculate the y-axis positions of all the rows.

[0069] For example, create a table with 3 rows and 4 columns in the canvas interface of the electronic drawing board, the width and height of each cell are equal, the height of each row is 100 pixels, the width of each column is 120 pixels, the target line position is the second row, move the second row up, that is, the height of the second row is increased to 200 pixels, the starting point coordinates of the table are (X, Y) = (50, 50), the total width of the table is 480 pixels, and the total height is 300 pixels. According to the target position, the new height of the second row is 200 pixels, and the height of the second row increases from 100 pixels to 200 pixels, while the positions and sizes of other rows and columns remain unchanged.

[0070] It can be seen that this method ensures that the position of the table line is consistent with the attributes in the table memory model, and no longer depends on the cell external memory model, so as to realize the automatic layout of the table and the position adjustment of the line to adapt to different needs and data.

[0071] In one embodiment, the updating of the position of a table line whose attributes are consistent with the target line in the table according to the table position information and the target position to obtain an updated table includes: determining, according to the target position, a reference table line whose position needs to be updated in the table, the attributes of the reference table line being consistent with the attributes of the target line, and the position of the reference table line before being updated being an initial position; and updating the position of the reference table line according to the table position information, the target position and the initial position of the reference table line to obtain an updated table.

[0072] Among them, the table lines that need to be updated are determined according to the target position, and the properties of these table lines (for example, if the target is a row line, it is the row property; if the target is a column line, it is the column property) are consistent with the properties of the target line. If it is a row line, the height of the row is updated; if it is a column line, the width of the column is updated.

[0073] The reference table lines are those table lines whose positions need to be updated. Their positions before being updated are regarded as initial positions. These table lines may be adjacent lines of the target line or other lines that need to be adjusted accordingly.

[0074] Among them, the new position of the target line is determined to be the new position in the updated table. For example, if it is a row line, the new position may be the new row height; if it is a column line, the new position may be the new column width. The offset or adjustment amplitude is further calculated so that the new position of the reference table line is consistent with the target position.

[0075] Among them, the position of the reference table line is updated, and the layout of the entire table and the position of the line are consistent with the memory model, that is, the position of the table line whose attributes are consistent with the target line has been updated.

[0076] For example, assuming that the starting point coordinates of the table are (X, Y) = (50, 50), the total width of the table is 300 pixels, the total height is 150 pixels, the target position is to increase the height of the first row to 200 pixels, the target line is the bottom border line of the first row, the initial position of the reference table line is the initial position of the bottom border line of the first row is the Y coordinate of 150 pixels, and the new height of the first row is 200 pixels. Therefore, the new position of the bottom border line of the first row is the starting point Y coordinate (50 pixels) plus the new height (200 pixels), that is, 250 pixels. The height of the first row has increased from 150 pixels to 200 pixels, which is consistent with the target position, and the positions and sizes of other rows and columns remain unchanged.

[0077] It can be seen that this method ensures that the position of the table line is effectively adjusted according to the memory model and the target position to maintain the consistency of the table.

[0078] In one embodiment, determining, in the table according to the target position, a reference table line whose position needs to be updated includes: selecting a table line located on a designated side of the target position as the reference table line whose position needs to be updated.

[0079] The target position is the position of the table line to be adjusted, which can be a row line or a column line. The specified side indicates the relative position of the target position, and there are usually two options: left / right side (for column lines) or top / bottom side (for row lines). By determining whether the target line is a row line or a column line, and determining its properties, such as row height or column width, the table line that needs to be updated is determined.

[0080] Among them, if the target position is a row line and the specified side is the upper side, then the row line above the target position is selected as the reference table line; if the target position is a row line and the specified side is the lower side, then the row line below the target position is selected as the reference table line; if the target position is a column line and the specified side is the left side, then the column line on the left side of the target position is selected as the reference table line; if the target position is a column line and the specified side is the right side, then the column line on the right side of the target position is selected as the reference table line.

[0081] It can be seen that the table line located at the specified side of the target position is selected as the reference table line that needs to be updated, and its position is updated to meet the needs of layout adjustment.

[0082] In one embodiment, updating the position of the reference table line according to the table position information, the target position and the initial position of the reference table line to obtain an updated table includes: determining the moving direction of the target line; calculating the new position of the reference table line according to the moving direction, the table position information, the target position and the initial position of the reference table line; obtaining the initial position of a fixed table line, the fixed table line being a table line in the table whose position does not need to be updated; updating the table according to the initial position of the fixed table line and the new position of the reference table line to obtain an updated table.

[0083] The moving direction may be upward or downward (for row lines) or leftward or rightward (for column lines).

[0084] Among them, according to the moving direction of the target line (up, down, left, right), as well as the position information of the table (starting point coordinates and size) and the target position (new row height or column width), the new position of the reference table line can be calculated. If the target line is a row line and is to be moved upward, the Y coordinate of the target position is subtracted from the new row height to determine the new position of the reference table line. If the target line is a column line and is to be moved to the left, the X coordinate of the target position is subtracted from the new column width to determine the new position of the reference table line.

[0085] Among them, fixed table lines are those that do not need to be moved during the update process. Their initial positions are determined before the update. Fixed table lines can be other row lines or column lines with different properties from the target line. Their positions do not need to be adjusted. For example, if we are moving the bottom border line of a row, then the bottom border lines of other rows are usually fixed because they will not change with the movement of the target line.

[0086] Among them, the initial position of the fixed table line remains unchanged, and the new position of the reference table line is calculated according to the moving direction and position information of the target line. Therefore, the local position in the table will change. Further updating of the table can obtain the corresponding table after the fixed table line and the target position move.

[0087] It can be seen that by ensuring that the properties of the reference table line are consistent with the properties of the target line, the property consistency of the lines in the table can be maintained. For example, if the target line is a row line and the height increases, the reference table line will also increase in height accordingly, thereby maintaining the height property of the row consistent. While maintaining the position of the fixed table line, the accuracy and consistency of each row and column in the table after the move can be guaranteed.

[0088] In one embodiment, the calculation of the new position of the reference table line based on the moving direction, the table position information, the target position and the initial position of the reference table line includes: calculating the difference between the target position after the target line moves and the initial position of the target line before the target line moves to obtain an offset distance; calculating the new position of the reference table line based on the moving direction, the table position information, the offset distance and the initial position of the reference table line.

[0089] Among them, the offset distance is the difference between the target position after the target line moves and the initial position before the target line moves. If the target line is a row line, the offset distance usually represents the difference between the new row height and the old row height; if the target line is a column line, the offset distance usually represents the difference between the new column width and the old column width.

[0090] Among them, according to the moving direction of the target line (up, down, left, right), the position information of the table (starting point coordinates and size), and the offset distance, the new position of the reference table line can be calculated. If the target line is a row line and is to be moved upward, the Y coordinate of the initial position of the target line can be subtracted from the offset distance to obtain the Y coordinate of the new position; if the target line is a column line and is to be moved to the left, the X coordinate of the initial position of the target line can be subtracted from the offset distance to obtain the X coordinate of the new position.

[0091] For example, the initial position (Y coordinate) of the target line before it moves is 100 pixels, the initial row height (old row height): 50 pixels, the new row height: 60 pixels, the offset distance = 60 pixels - 50 pixels = 10 pixels. Assuming that the moving direction is upward, the offset distance needs to be subtracted to ensure that the target line moves up, the Y coordinate of the new position = 100 pixels - 10 pixels = 90 pixels, that is, the Y coordinate of the new position of the reference table line is 90 pixels.

[0092] It can be seen that the new position of the reference table line is accurately calculated through the moving direction of the target line, the table position information, the offset distance and the initial position of the reference table line.

[0093] In one embodiment, the calculation of the new position of the reference table line based on the moving direction, the table position information, the offset distance and the initial position of the reference table line includes: if the moving direction is a first preset horizontal direction, the table position information is added to the initial position of the reference table line and then the offset distance is subtracted to obtain the new position of the reference table line; if the moving direction is a second preset horizontal direction, the table position information is added to the initial position of the reference table line and then the offset distance is added to obtain the new position of the reference table line, and the second preset horizontal direction is opposite to the first preset horizontal direction; if the moving direction is a first preset vertical direction, the table position information is added to the initial position of the reference table line and then the offset distance is subtracted to obtain the new position of the reference table line; if the moving direction is a second preset vertical direction, the table position information is added to the initial position of the reference table line and then the offset distance is added to obtain the new position of the reference table line, and the second preset vertical direction is opposite to the first preset vertical direction.

[0094] The first preset horizontal direction is moving to the left, that is, the reference table line moves to the left along the horizontal direction.

[0095] The second preset horizontal direction is moving to the right, that is, the reference table line moves to the right along the horizontal direction.

[0096] It can be seen that the movement in the above two directions represents different movement directions in the horizontal direction, one is to the left and the other is to the right. The definition of these two directions is used to determine whether to add or subtract the offset distance in order to calculate the new position.

[0097] The first preset vertical direction is upward movement, that is, the reference table line moves upward along the vertical direction.

[0098] The second preset vertical direction is moving downward, that is, the reference table line moves downward in the vertical direction.

[0099] It can be seen that the movement in the above two directions represents different movement directions in the vertical direction, one is upward and the other is downward. The definition of these two directions is used to determine whether to add or subtract the offset distance in order to calculate the new position.

[0100] For example, table position information (upper left corner of table): (100, 200); initial position of reference table line (X coordinate): 120; offset distance: 30; the moving direction of the target line is set to the first preset horizontal direction. The new position X coordinate = 100 (X coordinate of table position information) + 120 (X coordinate of initial position of reference table line) = 220, and the offset distance is subtracted from the intermediate result to obtain the new position of the reference table line: the new position X coordinate = 220-30 = 190.

[0101] For example, the table position information (upper left corner of the table): (100, 200); the initial position of the reference table line (Y coordinate): 250; the offset distance: 40; the moving direction of the target line is set to the first preset vertical direction. The Y coordinate of the new position can be obtained = 200 (Y coordinate of the table position information) + 250 (Y coordinate of the initial position of the reference table line) = 450, and then the offset distance is subtracted from the intermediate result to obtain the new position of the reference table line: the Y coordinate of the new position = 450-40 = 410.

[0102] It can be seen that different movement directions and offset distances are considered to ensure that the reference table line can correctly adjust its position to meet the layout requirements of the table. Different directions and offset distances will affect the new position of the reference table line to adapt to the movement of the target line.

[0103] The method of the present application is introduced above, and the device of the present application is introduced below.

[0104] See also Figure 4 , Figure 4 Schematic diagram of a table presentation device provided in an embodiment of the present application. Figure 4 As shown, the table presenting device includes:

[0105] A creation unit 401 is used to create a table on the canvas interface of the electronic drawing board, wherein the table is configured with a plurality of row lines and a plurality of column lines arranged in a determinant;

[0106] An acquisition unit 402 is used to acquire a target position after the target line moves and a table memory model of the table when detecting that the target line moves. The attribute of the target line may be a row line or a column line.

[0107] An updating unit 403 is used to update the position of the table line whose attributes are consistent with the target line in the table according to the table memory model and the target position, so as to obtain an updated table;

[0108] The control unit 404 is used to control the electronic drawing board to present the updated table.

[0109] This method detects in real time when a target line in a table moves, and further obtains the position of each row and column line in the table after the target line moves through the table memory model and the corresponding position of the target line. That is, the table memory model is used to achieve unified calculation and management of multiple row lines and multiple column lines in the table, and the corresponding positions and widths and heights of all row lines and column lines in the table can be obtained, thereby solving the problem of low efficiency in updating tables in related technologies and improving the efficiency and accuracy of creating and managing tables on electronic drawing boards.

[0110] In one embodiment, in updating the position of the table line whose attributes are consistent with the target line in the table according to the table memory model and the target position to obtain an updated table, the update unit 403 is also used to: obtain the table position information of the table on the canvas interface according to the table memory model; and update the position of the table line whose attributes are consistent with the target line in the table according to the table position information and the target position to obtain an updated table.

[0111] In one embodiment, in the updating unit 403, in updating the position of a table line having attributes consistent with the target line in the table according to the table position information and the target position to obtain an updated table, the updating unit 403 is further used to: determine, according to the target position, a reference table line whose position needs to be updated in the table, the attributes of the reference table line being consistent with the attributes of the target line, and the position of the reference table line before being updated being an initial position; and update the position of the reference table line according to the table position information, the target position, and the initial position of the reference table line to obtain an updated table.

[0112] In one embodiment, in determining the reference table line whose position needs to be updated in the table according to the target position, the updating unit 403 is further used to: select a table line located on a specified side of the target position as the reference table line whose position needs to be updated.

[0113] In one embodiment, in the updating of the position of the reference table line according to the table position information, the target position and the initial position of the reference table line to obtain an updated table, the updating unit 403 is further used to: determine the moving direction of the target line; calculate the new position of the reference table line according to the moving direction, the table position information, the target position and the initial position of the reference table line; obtain the initial position of a fixed table line, which is a table line in the table whose position does not need to be updated; and update the table according to the initial position of the fixed table line and the new position of the reference table line to obtain an updated table.

[0114] In one embodiment, in the calculation of the new position of the reference table line based on the moving direction, the table position information, the target position and the initial position of the reference table line, the updating unit 403 is further used to: calculate the difference between the target position after the target line moves and the initial position of the target line before the target line moves to obtain an offset distance; calculate the new position of the reference table line based on the moving direction, the table position information, the offset distance and the initial position of the reference table line.

[0115] In one embodiment, in the calculation of the new position of the reference table line according to the moving direction, the table position information, the offset distance and the initial position of the reference table line, the updating unit 403 is further used for: if the moving direction is a first preset horizontal direction, then the table position information is added to the initial position of the reference table line and then the offset distance is subtracted to obtain the new position of the reference table line; if the moving direction is a second preset horizontal direction, then the table position information is added to the initial position of the reference table line and then the offset distance is added to obtain the new position of the reference table line, and the second preset horizontal direction is opposite to the first preset horizontal direction; if the moving direction is a first preset vertical direction, then the table position information is added to the initial position of the reference table line and then the offset distance is subtracted to obtain the new position of the reference table line; if the moving direction is a second preset vertical direction, then the table position information is added to the initial position of the reference table line and then the offset distance is added to obtain the new position of the reference table line, and the second preset vertical direction is opposite to the first preset vertical direction.

[0116] See also Figure 5 , Figure 5Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 5 As shown, the computer device 50 includes a processor 501 and a memory 502. The memory 502 is connected to the processor 501, for example, via a bus.

[0117] The processor 501 is configured to support the computer device 50 to perform the corresponding functions in the method in the above method embodiment. The processor 501 can be a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof. The above hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0118] Specifically, the processor 501 may include a sending card, a receiving card and a driving chip.

[0119] The memory 502 is used to store program codes, etc. The memory 502 may include a volatile memory (VM), such as a random access memory (RAM); the memory 502 may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 502 may also include a combination of the above-mentioned types of memories.

[0120] The processor 501 may call the program code to perform the following operations:

[0121] Creating a table on the canvas interface of the electronic drawing board, wherein the table is configured with a plurality of row lines and a plurality of column lines arranged in a determinant;

[0122] When detecting that the target line moves, obtaining the target position after the target line moves and the table memory model of the table, wherein the attribute of the target line may be a row line or a column line;

[0123] According to the table memory model and the target position, updating the position of the table line whose attribute is consistent with the target line in the table to obtain an updated table;

[0124] The electronic drawing board is controlled to present the updated table.

[0125] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method described in the above embodiment.

[0126] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0127] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A table presentation method, applied to an electronic drawing board, characterized in that: include: Creating a table on the canvas interface of the electronic drawing board, wherein the table is configured with a plurality of row lines and a plurality of column lines arranged in a determinant; When detecting that the target line moves, obtaining the target position after the target line moves and the table memory model of the table, wherein the attribute of the target line may be a row line or a column line; According to the table memory model and the target position, updating the position of the table line whose attribute is consistent with the target line in the table to obtain an updated table; The electronic drawing board is controlled to present the updated table.

2. The method according to claim 1, characterized in that The updating, according to the table memory model and the target position, in the table, of the position of the table line whose attributes are consistent with the target line to obtain the updated table comprises: According to the table memory model, obtaining table position information of the table on the canvas interface; According to the table position information and the target position, the position of the table line whose attribute is consistent with the target line is updated in the table to obtain an updated table.

3. The method according to claim 2, characterized in that The updating, according to the table position information and the target position, in the table, of the position of the table line whose attributes are consistent with the target line to obtain the updated table comprises: According to the target position, determining in the table a reference table line whose position needs to be updated, the attribute of the reference table line is consistent with the attribute of the target line, and the position of the reference table line before being updated is the initial position; The position of the reference table line is updated according to the table position information, the target position and the initial position of the reference table line to obtain an updated table.

4. The method according to claim 3, characterized in that Determining the reference table line whose position needs to be updated in the table according to the target position includes: A table line whose position is on a specified side of the target position is selected as a reference table line whose position needs to be updated.

5. The method according to claim 3, characterized in that: The updating of the position of the reference table line according to the table position information, the target position and the initial position of the reference table line to obtain an updated table comprises: determining a moving direction of the target line; Calculate the new position of the reference table line according to the moving direction, the table position information, the target position and the initial position of the reference table line; Obtaining an initial position of a fixed table line, wherein the fixed table line is a table line in the table whose position does not need to be updated; The table is updated according to the initial position of the fixed table line and the new position of the reference table line to obtain an updated table.

6. The method according to claim 5, characterized in that Calculating the new position of the reference table line according to the moving direction, the table position information, the target position and the initial position of the reference table line comprises: Calculating the difference between the target position after the target line moves and the initial position before the target line moves to obtain an offset distance; The new position of the reference table line is calculated according to the moving direction, the table position information, the offset distance and the initial position of the reference table line.

7. The method according to claim 6, characterized in that Calculating the new position of the reference table line according to the moving direction, the table position information, the offset distance and the initial position of the reference table line comprises: If the moving direction is the first preset horizontal direction, the table position information is added to the initial position of the reference table line and then the offset distance is subtracted to obtain a new position of the reference table line; If the moving direction is a second preset horizontal direction, the table position information is added to the initial position of the reference table line and then the offset distance is added to obtain a new position of the reference table line, and the second preset horizontal direction is opposite to the first preset horizontal direction; If the moving direction is the first preset vertical direction, the table position information is added to the initial position of the reference table line and then the offset distance is subtracted to obtain a new position of the reference table line; If the moving direction is a second preset vertical direction, the table position information is added to the initial position of the reference table line and then the offset distance is added to obtain a new position of the reference table line, and the second preset vertical direction is opposite to the first preset vertical direction.

8. A table presentation device, applied to an electronic drawing board, comprising: A creating unit, configured to create a table on a canvas interface of the electronic drawing board, wherein the table is configured with a plurality of row lines and a plurality of column lines arranged in a determinant; An acquisition unit, used for acquiring a target position after the target line moves and a table memory model of the table when detecting that the target line moves, wherein the attribute of the target line may be a row line or a column line; An updating unit, configured to update the position of a table line having an attribute consistent with the target line in the table according to the table memory model and the target position, to obtain an updated table; A control unit is used to control the electronic drawing board to present the updated table.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the table presentation method according to any one of claims 1 to 7.

10. An electronic drawing board, characterized in that: include: A display panel, used to display the display screen in the electronic drawing board; A camera module is used to collect and display images; Microphone array, used to collect voice information; Memory; A processor is communicatively connected to the display panel, the camera module, the microphone array and the memory, respectively, wherein the processor is used to execute one or more computer programs stored in the memory, and when the processor executes the one or more computer programs, the electronic drawing board implements the table presentation method as described in any one of claims 1 to 7.