Table display method, apparatus and device

By dynamically adjusting the table cell size and text format, the problem of poor readability of tables generated by the AI ​​assistant on the mobile side is solved, achieving better user experience and content display.

CN119250052APending Publication Date: 2025-01-03BAICHUAN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411230200.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The form answers generated by existing AI assistants are poorly readable when displayed on the mobile side, cannot be compatible with too many rows and long and short texts, which affects the user experience.

Method used

By dynamically generating a reply table, adjust the cell size according to the number of text characters contained in the cells in the table, including column width and row height, and dynamically adjust the display format of text characters, such as font size, spacing or number of rows, to match the cell content.

Benefits of technology

It improves the readability of the table and enhances the user experience, especially on the mobile terminal, which can display more content without affecting reading efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250052A_ABST
    Figure CN119250052A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a table display method, device and equipment, and the method comprises the steps: responding to the input of a user in a man-machine conversation interface of an application program, and dynamically generating a reply table; wherein in the process of dynamically generating the reply table, the cell size of the reply table is dynamically adjusted based on the number of text characters contained in the cells in the table. In the embodiment of the invention, when the number of columns or words of the table is too large, the content capable of being displayed by the reply table can be increased by adjusting the width of the table and the format of the text data, and the readability of the table is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a table display method, device and equipment. Background Art

[0002] With the development of artificial intelligence (AI) technology, AI assistants can generate corresponding answers in response to users' questions and solve users' problems more directly through real-time dialogue. According to historical data statistics, conversations in which AI assistants use tables to answer accounts for a certain proportion of the total number of conversation samples. The advantages of tables in information transmission can enable users to quickly understand the answer information.

[0003] However, there are some problems with existing table responses. For example, due to screen limitations, mobile terminals cannot display tables with too many rows and columns, which affects the readability of the table; or the table has poor adaptability and cannot accommodate long text and short text in a column. The above problems affect the user experience to a certain extent. Summary of the invention

[0004] In view of this, the present application provides a table display method, device and equipment to help solve the problem of poor readability of tables displayed by AI assistants in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a table display method, including:

[0006] Dynamically generate a reply form in response to user input in the human-computer dialogue interface of the application;

[0007] Wherein, in the process of dynamically generating the reply table, the cell size of the reply table is dynamically adjusted based on the number of text characters contained in the cell in the table.

[0008] In an optional embodiment, the method further includes:

[0009] In the process of dynamically adjusting the cell size of the reply table, the display format of the text characters in each cell is dynamically adjusted so that the text characters in each cell match the size of the corresponding cell;

[0010] The display format includes: font size, spacing or number of text lines.

[0011] In an optional embodiment, in the process of dynamically generating the reply table, the cell size of the reply table is dynamically adjusted based on the number of text characters contained in the cell in the table, specifically including:

[0012] During the dynamic output of the reply form, when the human-computer dialogue interface cannot display the entire content of the reply form, the column width and / or row height of the corresponding cell in the reply form is dynamically adjusted based on the number of text characters contained in the cell.

[0013] In an optional embodiment, dynamically adjusting the column width and / or row height of the table based on the number of text characters contained in the cells in the table includes:

[0014] For any column table, when it is detected that the number of text characters contained in each cell of the current column table is less than the first threshold, the width of the cell in the current column is adjusted to the first width value;

[0015] When it is detected that the number of text characters contained in any cell in the current column is greater than or equal to the first threshold, the width of the cell in the current column is adjusted to the second width value, wherein the second width value is greater than the first width value.

[0016] In an optional embodiment, when it is detected that the number of text characters contained in any cell in the current column is greater than or equal to the first threshold, adjusting the width of the cell in the current column to the second width value specifically includes:

[0017] The second width value increases as the maximum number of text characters contained in each cell in the current column increases.

[0018] In an optional embodiment, the method further includes:

[0019] When the second width value reaches the second threshold, the width of the current column table is fixed to the second threshold.

[0020] In an optional embodiment, the reply form includes a content area and a title area;

[0021] After the content area is output, the title area generates and displays the text title of the reply form.

[0022] In an optional embodiment, the method further includes:

[0023] After the content area is output, a text title of the reply form is generated based on at least two of the user's input, the text data acquired through the search, and the text content included in the form.

[0024] In an optional embodiment, the reply form further includes a sharing control;

[0025] The method further comprises:

[0026] In response to a user triggering operation on the sharing control, a selection box for a sharing mode is displayed, where the sharing mode includes: picture sharing or link sharing;

[0027] When detecting the user's selection operation for the picture sharing, jumping to the picture sharing page, the picture sharing page includes a sharing picture and sharing address selection area corresponding to the reply form; or,

[0028] When the user's selection operation for link sharing is detected, a sharing link of the reply form is generated and result information indicating successful link copying is displayed in the human-computer dialogue interface.

[0029] In an optional embodiment, the shared image includes all the contents of the reply form and a download QR code for the application, and the download QR code is used to provide a download link for the application.

[0030] In an optional embodiment, the reply form also includes a full-screen display control;

[0031] The method further comprises:

[0032] In response to the user's triggering operation on the full-screen display control, the full-screen page corresponding to the reply form is jumped to and displayed horizontally, and the full-screen page includes a copy control, a download control and all text contents in the reply form.

[0033] In an optional embodiment, the reply form also includes a download control;

[0034] The method further comprises:

