Graphics processing method, electronic device and storage medium

By obtaining chart data and converting it into target table text, the structural inconsistency and numerical inconsistency during chart data conversion in the prior art are solved, and higher accuracy and reliability are achieved.

CN119783633APending Publication Date: 2025-04-08IFLYTEK CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411791997.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

When converting chart data into tabular data, there are problems of structural inconsistency, repetition of numbers or inconsistencies, which affects the accuracy and readability of the table.

Method used

By obtaining the chart data, the initial table text is generated, and converted into an intermediary structure, fusion is performed, and the target table text is finally generated. The method includes dividing the initial table text based on the preset level, forming hierarchical data, and associating it with the tree structure, and optimizing the leaf nodes of the target tree structure for numerical fusion.

Benefits of technology

Improve the accuracy and reliability of converting chart data into tabular data, ensuring the format consistency and accuracy of table output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783633A_ABST
    Figure CN119783633A_ABST
Patent Text Reader

Abstract

The present application discloses a chart processing method, an electronic device and a storage medium. The method comprises: obtaining chart data; processing the chart data to generate at least one initial table text; converting the at least one initial table text into at least one intermediate structure; fusing the at least one intermediate structure to obtain a target table text corresponding to the chart data. The present application improves the accuracy and reliability of converting chart data into table data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments disclosed in the present application relate to the field of artificial intelligence technology, and more specifically, to a graph processing method, an electronic device, and a storage medium. Background Art

[0002] In today's information age, charts and tables, as a visual language, are widely used in fields such as data analysis, report generation, and information presentation, and play a key role in daily work and decision-making. However, to truly understand chart information, not only visual processing capabilities are required, but also strong reasoning capabilities and structured thinking. Although the existing state-of-the-art models (State of the Art, SOTA) have achieved certain results by relying on a large number of training examples, they still have significant limitations in reasoning, especially in the text structure and numerical consistency of the model-generated results. These problems may cause the generated tables to deviate at the semantic and structural levels. Summary of the invention

[0003] According to the embodiments of the present application, the present application proposes a chart processing method, an electronic device and a storage medium to solve the above problems.

[0004] The first aspect of the present application discloses a chart processing method, comprising: obtaining chart data; processing the chart data to generate at least one initial table text; converting the at least one initial table text into at least one intermediate structure; fusing the at least one intermediate structure to obtain a target table text corresponding to the chart data.

[0005] In some embodiments, converting the at least one initial table text into at least one intermediate structure includes: dividing the initial table text based on a preset hierarchy to obtain hierarchical data corresponding to the initial table text; associating the hierarchical data with a preset data structure to obtain the intermediate structure, wherein the number of layers of the preset data structure corresponds to the preset hierarchy.

[0006] In some embodiments, the hierarchical data includes first-level data, second-level data, third-level data and fourth-level data; the preset data structure includes a tree structure, and the tree structure includes a root node, a first-level intermediate node, a second-level intermediate node and a leaf node; the associating the hierarchical data with the preset data structure to obtain the intermediary structure includes: using the root node to represent the first-level data, the first-level intermediate node to represent the second-level data, the first-level intermediate node to represent the third-level data, and the leaf node to represent the fourth-level data, to obtain a target tree structure as the intermediary structure.

[0007] In some embodiments, the first-level data includes titles in the initial table text; the second-level data includes one of row labels and column labels in the initial table text; the third-level data includes the other of row labels and column labels in the initial table text; and the fourth-level data includes cell values ​​in the initial table text.

[0008] In some embodiments, the first-layer intermediate node includes at least one first-layer child node, the second-layer intermediate node includes at least one second-layer child node, the at least one first-layer child node corresponds to at least one column in the initial table text, and the at least one second-layer child node corresponds to at least one row in the initial table text; or the first-layer intermediate node includes at least one first-layer child node, the second-layer intermediate node includes at least one second-layer child node, the at least one first-layer child node corresponds to at least one row in the initial table text, and the at least one second-layer child node corresponds to at least one column in the initial table text; wherein, at least one of the leaf nodes is determined by the at least one first-layer child node and the at least one second-layer child node.

