Table content processing method and electronic equipment
By implementing flexible selection and differentiated display of target areas in the table content processing method, the problem of crude table content copy-paste solutions in existing technologies is solved, thus improving the user experience.
Patent Information
- Application Number
- CN202410527652.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2025-10-28
AI Technical Summary
In the prior art, the solution of copying and pasting table contents is crude and difficult to meet user needs, resulting in a poor user experience.
This paper provides a table content processing method that selects the target area content of the table by responding to the user's selection operation, and implements flexible content selection and differentiated display in the image, PDF, web page or content extraction interface. It supports multiple selection mode and identical content search, improving selection efficiency and accuracy.
The efficiency and accuracy of the table content copy and paste process are improved to meet the user's selection needs and enhance the user experience.
Smart Images

Figure CN120850972A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method for processing table content and an electronic device. Background Technology
[0002] Spreadsheets, as a means of organizing and managing data, are widely used in various fields such as education, finance, and healthcare. In many cases, users reuse the content of spreadsheets.
[0003] Users typically reuse table content by copying and pasting. However, current solutions for copying and pasting table content are rather crude and fail to meet user needs, resulting in a poor user experience. Summary of the Invention
[0004] In view of this, this application provides a table content processing method and an electronic device to better meet user needs and improve the user experience when using table content by copying and pasting.
[0005] To achieve the above objectives, in a first aspect, embodiments of this application provide a table content processing method. In response to a first selection operation targeting a target area of a table, target content in the table is selected. The target area is a portion of the table, and the target content is all the content within the target area. The starting cursor of the first selection operation is located in row P and column Q of the table, and the ending cursor of the first selection operation is located in row M and column N of the table. The target area is columns Q to N from row P to row M of the table, where P and M are different. The table is located in an image, PDF, webpage, or content extraction interface.
[0006] The table content processing method provided in this application can, when a user selects a target area of a table in an image, PDF, webpage, or content extraction interface, select all content in a local area (i.e., between the row where the start cursor is located and the row where the end cursor is located, or between the column where the start cursor is located and the column where the end cursor is located) corresponding to the user's first selection operation, based on the user's first selection operation. In this way, the user can flexibly select the content they want to select by moving the start and end cursors of the selection operation for copying and pasting. Thus, this solution can better meet the user's selection needs and improve the user's experience when using table content by copying and pasting.
[0007] In one possible implementation of the first aspect, the table further includes a header, and in the case that the first selection operation does not select the table header, in response to the first selection operation on the table content, the table header corresponding to the target content is further selected.
[0008] When users select table content, they usually intend to select the table header. Through the above implementation method, the table header corresponding to the user's selected target content can be selected even if the user does not select a table header. This makes the selected content more consistent with the user's selection intent and improves the user experience.
[0009] In one possible implementation of the first aspect, when the table is located in a content extraction interface, the method further includes, before selecting target content in the table in response to a first selection operation on the table content:
[0010] The first interface is displayed, which includes the target table;
[0011] In response to a content extraction operation on the first interface, the extraction results are displayed on the first interface. The extraction results include a table corresponding to the target table, and the table is displayed in at least one of the following ways:
[0012] The table header and body are displayed differently;
[0013] Differentiated display of table areas and non-table areas;
[0014] In the case where the first cell in the target table corresponds to multiple second cells, the table includes multiple first sub-cells split from the first cell, and each of the multiple first sub-cells corresponds one-to-one with the multiple second cells.
[0015] The above implementation method enables differentiated display of table content in the content extraction interface, thus providing a more intuitive presentation of the table content; and it also allows for the splitting of merged cells in the table to better meet users' selection needs for table content.
[0016] In one possible implementation of the first aspect, the method further includes:
[0017] In response to the first action, enter multi-select mode;
[0018] In response to the second selection operation, the first region is selected, and the second selection operation corresponds to the second region in the table; wherein, the first region is the region that does not overlap with the target region and the second region.
[0019] The above implementation method enables the selection of non-overlapping areas corresponding to multiple selection operations by the user in multi-select mode, thereby improving selection efficiency.
[0020] In one possible implementation of the first aspect, the method further includes:
[0021] In response to the first action, enter multi-select mode;
[0022] In response to the third selection operation, the third region is selected, which corresponds to the 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.
[0023] In one possible implementation of the first aspect, the first operation includes any of the following:
[0024] Long press operation for non-text areas or touch points corresponding to the end cursor;
[0025] Selecting multiple options.
[0026] In one possible implementation of the first aspect, the method further includes: when the first operation is a long press operation, exiting the multi-select mode when the long press operation ends.
[0027] In one possible implementation of the first aspect, the method further includes:
[0028] In response to a same content search operation, select all rows or columns in the table that contain the target content.
[0029] Through the above implementation method, when a user selects the same content to search, all rows or columns in the table that include the user's selected content can be selected, thereby improving the flexibility and convenience of the selection operation and increasing the selection efficiency.
[0030] In one possible implementation of the first aspect, in response to a selection operation on table content, it further includes:
[0031] When content identical to the target content exists in the table, the same content search option is displayed; the same content search operation is a selection operation for the same content search option.
[0032] In one possible implementation of the first aspect, rows P and M are the middle rows of the table, and columns Q and N are the middle columns of the table.
[0033] Secondly, embodiments of this application provide a data processing apparatus, which includes a selection module;
[0034] The selection module is used to: select target content in a table in response to a first selection operation targeting a target area of the table. The target area is a portion of the table, and the target content is all the content within the target area. The starting cursor of the first selection operation is located at row P, column Q of the table, and the ending cursor of the first selection operation is located at row M, column N of the table. The target area is columns Q to N in rows P to M of the table, where P and M are different. The table is located in an image, PDF, webpage, or content extraction interface.
[0035] In one possible implementation of the second aspect, the table further includes a header, and if the first selection operation does not select the table header, the selection module is further configured to: select the header corresponding to the target content.
[0036] In one possible implementation of the second aspect, the data processing apparatus further includes a display module, the display module being configured to: when the table is located in a content extraction interface, display a first interface including the target table before selecting target content in the table in response to a first selection operation for the table content;
[0037] In response to a content extraction operation on the first interface, the extraction results are displayed on the first interface. The extraction results include a table corresponding to the target table, and the table is displayed in at least one of the following ways:
[0038] The table header and body are displayed differently;
[0039] Differentiated display of table areas and non-table areas;
[0040] In the case where the first cell in the target table corresponds to multiple second cells, the table includes multiple first sub-cells split from the first cell, and each of the multiple first sub-cells corresponds one-to-one with the multiple second cells.
[0041] In one possible implementation of the second aspect, the selection module is further configured to:
[0042] In response to the first action, enter multi-select mode;
[0043] In response to the second selection operation, the first region is selected, and the second selection operation corresponds to the second region in the table; wherein, the first region is the region that does not overlap with the target region and the second region.
[0044] In one possible implementation of the second aspect, the selection module is further configured to:
[0045] In response to the first action, enter multi-select mode;
[0046] In response to the third selection operation, the third region is selected, which corresponds to the 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.
[0047] In one possible implementation of the second aspect, the first operation includes any of the following:
[0048] Long press operation for non-text areas or touch points corresponding to the end cursor;
[0049] Selecting multiple options.
[0050] In one possible implementation of the second aspect, the selection module is further configured to: in the case that the first operation is a long press operation, exit the multi-selection mode when the long press operation ends.
[0051] In one possible implementation of the second aspect, the selection module is further configured to:
[0052] In response to a same content search operation, select all rows or columns in the table that contain the target content.
[0053] In one possible implementation of the second aspect, the display module is further configured to:
[0054] When content identical to the target content exists in the table, the same content search option is displayed; the same content search operation is a selection operation for the same content search option.
[0055] In one possible implementation of the second aspect, rows P and M are the middle rows of the table, and columns Q and N are the middle columns of the table.
[0056] Thirdly, an embodiment of this application provides a method for processing table content, including:
[0057] In response to a paste operation after copying the first content in the table, the second content is displayed. The second content is obtained by text processing the first content based on its semantics, or by redrawing the table of the first content. The second content includes the first content.
[0058] Text processing performed on the first content includes at least one of the following:
[0059] Associate the table body content in the first content with the corresponding table header;
[0060] Modify the punctuation marks in the first part of the text.
[0061] The table content processing method provided in this application provides that the second content displayed is obtained by text processing or table redrawing of the first content (i.e., the content that the user selects to copy in the table) based on the semantics of the first content. Therefore, the second content displayed after pasting has higher readability than the copied first content. Thus, this solution can improve the user's experience when using table content by copying and pasting.
[0062] In one possible implementation of the third aspect, before displaying the second content in response to a paste operation following copying the first content from the table, the method further includes:
[0063] In response to the first selection operation on the target area of the table, the first content in the table is selected. The target area is a part of the table, and the first content is all the content in the target area. The starting cursor of the first selection operation is located at row P and column Q of the table, and the ending cursor of the first selection operation is located at row M and column N of the table. The target area is columns Q to N in rows P to M of the table, where P and M are different. The table is located in an image, PDF, webpage, or content extraction interface.
[0064] In one possible implementation of the third aspect, the table header is the header of a table, or a header determined according to the semantics of the first content.
[0065] In one possible implementation of the third aspect, modifying the punctuation in the first content includes at least one of the following operations:
[0066] Add colons between texts that have an interpretive relationship;
[0067] Add connectors between texts that have a start and end relationship;
[0068] Remove line breaks between consecutive semantic text in the first content.
[0069] In the above embodiments, associating the first content with the corresponding or inferred header allows the meaning of the first content to be clearly indicated through the header or inferred header, thereby improving the readability of the pasted content. Adding corresponding punctuation marks between the text in the first content strengthens the information hierarchy and relationships within the first content, improving the readability of the pasted content and facilitating quick reading and understanding by users. Deleting line breaks between consecutive semantic text in the first content reduces the amount of editing operations required by users for pasted content, thus enhancing the user experience.
[0070] In one possible implementation of the third aspect, the text processing of the first content further includes:
[0071] Adjust the positional relationship between the text elements in the first content. The positional relationship of each text element is related to the font size of each text element.
[0072] In one possible implementation of the third aspect, the table redrawing for the first content includes at least one of the following operations:
[0073] If the first content does not include a table header, add a table header to the table corresponding to the first content;
[0074] Adjust the thickness of the border between the header and body of the table corresponding to the first content;
[0075] Adjust the background color of the meter;
[0076] Adjust the font of the text corresponding to the table header.
[0077] In the above embodiments, by adding a table header to the table corresponding to the first content, the meaning of the pasted content can be clearly indicated, thereby improving the readability of the pasted content; by adjusting the border thickness between the table header and the table body corresponding to the first content, adjusting the background color 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, thereby improving the readability of the pasted content.
[0078] Fourthly, embodiments of this application provide a data processing apparatus, which includes a display module, a text processing module, and a table redrawing module;
[0079] The display module is used to: display second content in response to a paste operation after copying the first content in the table. The second content is obtained by the text processing module performing text processing on the first content according to the semantics of the first content, or by the table redrawing module performing table redrawing on the first content. The second content includes the first content.
[0080] The text processing module is specifically used to perform at least one of the following operations:
[0081] Associate the table body content in the first content with the corresponding table header;
[0082] Modify the punctuation marks in the first part of the text.
[0083] In one possible implementation of the fourth aspect, the data processing apparatus further includes a selection module, specifically configured to: before displaying the second content in response to a paste operation following copying the first content in the table, select the first content in the table in response to a first selection operation targeting a target area of the table, wherein the target area is a portion of the table, the first content is all the content within the target area, the starting cursor of the first selection operation is located at row P, column Q of the table, the ending cursor of the first selection operation is located at row M, column N of the table, and the target area is columns Q to N from row P to row M of the table, where P and M are different, and the table is located in an image, PDF, webpage, or content extraction interface.
[0084] In one possible implementation of the fourth aspect, the table header is the header of a table, or a header determined according to the semantics of the first content.
[0085] In one possible implementation of the fourth aspect, the text processing module is specifically configured to perform at least one of the following operations:
[0086] Add colons between texts that have an interpretive relationship;
[0087] Add connectors between texts that have a start and end relationship;
[0088] Remove line breaks between consecutive semantic text in the first content.
[0089] In one possible implementation of the fourth aspect, the text processing module is further configured to:
[0090] Adjust the positional relationship between the text elements in the first content. The positional relationship of each text element is related to the font size of each text element.
[0091] In one possible implementation of the fourth aspect, the table redrawing module is specifically used to perform at least one of the following operations:
[0092] If the first content does not include a table header, add a table header to the table corresponding to the first content;
[0093] Adjust the thickness of the border between the header and body of the table corresponding to the first content;
[0094] Adjust the background color of the meter;
[0095] Adjust the font of the text corresponding to the table header.
[0096] Fifthly, embodiments of this application provide an electronic device, including: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the method described in the first aspect or any embodiment of the first aspect when the computer program is invoked.
[0097] In a sixth aspect, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any of the embodiments of the first or third aspect described above.
[0098] In a seventh aspect, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to perform the method described in any of the embodiments of the first or third aspect described above.
[0099] Eighthly, embodiments of this application provide a chip system including a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the method described in any of the embodiments of the first or third aspects. The chip system may be a single chip or a chip module composed of multiple chips.
[0100] It is understood that the beneficial effects of the second aspect and the fourth to eighth aspects mentioned above can be found in the relevant descriptions of the first and third aspects mentioned above, and will not be repeated here. Attached Figure Description
[0101] Figure 1 Some schematic diagrams of the interface for selecting table content are provided for embodiments of this application;
[0102] Figure 2 A flowchart illustrating a table content processing method provided in an embodiment of this application;
[0103] Figures 3-7 A schematic diagram of the content extraction interface provided in an embodiment of this application;
[0104] Figures 8-10 This is a schematic diagram of the selection results provided in the embodiments of this application;
[0105] Figure 11 and Figure 12 A schematic diagram illustrating the selection process for finding identical content provided in an embodiment of this application;
[0106] Figures 13-17 A schematic diagram illustrating the selection process for multiple options provided in this application embodiment;
[0107] Figure 18 This application provides a paste display interface for copied content in an embodiment;
[0108] Figure 19 A flowchart illustrating another table content processing method provided in this application embodiment;
[0109] Figures 20-28 This application provides a paste display interface for copied content in an embodiment.
[0110] Figure 29 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0111] Figure 30 This is a schematic diagram of the structure of another data processing apparatus provided in an embodiment of this application;
[0112] Figure 31 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0113] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is only for explaining specific embodiments and is not intended to limit the application. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0114] Tables are widely used in various fields as a means of organizing and structuring data. Users can reuse the content within a table by copying and pasting.
[0115] Copying primarily involves selecting table content. When the table is located in an interface that the user cannot directly edit (such as an image interface, a portable document format (PDF) interface, a webpage interface, or a content extraction interface), one selection method for the table content is to use a selection tool in word selection mode to make selections. However, this method usually requires multiple selections, which is inefficient.
[0116] Another selection method is to select directly by moving the cursor within the interface. However, in many cases, this method fails to accurately identify the user's selection intent, resulting in the selected content differing significantly from the user's intended choice. For example, such as... Figure 1 As shown in (a), the cursor movement range corresponding to the user's selection operation is from "Check 4" to "30.00" (that is, the user wants to select the entire row corresponding to "Check 4", which is the 5th row), and the system ultimately selects not only the 5th row, but also the 2nd and 3rd columns in rows 1 to 4.
[0117] For example, such as Figure 1 As shown in (b), the cursor movement range corresponding to the user's selection operation is from "Check 1" to "Check 4" (that is, the user wants to select the first column in the second to fifth rows), and the system ultimately selects not only the first column in the second to fifth rows, but also the second and third columns in the second to fourth rows.
[0118] For example, such as Figure 1 As shown in (c), the cursor movement range corresponding to the user's selection operation is from "Check 1" to "Check 4" corresponding to the number "1" (that is, the user wants to select the first and second columns in rows 2 to 5). In the end, the system not only selects the first and second columns in rows 2 to 5, but also selects the third column in rows 2 to 4.
[0119] For example, such as Figure 1 As shown in (d), if a user wants to select "Topic 2" and the corresponding "Date 1" and "Location 2", the user may move the cursor from "Date 1" to "Location 2" when making the selection. In the end, the system will not only select "Date 1", "Topic 2" and "Location 2", but also "Topic 1" and "Location 1".
[0120] When copying and selecting table content in interfaces that cannot be directly edited, the above solutions fail to balance selection efficiency with accurately recognizing the user's selection intent, making it difficult to meet user needs and resulting in a poor user experience.
[0121] Therefore, this application provides a table content processing method that, when copying and selecting table content in an interface that cannot be directly edited, balances selection efficiency with accurate identification of the user's selection intent, thereby better meeting user needs and improving user experience.
[0122] The table content processing method provided in this application embodiment can be applied to electronic devices, including but not limited to personal computers (PCs), smartphones, netbooks, tablets, PDAs, smart screens, etc. For ease of explanation, this application embodiment will use a mobile phone as an example for illustrative purposes.
[0123] Figure 2 This is a flowchart illustrating a table content processing method provided in an embodiment of this application, as shown below. Figure 2 As shown, the table content processing method provided in this application embodiment may include the following steps:
[0124] S110, Display the first interface.
[0125] 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.
[0126] S120, In response to the content extraction operation on the first interface, display the extraction result on the first interface.
[0127] 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).
[0128] 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 may be displayed differently to more intuitively present the table content. For example, as shown... Figure 3 As shown in (a) and (b), in response to the content extraction operation of the first interface, the text in the table header 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.
[0129] In some embodiments, the table area can also be displayed differently from non-table areas to more intuitively present the table content. For example, such as... Figure 4 (a) and Figure 4 As shown in (b) of the diagram, 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 areas and non-table areas are displayed with different colors in the extraction results. In some embodiments, different background shading can also be used to differentiate the display of the table areas and non-table areas.
[0130] In some embodiments, if there is a first cell (i.e., a merged cell) in the target table, and the merged cell corresponds to multiple second cells, the table corresponding to the extraction result may include multiple first sub-cells split based on the first cell, and the first sub-cells may correspond one-to-one with the second cells.
[0131] For example, such as Figure 5 (a) and Figure 5 As shown in (b), the target table in the first interface contains merged cells, namely the cell containing "Date 1" and the cell containing "Date 2". "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, the displayed extraction results show that the cell containing "Date 1" is split into two sub-cells, with both sub-cells containing the text "Date 1", corresponding to "Topic 1" and "Topic 2" respectively. The cell containing "Date 2" is split into three sub-cells, with all three sub-cells containing the text "Date 2", corresponding to "Topic 3", "Topic 4", and "Topic 5" respectively.
[0132] By splitting merged cells, users' needs for selecting table content can be better met. For example, if a user wants to... Figure 5 In (b) of the example, if "Topic 2" and the corresponding "Date 1" and "Location 2" are selected, the user can directly move the cursor from "Date 1" in the 3rd row of the 1st column to "Location 2" to select the entire 3rd row, instead of... Figure 1 As shown in (d), "Topic 1" and "Location 1" are also selected.
[0133] In some embodiments, after splitting the merged cells, the text positions in the original merged cells can be maintained in the table corresponding to the extraction results, and markers can be set for each split cell to indicate its position. This allows the content of a merged cell to be displayed in only one place in the extraction interface, thereby reducing the clutter of the content displayed in the extraction interface when there is a lot of content in the merged cells and improving the user experience.
[0134] For example, such as Figure 6 (a) and Figure 6 As shown in (b), the target table in the first interface contains merged cells, namely the cell containing "Date 1" and the cell containing "Date 2". "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, the displayed extraction results show that the cell containing "Date 1" is split into two sub-cells, with triangle markers on both sides of each sub-cell. The cell containing "Date 2" is split into three sub-cells, with triangle markers on both sides of each of the three sub-cells.
[0135] It is understood that the markers set for the split cells can also be other shapes such as rhombuses or circles, and this application embodiment does not specifically limit this.
[0136] In some embodiments, if there are blank cells in the target table, blank cells, dashed lines, or dashed borders can be displayed in the table corresponding to the extracted results, so that the cursor of subsequent selection operations can be moved to the location of the blank cells.
[0137] For example, such as Figure 7 (a) and Figure 7 As shown in (b), in the target table of the first interface, the third cell in the third row is blank. In response to the content extraction operation of the first interface, the extracted results display a blank cell in the original blank cell's position.
[0138] S130, In response to the first selection operation on the table content, select the target content in the table.
[0139] The table can be located in an image, PDF, or webpage, or it can be located in the content extraction interface displayed after the content extraction operation is performed on the image, PDF, or webpage. In this embodiment, the following description will use the example of the table being located in the content extraction interface.
[0140] The first selection operation can be the user moving the cursor within a table on the content extraction interface while copying. In response to this first selection operation on the table content, the electronic device can select all content within a target area of the table. The target area can be a portion or the entire table, and it can be determined based on the positions of the starting and ending cursors of the first selection operation. For example, if the starting cursor of the first selection operation is located in row P, column Q, and the ending cursor is located in row M, column N, then the target area can be columns Q through N from row P to row M. P and M can be the same or different, and Q and N can be the same or different. Specifically, when P and M are the same, Q and N can be different; when Q and N are the same, P and M can be different.
[0141] For example, such as Figure 8 As shown in (a), the starting cursor of the first selection operation is located in the 2nd row and 1st column of the table, and the ending cursor is located in the 2nd row and 3rd column of the table. Therefore, the selected target area is the 1st to 3rd columns of the 2nd row of the table.
[0142] For example, such as Figure 8 As shown in (b) in the table, the starting cursor of the first selection operation is located in the first column of the first row of the table, and the ending cursor is located in the first column of the eighth row of the table. Therefore, the selected target area is the first column of the first to eighth rows of the table.
[0143] For example, such as Figure 8 As shown in (c), the starting cursor of the first selection operation is located in the first column of the second row of the table, and the ending cursor is located in the second column of the fifth row of the table. Therefore, the selected target area is the first and second columns of the second to fifth rows of the table.
[0144] For example, such as Figure 8 As shown in (d) in the table, the starting cursor of the first selection operation is located in the first column of the third row of the table, and the ending cursor is located in the third column of the third row of the table. Therefore, the selected target area is the first to third columns of the third row of the table.
[0145] For example, such as Figure 8 As shown in (e), the starting cursor of the first selection operation is located in the first column of the second row of the table, and the ending cursor is located in the third column of the third row of the table. Therefore, the selected target area is the first to third columns in the second and third rows of the table.
[0146] For example, such as Figure 8 As shown in (f), the starting cursor of the first selection operation is located in the first column of the second row of the table, and the ending cursor is located in the third column of the third row of the table. Therefore, the selected target area is the first to third columns in the second and third rows of the table.
[0147] In some embodiments, the target area can also be the middle row and middle column of a table. For example, as shown... Figure 8 As shown in (g), the starting cursor of the first selection operation is located in the 2nd column of the 2nd row of the table, and the ending cursor is located in the 3rd column of the 5th row of the table. The selected target area is the 2nd and 3rd columns of the 2nd to 5th rows of the table.
[0148] This table content selection method allows users to select all content within a local area (between the starting and ending cursors) when choosing a target area in an image, PDF, webpage, or content extraction interface, based on the user's first selection. This means users can flexibly select the desired content for copying and pasting by moving the starting and ending cursors, better meeting their selection needs and improving the user experience when using table content via copy and paste.
[0149] Since users usually intend to select the table header when selecting table content, in some embodiments, even if the table header exists but the first selection operation does not select the header, the electronic device can still select the header corresponding to the target content at the same time as selecting the target area according to the user's first selection operation, so that the selected content better matches the user's selection intention and improves the user experience.
[0150] For example, such as Figure 9 As shown, the table contains headers (i.e., "Payment Item", "Quantity", and "Amount"). The electronic device selects the target content "Check 2", "2", "20.00", "Check 3", "1", and "14.00" based on the user's first selection. Furthermore, the electronic device selects the headers "Payment Item" corresponding to "Check 2", "Quantity" corresponding to "2" and "1", and "Amount" corresponding to "20.00" and "14.00" using dashed boxes. The electronic device can also select the headers corresponding to the target content in other ways; this embodiment does not specifically limit this method.
[0151] In some embodiments, when the first selection operation selects both the meter header and the meter body, the electronic device can also differentiate the selected meter header area and the meter body area. For example, as... Figure 10 As shown, the first selection operation selects both the table header (i.e., row 1) and the table body (i.e., rows 2 to 4), and the color of the selected header area is different from the color of the table body area.
[0152] Electronic devices can also differentiate the selected header and body areas by setting different selection styles and other methods.
[0153] S140. In response to a search operation for identical content, select all rows or columns in the table that contain the target content.
[0154] The "Find Same Content" operation can be a user's selection of search options for the same content. For example, such as... Figure 11 As shown in (a) above, the same content search option (i.e., the "Find Same" option) can be placed to the right of the select all option. The same content search option can also be placed in other positions, such as to the left of the select all option, and this embodiment does not specifically limit this.
[0155] The "Find Same Content" option can appear together with the "Copy" option, or it can be displayed only if the user selects the target content in the table, and the table first checks if there is content identical to the target content.
[0156] After a user triggers the same content search option, the electronic device can select all rows or columns in the table that contain the target content. This enhances the flexibility and convenience of the initial selection operation and improves selection efficiency. For example, such as... Figure 11 (a) and Figure 11 As shown in (b), after the electronic device selects "Topic 3" based on the user's first selection operation, it selects the 3rd and 4th rows containing the target content "Topic 3" in response to the user clicking the "Find Same" option.
[0157] In some embodiments, after a user triggers the same content search option, the electronic device can directly copy the selected content to the clipboard after selecting all rows or columns in the table that contain the target content, thereby further improving selection efficiency. For example, as... Figure 12 (a) and Figure 12 As shown in (b), after the electronic device selects "Topic 3" based on the user's first selection, it selects the third and fourth lines containing the target content "Topic 3" in response to the user clicking the "Find Same" option. Simultaneously, it copies the content of the third and fourth lines and prompts the user that the selected content has been copied to the clipboard.
[0158] S150. In response to the first operation, enter multi-select mode. In multi-select mode, in response to the second selection operation on the table content, select the corresponding content in the table.
[0159] In some embodiments, the first operation may be a long press operation on the touch point corresponding to the end cursor of the user's first selection operation. The electronic device may respond to the first operation by entering a multi-selection mode, and select the corresponding content in the table based on the first selection operation and the user's second selection operation after entering the multi-selection mode. The second selection operation may be a single selection operation or a multi-selection operation.
[0160] Specifically, if the selection area corresponding to the first selection operation (hereinafter referred to as the first selection area) and the selection area corresponding to the second selection operation (hereinafter referred to as the second selection area) do not overlap, then both the first selection area and the second selection area are selected.
[0161] For example, such as Figure 13 (a) Figure 13 (b) and Figure 13 As shown in (c), the electronic device responds to the first selection operation by selecting row 2 in the table. In response to a long press operation on the touch point corresponding to the end cursor of the first selection operation, it enters multi-select mode. In multi-select mode, in response to a second selection operation (the start cursor of the second selection operation is located in row 4, column 1 of the table, and the end cursor is located in row 5, column 3 of the table), it selects rows 4 and 5 in the table again. After releasing the touch point (i.e., the long press operation ends), it exits multi-select mode, and finally the electronic device selects rows 2, 4, and 5 in the table.
[0162] If the first selection area and the second selection area overlap, the non-overlapping portions of the first selection area and the second selection area are selected.
[0163] For example, such as Figure 14 (a) Figure 14 (b) and Figure 14 As shown in (c), the electronic device responds to the first selection operation by selecting rows 2 through 5 of the table. In response to a long press operation on the touch point corresponding to the end cursor of the first selection operation, it enters multi-select mode. In multi-select mode, in response to a second selection operation (the start cursor of the second selection operation is located in row 4, column 1 of the table, and the end cursor is located in row 3, column 3 of the table), it releases rows 3 and 4 selected during the first selection operation. After releasing the touch point, it exits multi-select mode, and the electronic device finally selects rows 2 and 5 of the table.
[0164] For example, such as Figure 14 (d) in Figure 14 (e) and Figure 14As shown in (f), the electronic device responds to the first selection operation by selecting rows 2 through 5 of the table. In response to a long press operation on the touch point corresponding to the end cursor of the first selection operation, it enters multi-select mode. In multi-select mode, in response to a second selection operation (the start cursor of the second selection operation is located in row 6, column 1 of the table, and the end cursor is located in row 5, column 3 of the table), it releases row 5, which was selected during the first selection operation. After releasing the touch point, it exits multi-select mode, and the electronic device ultimately selects rows 2 through 4, and row 6 of the table.
[0165] In some embodiments, the first operation may also be a long press operation on a non-text area of the interface. For example, as shown... Figure 15 (a) Figure 15 (b) Figure 15 (c) and Figure 15 As shown in (d), the electronic device enters multi-select mode in response to a long press on a non-text area of the interface. In multi-select mode, in response to the first selection, rows 2 to 5 of the table are selected. In response to the second selection (the starting cursor for the second selection is located in row 4, column 1 of the table, and the ending cursor is located in row 3, column 3 of the table), rows 3 and 4 selected during the first selection are released. After releasing the touch, multi-select mode is exited, and the electronic device ultimately selects rows 2 and 5 of the table.
[0166] In some embodiments, after a selection operation, a user can also long-press a non-text area on the interface to enter a multi-select mode. In this case, the area selected by the electronic device can be determined based on the selection operation before entering the multi-select mode and the selection operation after entering the multi-select mode. For example, as shown... Figure 16 (a) Figure 16 (b) Figure 16 (c) and Figure 16 As shown in (d), the electronic device responds to the first selection operation by selecting rows 2 through 5 of the table. In response to a long press on a non-text area of the interface, it enters multi-select mode. In multi-select mode, in response to a second selection operation (the starting cursor for the second selection operation is located in row 4, column 1 of the table, and the ending cursor is located in row 3, column 3 of the table), it releases rows 3 and 4, which were selected during the first selection operation. After releasing the touch point, it exits multi-select mode, and the electronic device ultimately selects rows 2 and 5 of the table.
[0167] In some embodiments, the first operation may also be an operation whereby the user selects multiple options. For example, such as... Figure 17 (a) Figure 17 (b) Figure 17 (c) and Figure 17As shown in (d), in response to the first selection operation, the electronic device selects rows 2 through 5 of the table. In response to a click operation on the multi-select option in the interface, it enters multi-select mode. In multi-select mode, in response to the second selection operation (the starting cursor of the second selection operation is located in row 4, column 1 of the table, and the ending cursor is located in row 3, column 3 of the table), it releases rows 3 and 4 selected in the first selection operation, and finally the electronic device selects rows 2 and 5 of the table.
[0168] Multiple selection options can be like Figure 17 As shown in (a) above, the option is set to the right of the copy option. The multi-select option can also be set in other positions, such as to the right of the select all option. This application does not specifically limit this.
[0169] The table content processing method provided in this application can, when a user selects a target area of a table in an image, PDF, webpage, or content extraction interface, select all content within a local area (i.e., between the row and column of the starting and ending cursors corresponding to the user's first selection operation) based on the user's first selection operation. This allows the user to flexibly select the desired content for copying and pasting by moving the starting and ending cursors of the selection operation. Therefore, this solution better meets the user's selection needs and improves the user experience when using table content through copying and pasting.
[0170] If the content selected on the electronic device meets the user's selection intent, the user can copy the selected content and paste it to another location.
[0171] The paste operation mainly involves displaying the copied content. Figure 18 This application provides a paste display interface for copied content in an embodiment, such as... Figure 18 (a) and Figure 18 As shown in (b), each row of the copied selection includes 3 columns, but after pasting into the memo, the selection is merged into 1 column, resulting in unclear meaning and poor readability. Additionally, for text content that naturally wraps within a single cell of the selected content, such as... Figure 18 The text content corresponding to the 4th row of column 1 in table (a) of the table, "General Vision Test", is also displayed in two lines when pasted, as shown below. Figure 18 The fourth line, “normal vision,” and the fifth line, “check,” in the memo in (b) further degrade readability.
[0172] To address this, this application provides another method for processing table content. This method processes the selected content into text based on the semantics of the content selected during copying and displays the processed selected content, thereby improving the readability of the content displayed after pasting and enhancing the user experience.
[0173] The table content processing method provided in this application embodiment can be applied to electronic devices, including but not limited to personal computers (PCs), smartphones, netbooks, tablets, PDAs, smart screens, etc. For ease of explanation, this application embodiment will use a mobile phone as an example for illustrative purposes.
[0174] Figure 19 A flowchart illustrating another table content processing method provided in this application embodiment is shown below. Figure 19 As shown, another table content processing method provided in this application embodiment may include the following steps:
[0175] S210. In response to a paste operation following copying the first content from the table, display the second content.
[0176] The electronic device can perform text processing on the first content according to the semantics of the first content to obtain the second content, which may include the first content.
[0177] Specifically, when a table has a header, the electronic device can first associate the first content with the corresponding header based on the semantics of the first content to obtain the second content, and then display the second content. In this way, users can more easily understand the meaning of the pasted content through the header, thereby improving the readability of the pasted content.
[0178] For example, such as Figure 20 (a) and Figure 20 As shown in (b), the selected first items "Check 1", "Check 2" and "General Vision Check" are displayed after being associated with the "Payment Item" header; "1", "3" and "2" are displayed after being associated with the "Quantity" header; "16.00", "20.00" and "30.00" are displayed after being associated with the "Amount" header.
[0179] For example, such as Figure 21 (a) and Figure 21As shown in (b), the selected first content, "Energy," "Carbohydrates," "Protein," and "Fat," are displayed after being associated with the "Item" header; "1," "3," and "2" are displayed after being associated with the "Quantity" header; and "16.00," "20.00," and "30.00" are displayed after being associated with the "Amount" header. The "Nutrient Reference Value %" header is associated with the corresponding content "21%," "16%," "7%," and "40%" and combined into a single phrase for display.
[0180] For example, such as Figure 22 (a) and Figure 22 As shown in (b), after the header "Related Elements" in the selected first content is associated with the corresponding content "Cl2, O3, Concentrated HNO3" and "Activated Carbon", only the corresponding content is displayed, and the words "Related Elements" are no longer displayed repeatedly. After the header "Chemical Change" is associated with the corresponding content "Yes", the display is adjusted to "Chemical Change" and "Non-Chemical Change".
[0181] In some embodiments, when the table does not have a header, the electronic device can first infer the corresponding header based on the semantics of the first content, then associate the first content with the inferred header to obtain the second content, and finally display the second content. This allows users to more easily understand the meaning of the pasted content through the inferred header, thereby improving the readability of the pasted content.
[0182] For example, such as Figure 23 (a) and Figure 23 As shown in (b), it is speculated that the headers corresponding to "December 1st" and "December 2nd" in the first selected content can be time, the headers corresponding to "Psychology" and "Introduction to Economics" can be courses, the headers corresponding to "Zhang San" and "Li Si" can be instructors, and the headers corresponding to "College A" and "College B" can be the sponsoring college. During display, the first content will be associated with the speculated headers.
[0183] In some embodiments, based on the semantic relationships between the text in the first content, corresponding punctuation marks can be added to obtain the second content, which is then displayed. This strengthens the information hierarchy and relationships in the first content, improves the readability of the pasted content, and facilitates quick reading and understanding by the user.
[0184] For example, adding a colon between texts that have an interpretive relationship. For instance, such as... Figure 24 (a) and Figure 24 As shown in (b), in rows 2 through 7 of the selected first content, the second column of each row is used to explain the specific amount corresponding to column 1. When pasting, a colon ":" is added between columns 1 and 2 of each row in rows 2 through 7 of the first content.
[0185] For example, adding connectors between text that have a start and end relationship. For instance, such as... Figure 25 (a) and Figure 25 As shown in (b), in the selected first content, there is a start-end relationship between "XX International Airport T1" and "Bus Stop 1" and "Bus Stop 2" respectively. When pasting and displaying, add the connector "——" between "XX International Airport T1" and "Bus Stop 1" and between "XX International Airport T1" and "Bus Stop 2" respectively.
[0186] In some embodiments, line breaks between consecutive semantic text in the first content may also be removed. For example, as shown below... Figure 26 (a) and Figure 26 As shown in (b), in the selected first content, the continuous semantic text "General Vision Check" in the cell of row 4, column 1 has a line break between "General Vision" and "Check" due to cell size limitations. When pasting, this line break is removed to improve readability. Furthermore, users do not need to delete the line break when editing the pasted content, thus reducing editing operations and improving the user experience.
[0187] In some embodiments, the positional relationship between texts in the first content can be adjusted based on information such as the information type of each text, the semantic relationship between each text, and the font size of each text, thereby strengthening the information hierarchy and relationship of the first content, improving the readability of the content pasted by the user, and facilitating the user's quick reading and understanding.
[0188] Specifically, we can first analyze the information type of each text in the first content through methods such as named entity recognition (NER) and classify the information of each text. Then, we can analyze the semantic relationship between each text in the first content through methods such as chatgenerative pre-trained transformer (chatGPT). Finally, we can combine information such as the font size of each text to adjust the positional relationship between each text in the first content.
[0189] For example, such as Figure 27 (a) and Figure 27As shown in (b), in the first content, the texts "08:35" and "11:40" represent the aircraft's departure and arrival times (there is a start-end relationship between "08:35" and "11:40"), and "3h5m" represents the flight duration. Since the font size of the texts "08:35" and "11:40" is the largest, they can be displayed first, with a hyphen "-" added between them. The text "3h5m" can then follow immediately, enclosed in parentheses. The texts "Airport A T3" and "Airport B T3" represent the aircraft's departure and arrival locations, which can be displayed on a separate line, with a hyphen "-" added between them. The texts "Economy Class" and "From ¥3000" represent the ticket price and corresponding cabin class, which can be displayed on a separate line, connected by the symbol "|". The text “CA1xx International Routes”, “LAN”, and “xx77W” are other minor information that can be displayed on the last line and connected using the symbol “|”.
[0190] In some embodiments, when a table style can be displayed at the paste location, the electronic device can display a table format paste option. After the user selects the table format paste option, the table style can be displayed at the paste location. The electronic device can display the original table style, or it can redraw the original table style and display the redrawn table style. The original table style can be obtained during copying, or it can be generated based on the position of each text in the first content. The following embodiments of this application will be illustrated by example using the electronic device redrawing the table style and displaying it.
[0191] For example, such as Figure 28 (a) and Figure 28 As shown in (b), the first selected content does not include a table header. The electronic device can add a corresponding table header during display. The added header more clearly indicates the meaning of the pasted content, improving readability. The electronic device can also adjust the thickness of the border corresponding to the table header, making it thicker. The electronic device can also adjust the background color of the table header to distinguish it from the background color of the table body. Furthermore, the electronic device can adjust the font of the text corresponding to the table header (such as font size, font style, font color, italics, bold, underline, etc.) to differentiate the text in the table header and body, strengthening the hierarchy and relationship between them and improving readability of the pasted content.
[0192] The table content processing method provided in this application provides that the second content displayed is obtained by text processing or table redrawing of the first content (i.e., the content that the user selects to copy in the table) based on the semantics of the first content. Therefore, the second content displayed after pasting has higher readability than the copied first content. Thus, this solution can improve the user's experience when using table content by copying and pasting.
[0193] It is understood that the operations input by the user on the electronic device in this application are not limited to touch operations, but may also be voice control operations, air gesture operations, or remote control operations, etc.; the touch operations input by the user are not limited to click operations and gesture operations, but may also be other operations, etc., and the embodiments of this application do not make any special limitations in this regard.
[0194] The naming conventions for user input operations in this application are merely examples and should not be construed as limiting the scope of this application. In some embodiments, the same operations may use other names. Similarly, the naming conventions for various functions, interfaces, and interface elements in this application are also merely examples and are not intended to limit this application. In other embodiments, other names may also be used.
[0195] Furthermore, the user interface shown in the embodiments of this application is only an example and is not intended to limit this application. In some embodiments, the user interface displayed by the electronic device may include more or fewer interface elements than shown in the figure to achieve more or fewer functions; the position of each interface element can be adjusted as needed; each function can also be implemented using other interface elements, or it can also be implemented in other user interfaces. This embodiment does not make any special limitations on this.
[0196] Those skilled in the art will understand that the above embodiments are exemplary and not intended to limit this application. Where possible, the execution order of one or more of the above steps can be adjusted. For example, in some embodiments, steps S140 and S150 can be executed before step S130, and in other embodiments, step S150 can be executed before step S140. Selective combinations can also be made to obtain one or more other embodiments. For example, in some embodiments, steps S110, S120, S140, and S150 may not be executed, and in some embodiments, some steps S110 to S150 may be executed. Those skilled in the art can arbitrarily select and combine the above steps as needed, and all combinations that do not depart from the essence of the present application fall within the protection scope of this application.
[0197] Based on the same concept, as an implementation of the above method, this application provides a data processing device. This device embodiment corresponds to the embodiment related to the selection operation during copying in the foregoing method embodiment. For ease of reading, this device embodiment will not describe the details of the embodiment related to the selection operation during copying in the foregoing method embodiment one by one. However, it should be clear that the device in this embodiment can correspondingly implement all the contents of the embodiment related to the selection operation during copying in the foregoing method embodiment.
[0198] Figure 29 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this application, such as... Figure 29 As shown, the data processing device provided in this embodiment may include a selection module 210;
[0199] Selection module 210 is used to: in response to a first selection operation on a target area of a table, select target content in the table, wherein the target area is a portion of the table, the target content is all content in the target area, the starting cursor of the first selection operation is located at row P, column Q of the table, the ending cursor of the first selection operation is located at row M, column N of the table, the target area is columns Q to N in rows P to M of the table, P and M are different, and the table is located in an image, PDF, webpage or content extraction interface.
[0200] As an optional implementation, the table also includes a header. If the header of the table is not selected in the first selection operation, the selection module 210 is further used to select the header corresponding to the target content.
[0201] As an optional implementation, the data processing apparatus further includes a display module 220, which is configured to: when the table is located in the content extraction interface, before selecting target content in the table in response to a first selection operation on the table content, display a first interface including the target table;
[0202] In response to a content extraction operation on the first interface, the extraction results are displayed on the first interface. The extraction results include a table corresponding to the target table, and the table is displayed in at least one of the following ways:
[0203] The table header and body are displayed differently;
[0204] Differentiated display of table areas and non-table areas;
[0205] In the case where the first cell in the target table corresponds to multiple second cells, the table includes multiple first sub-cells split from the first cell, and each of the multiple first sub-cells corresponds one-to-one with the multiple second cells.
[0206] As an optional implementation, the selection module 210 is also used for:
[0207] In response to the first action, enter multi-select mode;
[0208] In response to the second selection operation, the first region is selected, and the second selection operation corresponds to the second region in the table; wherein, the first region is the region that does not overlap with the target region and the second region.
[0209] As an optional implementation, the selection module 210 is also used for:
[0210] In response to the first action, enter multi-select mode;
[0211] In response to the third selection operation, the third region is selected, which corresponds to the 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.
[0212] As an optional implementation, the first operation includes any one of the following:
[0213] Long press operation for non-text areas or touch points corresponding to the end cursor;
[0214] Selecting multiple options.
[0215] As an optional implementation, the selection module 210 is also used to: when the first operation is a long press operation, exit the multi-select mode when the long press operation ends.
[0216] As an optional implementation, the selection module 210 is also used for:
[0217] In response to a same content search operation, select all rows or columns in the table that contain the target content.
[0218] As an optional implementation, the display module 220 is also used for:
[0219] When content identical to the target content exists in the table, the same content search option is displayed; the same content search operation is a selection operation for the same content search option.
[0220] As an optional implementation, rows P and M are the middle rows of the table, and columns Q and N are the middle columns of the table.
[0221] The apparatus provided in this embodiment can execute the embodiments related to the selection operation during copying in the above method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0222] Based on the same concept, as an implementation of the above method, this application provides another data processing device. This device embodiment corresponds to the embodiment related to the display of content during pasting in the foregoing method embodiment. For ease of reading, this device embodiment will not describe the details of the embodiment related to the display of content during pasting in the foregoing method embodiment one by one. However, it should be clear that the device in this embodiment can implement all the contents of the embodiment related to the display of content during pasting in the foregoing method embodiment.
[0223] Figure 30 This is a schematic diagram of the structure of another data processing device provided in an embodiment of this application, as shown below. Figure 30 As shown, another data processing device provided in this embodiment may include a display module 310, a text processing module 320, and a table redrawing module 330;
[0224] The display module 310 is used to: display second content in response to a paste operation after copying the first content in the table. The second content is obtained by the text processing module 320 performing text processing on the first content according to the semantics of the first content, or by the table redrawing module 330 performing table redrawing on the first content. The second content includes the first content.
[0225] Text processing module 320 is specifically used to perform at least one of the following operations:
[0226] Associate the table body content in the first content with the corresponding table header;
[0227] Modify the punctuation marks in the first part of the text.
[0228] As an optional implementation, the data processing device further includes a selection module, which is specifically used to: select the first content in the table in response to a first selection operation on a target area of the table before displaying the second content after a paste operation following copying the first content in the table. The target area is a portion of the table, and the first content is all the content in the target area. The starting cursor of the first selection operation is located in row P and column Q of the table, and the ending cursor of the first selection operation is located in row M and column N of the table. The target area is columns Q to N in rows P to M of the table, where P and M are different, and the table is located in an image, PDF, webpage, or content extraction interface.
[0229] As an optional implementation, the table header is the header of a table, or a table header determined according to the semantics of the first content.
[0230] As an optional implementation, the text processing module 320 is specifically configured to perform at least one of the following operations:
[0231] Add colons between texts that have an interpretive relationship;
[0232] Add connectors between texts that have a start and end relationship;
[0233] Remove line breaks between consecutive semantic text in the first content.
[0234] As an optional implementation, the text processing module 320 is also used for:
[0235] Adjust the positional relationship between the text elements in the first content. The positional relationship of each text element is related to the font size of each text element.
[0236] As an optional implementation, the table redrawing module 330 is specifically used to perform at least one of the following operations:
[0237] If the first content does not include a table header, add a table header to the table corresponding to the first content;
[0238] Adjust the thickness of the border between the header and body of the table corresponding to the first content;
[0239] Adjust the background color of the meter;
[0240] Adjust the font of the text corresponding to the table header.
[0241] The device provided in this embodiment can execute the embodiments related to the display of content during pasting in the above method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0242] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0243] Based on the same concept, this application also provides an electronic device, please refer to... Figure 31 , Figure 31 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 31As shown, the electronic device provided in this application embodiment may include: a memory 410 and a processor 420, wherein the memory 410 is used to store a computer program; and the processor 420 is used to implement the method described in the above method embodiment when the computer program is invoked.
[0244] The electronic device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so they will not be described again here.
[0245] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the methods described in the above-described method embodiments.
[0246] This application also provides a computer program product that, when run on an electronic device, causes the electronic device to implement the method described in the above-described method embodiments.
[0247] This application also provides a chip system including a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the method described in the above-described method embodiments. The chip system may be a single chip or a chip module composed of multiple chips.
[0248] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially 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 this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through 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 via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, or magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0249] Those skilled in the art will understand that implementing all or part of the processes in the above embodiments can be accomplished by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium can include various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0250] The naming or numbering of steps in this application does not imply that the steps in the method flow 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 effect can be achieved.
[0251] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0252] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0253] It should be understood that in the description of this application and the appended claims, the terms "comprising," "including," "having," and any variations thereof are intended to cover a non-exclusive inclusion and mean "including but not limited to," unless otherwise specifically emphasized. For example, a process, method, system, product, or apparatus that includes a series of steps or modules is not necessarily limited to those steps or modules that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to such process, method, product, or apparatus.
[0254] In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can mean A or B. "And / or" in this application is used to describe the relationship between the related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural.
[0255] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0256] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0257] Furthermore, in the description of this application and the appended claims, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein; features defined as "first" or "second" may explicitly or implicitly include at least one of those features.
[0258] In the embodiments described in this application specification, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application specification should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0259] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this specification include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in still other embodiments" appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0260] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for processing table content, characterized in that, include: In response to a first selection operation targeting a target area of a table, target content in the table is selected. The target area is a portion of the table, and the target content is all content within the target area. The starting cursor of the first selection operation is located at row P, column Q of the table, and the ending cursor of the first selection operation is located at row M, column N of the table. The target area is columns Q to N from row P to row M of the table, where P and M are different. The table is located in an image, PDF, webpage, or content extraction interface.
2. The method according to claim 1, characterized in that, The table also includes a header. If the first selection operation does not select the header of the table, the response to the first selection operation on the table content further includes: selecting the header corresponding to the target content.
3. The method according to claim 1 or 2, characterized in that, When the table is located in a content extraction interface, before selecting target content in the table in response to a first selection operation on the table content, the method further includes: Display a first interface, which includes a target table; In response to a content extraction operation on the first interface, the extraction results are displayed on the first interface. The extraction results include the table corresponding to the target table, and the table is displayed in at least one of the following ways: The table header and body are displayed differently; Differentiated display of table areas and non-table areas; In the case where a first cell in the target table corresponds to multiple second cells, the table includes multiple first sub-cells split based on the first cell, and the multiple first sub-cells correspond one-to-one with the multiple second cells.
4. The method according to any one of claims 1-3, characterized in that, The method further includes: In response to the first action, enter multi-select mode; In response to a second selection operation, a first region is selected, 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-4, characterized in that, The method further includes: In response to the first action, enter multi-select mode; In response to a third selection operation, a third region is selected, 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.
6. The method according to claim 4 or 5, characterized in that, The first operation includes any one of the following: Long press operation for non-text areas or the touch point corresponding to the end cursor; Selecting multiple options.
7. The method according to claim 6, characterized in that, The method further includes: when the first operation is the long press operation, exiting the multi-select mode when the long press operation ends.
8. The method according to any one of claims 1-7, characterized in that, The method further includes: In response to a search operation for identical content, select all rows or all columns in the table that contain the target content.
9. The method according to claim 8, characterized in that, The response to a selection operation on table content also includes: When content identical to the target content exists in the table, a search option for identical content is displayed; the search operation for identical content is a selection operation for the search option for identical content.
10. The method according to any one of claims 1-9, characterized in that, Rows P and M are the middle rows of the table, and columns Q and N are the middle columns of the table.
11. A method for processing table content, characterized in that, include: In response to a paste operation after copying the first content in the table, a second content is displayed. The second content is obtained by text processing the first content according to the semantics of the first content, or by redrawing the table of the first content. The second content includes the first content. The text processing performed on the first content includes at least one of the following: Associate the table body content in the first content with the corresponding table header; Modify the punctuation marks in the first part of the text.
12. The method according to claim 11, characterized in that, Before displaying the second content in response to a paste operation following copying the first content from the table, the method further includes: In response to a first selection operation targeting a target area of a table, the first content in the table is selected. The target area is a portion of the table, and the first content is all the content within the target area. The starting cursor of the first selection operation is located at row P, column Q of the table, and the ending cursor of the first selection operation is located at row M, column N of the table. The target area is columns Q to N from row P to row M of the table, where P and M are different. The table is located in an image, PDF, webpage, or content extraction interface.
13. The method according to claim 11 or 12, characterized in that, The header is the header of the table, or a header determined according to the semantics of the first content.
14. The method according to any one of claims 11-13, characterized in that, Modifying the punctuation marks in the first content includes at least one of the following operations: Add colons between texts that have an interpretive relationship; Add connectors between texts that have a start and end relationship; Remove line breaks between consecutive semantic text in the first content.
15. The method according to any one of claims 11-14, characterized in that, The text processing performed on the first content also includes: Adjust the positional relationship between the texts in the first content, where the positional relationship is related to the font size of each text.
16. The method according to any one of claims 11-15, characterized in that, The table redrawing performed on the first content includes at least one of the following operations: If the first content does not include a table header, add a table header to the table corresponding to the first content; Adjust the thickness of the border between the header and body of the table corresponding to the first content; Adjust the background color of the meter; Adjust the font of the text corresponding to the table header.
17. An electronic device, characterized in that, include: A memory and a processor, the memory being used to store a computer program; the processor being used to, when the computer program is invoked, perform the method as described in any one of claims 1-10; or perform the method as described in any one of claims 11-16.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-10; or, it implements the method as described in any one of claims 11-16.
19. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-10; or, to perform the method as described in any one of claims 11-16.
20. A chip system, characterized in that, The chip system includes a processor coupled to a memory, the processor executing a computer program stored in the memory to implement the method as claimed in any one of claims 1-10; or, to implement the method as claimed in any one of claims 11-16.