[0035] In response to the user's triggering operation on the download control, the table image corresponding to the reply table is saved to the album, and the result information of successful saving of the image is displayed in the human-computer dialogue interface;

[0036] The table image contains all the contents of the reply table and the identification information of the application.

[0037] In an optional embodiment, the reply form further includes a first copy control and a second copy control;

[0038] The method further comprises:

[0039] In response to a user triggering operation on the first copy control, copying the text contained in the table, and displaying the copied result information in the human-computer dialogue interface;

[0040] In response to the user's triggering operation on the second copy control, the text contained in the table, the text title located above the table, and the text summary located below the table are copied, and the copied result information is displayed in the human-computer dialogue interface.

[0041] In an optional embodiment, the method further includes:

[0042] During the text output process contained in the content area of ​​the reply form, each control in the reply form is set to a locked state, wherein the control in the locked state cannot be triggered by the user;

[0043] When it is detected that all the texts contained in the content area of ​​the reply form have been outputted, each control of the reply form is set to an operable state.

[0044] In an optional embodiment, the reply form further includes a voice broadcast control;

[0045] The method further comprises:

[0046] In response to a user triggering operation on the voice broadcast control, the text title, the text contained in the content area, and the text summary are broadcasted in sequence;

[0047] Among them, according to the progress of the voice broadcast, the background color of the title area, content area or summary area in the human-computer dialogue interface is adjusted to a preset color.

[0048] In an optional embodiment, before dynamically generating the reply form, the method further includes: calling a search enhancement service based on the user's input, and outputting search link results related to the user's input.

[0049] In a second aspect, an embodiment of the present application provides a table display device, including:

[0050] A generating module for dynamically generating a reply form in response to user input in the human-computer dialogue interface of the application;

[0051] The adjustment module is used to dynamically adjust the cell size of the reply table based on the number of text characters contained in the cells in the table during the process of dynamically generating the reply table.

[0052] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute any one of the methods described in the first aspect above.

[0053] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the first aspect.

[0054] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes any method described in the first aspect.

[0055] By adopting the solution provided in the embodiment of the present application, a reply table is dynamically generated in response to the user's input in the human-computer dialogue interface of the application; wherein, in the process of dynamically generating the reply table, the size of the reply table is dynamically adjusted based on the size of the human-computer dialogue interface and the number of text characters contained in the cells in the table. In the embodiment of the present application, when the number of columns or words in the table is too large, by adjusting the table width and the format of the text data, the content that can be displayed in the reply table can be increased, thereby improving the readability of the table. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0057] Figure 1 An exemplary schematic diagram of a table display method provided in an embodiment of the present application;

[0058] Figure 2a A flowchart of a table display method provided in an embodiment of the present application;

[0059] Figure 2b An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0060] Figure 2c An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0061] Figure 3a An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0062] Figure 3b An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0063] Figure 4 An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0064] Figure 5a An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0065] Figure 5b An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0066] Figure 5c An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0067] Figure 6 An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0068] Figure 7a An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0069] Figure 7b An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0070] Figure 8a An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0071] Figure 8b An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0072] Figure 8c An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0073] Fig. 9 An exemplary schematic diagram of another table display method provided in an embodiment of the present application;

[0074] Fig.10 A schematic diagram of the structure of another table display device provided in an embodiment of the present application;

[0075] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0076] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0077] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0078] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0079] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0080] In the embodiments of the present application, the core processing architecture for human-computer dialogue applications can be implemented based on a large language model (LLM). A large language model is a type of basic model, usually constructed from a deep neural network, with hundreds of millions of parameters and deeper neural network layers, with stronger expressive power and higher accuracy, and can be applied to scenarios with large computational load and sufficient computing resources, such as artificial intelligence. The model can understand and process various natural language expressions, including syntactic structures, semantic relationships, etc., and has broad application prospects in applications such as question-answering systems, text summarization, and translation.

[0081] Specifically, the human-computer dialogue application can be implemented based on the AIGC large model, which is a natural language processing model based on deep learning technology. The large language model has the ability to communicate with users and answer user questions. In other embodiments, it is not excluded that the GPT model (Generative Pre-trained Transformer) based on the Transformer architecture or baichuan-7B, baichuan-13B, baichuan2-53B, a large language model based on GPT-2, a knowledge-enhanced large language model, etc. can also be used, or the large model based on AIGC can be combined with other large models to obtain a core processing architecture.

[0082] In some embodiments, the GPT model based on the Transformer architecture may also include pre-training, supervised fine-tuning (SFT), and reinforcement learning modules. Among them, the pre-training of a large language model refers to building a large neural network model and feeding a large amount of data to train the language model in some way. The main feature of the pre-training of a large language model is that the amount of data used to train the language model is large enough and the model is large enough. SFT refers to pre-training a neural network model on a source data set, namely the source model. Then a new neural network model is created, namely the target model. The target model copies all model designs and parameters of the source model except the output layer. These model parameters contain the knowledge learned on the source data set, and this knowledge is also applicable to the target data set. The output layer of the source model is closely related to the label of the source data set, so it is not used in the target model. During fine-tuning, an output layer with an output size of the number of categories of the target data set is added to the target model, and the model parameters of the layer are randomly initialized. When training the target model on the target data set, it will be trained from the beginning to the output layer, and the parameters of the remaining layers are fine-tuned based on the parameters of the source model. Reinforcement learning is one of the paradigms and methodologies of machine learning, which is used to describe and solve the problem of how intelligent agents learn strategies to maximize rewards or achieve specific goals during their interactions with the environment. The central idea is to let the agent learn in the environment. Each action will correspond to its own reward, and the agent will learn what to do under what circumstances by analyzing data. It is to solve the problem of sequential decision-making, in which a decision-making agent interacts iteratively with a discrete time dynamic system. At the beginning of each time step, the system is in a certain state. Based on the agent's decision rule, it observes the current state and selects one from a finite set of states. Then, the dynamic system will enter the next new state and obtain a corresponding benefit. This cycle of state selection is repeated to obtain a set of maximized benefits.