[0009] In some embodiments, the fusing of the at least one intermediate structure to obtain the target table text corresponding to the chart data includes: optimizing at least one of the target tree structures to obtain at least one optimized target tree structure; performing numerical fusion operations on leaf nodes of the at least one optimized target tree structure to generate the target table text.

[0010] In some embodiments, the optimizing the at least one target tree structure includes: checking whether each leaf node of the at least one target tree structure is a valid value; or checking whether the first-layer intermediate nodes and / or the second-layer intermediate nodes of the at least one target tree structure are repeated; or optimizing the structure of the at least one target tree structure based on the number of first-layer intermediate nodes and the number of second-layer intermediate nodes of the at least one target tree structure.

[0011] In some embodiments, the processing of the chart data to generate at least one initial table text includes: based on at least one decoding parameter combination, using a language generation model to perform perturbation processing on the chart data to generate the at least one initial table text.

[0012] The second aspect of the present application discloses an electronic device, comprising a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the chart processing method described in the first aspect.

[0013] The third aspect of the present application discloses a non-volatile computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the chart processing method described in the first aspect is implemented.

[0014] The beneficial effects of the present application include: acquiring chart data, processing the chart data to generate at least one initial table text, converting the at least one initial table text into at least one intermediate structure, fusing the at least one intermediate structure, and obtaining a target table text corresponding to the chart data, wherein the accuracy and reliability of converting the chart data into table data are improved by converting the at least one initial table text into at least one intermediate structure for processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The present application will be further described below in conjunction with the accompanying drawings and implementation methods, in which:

[0016] Figure 1 It is a flowchart of a chart processing method according to an embodiment of the present application;

[0017] Figure 2 This is a schematic diagram of the effect of chart data processing in one embodiment of the present application;

[0018] Figure 3 is a schematic diagram of a tree structure according to an embodiment of the present application;

[0019] Figure 4 This is a schematic diagram of the effect of generating an intermediary structure according to an embodiment of the present application;

[0020] Figure 5 It is a schematic diagram of the effect of chart data processing according to another embodiment of the present application;

[0021] Figure 6 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application;

[0022] Figure 7 It is a schematic diagram of the structure of the non-volatile computer-readable storage medium of an embodiment of the present application. DETAILED DESCRIPTION

[0023] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0024] The term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there may 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 objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, and can mean including any one or more elements selected from the set consisting of A, B, and C. In addition, the terms "first", "second", and "third" in this application are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features.

[0025] Although existing chart to table methods can convert visual information into text in a relatively reasonable manner, there are still many limitations and challenges. For example, due to the lack of an effective post-processing mechanism, the generated tables often have problems such as inconsistent structures, repeated or inconsistent numbers, which affect the accuracy and readability of the tables; or when the training is insufficient, the model output is prone to format errors, which affects the performance of the subsequent question and answer (QA) system and leads to a deviation in the understanding of the chart content. Therefore, although some progress has been made in visual language reasoning, how to ensure the consistency and accuracy of the format of the table output is still a difficult problem that needs to be solved urgently.

[0026] Therefore, the present application proposes a chart processing method, an electronic device and a storage medium to solve the above problems.

[0027] In order to enable those skilled in the art to better understand the technical solution of the present application, the technical solution of the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0028] See also Figure 1 , Figure 1 The flowchart of the chart processing method of the embodiment of the present application is shown in FIG. The execution subject of the method can be an electronic device with computing function, such as a microcomputer, a server, and a mobile device such as a notebook computer and a tablet computer.

[0029] It should be noted that if there are substantially the same results, the method of the present application is not limited to Figure 1 The process sequence shown is limited.

