Text generation method and system capable of freely selecting table content

Through the text generation method and system for freely selecting table contents, and the large model generates sequential summary text, the problems of time-consuming and labor-intensive manual summary and mis-option are solved, and the automatic table content generation and comparison between text and tables are realized, improving the improvement of the problem of automatic table content generation and the use of text to tables. Work efficiency.

CN119272741APending Publication Date: 2025-01-07电视电声研究所(中国电子科技集团公司第三研究所)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411316731.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Generating text of existing tables requires manual summary, which is time-consuming and labor-intensive. The method of selecting different rows, columns and cells can easily lead to misoperation, resulting in invalid selection, and re-selecting.

Method used

Provide a text generation method and system for freely selecting table contents. By obtaining the target table, determining the selected rows or columns, using a pre-trained big model to generate text, generating sequential summary text, supporting importing selections and cancellation Associated terms are classified and distinguished and text generated by Bert and mT5, and GPT2 is used to calculate the importance and sorting of the associations.

Benefits of technology

Save time to write manual summary form content, improve work efficiency, realize automated text generation of form content, reduce the risk of misoperation, and clearly distinguish the primary and secondary content of the generated text, and support the comparison and verification of text and tables.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119272741A_ABST
    Figure CN119272741A_ABST
Patent Text Reader

Abstract

The invention discloses a text generation method and system capable of freely selecting table content, and relates to a data processing technology, and the method comprises the following steps: obtaining a target table; determining selected rows or columns in the target table; based on the selected row or column and the associated item of the selected row or column, a text is generated through a pre-trained large model, and the generated text describes the selected content related to the associated item in a language mode. According to the method provided by the invention, by freely selecting and associating rows, columns or cells of different sheets in different tables, the sequential general text is automatically generated, so that the time for manually summarizing table contents and writing the text is saved, and the working efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a text generation method and system for freely selecting table content. Background Art

[0002] The current table text generation requires manual summary, which is relatively time-consuming and laborious. In the table application, the current way to select different rows, columns, and cells in the Excel table is to use ctrl and the left mouse button to select at the same time, but if this system uses this method, it is easy to cause misoperation, because after different rows, columns, and cells have been merged and selected, once the ctrl key is not held down, the mouse accidentally clicks a certain position, all previous selections will become invalid and need to be reselected. Summary of the invention

[0003] The embodiments of the present application provide a text generation method and system for freely selecting table contents, which is used to automatically generate sequential summary text by freely selecting and associating rows, columns or cells of different sheets in different tables, thereby saving time for manually summarizing the table contents and writing text, and greatly improving work efficiency.

[0004] The present application embodiment provides a text generation method for freely selecting table content, including:

[0005] Get the target table;

[0006] Determine the selected row or column in the target table;

[0007] Based on the selected row or column and the associated items of the selected row or column, a pre-trained large model is used to generate text, wherein the generated text describes the selected content related to the associated items in a linguistic manner.

[0008] Optionally, obtaining the target table includes providing an import interface in a table format and import options, so as to trigger selection of the target table through the import options to import the target table.

[0009] Optionally, determining the selected row or column in the target table includes:

[0010] A check box is provided in any row or any column of the target table, so that when a click instruction is obtained by using the check box, the row or column corresponding to the check box is selected.

[0011] Optionally, the method further includes: triggering a selection item based on any sub-item in the selected row or column in the target table, so as to cancel or associate the selected row or column in the target table based on the selection item.

[0012] Optionally, the method further includes: triggering a selection item based on an associated item in a selected row or column in the target table, so as to select or cancel all rows or columns in the target table containing the associated item based on the selection item.

[0013] Optionally, the large model may be pre-trained in the following manner:

[0014] In the training phase, Bert is used to classify and distinguish different categories of tables;

[0015] The Bert-classified table is input into the large model mT5 for training using the corresponding prompt word prompt, wherein in the design of the prompt, a corresponding header is added to each source table cell information.