[0083] After the user enters a question or demand, the human-computer dialogue application can search the data and generate the corresponding answer. Among the large amount of dialogue data generated by the human-computer dialogue application, some questions will be answered in the form of a table. According to historical data statistics, the table trigger rate is 5%-6%. Currently, many users do not know that the answers of the human-computer dialogue application have the function of generating tables. With the continuous promotion and use of the human-computer dialogue application, the demand for generating tables will increase. In the human-computer dialogue that triggers the table answer, the table is mostly 2-5 columns, accounting for 94%, of which 3 columns have the highest probability, usually dominated by short text tables, or one column is a long text.

[0084] The tables generated by the existing human-computer dialogue application are not easy to read. Figure 1 , Figure 1The two tables shown are commonly used table display formats. Taking the table on the left as an example, the position indicated by arrow 101 is the content area of ​​the table. The columns it contains are of fixed width. If the text contained in a column is mainly short text, there will be more blank areas in the table, and other columns cannot be displayed in the human-computer dialogue interface at one time. They can only scroll to the right and overflow, affecting the user's reading. Figure 1 Taking the table on the right as an example, the position indicated by arrow 102 is the content area of ​​the table. The first column contains the character names, which are usually short texts, while the second column contains the character identities, which are usually long texts. Regardless of how much text the current table contains, the display format of the text (such as font size, number of rows, and spacing, etc.) will not change. The column width of the table only overflows to the right based on the large space occupied by the text, and the row height of the table is usually not changed. If the table contains too much text, the overall width of the current column table will be very large, making it impossible for the current interface to display the entire content of the table at one time. The user can only view the text that is not displayed in the table by swiping left. Due to the layout defects of the table, the content displayed at a single time in the current human-computer dialogue interface is relatively small, which affects the user's reading efficiency.

[0085] In response to the above problems, an embodiment of the present application provides a table display method, which dynamically adjusts the size of the table during the process of outputting the reply table, thereby effectively improving the readability of the table and enhancing the user experience.

[0086] Figure 2a A flowchart of a table display method provided in an embodiment of the present application is provided. The method can be applied to an electronic device (such as a smart phone or a computer) that supports a human-computer dialogue application. As shown in FIG2 , the method may include:

[0087] Step 201, dynamically generating a reply form in response to the user's input in the human-computer dialogue interface of the application;

[0088] Step 202, in the process of dynamically generating the reply table, dynamically adjust the cell size of the reply table based on the number of text characters contained in the cells in the table.

[0089] The application mainly refers to a human-computer dialogue application with a real-time dialogue function. After the human-computer dialogue application is turned on, the user can enter questions or requests in the human-computer dialogue interface. In response to the questions entered by the user, the electronic device searches and obtains the corresponding text data. The text data may include text, numbers, special symbols, etc. For text data that needs to be displayed in a table, the electronic device can dynamically generate a corresponding reply table based on the searched and obtained text data.

[0090] In an optional embodiment, a human-computer dialogue application developed based on a large language model may encounter problems such as lack of domain knowledge, low information accuracy, and false content in real-time dialogue. To address the above problems, the human-computer dialogue application can apply search enhancement services. By introducing additional information sources such as external knowledge bases, the large language model can directly access the latest information without retraining to generate reliable, retrieval-based outputs. The specific steps of the search enhancement service may include: input, indexing, retrieval, and generation. (1) Input: the question or demand entered by the user. (2) Indexing: When using the search enhancement service, the relevant documents will first be divided into blocks, embedding vectors will be generated for these blocks, and they will be indexed into the vector library. When performing a query, the query content will also be embedded in a similar manner. (3) Retrieval: Find relevant documents by comparing the query content with the index vector. (4) Generation: The found relevant documents are combined with the original prompt as additional context, and then passed to the model for response generation, ultimately forming the system's answer to the user. Without search enhancement, a large language model may not be able to answer questions because it is not aware of recent events. However, by using search enhancement, human-computer conversational applications are able to extract relevant information that the model needs to answer questions.

[0091] In the process of human-computer dialogue, not all responses generate tables or start search enhancement services to obtain text. Instead, the intent is recognized based on the user's input to identify the user's search or the need to generate a table. For example, (1) the user's input clearly specifies the output to be in the form of a table. Figure 2b , the area indicated by arrow 203 is the user's input, and its content is "Please use a table to give the average housing price of City A in the past five years." By performing intent recognition on the text input by the user, it can be clearly seen that the user wants to generate a table for reply, and the human-computer dialogue application will generate a corresponding reply table. (2) The user's input does not explicitly indicate that it should be output in a table, but according to the judgment of intent recognition, output in a table will be clearer and more intuitive. Figure 2c , the area pointed by arrow 204 is the user's input, and its content is "Please give the GDP comparison of City A, City B, and City C in the past five years", and the human-computer dialogue application still generates a reply form for reply.