[0030] In some possible implementations, the method may be implemented by a processor calling computer-readable instructions stored in a memory, such as Figure 1 As shown, the method may include the following steps:

[0031] S11: Obtain chart data.

[0032] The chart data may include at least one chart, wherein the chart may be a line chart, a column chart, a pie chart, etc.

[0033] S12: Processing the chart data to generate at least one initial table text.

[0034] Process the chart data to generate at least one initial table text. For example, the chart data includes chart A, such as Figure 2 As shown, Figure 2 It is a schematic diagram of the effect of chart data processing in an embodiment of the present application. Chart A is converted through a preset model to generate multiple initial table texts corresponding to Chart A.

[0035] S13: Convert at least one initial table text into at least one intermediate structure.

[0036] For example, after generating n initial table texts corresponding to the chart A, the n initial table texts are converted into the intermediate structures one by one, so as to obtain n intermediate structures corresponding to the chart A. The intermediate structure can be represented by a data structure.

[0037] S14: Fusing at least one intermediary structure to obtain a target table text corresponding to the chart data.

[0038] At least one intermediary structure is fused to obtain a target table text corresponding to the chart data. For example, n intermediary structures corresponding to chart A are fused to obtain a target table text corresponding to chart A. The target table text can be used to accurately understand the data information in chart A, etc.

[0039] In this embodiment, chart data is acquired, the chart data is processed to generate at least one initial table text, the at least one initial table text is converted into at least one intermediate structure, and the at least one intermediate structure is fused to obtain a target table text corresponding to the chart data, wherein the accuracy and reliability of converting the chart data into table data is improved by converting the at least one initial table text into at least one intermediate structure for processing.

[0040] In some embodiments, processing the chart data to generate at least one initial table text includes: based on at least one decoding parameter combination, using a language generation model to perform perturbation processing on the chart data to generate at least one initial table text.

[0041] Based on at least one decoding parameter combination, the chart data is perturbed using the language generation model, that is, the decoding process of generating a chart to a table using the language generation model is perturbed. For example, multiple versions of table texts are generated using language generation models corresponding to different decoding parameter combinations, wherein different decoding parameter combinations can be used for the same or different types of models, and the decoding parameters at least include {'do_sample', 'num_beams', 'temperature', 'top_k', 'top_p'}. It can be understood that when converting a chart to a table text using a language generation model, different decoding parameter combinations can be set based on a language generation model to generate multiple table texts; or different decoding parameter combinations can be set based on multiple language generation models to generate multiple table texts. Among them, the language generation model is a Chart to Table model, for example, it can be a OneChart model, a ChartAssistant model, a DEPLOT model, a Tabular LLM model, etc.

[0042] In some examples, the format of the initial table text (or, target table text) in this application can be in Markdown format, as shown below:

[0043] |Title|Header 1|Header 2|

[0044] |----------|----------|----------|

[0045] |Row 1|Data 1|Data 2|

[0046] |Row 2|Data 3|Data 4|

[0047] In the table text:

[0048] The first row and first column are the title cells (Title).

[0049] The remaining cells in the first row (Header 1 and Header 2) represent the column labels.

[0050] The remaining cells in the first column (Row 1 and Row 2) represent the row labels.

[0051] Each data cell (Data 1-Data N) contains specific numerical content.

[0052] In an embodiment of the present application, based on at least one decoding parameter combination, a language generation model is used to perform perturbation processing on the chart data to generate at least one initial table text, so that even in a few-sample learning scenario, more candidate table texts can be generated, providing a wide range of choices for subsequent processing.

[0053] In some embodiments, at least one initial table text is converted into at least one intermediate structure, including: dividing the initial table text based on a preset hierarchy to obtain hierarchical data corresponding to the initial table text; associating the hierarchical data with a preset data structure to obtain an intermediate structure, wherein the number of layers of the preset data structure corresponds to the preset hierarchy.