[0016] Optionally, it also includes: using pre-trained GPT2 to perform rearrangement training on each associated item in advance, and calculating and ranking the importance of each associated item, so as to rank the associated items based on the rearrangement of GPT2 and the calculated importance ranking results;

[0017] In the generation phase, generating text using a pre-trained large model includes: giving priority to using highly important related items for text generation.

[0018] Optionally, the method further includes: presenting the generated text in association with corresponding associated items.

[0019] An embodiment of the present application also proposes a text generation system for freely selecting table contents, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the text generation method for freely selecting table contents as described above are implemented.

[0020] The embodiment of the present application can automatically generate a sequential summary text by freely selecting and associating rows, columns or cells of different sheets in different tables, saving the time of manually summarizing the table contents and writing text, thereby greatly improving work efficiency.

[0021] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0023] Figure 1 The following is a basic flow chart of the text generation method according to the embodiment of the present application;

[0024] Figure 2 This is a schematic diagram of a text upload page of the text generation method of an embodiment of the present application;

[0025] Figure 3 This is a schematic diagram of a text generation page of the text generation method of an embodiment of the present application;

[0026] Figure 4 This is a schematic diagram of the selection-related content of the text generation method in the embodiment of the present application;

[0027] Figure 5 This is a schematic diagram of canceling the association of the text generation method in the embodiment of the present application;

[0028] Figure 6 This is a schematic diagram of the contents of a text keyword positioning table of the text generation method of an embodiment of the present application;

[0029] Figure 7 This is a schematic diagram of locating text keywords in the table content of the text generation method in the embodiment of the present application. DETAILED DESCRIPTION

[0030] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0031] The present application embodiment provides a text generation method for freely selecting table contents, such as Figure 1 As shown, the following steps are included:

[0032] In step S101, a target table is obtained. In some specific examples, obtaining the target table includes providing an import interface in a table format and an import option, so that the target table is selected by triggering the import option to import the target table. Figure 2 As shown, you can upload one or more Excel files ( Figure 2 ), after uploading is complete, the table and sheet name as well as the table content will be displayed in the navigation bar on the left side of the interface.

[0033] In step S102, the selected row or column in the target table is determined. Figure 3 As shown, you can check the rows or columns in the target table.

[0034] In step S103, based on the selected row or column and the associated items of the selected row or column, a text is generated using a pre-trained large model, wherein the generated text describes the selected content related to the associated items in a language. Figure 3 As shown, you can freely select rows, columns, and cells of different sheets in different tables, and then click "Generate" to generate text, which is displayed on the right side of the interface ( Figure 3 ). You can also continue to add table files on this page, or clear the file and upload it again.

[0035] The embodiment of the present application can automatically generate a sequential summary text by freely selecting and associating rows, columns or cells of different sheets in different tables, saving the time of manually summarizing the table contents and writing text, thereby greatly improving work efficiency.

[0036] In some embodiments, determining the selected row or column in the target table includes: providing a check box in any row or column of the target table, so that when a click instruction is obtained by using the check box, the row or column corresponding to the check box is selected. Figure 3 As shown, you can freely select rows, columns, and cells of different sheets in different tables, and then click "Generate" to generate text.

[0037] In some embodiments, the method further includes: triggering a selection item based on any sub-item in the selected row or column in the target table, so as to cancel or associate the selected row or column in the target table based on the selection item. Figure 4 As shown in the figure, you can select and cancel cells by checking the checkboxes of table rows / columns, and by clicking "Select" or "Cancel" (selected items) in the pop-up tab when you right-click a cell. You can also associate related row / column / cell contents through the options that pop up when you right-click. For example, if you right-click the "Returning Lost Property" cell in the category and select the "Associate" function, the table row contents that have the "Returning Lost Property" attribute (associated item) will be selected ( Figure 4 ).

[0038] In some embodiments, the method further includes: triggering a selection item based on an associated item in a selected row or column in the target table, so as to select or cancel all rows or columns in the target table containing the associated item based on the selection item. Figure 5 As shown, if you right-click the check box in front of the selected row content, the "Deselect this row" and "Deselect all associated rows" (selected items) functions are displayed, and you can deselect this row and deselect all associated rows.