[0092] The intention recognition function of the human-computer dialogue application can be obtained by training the large language model. Specifically, for the user's intention recognition (Intent Recognit ion), it can include several steps such as text preprocessing, feature extraction, model training and intention prediction. Text preprocessing: Clean and segment the text input by the user to remove meaningless stop words and punctuation marks. Feature extraction: Extract meaningful features from the cleaned text, such as bag-of-words model, TF-IDF weight, etc. Model training: Use the labeled training data set to train the intention recognition model. Commonly used algorithms include naive Bayes, support vector machine and deep neural network. Intent prediction: Input the new user input text into the trained model to predict the user's intention category. In other embodiments, the above-mentioned intention recognition function can also be implemented by conventional classifiers, etc. The embodiment of the present application only uses the pre-trained large language model as an example but not a limitation to implement intention recognition.

[0093] In the process of generating the reply table content area, in order to improve the readability of the reply table, the electronic device dynamically adjusts the cell size of the reply table based on the number of text characters contained in the cells in the table. Specifically, in the process of dynamically outputting the reply table, as the number of columns and / or rows of the reply table continues to increase, the overall width and / or height of the reply table will increase accordingly, or, as the number of characters contained in the cell continues to increase, the width and / or height of the corresponding cell will increase accordingly, and then the overall width and / or height of the reply table will increase accordingly. When the human-computer dialogue interface cannot display the entire content of the reply table, if the reply table is not dynamically adjusted, the columns that are not displayed in the reply table will usually overflow to the right. In response to this problem, the electronic device dynamically adjusts the column width and / or row height of the table cell based on the number of text characters contained in the cell in the table. In addition, in the process of dynamically adjusting the column width and / or row height of the table cell, the electronic device will also dynamically adjust the display format of the text characters in each cell so that the text characters in each cell match the size of the corresponding cell; wherein the display format includes: font size, spacing or number of text rows.

[0094] For some reply forms with fewer columns, as the reply form is dynamically adjusted, the overall width and / or height of the reply form may be reduced so that the entire content of the dynamically adjusted reply form can be displayed in the human-computer dialogue interface. For some reply forms with more columns and more text, as the reply is dynamically adjusted, more columns of cells can be displayed in the human-computer dialogue interface.

[0095] It is understandable that the "dynamic" in "dynamically generate a reply table" and the "dynamic" in "dynamically adjust the table size" are not exactly the same. The former "dynamic" mainly means that the reply table is dynamically generated as the text data is output. For example, when the first line of text data is output, the electronic device will generate the first line of the reply table. After the entire text data is output, all cells of the reply table are also generated. The latter "dynamic" mainly refers to the adaptive adjustment of the row height and / or column width of the reply table cells as the number of text characters increases.

[0096] Reference Figure 3a , the third column of the reply form is "Role Introduction", which is usually a long text with a large number of words. If the size of the form is not adjusted, the overall width of the reply form will exceed the width of the human-computer dialogue interface, and part of the content of the reply form cannot be displayed. After applying the method of the present application, the electronic device will dynamically adjust the cell size based on the number of text characters contained in the cell. Referring to the position indicated by arrow 302, after adjustment, the content of the third column of the reply form can be fully displayed in the human-computer dialogue interface.

[0097] When resizing any column, the electronic device will refer to the number of text characters contained in all cells of the current column. Figure 3a For example, the second column of the reply table in the second column contains the actor's name, and the number of text characters contained in the second column is usually 2 or 3. The electronic device can adjust the width of this column to 3 characters. If the number of text characters contained in any cell in this column exceeds 3 characters, a line break operation is required. Referring to the position indicated by arrow 301, "Actor's Name" includes 4 characters, and the last character is displayed in a line break.

[0098] In an optional embodiment, the dynamic adjustment of the reply table may refer to the overall length and width of the reply table, or to the column width of each column table or the row height of each row table. When the column width of each column table or the row height of each row table is dynamically adjusted, the overall length or width of the reply table will usually change. However, in some scenarios, after the column width of each column table or the row height of each row table is dynamically adjusted, the overall length and width of the reply table does not change. For example, the reply table contains only two columns of tables, the first column is mainly short text, and the second column is mainly long text. Taking the existing table display format as an example, the table column widths of the first and second columns may be the same. After the method of the present application is used to dynamically adjust the table size, when the first column table is output, its initial column width may account for half of the overall width, but with the dynamic output of the long text in the second column table, the electronic device will dynamically adjust the column width of the first column table. In the reply table finally output, the column width of the first column table may account for one-third of the overall width, and the second column table may account for two-thirds of the overall width, and the overall width of the reply table does not change.

[0099] Reference Figure 3b , the table on the left can be regarded as an existing, unresized table, and the width of the first column of the table is larger, which is determined by the cell with the largest number of characters in the column, that is, the cell indicated by arrow 303. When the reply table in the embodiment of the present application is output, the first row and the first column are usually output first, and then the remaining columns of the first row are output sequentially. After the output of the first row is completed, the remaining rows are output sequentially. When the first row and the first column of the reply table are output, its width may be larger, similar to the cell indicated by arrow 304. And with the dynamic output of the long text contained in the first row and the second column (the cell indicated by arrow 305), the width of the first row and the first column will be dynamically reduced (the cell indicated by arrow 306).