[0054] The initial table text is divided based on the preset hierarchy to obtain hierarchical data corresponding to the initial table text. For example, the preset hierarchy is set to m according to the relevant attributes of the table, that is, the initial table text is divided into m layers of data, and each layer of the m layers of data can correspond to different information in the table. Further, the hierarchical data is associated with the preset data structure to obtain an intermediate structure, and the number of layers of the preset data structure corresponds to the preset hierarchy, wherein the preset data structure can be a tree structure, a graph structure, a nested array, etc. For example, the corresponding intermediate structure is obtained by associating the obtained m-level data with the m-level nested array, that is, the m-level data in the initial table text is represented by the m-level nested array.

[0055] In some embodiments, the hierarchical data includes first-level data, second-level data, third-level data and fourth-level data; the preset data structure includes a tree structure, and the tree structure includes a root node, a first-level intermediate node, a second-level intermediate node and a leaf node.

[0056] For example, when the preset level is 4, the initial table text can be divided into 4 layers of data, that is, the hierarchical data includes the first level data B1, the second level data B2, the third level data B3 and the fourth level data B4, and B1, B2, B3 and B4 correspond to different attribute information of the initial table text. Correspondingly, the number of layers of the preset data structure is also 4. When the preset data structure is a tree structure, such as Figure 3 As shown, Figure 3 It is a schematic diagram of the tree structure of an embodiment of the present application. The tree structure T may include a root node T1, a first-layer intermediate node T2, a second-layer intermediate node T3 and a leaf node T4, wherein the number of each node is determined based on the division result of the initial table text, for example, the number of the first-layer intermediate nodes T2 is n, n≥1, the number of the second-layer intermediate nodes T3 may be the same as the number of the first-layer intermediate nodes T2 is m, m and n may be the same or different, and the number of leaf nodes T4 may be the same as the number of the second-layer intermediate nodes T3.

[0057] At this time, the hierarchical data is associated with the preset data structure to obtain an intermediate structure, including: using the root node to represent the first-level data, the first-level intermediate node to represent the second-level data, the first-level intermediate node to represent the third-level data, and the leaf node to represent the fourth-level data, to obtain a target tree structure as an intermediate structure. For example, the root node T1 can be used to represent the first-level data B1, the first-level intermediate node T2 can be used to represent the second-level data B2, the second-level intermediate node T3 can be used to represent the third-level data B3, and the leaf node T4 can be used to represent the fourth-level data B4.

[0058] In some examples, the first level data includes headings in the initial table text; the second level data includes one of row labels and column labels in the initial table text; the third level data includes the other of the row label and column label in the initial table text; and the fourth level data includes cell values ​​in the initial table text.

[0059] That is to say, the table text can be divided into four layers of data according to the four attributes of the table title, row label, column label and cell. For example, the first-level data B1 corresponds to the title in the initial table text, the second-level data B2 corresponds to one of the row label and column label in the initial table text, the third-level data B3 corresponds to the other of the row label and column label in the initial table text, and the fourth-level data B4 corresponds to the cell value in the initial table text. Further, the initial table text is converted into a tree structure, that is, the root node T1 can be used to represent the title in the initial table text, the first-level intermediate node T2 can be used to represent one of the row label and column label in the initial table text, the second-level intermediate node T3 can be used to represent the other of the row label and column label in the initial table text, and the leaf node T4 can represent the cell value in the initial table text.

[0060] In some embodiments, the first-layer intermediate node includes at least one first-layer child node, the second-layer intermediate node includes at least one second-layer child node, at least one first-layer child node corresponds to at least one column in the initial table text, and at least one second-layer child node corresponds to at least one row in the initial table text; wherein, at least one leaf node is determined by at least one first-layer child node and at least one second-layer child node.