[0039] In some embodiments, the method of pre-training the large model includes:

[0040] In the training phase, Bert is used to classify and distinguish different categories of tables;

[0041] The tables classified by Bert are input into the large model mT5 using the corresponding prompt word prompt for training, wherein in the design of prompt, a corresponding table header is added to each source table cell information. The embodiment of the present application uses the basic model Bert and the basic generation model mT5 and improves them on this basis, and designs an algorithm strategy to enable it to meet the task of freely selecting table information to generate text. Specifically, Bert is used to classify and distinguish tables of different categories, aiming to enable the generation model to more accurately combine and generate table information of different categories. During the training phase, the embodiment of the present application divides tables into seven categories: "contains digital information that does not need to be processed", "contains digital information that needs to be processed", "no digital information", "hard constraint information", "soft constraint information", "contains long text information", and "no long text information", without limitation to more other categories that may be added over time. An end-to-end training method is adopted. Bert first classifies tables of different categories, and then the classified tables are input into mT5 for training by designing different prompts. In the design of the prompt, the present application adds a corresponding header for each source table cell information, so that the large model can distinguish the attributes of key information (that is, related items) that should be in the generated text.

[0042] Since the key information in the table is likely to be redundant, and the key information of each cell has different importance in the generated text. In some embodiments, it also includes: using pre-trained GPT2 to perform rearrangement training on each associated item in advance, and calculating the importance of each associated item and sorting it. For example, the importance can be calculated and sorted using the textrank algorithm, so as to sort the associated items based on the rearrangement of GPT2 and the calculated importance sorting results.

[0043] In a specific example, in the generation stage, key information with high importance is given priority for generation. In an embodiment of the present application, the cell contents of the table are pre-sorted. Specifically, GPT2 is used on a large-scale general corpus to perform rearrangement training on key information. In order to improve the reliability of the rearrangement, in the reasoning stage, the importance of each key information (related items) is further calculated and sorted using algorithms such as textrank and high-order feature extractors. The key information is re-sorted by combining the importance of the key information with the GPT2 rearrangement results, and the sorted results are sent to the generation model for generation. In this way, not only can the excessive redundant information that squeezes the model representation capacity and computing resources be alleviated, but the model can also be more focused on more important information, thereby improving model performance.

[0044] In the generation phase, generating text using a pre-trained large model includes: giving priority to using highly important related items for text generation.

[0045] In a specific example, Figure 5 As shown in the figure, the text content generated by the large model automatically outputs the text in order according to the importance of the category or cell content. For example, if three rows of "Returning lost property" and one row of "Being willing to help others" are checked at the same time, the priority of "Returning lost property" is placed before "Being willing to help others" according to the importance, and the output text will first describe the "Returning lost property" case and then the "Being willing to help others" case.

[0046] In other specific examples, the arrangement of internal cell information in the same row or multiple rows of the same associated item, for example, the row information belonging to the "Returning Lost Property" category contains cells such as "January 1, 202x", "20,000", "Xiao Ming", "Picked up Money", "XX East Road", "Walking", "Thanks", and "Happy". According to the sorting algorithm's judgment on the importance of information, information such as time, place, people, and events is the most important. When used as the input of the model, it is sorted according to importance, with the most important information at the front, and the rest of the information is arranged in order of importance to ensure that the model can prioritize important information for generation, so that the generated model retains key information as completely as possible.

[0047] The method of the present application can freely select different rows / columns / cells, and can associate / disassociate rows / columns / cells with similar contents in the selected table, which is flexible and efficient. The text output order can be automatically formulated according to the table content, so that the text output content is clearly prioritized.