[0100] by Figure 4 Take this as an example to further explain. Figure 4 The table on the left can be considered as an existing table without resizing. The width of each column is usually determined by the table with the largest column width, and the width of the table without resizing matches the space occupied by the text contained in the table. Referring to the position indicated by arrow 401, the width of the current column matches "Number of Births in Country A (10,000)". This column has more blank areas in the cells except the first row, and the overall content that can be displayed is less. Figure 4 The table on the right can be regarded as a resized table. The width of each column is reduced, so that the blank area of ​​each cell is reduced, and the human-computer dialogue interface can display more columns. Correspondingly, as the width of the table is adjusted, the display format of the text in the table is also adjusted accordingly. For example, the text font size is reduced, and due to the reduced width, the text needs to wrap when it reaches the end of the cell. After the text wraps, the row height of the table increases, so the spacing between the text is also reduced so that the human-computer dialogue interface can display more text at one time. After the adjustment limit, if the table of all columns cannot be displayed, the electronic device will overflow the table that cannot be displayed to the right and scroll. The user can view the content that is not displayed in the current reply table by touching or pulling the corresponding button.

[0101] In an optional embodiment, the electronic device may adjust the size of the table based on the following method: for any column of the table, when it is detected that the number of text characters contained in each cell of the current column is less than a first threshold value, the width of the cells in the current column is adjusted to a first width value; when it is detected that the number of text characters contained in any cell in the current column is greater than or equal to the first threshold value, the width of the cells in the current column is adjusted to a second width value, wherein the second width value is greater than the first width value.

[0102] Reference Figure 5a, the table on the left can be regarded as an existing, unresized table, and the right can be regarded as a reply table that applies the method of the embodiment of the present application and dynamically adjusts the size. Referring to the cell indicated by arrow 501, the number of text characters contained in all cells in the current column is less than the first threshold, and the electronic device can set the width of the cells in this column to the first width value. Referring to the cell indicated by arrow 502, the number of text characters contained in this cell in the current column is the largest and greater than the first threshold, and the electronic device can set the width of the cells in the current column to the second width value. Among them, the width of the second column table is significantly greater than the width of the first column table.

[0103] In an optional embodiment, the second width value increases as the maximum number of text characters contained in each cell in the current column table increases. When the number of text characters contained in any cell of a column table exceeds the first threshold, the width of the column table is determined by the cell containing the largest number of text characters. A certain calculation formula can be set between the "number of text characters" and the "width value of the cell", and the electronic device can calculate the above second width value based on the number of text characters. Figure 5a In the table on the right, the number of text characters contained in each cell in the first column and the third column is less than the first threshold value, and the electronic device sets the column width of the first column and the third column to the first width value. There are cells in the second column and the fourth column whose number of text characters exceeds the first threshold value, and the column width of each column is determined by the cell with the largest number of text data characters in the current column. Among them, the number of text characters in the cell pointed to by arrow 502 is greater than the number of text characters in the cell pointed to by arrow 503, so the column width of the second column is greater than the column width of the fourth column.

[0104] The second width value may also be set to an upper limit value, and when the second width value calculated by the electronic device exceeds the upper limit value, the upper limit value is still used as the column width of the table. Specifically, the first threshold, the first width value, and the second width value may be set based on the size adaptability of the device screen.

[0105] In an optional embodiment, there is a mapping relationship between the pixels of a cell and the width and height. The electronic device can adjust the width or height of the cell by adjusting the pixels of the cell. For example, the first threshold can be set to 25, and when the number of text characters contained in the cell is less than 25, the electronic device can set the pixels of the cell to 60px. When the number of text characters contained in the cell is higher than 25, the electronic device can set the pixels of the cell to 3 times the number of words. The upper limit value of the cell pixel can be set to 180px, corresponding to the upper limit of the second width value.

[0106] After applying the above dynamic adjustment method, the reply form generated by the human-computer dialogue interface can achieve an appropriate balance between "displaying more content" and "ensuring reading experience". Figure 5b, the table on the left can be regarded as an example of an existing table whose size is determined based on the space occupied by the text. The table can display less content, and the user cannot quickly understand the reply content of the human-computer dialogue application, which affects the user's reading efficiency. The table in the middle can be regarded as an example of an existing table based on fixed size display. All columns of the table share a column width and can display the content of multiple columns. However, the long text in the table needs to be wrapped multiple times under the condition of fixed column width, so that the following rows of the table cannot be displayed in the human-computer dialogue interface, and the user needs to swipe up the screen to view it. In addition, the long text affects the user's viewing experience due to the large number of line breaks. The table on the right can be regarded as an example of a table generated based on the dynamic adjustment of the number of text characters mentioned above. Compared with the table on the left, the table can display more columns of content. Compared with the table in the middle, the table can display more table rows, and the text layout in each cell is more reasonable, and the user viewing experience is better.

[0107] In some scenarios, the reply table can be adjusted dynamically by considering the width of each column and the height of each row in the table, and the length and width can be reduced at the same time. Figure 5c , the table on the left can be regarded as an existing table that has not been resized, and the table on the right can be regarded as a reply table that applies the method of the embodiment of the present application and dynamically adjusts the size. The second column and the second column indicated by arrow 504 contain at least two lines of text, and the first column indicated by arrow 505 is all short texts of 4 characters. If only the number of characters in the first column of text is considered, the column width of the first column of the reply table can be adjusted to a width that can accommodate 4 characters. Under the condition that the number of text lines contained in other columns is at least two, the column width of the first column of the reply table can also be reduced, and the 4th character is displayed in a new line. Referring to the cell indicated by arrow 505, the characters contained in the current cell just fill two lines. If the column width of the first column is not reduced, the text contained in the current cell needs to be displayed as 3 lines. Through overall coordination, the overall length and width of the reply table are reduced, so that the human-computer dialogue interface can display more content at a time. Compared with the problems existing in existing tables that display with fixed column widths or determine the column width of the table based on the size of the space occupied by the text, in the embodiment of the present application, the electronic device dynamically adjusts the size of the reply table and the display format of the text characters based on the number of text characters, which can make the layout of the reply table more reasonable and improve the readability of the table.