[0061] like Figure 4 As shown, Figure 4It is a schematic diagram of the effect of generating an intermediate structure of an embodiment of the present application. The initial table (initial table text) Ti is converted into a target tree structure Tg. The table Ti is divided into four layers of data, namely, the first layer of data includes the title Title, the second layer of data includes the column labels L1 and L2, the third layer of data includes the row labels H1 and H2, and the fourth layer of data includes the cell values ​​D1, D2, D3 and D4. At this time, in the target tree structure Tg, the first layer intermediate node includes 2 first layer child nodes, and the 2 first layer child nodes correspond to the column labels L1 and L2 of the table Ti; the second layer intermediate node includes 2 second layer child nodes, and the 2 second layer child nodes correspond to the labels H1 and H2 in the table Ti. Furthermore, at least one leaf node can be determined by at least one first-layer child node and at least one second-layer child node, that is, a cell value can be determined according to a column label and a row label. For example, the leaf node corresponding to the cell value D1 can be determined according to the first-layer child node corresponding to the column label L1 and the second-layer child node corresponding to the row label H1, and the leaf node corresponding to the cell value D4 can be determined according to the first-layer child node corresponding to the column label L2 and the second-layer child node corresponding to the row label H2, and so on.

[0062] Understandably, the root node is located at the top of the tree structure, representing the title of the entire table, providing contextual information for other nodes of the tree, and clarifying the overall description of the subject or content of the table. The first-level intermediate nodes represent column labels, usually corresponding to the first row of the table, and are used to describe the category or attribute of each column of data. The second-level intermediate nodes represent row labels, usually corresponding to the first column of the table, and are used to describe the category or classification of each row of data. The two-layer intermediate node structure helps the tree visually display the relationship between rows and columns of the table and establish a clear context for each data cell. The leaf node is located at the bottom of the tree structure and stores the specific numerical content of each data cell, which can be directly used for model calculations or further analysis and processing.

[0063] Alternatively, in some embodiments, at least one first-level child node corresponds to at least one row in the initial table text, and at least one second-level child node corresponds to at least one column in the initial table text; wherein, at least one leaf node is determined by at least one first-level child node and at least one second-level child node.

[0064] For example, the table Ti is divided into four layers of data, wherein the first layer of data includes the title Title, the second layer of data includes the row labels H1 and H2, the third layer of data includes the column labels L1, L2 and L3, and the fourth layer of data includes the cell values ​​D1, D2, D3, D4, D5 and D6. At this time, when the table Ti is converted to generate the target tree structure Tg, the first layer of intermediate nodes in the target tree structure Tg includes two first layer child nodes, and the two first layer child nodes correspond to the row labels H1 and H2 in the table Ti; the second layer of intermediate nodes includes three second layer child nodes, and the three second layer child nodes correspond to the column labels L1, L2 and L3 in the table Ti. Similarly, at least one leaf node can be determined by at least one first layer child node and at least one second layer child node, that is, a cell value can be determined according to a row label and a column label.

[0065] In an embodiment of the present application, the hierarchical data corresponding to the initial table text is associated with the tree structure to obtain an intermediate structure, and the number of layers of the tree structure corresponds to the preset level, wherein the accurate positioning of each data point can be ensured through the structured leaf node design, so as to facilitate the refined processing in the process of data generation and model fusion, and support the deep optimization and precise fusion of the table content. It can be understood that through the definition of the data structure, the row and column relationship and the numerical content of the table can be completely retained in structure, providing the model with higher fusion accuracy and stronger interpretation ability.

[0066] In some embodiments, at least one intermediate structure is fused to obtain a target table text corresponding to the chart data, including: optimizing at least one target tree structure to obtain at least one optimized target tree structure; performing a numerical fusion operation on the leaf nodes of the at least one optimized target tree structure to generate the target table text.

