Table content processing method and electronic device
By selecting a partial area of the table and the table header in the table content processing method, multi-select mode and same content search are supported, which solves the problems of low selection intent recognition and low efficiency when copying and pasting table content in the existing technology, and improves the user experience.
Patent Information
- Application Number
- PCT/CN2024/140093
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-28
- Filing Date
- 2024-12-17
- Publication Date
- 2025-11-06
AI Technical Summary
In existing technologies, when users copy and paste table content, the selection intent cannot be accurately identified, resulting in low efficiency and a poor user experience.
This paper provides a method for processing table content. By responding to the user's selection operation, it selects a local area of the table content and selects the table header when necessary. It supports multi-select mode and searching for the same content, thereby improving selection efficiency and accuracy.
It improves the efficiency and accuracy of users' selection when copying and pasting table content, thus enhancing the user experience.
Smart Images

Figure CN2024140093_06112025_PF_FP_ABST
Abstract
Description
Table content processing method and electronic device
[0001] The present application claims priority to the Chinese patent application No. 202410527652.4, filed on April 28, 2024, and entitled "Table content processing method and electronic device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the technical field of data processing, in particular to a table content processing method and an electronic device. BACKGROUND
[0003] As a means of organizing and arranging data, tables are widely used in various fields such as education, finance, and medical treatment. In many cases, users will reuse the content of the table.
[0004] Users usually reuse the content of the table by copying and pasting. However, the current copying and pasting methods for table content are relatively rough and cannot meet the needs of users, resulting in poor user experience. SUMMARY
[0005] Therefore, the present application provides a table content processing method and an electronic device to better meet the needs of users and improve the user experience when using the content of the table by copying and pasting.
[0006] To achieve the above purpose, in a first aspect, the present application provides a table content processing method. In response to a first selection operation on a target area of a table, the target content in the table is selected. The target area is a partial area of the table, and the target content is all the content in the target area. The starting cursor of the first selection operation is located at the Pth row and Qth column of the table, and the ending cursor of the first selection operation is located at the Mth row and Nth column of the table. The target area is the Qth column to the Nth column in the Pth row to the Mth row of the table. P and M are different. The table is located in a picture, a PDF, a webpage, or a content extraction interface.
[0007] The table content processing method provided by the present application can select all the content in the local area between the starting cursor and the ending cursor corresponding to the first selection operation when the user selects the target area of the table in the picture, the PDF, the webpage, or the content extraction interface. In this way, the user can move the starting cursor and the ending cursor of the selection operation to flexibly frame the content to be selected for copying and pasting. Therefore, the present application can better meet the selection needs of users and improve the user experience when using the content of the table by copying and pasting.
[0008] In a possible implementation of the first aspect, the table further includes a table header, and in response to the first selection operation on the table content without selecting the table header, the method further includes: selecting the table header corresponding to the target content.
[0009] When selecting the table content, the user usually has the intention of selecting the table header. Through the above implementation, the table header corresponding to the target content selected by the user can be selected when the user does not select the table header, so that the selected content can be more consistent with the selection intention of the user, and the user experience is improved.
[0010] In a possible implementation of the first aspect, in the case where the table is located in the content extraction interface, before the target content in the table is selected in response to the first selection operation on the table content, the method further includes:
[0011] displaying a first interface, the first interface including the target table; and in response to a content extraction operation on the first interface, displaying an extraction result on the first interface, the extraction result including a table corresponding to the target table, the table being displayed in at least one of the following manners:
[0012] differentially displaying a table header and a table body of the table;
[0013] differentially displaying a table region and a non-table region;
[0014] In the case where a first cell in the target table corresponds to a plurality of second cells, the table includes a plurality of first sub-cells split based on the first cell, and the plurality of first sub-cells correspond to the plurality of second cells one by one.
[0015] Through the above implementation, the table content in the content extraction interface can be differentially displayed, so that the table content can be more intuitively displayed; and the merged cells in the table can be split to better meet the selection needs of the user for the table content.
[0016] In a possible implementation of the first aspect, the method further includes:
[0017] in response to the first operation, entering a multi-selection mode; and in response to a second selection operation, selecting a first region, the second selection operation corresponding to a second region in the table; wherein the first region is a region in the target region that does not overlap with the second region.
[0018] Through the above implementation, in the multi-selection mode, the non-overlapping regions corresponding to the multiple selection operations of the user can be selected, and the selection efficiency is improved.
[0019] In a possible implementation of the first aspect, the method further includes:
[0020] In response to the first operation, enter the multi-selection mode; in response to a third selection operation, select a third region, the third selection operation corresponding to a fourth region in the table; wherein the fourth region and the target region do not overlap, and the third region includes the fourth region and the target region.
[0021] In a possible implementation of the first aspect, the first operation includes any one of the following:
[0022] a long press operation on a non-text region or a touch point corresponding to the end cursor;
[0023] an operation of selecting a multi-selection option.
[0024] In a possible implementation of the first aspect, the method further includes: in a case where the first operation is a long press operation, when the long press operation ends, exiting the multi-selection mode.
[0025] In a possible implementation of the first aspect, the method further includes:
[0026] in response to the same content search operation, selecting all rows or all columns in the table that include the target content.
[0027] By the above implementation, when the user selects the same content search, all rows or all columns in the table that include the user-selected content can be selected, thereby improving the flexibility, convenience and efficiency of the selection operation.
[0028] In a possible implementation of the first aspect, in response to the selection operation on the table content, the method further includes:
[0029] when there is the same content as the target content in the table, displaying a same content search option; the same content search operation is a selection operation on the same content search option.
[0030] In a possible implementation of the first aspect, the P rows and the M rows are middle rows of the table, and the Q columns and the N columns are middle columns of the table.
[0031] In a second aspect, an embodiment of the present application provides a data processing apparatus, the data processing apparatus including a selection module;
[0032] The selection module is configured to: in response to a first selection operation on a target region of a table, select target content in the table, the target region being a partial region of the table, the target content being all content in the target region, a start cursor of the first selection operation being located at a Pth row and a Qth column of the table, an end cursor of the first selection operation being located at an Mth row and an Nth column of the table, the target region being the Qth column to the Nth column in the Pth row to the Mth row of the table, P and M being different, and the table being located in a picture, a PDF, a webpage or a content extraction interface.
[0033] In a possible implementation of the second aspect, the table further includes a table header, and the selection module is further configured to: select the table header corresponding to the target content, in a case where the first selection operation does not select the table header of the table.
[0034] In a possible implementation of the second aspect, the data processing apparatus further includes a display module, configured to: in a case where the table is located in the content extraction interface, display a first interface including the target table, before selecting the target content in the table in response to the first selection operation on the table content.
[0035] In response to the content extraction operation on the first interface, display an extraction result on the first interface, the extraction result including a table corresponding to the target table, and the table being displayed in at least one of the following manners:
[0036] The table header and the table body are displayed differently.
[0037] The table region and the non-table region are displayed differently.
[0038] In a case where a first cell in the target table corresponds to a plurality of second cells, the table includes a plurality of first sub-cells split based on the first cell, and the plurality of first sub-cells correspond to the plurality of second cells one by one.
[0039] In a possible implementation of the second aspect, the selection module is further configured to:
[0040] In response to the first operation, enter a multi-selection mode.
[0041] In response to a second selection operation, select a first region, the second selection operation corresponding to a second region in the table; and the first region being a region in the target region that does not overlap with the second region.
[0042] In a possible implementation of the second aspect, the selection module is further configured to:
[0043] In response to the first operation, enter a multi-selection mode.
[0044] In response to a third selection operation, select a third region, the third selection operation corresponding to a fourth region in the table; and the fourth region and the target region not overlapping, and the third region including the fourth region and the target region.
[0045] In a possible implementation of the second aspect, the first operation includes any of the following:
[0046] A long-press operation on a non-text region or a touch point corresponding to an end cursor.
[0047] An operation of selecting a multi-selection option.
[0048] In a possible implementation of the second aspect, the selection module is further configured to: in a case where the first operation is a long press operation, when the long press operation ends, the multi-selection mode is exited.
[0049] In a possible implementation of the second aspect, the selection module is further configured to:
[0050] In response to the same content search operation, all rows or all columns in the table that include the target content are selected.
[0051] In a possible implementation of the second aspect, the display module is further configured to:
[0052] When there is the same content as the target content in the table, a same content search option is displayed; the same content search operation is a selection operation on the same content search option.
[0053] In a possible implementation of the second aspect, the P rows and the M behaviors are middle rows of the table, and the Q columns and the N columns are middle columns of the table.
[0054] In a third aspect, an embodiment of the present application provides a table content processing method, including:
[0055] In response to a paste operation after copying of first content in a table, second content is displayed, the second content is obtained by performing text processing on the first content according to semantics of the first content or by performing table redrawing on the first content, and the second content includes the first content.
[0056] The text processing performed on the first content includes at least one of the following:
[0057] Table body content in the first content is associated with corresponding table headers.
[0058] Punctuation marks in the first content are modified.
[0059] The table content processing method provided by the embodiment of the present application has the following advantages: the displayed second content is obtained by performing text processing on the first content according to semantics of the first content (i.e., content selected and copied by the user in the table) or by performing table redrawing on the first content, so that the second content displayed after pasting has higher readability than the first content copied, thereby improving the experience of the user when using table content by copying and pasting.
[0060] In a possible implementation of the third aspect, before the second content is displayed in response to the paste operation after copying of the first content in the table, the method further includes:
[0061] In response to a first selection operation on a target area of a table, a first content in the table is selected, the target area is a partial area of the table, the first content is all content in the target area, a start cursor of the first selection operation is located at a Pth row and a Qth column of the table, an end cursor of the first selection operation is located at an Mth row and an Nth column of the table, the target area is a Qth column to an Nth column in the Pth row to the Mth row of the table, P and M are different, and the table is located in a picture, a PDF, a webpage or a content extraction interface.
[0062] In a possible implementation of the third aspect, the table header is a table header of the table or a table header determined according to semantics of the first content.
[0063] In a possible implementation of the third aspect, modifying the punctuation in the first content includes at least one of the following operations:
[0064] adding a colon between texts having an explanation relationship;
[0065] adding a conjunction between texts having a start-end relationship;
[0066] deleting a line break between continuous semantic texts in the first content.
[0067] In the above implementations, the first content is displayed in association with the corresponding table header or the inferred table header, the meaning of the first content can be explicitly indicated by the table header or the inferred table header, and therefore the readability of the pasted content can be improved; the corresponding punctuation is added between the texts in the first content, the information hierarchy and the relationship in the first content can be strengthened, and the readability of the pasted content can be improved, facilitating quick reading and understanding of the user; the line break between the continuous semantic texts in the first content is deleted, the editing operation of the user on the pasted content can be reduced, and the user experience is improved.
[0068] In a possible implementation of the third aspect, the text processing on the first content further includes:
[0069] adjusting a position relationship between the texts in the first content, the position relationship between the texts being related to font sizes of the texts.
[0070] In a possible implementation of the third aspect, the table redrawing on the first content includes at least one of the following operations:
[0071] in a case where the first content does not include a table header, adding the table header to a table corresponding to the first content;
[0072] adjusting a border thickness between the table header and a table body corresponding to the first content;
[0073] adjusting a hatching color of the table header;
[0074] Adjust the font of the text corresponding to the table header.
[0075] In the above embodiment, by adding a table header to the table corresponding to the first content, the meaning of the pasted content can be explicitly indicated, thereby improving the readability of the pasted content; by adjusting the thickness of the border between the table header and the table body corresponding to the first content, adjusting the color of the texture of the table header, and adjusting the font of the text corresponding to the table header, the hierarchy and relationship between the table header and the table body can be strengthened, and the readability of the pasted content can be improved.
[0076] In a fourth aspect, an embodiment of the present application provides a data processing apparatus, the data processing apparatus comprising a display module, a text processing module, and a table redrawing module;
[0077] The display module is configured to display second content in response to a pasting operation after copying of first content in a table, the second content being obtained by text processing of the first content by the text processing module or by table redrawing of the first content by the table redrawing module, and the second content comprising the first content.
[0078] The text processing module is specifically configured to perform at least one of the following operations:
[0079] Associating table body content in the first content with a corresponding table header;
[0080] Modifying punctuation in the first content.
[0081] In a possible implementation of the fourth aspect, the data processing apparatus further comprises a selection module, which is specifically configured to select the first content in the table in response to a first selection operation on a target region of the table before displaying the second content in response to the pasting operation after copying of the first content in the table, the target region being a partial region of the table, the first content being all content in the target region, a starting cursor of the first selection operation being located at the Pth row and the Qth column of the table, an ending cursor of the first selection operation being located at the Mth row and the Nth column of the table, the target region being the Qth column to the Nth column in the Pth row to the Mth row of the table, P and M being different, and the table being located in a picture, a PDF, a webpage, or a content extraction interface.
[0082] In a possible implementation of the fourth aspect, the table header is a table header of the table, or a table header determined according to the semantics of the first content.
[0083] In a possible implementation of the fourth aspect, the text processing module is specifically configured to perform at least one of the following operations:
[0084] Adding a colon between texts having an explanatory relationship;
[0085] Adding a conjunction between texts having a start-end relationship;
[0086] deleting line breaks between the continuous semantic texts in the first content.
[0087] In a possible implementation of the fourth aspect, the text processing module is further configured to:
[0088] adjusting the positional relationship between the texts in the first content, the positional relationship between the texts being related to the font size of the texts.
[0089] In a possible implementation of the fourth aspect, the table redrawing module is specifically configured to perform at least one of the following operations:
[0090] adding a table header to the table corresponding to the first content when the first content does not include a table header;
[0091] adjusting the thickness of the border between the table header and the table body corresponding to the first content;
[0092] adjusting the color of the bottom line of the table header;
[0093] adjusting the font of the text corresponding to the table header.
[0094] In the fifth aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, the memory is used to store a computer program, and the processor is used to execute the method in the first aspect or any implementation of the first aspect when the computer program is invoked.
[0095] In the sixth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method in the first aspect or any implementation of the third aspect.
[0096] In the seventh aspect, an embodiment of the present application provides a computer program product, when the computer program product is run on an electronic device, the electronic device executes the method in the first aspect or any implementation of the third aspect.
[0097] In the eighth aspect, an embodiment of the present application provides a chip system, including a processor, the processor is coupled with a memory, and the processor executes a computer program stored in the memory to implement the method in the first aspect or any implementation of the third aspect. The chip system can be a single chip or a chip module composed of multiple chips.
[0098] It can be understood that the beneficial effects of the second aspect and the fourth to eighth aspects can be referred to the related description in the first aspect and the third aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0099] FIG. 1 is a schematic diagram of an interface for selecting some table content according to an embodiment of the present application;
[0100] FIG. 2 is a flow diagram of a table content processing method according to an embodiment of the present application;
[0101] FIGS. 3-7 are schematic diagrams of content extraction interfaces according to embodiments of the present application;
[0102] FIGS. 8-10 are schematic diagrams of selection results according to embodiments of the present application;
[0103] FIGS. 11 and 12 are schematic diagrams of selection processes for finding the same content according to embodiments of the present application;
[0104] FIGS. 13-17 are schematic diagrams of selection processes for multiple selection according to embodiments of the present application;
[0105] FIG. 18 is a paste display interface for copying content according to an embodiment of the present application;
[0106] FIG. 19 is a flow diagram of another table content processing method according to an embodiment of the present application;
[0107] FIGS. 20-28 are paste display interfaces for copying content according to embodiments of the present application;
[0108] FIG. 29 is a structural diagram of a data processing apparatus according to an embodiment of the present application;
[0109] FIG. 30 is a structural diagram of another data processing apparatus according to an embodiment of the present application;
[0110] FIG. 31 is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0111] The embodiments of the present application will be described below in conjunction with the accompanying drawings. The terms used in the implementation manner part of the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments.
[0112] Tables are widely used in various fields as a means of organizing and arranging data. For the content in the table, users can reuse it through copying and pasting.
[0113] The copying operation mainly involves the selection of table content. When the table is located in an interface that cannot be directly edited by the user (such as a picture interface, a portable document format (PDF) interface, a web page interface, and a content extraction interface), for the table content in the interface, one selection scheme is to select by smearing in the word selection mode, but this method usually needs to be smeared multiple times, which is inefficient.
[0114] Another selection scheme is to select directly in the interface by moving the cursor, however, in many cases, this way cannot accurately identify the selection intention of the user, resulting in a large difference between the selected content and the selection intention of the user. Exemplarily, as shown in (a) of FIG. 1, the cursor moving range corresponding to the selection operation of the user is from "inspection 4" to "30.00" (that is, the user wants to select the whole row corresponding to "inspection 4", that is, the 5th row), and the system finally not only selects the 5th row, but also selects the 2nd and 3rd columns in the 1st to 4th rows.
[0115] Exemplarily, as shown in (b) of FIG. 1, the cursor moving range corresponding to the selection operation of the user is from "inspection 1" to "inspection 4" (that is, the user wants to select the 1st column in the 2nd to 5th rows), and the system finally not only selects the 1st column in the 2nd to 5th rows, but also selects the 2nd and 3rd columns in the 2nd to 4th rows.
[0116] Exemplarily, as shown in (c) of FIG. 1, the cursor moving range corresponding to the selection operation of the user is from the number "1" corresponding to "inspection 1" to "inspection 4" (that is, the user wants to select the 1st and 2nd columns in the 2nd to 5th rows), and the system finally not only selects the 1st and 2nd columns in the 2nd to 5th rows, but also selects the 3rd column in the 2nd to 4th rows.
[0117] Exemplarily, as shown in (d) of FIG. 1, if the user wants to select "theme 2" and the corresponding "date 1" and "place 2", the user may move the cursor from "date 1" to "place 2" when selecting, and the system finally not only selects "date 1", "theme 2" and "place 2", but also selects "theme 1" and "place 1".
[0118] The above schemes cannot balance the selection efficiency and accurately identify the selection intention of the user when copying and selecting the table content in the interface that cannot be directly edited, and it is difficult to meet the user demand, resulting in poor user experience.
[0119] Therefore, the present application provides a table content processing method, which can balance the selection efficiency and accurately identify the selection intention of the user when copying and selecting the table content in the interface that cannot be directly edited, can better meet the user demand, and improve the user experience.
[0120] The table content processing method provided by the embodiments of the present application can be applied to an electronic device, which can include but is not limited to a personal computer (PC), a smart phone, a netbook, a tablet computer, a palm computer, a smart screen, etc. In order to facilitate the description, the electronic device is exemplarily taken as a mobile phone in the following embodiments of the present application.
[0121] Figure 2 is a flowchart illustrating a table content processing method provided in an embodiment of this application. As shown in Figure 2, the table content processing method provided in this embodiment may include the following steps:
[0122] S110, Display the first interface.
[0123] The first interface can be an image interface, a PDF interface, a webpage interface, or any other interface that the user cannot directly edit. The first interface can include the target table, which may or may not have borders.
[0124] S120, In response to the content extraction operation on the first interface, display the extraction result on the first interface.
[0125] Content extraction can be a long press operation by the user on the first interface, or a click on the content extraction button. The electronic device can respond to the content extraction operation on the first interface by analyzing and extracting text and table information from it. The table information can include the area where the table is located, the table header, the table body, the correspondence between rows and columns, and the correspondence between cells in the table (e.g., one-to-one, one-to-many, one-to-blank).
[0126] The extraction results displayed on the first interface may include a table corresponding to the target table. In some embodiments, the table headers and bodies in the extraction results can be displayed differently to more intuitively show the table content. For example, as shown in Figures 3(a) and (b), in response to the content extraction operation on the first interface, the text in the table headers of the displayed extraction results is underlined, and the color of the underline can be distinguished from the color of the text in the table to achieve a better differentiated display effect.
[0127] In some embodiments, the table area can be differentiated from the non-table area to more intuitively display the table content. For example, as shown in Figures 4(a) and 4(b), the areas containing "Human-Computer Interaction Leads the Future" and "Organizer: xxx" in the first interface are non-table areas, while the areas containing "Date," "Main Body," "Location," and their corresponding specific content are table areas. In response to the content extraction operation on the first interface, the table area and the non-table area are displayed with different colors in the extraction results. In some embodiments, different backgrounds can also be used to differentiate the table area from the non-table area.
[0128] In some embodiments, in a case where there is a first cell (i.e., a merged cell) in the target table, and the merged cell corresponds to a plurality of second cells, the table corresponding to the extraction result can include a plurality of first sub-cells split based on the first cell, and the first sub-cells can correspond to the second cells one by one.
[0129] Exemplarily, as shown in (a) of FIG. 5 and (b) of FIG. 5, there is a merged cell in the target table of the first interface, i.e., the cell where “Date 1” is located and the cell where “Date 2” is located, where “Date 1” corresponds to “Topic 1” and “Topic 2”, and “Date 2” corresponds to “Topic 3”, “Topic 4” and “Topic 5”. In response to the content extraction operation on the first interface, in the displayed extraction result, the cell where “Date 1” is located is split into two sub-cells, and the text in the two sub-cells is “Date 1” respectively, and the two sub-cells correspond to “Topic 1” and “Topic 2” respectively, and the cell where “Date 2” is located is split into three sub-cells, and the text in the three sub-cells is “Date 2” respectively, and the three sub-cells correspond to “Topic 3”, “Topic 4” and “Topic 5” respectively.
[0130] By splitting the merged cell, the user's selection demand for the table content can be better met. For example, if the user wants to select “Topic 2” and the corresponding “Date 1” and “Location 2” in (b) of FIG. 5, the user can directly move the cursor from “Date 1” in the first column and the third row to “Location 2” to select the third row when selecting, without selecting “Topic 1” and “Location 1” as shown in (d) of FIG. 1.
[0131] In some embodiments, after splitting the merged cell, the text position in the original merged cell can be maintained in the table corresponding to the extraction result, and a mark can be set for each cell after splitting to indicate each cell after splitting. In this way, in the extraction interface, the content in a merged cell can be displayed at only one place, so that when the content in the merged cell is more, the crowded degree of the content displayed in the extraction interface can be reduced, and the user experience can be improved.
[0132] Exemplarily, as shown in (a) of FIG. 6 and (b) of FIG. 6, there are merged cells in the target table of the first interface, i.e., the cells where "Date 1" is located and the cells where "Date 2" is located, where "Date 1" corresponds to "Topic 1" and "Topic 2", and "Date 2" corresponds to "Topic 3", "Topic 4" and "Topic 5". In response to the content extraction operation on the first interface, in the displayed extraction result, the cell where "Date 1" is located is split into two sub-cells, and the left and right sides of the two sub-cells are each provided with a triangular mark, and the cell where "Date 2" is located is split into 3 sub-cells, and the left and right sides of the 3 sub-cells are each provided with a triangular mark.
[0133] It can be understood that the mark provided for the split cell can also be a rhombus, a circle or other shapes, and the embodiments of the present application do not make specific limitations thereto.
[0134] In some embodiments, in the case where there is a blank cell in the target table, the blank cell can also be displayed in the position of the blank cell in the table corresponding to the extraction result, so that the cursor of the subsequent selection operation can be moved to the position of the blank cell.
[0135] Exemplarily, as shown in (a) of FIG. 7 and (b) of FIG. 7, in the target table of the first interface, the cell in the 3rd row and the 3rd column is a blank cell. In response to the content extraction operation on the first interface, in the displayed extraction result, a blank cell is displayed in the position of the original blank cell.
[0136] S130, in response to the first selection operation on the table content, the target content in the table is selected.
[0137] The table can be located in a picture, a PDF or a webpage, or can be located in a content extraction interface displayed after a content extraction operation is performed on the picture, the PDF or the webpage. The embodiments of the present application will be exemplarily described below with the table located in the content extraction interface.
[0138] The first selection operation can be an operation of moving a cursor in the table of the content extraction interface when the user copies. In response to the first selection operation for the table content, the electronic device can select all content in a target area of the table. The target area can be a partial area of the table or the entire area of the table, and the target area can be determined according to the positions of the start cursor and the end cursor of the first selection operation. For example, if the start cursor of the first selection operation is located at the Pth row and the Qth column of the table and the end cursor of the first selection operation is located at the Mth row and the Nth column of the table, the target area can be the Qth column to the Nth column in the Pth row to the Mth row of the table. P and M can be the same or different, and Q and N can be the same or different, where P and M can be different when Q and N are the same, and P and M can be different when Q and N are the same.
[0139] For example, as shown in (a) of FIG. 8, the start cursor of the first selection operation is located at the 2nd row and the 1st column of the table, and the end cursor of the first selection operation is located at the 2nd row and the 3rd column of the table, and the selected target area is the 1st column to the 3rd column of the 2nd row of the table.
[0140] For example, as shown in (b) of FIG. 8, the start cursor of the first selection operation is located at the 1st column of the 1st row of the table, and the end cursor of the first selection operation is located at the 1st column of the 8th row of the table, and the selected target area is the 1st column in the 1st row to the 8th row.
[0141] For example, as shown in (c) of FIG. 8, the start cursor of the first selection operation is located at the 1st column of the 2nd row of the table, and the end cursor of the first selection operation is located at the 2nd column of the 5th row of the table, and the selected target area is the 1st column and the 2nd column in the 2nd row to the 5th row.
[0142] For example, as shown in (d) of FIG. 8, the start cursor of the first selection operation is located at the 1st column of the 3rd row of the table, and the end cursor of the first selection operation is located at the 3rd column of the 3rd row of the table, and the selected target area is the 1st column to the 3rd column of the 3rd row of the table.
[0143] For example, as shown in (e) of FIG. 8, the start cursor of the first selection operation is located at the 1st column of the 2nd row of the table, and the end cursor of the first selection operation is located at the 3rd column of the 3rd row of the table, and the selected target area is the 1st column to the 3rd column in the 2nd row and the 3rd row.
[0144] For example, as shown in (f) of FIG. 8, the start cursor of the first selection operation is located at the 1st column of the 2nd row of the table, and the end cursor of the first selection operation is located at the 3rd column of the 3rd row of the table, and the selected target area is the 1st column to the 3rd column in the 2nd row and the 3rd row.
[0145] In some embodiments, the target region can also be the middle row and the middle column of the table. For example, as shown in (g) of FIG. 8, the starting cursor of the first selection operation is located at the second column of the second row of the table, and the ending cursor is located at the third column of the fifth row of the table. The selected target region is the second column and the third column in the second row to the fifth row of the table.
[0146] By this table content selection manner, when the user selects the target region of the picture, the PDF, the webpage or the table in the content extraction interface, the local region between the starting cursor and the ending cursor corresponding to the first selection operation can be selected according to the first selection operation (that is, the rows between the starting cursor and the ending cursor, and the columns between the starting cursor and the ending cursor). In this way, the user can move the starting cursor and the ending cursor of the first selection operation to flexibly select the content to be selected for copying and pasting, so as to better meet the selection requirements of the user and improve the experience of the user when using the table content by copying and pasting.
[0147] Since the user usually has the intention to select the table header when selecting the table content, in some embodiments, when the table header exists in the table but the first selection operation does not select the table header, the electronic device can also select the table header corresponding to the target content when selecting the target region according to the first selection operation of the user, so that the selected content is more in line with the selection intention of the user and the user experience is improved.
[0148] For example, as shown in FIG. 9, the table header (that is, “payment item”, “quantity”, “amount”) exists in the table. The target content selected by the electronic device according to the first selection operation of the user is “inspection 2”, “2”, “20.00”, “inspection 3”, “1” and “14.00”. The electronic device also selects the table header “payment item” corresponding to “inspection 2” and “inspection 2” by means of the dashed box, the table header “quantity” corresponding to “2” and “1”, and the table header “amount” corresponding to “20.00” and “14.00”. The electronic device can also select the table header corresponding to the target content by other means, which is not limited in the embodiments of the present application.
[0149] In some embodiments, when the first selection operation selects both the table header and the table body, the electronic device can also differentially display the selected table header region and the table body region. For example, as shown in FIG. 10, the first selection operation selects both the table header (that is, the first row) and the table body (that is, the second to fourth rows). The color of the selected table header region is different from the color of the table body region.
[0150] The electronic device can also differentially display the selected table header region and the table body region by setting different selection styles for the selected table header region and the table body region and other means.
[0151] S140, in response to the same content search operation, selecting all rows or all columns in the table that include the target content.
[0152] The same content search operation can be a selection operation of the user for a same content search option. For example, as shown in (a) of FIG. 11, the same content search option (i.e., the "Search Same" option) can be arranged to the right of the full selection option. The same content search option can also be arranged to the left of the full selection option, and the embodiments of the present application do not make a specific limitation in this regard.
[0153] The same content search option can appear together with the copy option, or after the target content in the table is selected according to the first selection operation of the user, the same content search option can be displayed only when there is content in the table that is the same as the target content.
[0154] After the user triggers the same content search option, the electronic device can select all rows or all columns in the table that include the target content, which can improve the flexibility and convenience of the first selection operation and improve the selection efficiency. For example, as shown in (a) of FIG. 11 and (b) of FIG. 11, after the electronic device selects "Theme 3" according to the first selection operation of the user, in response to the operation of the user clicking the "Search Same" option, the third row and the fourth row that include the target content "Theme 3" are selected.
[0155] In some embodiments, after the user triggers the same content search option, the electronic device can directly copy the selected content to the clipboard after selecting all rows or all columns in the table that include the target content, so as to further improve the selection efficiency. For example, as shown in (a) of FIG. 12 and (b) of FIG. 12, after the electronic device selects "Theme 3" according to the first selection operation of the user, in response to the operation of the user clicking the "Search Same" option, the third row and the fourth row that include the target content "Theme 3" are selected. At the same time, the content of the third row and the fourth row is copied, and the user is prompted that the selected content has been copied to the clipboard.
[0156] S150, in response to the first operation, entering a multi-selection mode, and in the multi-selection mode, in response to a second selection operation for the table content, selecting corresponding content in the table.
[0157] In some embodiments, the first operation can be a long press operation of the touch point corresponding to the end cursor of the first selection operation of the user. The electronic device can enter the multi-selection mode in response to the first operation, and select corresponding content in the table according to the first selection operation and the second selection operation of the user after entering the multi-selection mode. The second selection operation can be a single selection operation or a multiple selection operation.
[0158] Specifically, if the selection region corresponding to the first selection operation (hereinafter referred to as the first selection region) and the selection region corresponding to the second selection operation (hereinafter referred to as the second selection region) do not overlap, the first selection region and the second selection region are both selected.
[0159] For example, as shown in (a) of FIG. 13, (b) of FIG. 13, and (c) of FIG. 13, the electronic device selects the 2nd row in the table in response to the first selection operation, and enters the multi-selection mode in response to a long press operation of the contact corresponding to the end cursor of the first selection operation. In the multi-selection mode, the 4th row and the 5th row in the table are selected again in response to the second selection operation (the start cursor of the second selection operation is located at the 1st column of the 4th row, and the end cursor is located at the 3rd column of the 5th row). After the contact is released (i.e., the long press operation ends), the multi-selection mode is exited, and finally the electronic device selects the 2nd row, the 4th row, and the 5th row in the table.
[0160] If the first selection region and the second selection region overlap, the non-overlapping part of the first selection region and the second selection region is selected.
[0161] For example, as shown in (a) of FIG. 14, (b) of FIG. 14, and (c) of FIG. 14, the electronic device selects the 2nd row to the 5th row in the table in response to the first selection operation, and enters the multi-selection mode in response to a long press operation of the contact corresponding to the end cursor of the first selection operation. In the multi-selection mode, the 3rd row and the 4th row selected in the first selection operation are released in response to the second selection operation (the start cursor of the second selection operation is located at the 1st column of the 4th row, and the end cursor is located at the 3rd column of the 3rd row). After the contact is released, the multi-selection mode is exited, and finally the electronic device selects the 2nd row and the 5th row in the table.
[0162] For example, as shown in (d) of FIG. 14, (e) of FIG. 14, and (f) of FIG. 14, the electronic device selects the 2nd row to the 5th row in the table in response to the first selection operation, and enters the multi-selection mode in response to a long press operation of the contact corresponding to the end cursor of the first selection operation. In the multi-selection mode, the 5th row selected in the first selection operation is released in response to the second selection operation (the start cursor of the second selection operation is located at the 1st column of the 6th row, and the end cursor is located at the 3rd column of the 5th row). After the contact is released, the multi-selection mode is exited, and finally the electronic device selects the 2nd row to the 4th row, and the 6th row in the table.
[0163] In some embodiments, the first operation can also be a long press operation on a non-text region in the interface. Illustratively, as shown in (a) of FIG. 15, (b) of FIG. 15, (c) of FIG. 15, and (d) of FIG. 15, the electronic device enters the multi-selection mode in response to a long press operation on a non-text region in the interface. In the multi-selection mode, in response to a first selection operation, the electronic device selects the second to fifth rows in the table, and in response to a second selection operation (the start cursor of the second selection operation is located at the first column of the fourth row of the table, and the end cursor is located at the third column of the third row of the table), the third and fourth rows selected in the release of the first selection operation. After the touch point is released, the multi-selection mode is exited, and finally the electronic device selects the second and fifth rows in the table.
[0164] In some embodiments, the user can also long press a non-text region in the interface after a selection operation, enter the multi-selection mode, and in this case, the region selected by the electronic device can be determined according to the selection operation before entering the multi-selection mode and the selection operation after entering the multi-selection mode. Illustratively, as shown in (a) of FIG. 16, (b) of FIG. 16, (c) of FIG. 16, and (d) of FIG. 16, the electronic device selects the second to fifth rows in the table in response to a first selection operation, and enters the multi-selection mode in response to a long press operation on a non-text region in the interface. In the multi-selection mode, in response to a second selection operation (the start cursor of the second selection operation is located at the first column of the fourth row of the table, and the end cursor is located at the third column of the third row of the table), the third and fourth rows selected in the release of the first selection operation. After the touch point is released, the multi-selection mode is exited, and finally the electronic device selects the second and fifth rows in the table.
[0165] In some embodiments, the first operation can also be an operation in which the user selects a multi-selection option. Illustratively, as shown in (a) of FIG. 17, (b) of FIG. 17, (c) of FIG. 17, and (d) of FIG. 17, the electronic device selects the second to fifth rows in the table in response to a first selection operation, and enters the multi-selection mode in response to a click operation on a multi-selection option in the interface. In the multi-selection mode, in response to a second selection operation (the start cursor of the second selection operation is located at the first column of the fourth row of the table, and the end cursor is located at the third column of the third row of the table), the third and fourth rows selected in the release of the first selection operation. Finally, the electronic device selects the second and fifth rows in the table.
[0166] The multi-selection option can be arranged to the right of the copy option as shown in (a) of FIG. 17, or can be arranged at other positions, such as to the right of the select-all option, and embodiments of the present application do not make specific limitations in this regard.
[0167] The table content processing method provided in the embodiments of the present application can select all the content in the local area (i.e., between the row where the starting cursor is located and the row where the ending cursor is located, and between the column where the starting cursor is located and the column where the ending cursor is located) between the starting cursor and the ending cursor corresponding to the first selection operation when the user selects the target area of the table in the picture, the PDF, the webpage or the content extraction interface. In this way, the user can flexibly frame the content to be selected by moving the starting cursor and the ending cursor of the selection operation to copy and paste, so that the present solution can better meet the selection requirements of the user and improve the experience of the user when using the table content by copying and pasting.
[0168] In the case that the selected content of the electronic device meets the selection intention of the user, the user can copy the selected content and paste it to other positions.
[0169] The paste operation mainly involves the display of the copied content. FIG. 18 is a paste display interface of the copied content provided in an embodiment of the present application. As shown in (a) of FIG. 18 and (b) of FIG. 18, each row of the selected content includes 3 columns, but after being pasted in the memo, the selected content is merged into 1 column, which causes the meaning of the displayed content after pasting to be not clear and the readability to be poor. In addition, for the text content of a cell in the selected content that is naturally line-wrapped, such as the text content corresponding to the 4th row of the 1st column of the table in (a) of FIG. 18: “ordinary visual inspection”, when displayed after pasting, it is also displayed in two rows, such as the 4th row “ordinary visual inspection” and the 5th row “check” of the memo in (b) of FIG. 18, which further causes the readability to be poor.
[0170] Therefore, another table content processing method is provided in an embodiment of the present application. The method performs text processing on the selected content according to the semantics of the selected content when copying, and displays the processed selected content, so as to improve the readability of the displayed content after pasting and improve the user experience.
[0171] The table content processing method provided in the embodiments of the present application can be applied to an electronic device, which can include but is not limited to a personal computer (PC), a smart phone, a netbook, a tablet computer, a palm computer, a smart screen and the like. In order to facilitate the description, the electronic device is exemplarily taken as a mobile phone in the subsequent embodiments of the present application.
[0172] FIG. 19 is a flow diagram of another table content processing method provided in an embodiment of the present application. As shown in FIG. 19, the another table content processing method provided in the embodiment of the present application can include the following steps:
[0173] S210, in response to the paste operation after the first content in the table is copied, the second content is displayed.
[0174] The electronic device can text-process the first content according to semantics of the first content to obtain second content, which can include the first content.
[0175] Specifically, in a case where the table has a table header, the electronic device can first associate the first content with a corresponding table header according to semantics of the first content to obtain second content, and then display the second content. In this way, the user can more easily understand the meaning of the pasted content through the table header, thereby improving the readability of the pasted content.
[0176] For example, as shown in (a) of FIG. 20 and (b) of FIG. 20, "Inspection 1", "Inspection 2", and "General vision inspection" in the selected first content are displayed after being associated with the table header "Payment item"; "1", "3", "2" are displayed after being associated with the table header "Quantity"; and "16.00", "20.00", "30.00" are displayed after being associated with the table header "Amount".
[0177] For example, as shown in (a) of FIG. 21 and (b) of FIG. 21, "Energy", "Carbohydrate", "Protein", and "Fat" in the selected first content are displayed after being associated with the table header "Item"; "1", "3", "2" are displayed after being associated with the table header "Quantity"; and "16.00", "20.00", "30.00" are displayed after being associated with the table header "Amount". The table header "Nutrient reference value %" is respectively associated with the corresponding content "21%", "16%", "7%", and "40%" and merged into one word group for display.
[0178] For example, as shown in (a) of FIG. 22 and (b) of FIG. 22, the table header "Related elements" in the selected first content is respectively associated with the corresponding content "Cl2, O3, concentrated HNO3", "Activated carbon", and only the corresponding content is displayed without repeating the "Related elements" word.
[0179] In some embodiments, in a case where the table does not have a table header, the electronic device can first infer a corresponding table header according to semantics of the first content, then associate the first content with the corresponding inferred table header to obtain second content, and then display the second content. In this way, the user can more easily understand the meaning of the pasted content through the inferred table header, thereby improving the readability of the pasted content.
[0180] Exemplarily, as shown in (a) of FIG. 23 and (b) of FIG. 23, it is presumed that the table header corresponding to "December 1" and "December 2" in the selected first content can be time, the table header corresponding to "Psychology" and "Introduction to Economics" can be course, the table header corresponding to "Zhang San" and "Li Si" can be teacher, and the table header corresponding to "A College" and "B College" can be sponsor college. When displayed, the first content is displayed in association with the presumed table header.
[0181] In some embodiments, the second content can also be obtained by adding corresponding punctuation marks according to the semantic relationship between texts in the first content, and then the second content is displayed. In this way, the information hierarchy and relationship in the first content can be strengthened, the readability of the pasted content can be improved, and the user can quickly read and understand.
[0182] For example, a colon is added between texts that have an explanatory relationship. Exemplarily, as shown in (a) of FIG. 24 and (b) of FIG. 24, the second column of each of the second to seventh rows of the selected first content is used to explain the specific amount corresponding to the first column. When displayed, a colon ":" is added between the first column and the second column of each of the second to seventh rows of the first content.
[0183] For another example, a dash is added between texts that have a start-end relationship. Exemplarily, as shown in (a) of FIG. 25 and (b) of FIG. 25, "XX International Airport T1" in the selected first content has a start-end relationship with "Bus Station 1" and "Bus Station 2", respectively. When displayed, a dash "— " is added between "XX International Airport T1" and "Bus Station 1" and between "XX International Airport T1" and "Bus Station 2", respectively.
[0184] In some embodiments, the line break between continuous semantic texts in the first content can also be deleted. Exemplarily, as shown in (a) of FIG. 26 and (b) of FIG. 26, in the selected first content, the continuous semantic text "ordinary vision examination" in the cell in the first column of the fourth row has a line break between "ordinary vision" and "examination" due to the size limitation of the cell. When displayed, the line break is deleted, so as to improve the readability of the pasted content, and the user does not need to perform the operation of deleting the line break when editing the pasted content, which can reduce the editing operation of the user and improve the user experience.
[0185] In some embodiments, the position relationship between texts in the first content can also be adjusted according to the information type of each text, the semantic relationship between texts, the font size of each text, and other information, so as to strengthen the information hierarchy and relationship of the first content, improve the readability of the content pasted by the user, and facilitate the user to quickly read and understand.
[0186] Specifically, the information types of the texts in the first content can be analyzed by named entity recognition (NER) or the like, and the texts can be classified according to the information. Then, the semantic relationship between the texts in the first content can be analyzed by a chat generative pre-trained transformer (chatGPT) or the like. In addition, the position relationship between the texts in the first content can be adjusted according to the font size of the texts.
[0187] For example, as shown in (a) of FIG. 27 and (b) of FIG. 27, in the first content, the texts “08:35” and “11:40” represent the takeoff time and the landing time of the airplane (there is a start-end relationship between “08:35” and “11:40”), “3h5m” represents the flight duration, and the font of the texts “08:35” and “11:40” is the largest. Therefore, the texts “08:35” and “11:40” can be displayed first, and a hyphen can be added between the texts “08:35” and “11:40”. The text “3h5m” can be displayed next to the texts “08:35” and “11:40”, and the text “3h5m” can be enclosed in parentheses. The texts “A airport T3” and “B airport T3” represent the takeoff place and the landing place of the airplane, and the texts “A airport T3” and “B airport T3” can be displayed in a new line. A hyphen can be added between the texts “A airport T3” and “B airport T3”. The texts “Economy class” and “¥3000” represent the ticket price and the corresponding cabin, and the texts “Economy class” and “¥3000” can be displayed in a new line. The texts “Economy class” and “¥3000” can be connected by a symbol “|”. The texts “CA1xx international route”, “Local area network”, and “xx77W” represent other secondary information, and the texts “CA1xx international route”, “Local area network”, and “xx77W” can be displayed in the last line. The texts “CA1xx international route”, “Local area network”, and “xx77W” can be connected by a symbol “|”.
[0188] In some embodiments, when the table style can be displayed at the paste position, the electronic device can display a table format paste option. After the user selects the table format paste option, the electronic device can display the style of the table at the paste position. The electronic device can display the original style of the table, or can redraw the original style of the table and display the redrawn table style. The original style of the table can be obtained when the table is copied, or can be generated according to the positions of the texts in the first content. The following examples are used to illustrate the electronic device displaying the table style after redrawing the table style.
[0189] Exemplarily, as shown in (a) of FIG. 28 and (b) of FIG. 28, the selected first content does not include a table header, and the electronic device can add a corresponding table header when displaying, and the added table header can more clearly indicate the meaning of the pasted content, improving the readability of the pasted content. The electronic device can also adjust the thickness of the border corresponding to the table header, so that the border corresponding to the table header is thicker. The electronic device can also adjust the texture color of the table header to distinguish the texture color of the table header from the table body. The electronic device can also adjust the font of the text corresponding to the table header (such as font size, font style, font color, font slant, bold, underline, etc.) to distinguish the text in the table header from the text in the table body, to strengthen the hierarchy and relationship between the table header and the table body, and to improve the readability of the pasted content.
[0190] The table content processing method provided by the embodiments of the present application can improve the user experience when the user uses the table content by copying and pasting, because the displayed second content is obtained by text processing or table redrawing on the first content (i.e. the content copied by the user in the table) according to the semantics of the first content, so that the pasted second content has higher readability than the copied first content.
[0191] It can be understood that the operation input by the user on the electronic device in the present application is not limited to touch operation, but can also be voice control operation, air gesture operation or remote control operation, etc.; the touch operation input by the user is not limited to click operation and gesture operation, but can also be other operations, etc., and the embodiments of the present application do not particularly limit this.
[0192] The naming method of the operation input by the user in the embodiments of the present application is only an example, which should not be understood as a limitation of the embodiments of the present application. In some embodiments, the same operation can also use other names. Similarly, the naming of various functions, interfaces and interface elements in the embodiments of the present application is only an example, which is not used to limit the present application, and in other embodiments, other names can also be used.
[0193] In addition, the user interface shown in the embodiments of the present application is only an example, which is not used to limit the present application, and in some embodiments, the user interface displayed by the electronic device can include more or less interface elements than the illustration to realize more or less functions; the position of each interface element can be adjusted as needed; each function can also be realized by other interface elements, or can also be realized in other user interfaces, and the embodiments do not particularly limit this.
[0194] Those skilled in the art can understand that the above embodiments are exemplary and are not intended to limit the present application. In possible cases, the execution order of one or more steps in the above steps can be adjusted, for example, in some embodiments, step S140 and step S150 can be executed before step S130, and in some embodiments, step S150 can be executed before step S140. Selective combination can also be made to obtain one or more other embodiments, for example, in some embodiments, steps S110, S120, S140 and S150 can all not be executed, and in some embodiments, part of steps S110-S150 can be executed. Those skilled in the art can make selective combination of any of the above steps as needed, and any embodiment that does not deviate from the spirit of the present application falls within the protection scope of the present application.
[0195] Based on the same concept, as an implementation of the above method, the embodiment of the present application provides a data processing apparatus, which corresponds to the embodiments related to the selection operation during copying in the above method embodiments. For ease of reading, the details of the embodiments related to the selection operation during copying in the above method embodiments will not be repeated one by one, but it should be clear that the apparatus in the present embodiment can correspondingly implement all the contents of the embodiments related to the selection operation during copying in the above method embodiments.
[0196] FIG. 29 is a structural schematic diagram of a data processing apparatus provided by an embodiment of the present application. As shown in FIG. 29, the data processing apparatus provided by the present embodiment can include a selection module 210.
[0197] The selection module 210 is configured to: in response to a first selection operation on a target region of a table, select target content in the table, the target region being a partial region of the table, the target content being all content in the target region, a starting cursor of the first selection operation being located at a Pth row and a Qth column of the table, an ending cursor of the first selection operation being located at an Mth row and an Nth column of the table, the target region being the Qth column to the Nth column in the Pth row to the Mth row of the table, P and M being different, and the table being located in a picture, a PDF, a webpage or a content extraction interface.
[0198] As an optional implementation, the table further includes a table header, and in a case where the first selection operation does not select the table header of the table, the selection module 210 is further configured to: select the table header corresponding to the target content.
[0199] As an optional implementation, the data processing apparatus further includes a display module 220, and the display module 220 is configured to: in a case where the table is located in the content extraction interface, display a first interface before selecting the target content in the table in response to the first selection operation on the table content, the first interface including the target table.
[0200] In response to the content extraction operation on the first interface, display the extraction result on the first interface, the extraction result including a table corresponding to the target table, and the display mode of the table including at least one of the following:
[0201] Differentiated display of table headers and table bodies of the table;
[0202] Differentiated display of table regions and non-table regions;
[0203] In a case where a first cell in the target table corresponds to a plurality of second cells, the table includes a plurality of first sub-cells split based on the first cell, and the plurality of first sub-cells correspond to the plurality of second cells one by one.
[0204] As an optional implementation, the selection module 210 is further configured to:
[0205] In response to the first operation, enter a multi-selection mode;
[0206] In response to a second selection operation, select a first region, the second selection operation corresponding to a second region in the table; and wherein the first region is a region in the target region that does not overlap with the second region.
[0207] As an optional implementation, the selection module 210 is further configured to:
[0208] In response to the first operation, enter a multi-selection mode;
[0209] In response to a third selection operation, select a third region, the third selection operation corresponding to a fourth region in the table; and wherein the fourth region does not overlap with the target region, and the third region includes the fourth region and the target region.
[0210] As an optional implementation, the first operation includes any one of the following:
[0211] A long press operation on a non-text region or a touch point corresponding to the end cursor;
[0212] An operation of selecting a multi-selection option.
[0213] As an optional implementation, the selection module 210 is further configured to: in a case where the first operation is a long press operation, exit the multi-selection mode when the long press operation ends.
[0214] As an optional implementation, the selection module 210 is further configured to:
[0215] In response to the same content search operation, select all rows or all columns in the table that include the target content.
[0216] As an optional implementation, the display module 220 is further configured to:
[0217] When the same content as the target content exists in the table, display a same content search option; the same content search operation is a selection operation on the same content search option.
[0218] As an optional implementation, the P rows and the M columns are middle rows of the table, and the Q column and the N column are middle columns of the table.
[0219] The apparatus provided in this embodiment can perform the embodiments related to the selection operation when copying in the foregoing method embodiments, and has similar implementation principles and technical effects, which will not be described here again.
[0220] Based on the same concept, as an implementation of the foregoing method, the embodiment of the present application provides another data processing apparatus, which corresponds to the embodiments related to the content display when pasting in the foregoing method embodiments. For ease of reading, the details of the foregoing method embodiments related to the content display when pasting will not be described one by one, but it should be clear that the apparatus in this embodiment can correspondingly implement all the content of the foregoing method embodiments related to the content display when pasting.
[0221] FIG. 30 is a structural schematic diagram of another data processing apparatus provided in the embodiment of the present application. As shown in FIG. 30, the another data processing apparatus provided in this embodiment can include a display module 310, a text processing module 320, and a table redrawing module 330.
[0222] The display module 310 is configured to display second content in response to a pasting operation after copying of first content in a table, the second content being obtained by text processing of the first content according to semantics of the first content by the text processing module 320 or by table redrawing of the first content by the table redrawing module 330, and the second content including the first content.
[0223] The text processing module 320 is specifically configured to perform at least one of the following operations:
[0224] associating table body content in the first content with a corresponding table header;
[0225] modifying a punctuation mark in the first content.
[0226] As an optional implementation, the data processing apparatus further comprises a selection module, which is specifically configured to: in response to a first selection operation on the target region of the table, select the first content in the table before displaying the second content in response to a paste operation on the first content in the table, the target region being a partial region of the table, the first content being all content in the target region, a starting cursor of the first selection operation being located at the Pth row and the Qth column of the table, an ending cursor of the first selection operation being located at the Mth row and the Nth column of the table, the target region being the Qth column to the Nth column in the Pth row to the Mth row of the table, P and M being different, and the table being located in a picture, a PDF, a webpage or a content extraction interface.
[0227] As an optional implementation, the table header is a table header of the table or a table header determined according to semantics of the first content.
[0228] As an optional implementation, the text processing module 320 is specifically configured to perform at least one of the following operations:
[0229] adding a colon between texts having an explanation relationship;
[0230] adding a conjunction between texts having a start-end relationship;
[0231] deleting line breaks between continuous semantic texts in the first content.
[0232] As an optional implementation, the text processing module 320 is further configured to:
[0233] adjusting a position relationship between texts in the first content, the position relationship between the texts being related to font sizes of the texts.
[0234] As an optional implementation, the table redrawing module 330 is specifically configured to perform at least one of the following operations:
[0235] adding a table header to a table corresponding to the first content in a case where the first content does not comprise a table header;
[0236] adjusting a border thickness between a table header and a table body of the first content;
[0237] adjusting a background color of the table header;
[0238] adjusting a font of text corresponding to the table header.
[0239] The apparatus provided in this embodiment can perform the embodiments related to content display when pasting in the method embodiments, and has similar implementation principles and technical effects, which will not be described here again.
[0240] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit, and the integrated unit can be realized in the form of hardware or software. In addition, the specific names of each functional unit and module are only for convenient distinction, and do not limit the protection scope of the present application. The specific working process of the unit and module in the system can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0241] Based on the same concept, the embodiment of the present application also provides an electronic device, please refer to Figure 31, Figure 31 is the structural schematic diagram of the electronic device provided by the embodiment of the present application. As shown in Figure 31, the electronic device provided by the embodiment of the present application can include: a memory 410 and a processor 420, the memory 410 is used to store computer programs; the processor 420 is used to realize the method described in the above method embodiments when calling the computer program.
[0242] The electronic device provided by the embodiment can execute the above method embodiments, and the implementation principle and technical effects are similar, which will not be repeated here.
[0243] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the method described in the above method embodiments.
[0244] The embodiment of the present application also provides a computer program product, when the computer program product runs on the electronic device, so that the electronic device executes to realize the method described in the above method embodiments.
[0245] The embodiment of the present application also provides a chip system, including a processor, the processor is coupled with a memory, and the processor executes the computer program stored in the memory to realize the method described in the above method embodiments. Wherein, the chip system can be a single chip, or a chip module composed of multiple chips.
[0246] In the above embodiments, all or part of the methods can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the methods can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted by the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available media can be magnetic media (such as floppy disk, hard disk or magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk (SSD)), etc.
[0247] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by a computer program to instruct the relevant hardware, which can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments. The storage medium can include ROM or random access memory (RAM), magnetic disk or optical disk, and various media that can store program codes.
[0248] The naming or numbering of the steps in the present application does not mean that the steps in the method process must be executed in the time / logical order indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.
[0249] In the above embodiments, the description of each embodiment has its own emphasis. The parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0250] In the embodiments of the present disclosure, it should be understood that the disclosed apparatuses / devices and methods can be implemented in other manners. For example, the embodiments of the apparatuses / devices described above are merely schematic. For example, the division of the modules or units is merely logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0251] It should be understood that, in the description of the present application and the appended claims, the terms "comprise", "contain", "have" and any variations thereof are intended to cover non-exclusive inclusion, and mean "including but not limited to", unless otherwise specifically emphasized. For example, a process, method, system, product or device that includes a series of steps or modules does not have to be limited to those steps or modules clearly listed, but can include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices.
[0252] In the description of the present application, unless otherwise specified, " / " means that the objects associated before and after are in an "or" relationship, for example, A / B can mean A or B; "and / or" in the present application is used to describe the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can mean: A exists alone, A and B exist together, and B exists alone, where A, B can be singular or plural.
[0253] Also, in the description of the present application, unless otherwise specified, "multiple" means two or more than two. "At least one of the following" or similar expressions means any combination of the items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple.
[0254] As used in the present application and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to a determination" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [the described condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the described condition or event]" or "in response to detecting [the described condition or event]" depending on the context.
[0255] In addition, in the description of the present application and the appended claims, the terms "first", "second", and the like are used merely to distinguish similar objects from each other, and do not necessarily indicate a particular order or sequence, nor do they necessarily indicate relative importance of, or a preference for, the identified technical features. It is to be understood that the data so used is interchangeable under appropriate circumstances, such that the embodiments described herein are capable of operation in other sequences than those explicitly described or otherwise illustrated herein; the features of the one described as "first", "second", etc. can be clearly discerned from the context of the description to include at least one of the features.
[0256] In the embodiments of the present application, the words "exemplary" and "for example" are used to mean serving as an example, instance, or illustration. Any implementation described herein as "exemplary" or "for example" is not necessarily to be construed as preferred or advantageous over other implementations. The illustrative embodiments of the present application are not meant to be limiting but rather are intended to be illustrative.
[0257] In the present application, the expressions "one embodiment" or "some embodiments" and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrases "in one embodiment" or "in some embodiments" in various places in the specification are not necessarily all referring to the same embodiment, although they can. The expressions "in one embodiment" or "in some embodiments" are utilized to generally introduce a feature, structure, or characteristic that can be utilized in one or more embodiments of the application.
[0258] Finally, it should be noted that the above-described embodiments are merely intended for describing and illustrating, but not limiting, the technical solutions of the present application; even though the present application has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above-described embodiments, or equivalently replace some or all of the technical features thereof; and such modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method of processing contents of a table, characterized by, The method comprises: In response to a first selection operation on a target region of a table, selecting target content in the table, the target region being a partial region of the table, the target content being all content in the target region, a starting cursor of the first selection operation being located at a Pth row and a Qth column of the table, an ending cursor of the first selection operation being located at an Mth row and an Nth column of the table, the target region being the Qth column to the Nth column in the Pth row to the Mth row of the table, P and M being different, the table being located in a picture, a PDF, a webpage, or a content extraction interface.
2. The method of claim 1, wherein, The table further comprises a table header, and in a case where the first selection operation does not select the table header of the table, the response to the first selection operation on the table content further comprises: selecting the table header corresponding to the target content.
3. The method according to claim 1 or 2, characterized in that, In a case where the table is located in a content extraction interface, before the response to the first selection operation on the table content, the method further comprises: displaying a first interface, the first interface comprising a target table; in response to a content extraction operation on the first interface, displaying an extraction result on the first interface, the extraction result comprising the table corresponding to the target table, the display mode of the table comprising at least one of the following: differential display of a table header and a table body of the table; differential display of a table region and a non-table region; in a case where a first cell in the target table corresponds to a plurality of second cells, the table comprising a plurality of first sub-cells split based on the first cell, the plurality of first sub-cells corresponding to the plurality of second cells one by one.
4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: in response to a first operation, entering a multiple selection mode; in response to a second selection operation, selecting a first region, the second selection operation corresponding to a second region in the table; wherein the first region is a region that does not overlap with the target region and the second region.
5. The method according to any one of claims 1 to 4, characterized in that, The method further comprises: in response to a first operation, entering a multiple selection mode; in response to a third selection operation, selecting a third region, the third selection operation corresponding to a fourth region in the table; wherein the fourth region and the target region do not overlap, and the third region comprises the fourth region and the target region.
6. The method according to claim 4 or 5, characterized in that, The first operation comprises any one of the following: a long press operation on a non-text region or a touch point corresponding to the ending cursor; an operation of selecting a multiple selection option.
7. The method of claim 6, wherein, The method further comprises: in a case where the first operation is the long press operation, when the long press operation ends, exiting the multiple selection mode.
8. The method according to any one of claims 1 to 7, characterized in that, The method further comprises: in response to a same content search operation, selecting all rows or all columns in the table that comprise the target content.
9. The method of claim 8, wherein, The response to the selection operation on the table content further comprises: when there is content in the table that is the same as the target content, displaying a same content search option; the same content search operation being a selection operation on the same content search option.
10. The method according to any one of claims 1 to 9, characterized in that, The Pth row and the Mth row are middle rows of the table, and the Qth column and the Nth column are middle columns of the table.
11. A method of processing contents of a table, characterized by, The method comprises: In response to a paste operation after copying the first content in the table, display the second content, the second content being obtained by text processing or table redrawing on the first content according to semantics of the first content, the second content comprising the first content; The text processing on the first content comprises at least one of the following: associating table body content in the first content with corresponding table headers; modifying punctuation in the first content.
12. The method of claim 11, wherein, Before displaying the second content in response to the paste operation after copying the first content in the table, the method further comprises: In response to a first selection operation on a target area of the table, select the first content in the table, the target area being a partial area of the table, the first content being all content in the target area, a start cursor of the first selection operation being located at the Pth row and the Qth column of the table, an end cursor of the first selection operation being located at the Mth row and the Nth column of the table, the target area being the Qth column to the Nth column in the Pth row to the Mth row of the table, P and M being different, the table being located in a picture, a PDF, a webpage or a content extraction interface.
13. The method according to claim 11 or 12, characterized in that, The table headers are table headers of the table or table headers determined according to semantics of the first content.
14. The method according to any one of claims 11-13, characterized in that, The modifying of the punctuation in the first content comprises at least one of the following operations: adding a colon between texts having an explanatory relationship; adding a conjunction between texts having a start-end relationship; deleting line breaks between continuous semantic texts in the first content.
15. The method according to any one of claims 11-14, characterized in that, The text processing on the first content further comprises: adjusting position relationships between texts in the first content, the position relationships between the texts being related to font sizes of the texts.
16. The method according to any one of claims 11-15, characterized in that, The table redrawing on the first content comprises at least one of the following operations: in a case where the first content does not comprise table headers, adding table headers to a table corresponding to the first content; adjusting a border thickness between table headers and table bodies corresponding to the first content; adjusting a hatching color of the table headers; adjusting a font of texts corresponding to the table headers.
17. An electronic device, comprising: comprise: a memory and a processor, the memory being configured to store a computer program, and the processor being configured to execute the computer program to implement the method according to any one of claims 1-10, or to implement the method according to any one of claims 11-16.
18. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method according to any one of claims 1-10, or to implement the method according to any one of claims 11-16.
19. A computer program product, characterised in that, The computer program product, when running on the electronic device, causes the electronic device to implement the method according to any one of claims 1-10, or to implement the method according to any one of claims 11-16.
20. A chip system, characterized by The chip system comprises a processor coupled with a memory, and the processor executes a computer program stored in the memory to implement the method according to any one of claims 1-10, or to implement the method according to any one of claims 11-16.
Citation Information
Patent Citations
Data acquisition and processing method and system based on PDF financial data report
CN115630621A
In-image table identification method and system based on deep learning
CN115761773A
PDF (Portable Document Format) text copying optimization method and device, equipment and medium
CN117421143A