[0108] In an optional embodiment, the reply form also includes a title area, and after the text contained in the content area of ​​the reply form is output, the electronic device can also generate a text title based on the large language model. Specifically, when the reply form appears in the answer, the front end asynchronously responds to the interface when the content area of ​​the reply form is output, and the back end requests the large language model to generate a text title through PE.

[0109] First, you need to define the meaning of the text title for the large language model, for example, "In the human-computer dialogue scenario, you need to give the table in the answer a title. The title is a brief description of the table content, which can help readers quickly understand the theme and purpose of the table." After that, define the input of the large language model, including user questions, text data obtained by enhanced search, and the text contained in the reply form. In addition, it is necessary to determine the requirements for the text title, such as "Based on the content of the table, combined with the user's questions and the assistant's answers before the table, judge the function of this table", "User questions may be the analysis of multiple entities, and the current table may only be an introduction to one of the entities. At this time, you only need to generate a table name for this entity", "Simplicity: A good table name should be concise and clear, and accurately reflect the content of the table." Based on the above standards, the large language model can generate appropriate text titles to improve the efficiency of users' understanding of the content of the reply form.

[0110] Reference Figure 6 , the area indicated by arrow 601 is the user's question. The user needs to compare the GDP of city A, city B, and city C in the past five years. Based on the user's question, the human-computer dialogue application obtains relevant text data through enhanced search. The area indicated by arrow 602 is the retrieved text data, a total of 12 web page contents. Then, the corresponding answer form can be generated based on the text data. The area indicated by arrow 603 is the content area of ​​the answer form, which contains the text for answering.

[0111] After the content area of ​​the reply form is output, the large language model generates a text title of the reply form based on the user's input, the text data obtained by the search, and at least two of the text contents contained in the form. The position indicated by arrow 604 is the text title "Comparison of GDP of City A and City B in the past five years". By reading this title, the user can quickly understand the content information in the reply form. Optionally, the title text is arranged to adapt to the width of the form, usually displayed as one line. If the text title exceeds one line, the excess part is truncated and "..." is displayed at the end.

[0112] In an optional embodiment, the reply form further includes a plurality of form controls, which may include a copy control, a download control, a share control, and a full-screen display control. The form control may be triggered by the user, and when the electronic device detects that any form control is triggered, it performs a corresponding operation (such as copying, downloading, sharing, or full-screen display, etc.) on the reply form, and displays the execution result on the human-computer dialogue interface.

[0113] During the process of outputting the table, the electronic device adjusts the size of the cells in real time as the table content is output. In addition, when the content area of ​​the reply table is not output completely, the electronic device sets the table control to a locked state. When displayed, the table control can be grayed out, indicating that it is currently in a locked state and cannot be triggered by the user. When the content area of ​​the reply table is fully output, the table control can be ungrayed out, indicating that it is currently in an operable state and can be triggered by a user click for interaction.

[0114] In an optional embodiment, the user can share the reply form by triggering the sharing control. In response to the user's triggering operation on the sharing control, the electronic device displays a selection box for the sharing mode. The sharing mode may include: picture sharing or link sharing. The user can select any sharing mode to send the reply form to the specified address. When the user clicks on the picture sharing, the electronic device jumps to the picture sharing page, which contains the sharing picture and sharing address selection area corresponding to the reply form. Alternatively, when the user clicks on the link sharing, the electronic device copies the sharing link of the reply form and displays the result information of the successful link copy in the human-computer dialogue interface.

[0115] Reference Figure 7a , the position indicated by arrow 701 is the sharing control. After the user clicks the sharing control, the human-computer dialogue interface displays a selection box for the sharing mode, and the dotted box indicated by arrow 703 is the selection box for the sharing mode. The sharing mode may include picture sharing, link sharing, or direct sharing through the functions of certain specific applications. Sharing is based on each round of dialogue. Referring to the position indicated by arrow 702, the user can select the current dialogue to share. If the user chooses to share with pictures, the electronic device will jump to the picture sharing page. The top of the picture sharing page is the shared picture corresponding to the reply form, referring to the area indicated by arrow 704. The bottom of the picture sharing page is the sharing address selection area, referring to the area indicated by arrow 705. The user can choose to share the application or save it locally. If the human-computer dialogue application does not have access to the album, the result message of "Save failed, please go to the phone settings to open the album permission" may also be displayed in the human-computer dialogue interface.

[0116] The shared image corresponding to the reply form can be Figure 7b As shown, in addition to the reply form, the shared picture may also contain relevant information about the application brand, such as application identification information or a QR code that provides an application download link. The position indicated by arrow 706 can display information such as the brand logo, application identification, and download QR code. For the electronic device that receives the shared picture, the user clicks to scan the QR code to display the application download interface, which includes a download button. The user clicks the download button to download the current application. If the application has been downloaded to the electronic device, after the user clicks the download button, the electronic device can directly start the application and display it on the user interface.