[0067] like Figure 5 As shown, Figure 5 This is a schematic diagram of the effect of chart data processing in another embodiment of the present application. Chart A is converted through a preset model to generate n initial table texts corresponding to chart A, and tables Ti1, Ti2...Tin are obtained. The n initial table texts are converted into n tree structures to obtain target tree structures Tg1, Tg2...Tgn. The target tree structures Tg1, Tg2...Tgn are optimized, and the leaf nodes of the optimized n target tree structures are numerically fused to generate the final target tree structure Tree, wherein numerical fusion operations are performed on the leaf node data, and the numerical fusion operations include at least weighted averaging, simple averaging, voting mechanism, stacking, bagging, Bayesian fusion, and least squares method. After obtaining the final target tree structure Tree, the target tree structure Tree is converted to obtain the target table text, that is, Figure 5The table in Table.

[0068] In this embodiment, by performing a numerical fusion operation on leaf nodes of at least one optimized target tree structure and then generating a target table text, the accuracy of the data is ensured on the basis of a consistent table structure.

[0069] Further, in some embodiments, optimizing at least one target tree structure includes: checking whether each leaf node of at least one target tree structure is a valid value; or checking whether the first-layer intermediate nodes and / or the second-layer intermediate nodes of at least one target tree structure are repeated; or optimizing the structure of at least one target tree structure based on the number of first-layer intermediate nodes and the number of second-layer intermediate nodes of at least one target tree structure.

[0070] Check whether each leaf node of at least one target tree structure is a valid value, for example, by traversing each leaf node of n target tree structures to check whether it contains a valid value, so as to quickly identify and repair missing items and ensure the integrity of the table data. Check whether the first-level intermediate nodes and / or second-level intermediate nodes of at least one target tree structure are repeated, for example, check whether there are duplicates in the intermediate nodes in the target tree structure (such as H1, H2 or L1, L2 mentioned above), so as to effectively remove redundant content and maintain the simplicity and uniqueness of the table structure. Based on the number of first-level intermediate nodes and the number of second-level intermediate nodes of at least one target tree structure, optimize the structure of at least one target tree structure, for example, by comparing the number of first-level intermediate nodes and the number of second-level intermediate nodes of n target tree structures, select the best number of first-level intermediate nodes and the best number of second-level intermediate nodes from the n target tree structures, and use the best number of first-level intermediate nodes and the best number of second-level intermediate nodes as the adjustment direction of the n target tree structures.

[0071] For example, among 100 target tree structures, 60 target tree structures have 9 first-layer intermediate nodes and 9 second-layer intermediate nodes, 30 target tree structures have 10 first-layer intermediate nodes and 9 second-layer intermediate nodes, and 10 target tree structures have 8 first-layer intermediate nodes and 11 second-layer intermediate nodes. It can be determined that the optimal number of first-layer intermediate nodes is 9, and the number of second-layer intermediate nodes is also 9. It can be understood that by comparing the number of first-layer intermediate nodes and the number of second-layer intermediate nodes of n target tree structures, that is, comparing the number of rows and columns of table texts generated by different models, the optimal number of table rows and columns can be selected.

[0072] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0073] See also Figure 6 , Figure 6 6 is a schematic diagram of the structure of an electronic device of an embodiment of the present application. The electronic device 60 includes a memory 61 and a processor 62 coupled to each other, and the processor 62 is used to execute program instructions stored in the memory 61 to implement the steps of the above-mentioned chart processing method embodiment. In a specific implementation scenario, the electronic device 60 may include but is not limited to: a microcomputer, a server, which is not limited here.

[0074] Specifically, the processor 62 is used to control itself and the memory 61 to implement the steps of the above-mentioned chart processing method embodiment. The processor 62 can also be called a CPU (Central Processing Unit), and the processor 62 may be an integrated circuit chip with signal processing capabilities. The processor 62 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 62 can be implemented by an integrated circuit chip.

[0075] See also Figure 7 , Figure 7 Schematic diagram of the structure of a non-volatile computer-readable storage medium according to an embodiment of the present application. The non-volatile computer-readable storage medium 70 is used to store a computer program 701. When the computer program 701 is executed by a processor, for example, Figure 6 When the processor 62 in the embodiment is executed, it is used to implement the steps of the above-mentioned embodiment of the chart processing method.