[0048] In some embodiments, the method further includes: presenting an association between the generated text and the corresponding associated items. Figure 6 As shown in the figure, you can also highlight the keywords related to the table in the generated text, and support the comparison operation between the table and the text. For example, the text data related to the table on the left in the text content is highlighted with a highlighted background color. When the mouse moves to the highlighted text, the data in the related data cell on the left will also be highlighted accordingly. Figure 7 As shown in the figure, click or hover the mouse over the cell on the left, and the text-related data on the right will also be highlighted. After the text content is generated, the keywords related to the table content are highlighted to facilitate comparison with the table content and proofreading.

[0049] The association mentioned in the embodiment of the present application includes the tracing of the mapping of table information from left to right to text information and the tracing of the mapping of key information in the text from right to left to table information, that is, when a user clicks on a certain cell information, the corresponding cell information can be highlighted in the generated text, indicating the position of the key information in the generated text. Similarly, when a user clicks on a certain key information in the generated text, it is also directly mapped to the cell corresponding to the table (if it exists) to verify whether the key information is the information in the original table that the user is concerned about, and to verify which table and which category the key information belongs to, thereby greatly improving the efficiency of verifying the generated text. The above-mentioned mapping relationship includes but is not limited to the use of hard matching rules and fuzzy matching algorithms, and the granularity of the matching results also includes but is not limited to the same, similar, synonymous, etc.

[0050] The embodiment of the present application provides a method for automatically generating text by freely selecting table contents. Using large models and natural language processing technology, sequential summary text is automatically generated by freely selecting and associating rows, columns or cells of different sheets in different tables. The method of the present application supports editing and modifying the generated text, which is then used to train the model to make the model more perfect, thereby generating customized text that meets the requirements. The method of the present application saves the time of manually summarizing the table contents and writing text, greatly improving work efficiency.

[0051] An embodiment of the present application also proposes a text generation system for freely selecting table contents, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the text generation method for freely selecting table contents as described above are implemented.

[0052] It should be noted that in the various embodiments of the present application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0053] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0054] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0055] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A text generation method for freely selecting table contents, characterized in that: include: Get the target table; Determine the selected row or column in the target table; Based on the selected row or column and the associated items of the selected row or column, a pre-trained large model is used to generate text, wherein the generated text describes the selected content related to the associated items in a linguistic manner.

2. A method for generating text for freely selecting table contents as claimed in claim 1, characterized in that: Acquiring the target table includes providing an import interface in a table format and import options, so as to trigger selection of the target table through the import options to import the target table.

3. A method for generating text for freely selecting table contents as claimed in claim 1, characterized in that: Determining the selected row or column in the target table includes: A check box is provided in any row or any column of the target table, so that when a click instruction is obtained by using the check box, the row or column corresponding to the check box is selected.

4. A method for generating text for freely selecting table contents as claimed in claim 3, characterized in that: Also includes: A selection item is triggered based on any sub-item in the selected row or column in the target table, so as to cancel or associate the selected row or column in the target table based on the selection item.

5. A method for generating text for freely selecting table contents as claimed in claim 3, characterized in that: Also includes: A selection item is triggered based on the associated item in the selected row or column in the target table, so as to select or cancel all rows or columns in the target table containing the associated item based on the selection item.

6. A method for generating text for freely selecting table contents as claimed in claim 1, characterized in that: It also includes pre-training large models in the following ways: In the training phase, Bert is used to classify and distinguish different categories of tables; The Bert-classified table is input into the large model mT5 for training using the corresponding prompt word prompt, wherein in the design of the prompt, a corresponding header is added to each source table cell information.

7. A method for generating text for freely selecting table contents as claimed in claim 6, characterized in that: Also includes: Pre-training GPT2 is used to rearrange and train the associated items, and the importance of each associated item is calculated and sorted, so as to sort the associated items based on the rearrangement of GPT2 and the calculated importance sorting results; In the generation phase, generating text using a pre-trained large model includes: giving priority to using highly important related items for text generation.

8. A method for generating text for freely selecting table contents as claimed in claim 7, characterized in that: Also includes: The generated text and the corresponding associated items are presented in association.

9. A text generation system for freely selecting table contents, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the method for generating text for freely selecting table contents as claimed in any one of claims 1 to 8 are implemented.