[0117] Reference Figure 8a , the controls indicated by arrows 801, 802, 803 and 804 are respectively a download control, a full-screen display control, a first copy control and a second copy control. When the user clicks the download control, the electronic device saves the form image corresponding to the reply form to the album and displays the result information of the successful saving of the image in the human-computer dialogue interface. Figure 8b The table image may include the content area of ​​the reply table, the title area, and the identification information of the application.

[0118] When the user clicks the full-screen display control, the electronic device jumps to the full-screen page corresponding to the horizontal screen display reply form, refer to Figure 8c The full screen page includes a copy control, a download control, a content area of ​​the reply form, and a title area. The copy control and the download control are in an operable state, and the user can copy or download the reply form on the full screen page.

[0119] There are differences between the content copied by the first copy control and the second copy control. When the user clicks the first copy control, the electronic device only copies the text contained in the reply table content area and displays the copied result information in the human-computer dialogue interface; when the user clicks the second copy control, the electronic device copies the text contained in the reply table content area, the text title located above the table, and the text summary located below the table, and displays the copied result information in the human-computer dialogue interface. By setting different copy controls, users can copy different content based on different needs, which increases the user's operating space and improves the user experience.

[0120] In an optional embodiment, the reply form may also include a voice broadcast control. When the user clicks the voice broadcast control, the electronic device sequentially broadcasts the text title, the text contained in the content area, and the text summary; and according to the progress of the voice broadcast, the electronic device adjusts the background color of the title area, content area, or summary area in the human-computer dialogue interface to a preset color. Fig. 9 , the position indicated by arrow 901 is the voice broadcast control, and the areas indicated by arrows 902, 903 and 904 are the title area, content area and summary area respectively. When any area is voice broadcast, the electronic device adjusts the background color of the corresponding area to a preset color, such as a dark color, to improve the viewing efficiency of the user.

[0121] In an optional embodiment, the human-computer dialogue interface can also display corresponding abnormal information for certain abnormal situations that occur in the reply form. For example, when the length of the form exceeds the limit (the number of words in the text data exceeds a certain value), it is impossible to enter the full-screen page. If the user clicks the full-screen display control at this time, the human-computer dialogue interface may display an abnormal message that "the form is too long and full screen is not supported yet." When the form is too long, it does not support downloading as a picture. If the user clicks the download control at this time, the human-computer dialogue interface may display an abnormal message that "Save failed, the form is too long, please try to copy or connect to share." In this scenario, the copy and share functions of the reply form are not affected.

[0122] In an embodiment of the present application, by setting a table control in the reply form, the user can perform operations such as copying, downloading, sharing, and full-screen display on the form, thereby enhancing the interactive function of the form.

[0123] In an optional embodiment, the electronic device can perform intelligent output management on the table, which may specifically include: (1) The format of the table can be optimized when outputting the table. For example, the electronic device can simplify the word count and text content in the table, arrange the rows and columns of the table, and optimize the index to increase the readability of the table. (2) The electronic device can also adjust the structure of the table, such as transposing the rows and columns of the table, or. For tables with multiple repeated headers, the electronic device can merge the duplicate items. In addition, the electronic device can also merge cells to create a larger cell area, or split cells to adjust the layout. (3) Apply preset themes and styles to quickly change the appearance of the entire table. (4) Generate a multi-level mind map through a structured format to summarize the answer content.

[0124] In an embodiment of the present application, when the human-computer dialogue application answers user questions in a table, a reply table is generated based on the searched text data. By adaptively adjusting the size of the table and the display format of the text data, the device screen can display more text data at a time, thereby improving the readability of the table.

[0125] Fig.10 This is a schematic diagram of the structure of a table display device provided in an embodiment of the present application. The device can be deployed in an electronic device, as shown in FIG8 , and the device can include: a generation module 1001 and an adjustment module 1002 .

[0126] A generating module 1001, for dynamically generating a reply form in response to a user input in a human-computer dialogue interface of an application program;

[0127] The adjustment module 1002 is used to dynamically adjust the cell size of the reply table based on the number of text characters contained in the cells in the table during the process of dynamically generating the reply table.

[0128] For the specific process, please refer to the description in the above method flowchart.

[0129] Corresponding to the above embodiments, the present application also provides an electronic device. Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device 1100 may include: a processor 1101, a memory 1102 and a communication unit 1103. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiment of the present application. It can be a bus structure or a star structure, and can also include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.

[0130] The communication unit 1103 is used to establish a communication channel so that the electronic device can communicate with other devices, receive user data sent by other devices or send user data to other devices.

[0131] The processor 1101 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs, instructions, and / or modules stored in the memory 1102, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 1101 can include only a central processing unit (CPU). In the embodiment of the present application, the CPU can be a single computing core or multiple computing cores.

[0132] The memory 1102 is used to store the execution instructions of the processor 1101. The memory 1102 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0133] When the execution instructions in the memory 1102 are executed by the processor 1101 , the electronic device 1100 is enabled to execute part or all of the steps in the embodiment shown in FIG. 2 .

[0134] In a specific implementation, the present application further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the table display method provided in the present application. The storage medium may be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0135] In a specific implementation, the present application also provides a computer program product, wherein the computer program product includes executable instructions, and when the executable instructions are executed on a computer, the computer executes part or all of the steps in each embodiment of the table display method provided in the present application.

[0136] The embodiment of the present application also provides a non-temporary computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the table display method provided by the embodiment of the present application.