[0076] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0077] In the several embodiments provided in the present application, it should be understood that the disclosed methods and related devices can be implemented in other ways. For example, the above-described related device implementations are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication disconnection shown or discussed can be through some interfaces, indirect coupling or communication disconnection of devices or units, which can be electrical, mechanical or other forms.

[0078] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0079] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0080] It is easy for a person skilled in the art to know that many modifications and changes can be made to the device and method while maintaining the teaching content of the present application. Therefore, the above disclosure should be considered as limited only by the scope of the appended claims.

Claims

1. A chart processing method, characterized in that: include: Get chart data; Processing the chart data to generate at least one initial table text; converting the at least one initial tabular text into at least one intermediate structure; The at least one intermediary structure is merged to obtain a target table text corresponding to the chart data.

2. The method according to claim 1, characterized in that The converting the at least one initial table text into at least one intermediate structure comprises: Divide the initial table text based on a preset hierarchy to obtain hierarchical data corresponding to the initial table text; The hierarchical data is associated with a preset data structure to obtain the intermediate structure, wherein the number of layers of the preset data structure corresponds to the preset hierarchy.

3. The method according to claim 2, characterized in that The hierarchical data includes first-level data, second-level data, third-level data and fourth-level data; The preset data structure includes a tree structure, and the tree structure includes a root node, a first-layer intermediate node, a second-layer intermediate node, and a leaf node; The step of associating the hierarchical data with a preset data structure to obtain the intermediate structure includes: The root node is used to represent the first-level data, the first-level intermediate nodes are used to represent the second-level data, the first-level intermediate nodes are used to represent the third-level data, and the leaf nodes are used to represent the fourth-level data, to obtain a target tree structure as the intermediate structure.

4. The method according to claim 3, characterized in that The first level of data includes the headings in the initial table text; The second level data includes one of a row label and a column label in the initial table text; The third level data includes the other of the row label and the column label in the initial table text; The fourth level data includes cell values ​​in the initial table text.

5. The method according to claim 4, characterized in that The first-layer intermediate node includes at least one first-layer child node, the second-layer intermediate node includes at least one second-layer child node, the at least one first-layer child node corresponds to at least one column in the initial table text, and the at least one second-layer child node corresponds to at least one row in the initial table text; or The first-layer intermediate node includes at least one first-layer child node, the second-layer intermediate node includes at least one second-layer child node, the at least one first-layer child node corresponds to at least one row in the initial table text, and the at least one second-layer child node corresponds to at least one column in the initial table text; Among them, at least one leaf node is determined by the at least one first-layer child node and the at least one second-layer child node.

6. The method according to claim 3, characterized in that The step of fusing the at least one intermediary structure to obtain a target table text corresponding to the chart data includes: Optimizing at least one of the target tree structures to obtain at least one optimized target tree structure; A numerical fusion operation is performed on the leaf nodes of the at least one optimized target tree structure to generate the target table text.

7. The method according to claim 6, characterized in that The optimizing the at least one target tree structure comprises: Check whether each leaf node of at least one of the target tree structures is a valid value; or Check whether at least one first-layer intermediate node and / or second-layer intermediate node of the target tree structure is repeated; or Based on the number of first-layer intermediate nodes and the number of second-layer intermediate nodes of at least one of the target tree structures, structural optimization is performed on at least one of the target tree structures.

8. The method according to claim 1, characterized in that The processing of the chart data to generate at least one initial table text includes: Based on at least one decoding parameter combination, the chart data is perturbed using a language generation model to generate the at least one initial table text.

9. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the chart processing method according to any one of claims 1 to 8.

10. A non-volatile computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the chart processing method according to any one of claims 1 to 8 is implemented.