[0137] The above-mentioned non-temporary computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (Read On ly Memory; hereinafter referred to as: ROM), an erasable programmable read-only memory (Erasab leProgrammab le Read On ly Memory; hereinafter referred to as: EPROM) or flash memory, optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0138] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0139] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0140] Those skilled in the art can clearly understand that the technology in the embodiments of the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0141] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

Claims

1. A table generation method, applied to a human-computer dialogue application based on a large language model, characterized in that: include: Dynamically generate a reply form in response to user input in the human-computer dialogue interface of the application; Wherein, in the process of dynamically generating the reply table, the cell size of the reply table is dynamically adjusted based on the number of text characters contained in the cell in the table.

2. The method according to claim 1, characterized in that The method further comprises: In the process of dynamically adjusting the cell size of the reply table, the display format of the text characters in each cell is dynamically adjusted so that the text characters in each cell match the size of the corresponding cell; The display format includes: font size, spacing or number of text lines.

3. The method according to claim 1, characterized in that In the process of dynamically generating the reply table, the cell size of the reply table is dynamically adjusted based on the number of text characters contained in the cell in the table, specifically including: During the dynamic output of the reply form, when the human-computer dialogue interface cannot display the entire content of the reply form, the column width and / or row height of the corresponding cell in the reply form is dynamically adjusted based on the number of text characters contained in the cell.

4. The method according to claim 3, characterized in that The dynamically adjusting the column width and / or row height of the table based on the number of text characters contained in the cells of the table includes: For any column table, when it is detected that the number of text characters contained in each cell of the current column table is less than the first threshold, the width of the cell in the current column is adjusted to the first width value; When it is detected that the number of text characters contained in any cell in the current column is greater than or equal to the first threshold, the width of the cell in the current column is adjusted to a second width value, wherein the second width value is greater than the first width value.

5. The method according to claim 4, characterized in that When it is detected that the number of text characters contained in any cell in the current column is greater than or equal to the first threshold, adjusting the width of the cell in the current column to the second width value specifically includes: The second width value increases as the maximum number of text characters contained in each cell in the current column increases.

6. The method according to claim 5, characterized in that The method further comprises: When the second width value reaches the second threshold, the width of the current column table is fixed to the second threshold.

7. The method according to claim 1, characterized in that The reply form includes a content area and a title area; After the content area is output, the title area generates and displays the text title of the reply form.

8. The method according to claim 7, characterized in that The method further comprises: After the content area is output, a text title of the reply form is generated based on at least two of the user's input, the text data acquired through the search, and the text content included in the form.

9. The method according to claim 1, characterized in that: The reply form also includes a sharing control; The method further comprises: In response to a user triggering operation on the sharing control, a selection box for a sharing mode is displayed, where the sharing mode includes: picture sharing or link sharing; When detecting the user's selection operation for the picture sharing, jumping to the picture sharing page, the picture sharing page includes a sharing picture and sharing address selection area corresponding to the reply form; or, When the user's selection operation for link sharing is detected, a sharing link of the reply form is generated and result information indicating successful link copying is displayed in the human-computer dialogue interface.

10. The method according to claim 9, characterized in that The shared image contains all the contents of the reply form and a download QR code for the application, and the download QR code is used to provide a download link for the application.

11. The method according to claim 1, characterized in that: The reply form also includes a full-screen display control; The method further comprises: In response to the user's triggering operation on the full-screen display control, the full-screen page corresponding to the reply form is jumped to and displayed horizontally, and the full-screen page includes a copy control, a download control and all text contents in the reply form.

12. The method according to claim 1, characterized in that The reply form also includes a download control; The method further comprises: In response to the user's triggering operation on the download control, the table image corresponding to the reply table is saved to the album, and the result information of successful saving of the image is displayed in the human-computer dialogue interface; The table image contains all the contents of the reply table and the identification information of the application.

13. The method according to claim 1, characterized in that The reply form also includes a first copy control and a second copy control; The method further comprises: In response to a user triggering operation on the first copy control, copying the text contained in the table, and displaying the copied result information in the human-computer dialogue interface; In response to the user's triggering operation on the second copy control, the text contained in the table, the text title located above the table, and the text summary located below the table are copied, and the copied result information is displayed in the human-computer dialogue interface.

14. The method according to claim 1, characterized in that The method further comprises: During the text output process contained in the content area of ​​the reply form, each control in the reply form is set to a locked state, wherein the control in the locked state cannot be triggered by the user; When it is detected that all the texts contained in the content area of ​​the reply form have been outputted, each control of the reply form is set to an operable state.

15. The method according to claim 1, characterized in that The reply form also includes a voice broadcast control; The method further comprises: In response to a user triggering operation on the voice broadcast control, the text title, the text contained in the content area, and the text summary are broadcasted in sequence; Among them, according to the progress of the voice broadcast, the background color of the title area, content area or summary area in the human-computer dialogue interface is adjusted to a preset color.

16. The method according to claim 1, characterized in that Before dynamically generating the reply form, the method further includes: calling a search enhancement service based on the user's input, and outputting search link results related to the user's input.

17. A table display device, characterized in that: include: A generating module, for dynamically generating a reply form in response to a user input in a human-computer dialogue interface of the human-computer dialogue application; The adjustment module is used to dynamically adjust the cell size of the reply table based on the number of text characters contained in the cells in the table during the process of dynamically generating the reply table.

18. An electronic device, characterized in that: The electronic device comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 16.

19. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 16.