Table formula processing method and device, electronic equipment and storage medium
By obtaining and analyzing the table formulas to be corrected and their error information, combining the table metadata, using the target table formula error correction model to generate correct formulas, it solves the high threshold and error problems in the use of table formulas, and improves the correctness and user experience of the formulas.
Patent Information
- Application Number
- CN202311582309.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2025-05-23
AI Technical Summary
In the prior art, there is a high threshold for the use of table formulas, which leads to uncertainty and error probability when users manually input or automatically generate table formulas through large language models.
By obtaining the table formula to be corrected and its corresponding error information and explanation, determining the cause of the error, and combining the table metadata, the target table formula error correction model is used to generate the correct table formula.
It effectively reduces the uncertainty and probability of errors when using table formulas, and improves the correctness and user experience of table formulas.
Smart Images

Figure CN120030984A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for processing a table formula. Background Art
[0002] At present, spreadsheet software (Excel) is gradually being used by people due to its powerful data visualization and analysis capabilities. Among them, table formulas are very powerful tools in spreadsheet software, which can be used to solve various mathematical, statistical, logical, text, date and time problems, and can help users better process and analyze data.
[0003] However, as a very powerful tool in spreadsheet software, table formulas have a certain usage threshold for many users, such as function selection, formula syntax understanding, data reference, function nesting, etc. Such a high usage threshold of table formulas brings certain difficulties to people using table formulas.
[0004] For this purpose, a large language model is introduced. After users input their natural language requirements, the natural language requirements can be converted into corresponding table formulas. However, the table formulas output by the large language model have uncertainty and error probability. In addition, since the table formula has a certain usage threshold, the table formula manually entered by users also has uncertainty and error probability. For this reason, it is necessary to process the table formulas automatically generated by the large language model or manually entered by the user to obtain the correct table formula, so a solution for processing table formulas is urgently needed. Summary of the invention
[0005] In order to solve the uncertainty and error probability of the table formula output by the above-mentioned large language model. In addition, since the table formula has a certain usage threshold, the user's manual input of the table formula also has uncertainty and error probability. For this reason, it is necessary to process the table formula automatically generated by the large language model or manually input by the user to obtain the correct table formula. Therefore, there is an urgent need for a technical problem of a solution to the processing of the table formula. The embodiment of the present application provides a method, device, electronic device and storage medium for processing a table formula. The specific technical solution is as follows:
[0006] In a first aspect of an embodiment of the present application, a method for processing a table formula is first provided, the method comprising:
[0007] Obtaining a table formula to be corrected in a table, error information corresponding to the table formula to be corrected, and an error information explanation corresponding to the error information;
[0008] Determine the error cause corresponding to the table formula to be corrected according to the table formula to be corrected, the error information and the error information explanation;
[0009] determining metadata for the table;
[0010] The correct table formula is determined according to the table formula to be corrected, the error cause and the metadata.
[0011] In an optional implementation, the obtaining of the table formula to be corrected in the table, the error information corresponding to the table formula to be corrected, and the error information explanation corresponding to the error information includes:
[0012] Obtaining an original table formula generated in a preset manner, and detecting whether the original table formula has a corresponding correct formula result;
[0013] In the case that the original table formula does not have a corresponding correct formula result, the original table formula is determined as the table formula to be corrected;
[0014] Determine the error information corresponding to the table formula to be corrected and the error information explanation corresponding to the error information.
[0015] In an optional implementation, the obtaining of the original table formula generated in a preset manner includes:
[0016] Acquire a table in a document, and in response to a fill operation on a cell in the table, determine first data filled in the cell;
[0017] In a case where the first data is preset data, in response to a refilling operation on a cell in the table, determining second data to be refilled in the cell;
[0018] detecting whether the second data is a first type table formula, and marking the cell if the second data is not the first type table formula;
[0019] Wherein, the cell is marked according to a preset marking method, and the marking method is used to prompt that the cell will be subjected to artificial intelligence recognition;
[0020] In response to a confirmation operation of table formula generation, the second data is provided to a table formula generation model, and an original table formula output by the table formula generation model is obtained.
[0021] In an optional embodiment, the method further comprises:
[0022] In the case where the second data is the first type of table formula, the second data is determined to be the original table formula.
[0023] In an optional implementation, the obtaining of the original table formula generated in a preset manner includes:
[0024] Acquire a table in a document, and in response to a fill operation on a cell in the table, determine first data filled in the cell;
[0025] In the case where the first data is preset data, an entry for artificial intelligence to fill in a formula is displayed;
[0026] In response to a preset operation for filling in a formula entry for the artificial intelligence, an artificial intelligence input dialog box is displayed, wherein the artificial intelligence input dialog box is used to input a form formula requirement;
[0027] In response to an input operation of a table formula requirement, determining the table formula requirement input in the artificial intelligence input dialog box;
[0028] The table formula requirement is provided to a table formula generation model, and an original table formula output by the table formula generation model is obtained.
[0029] In an optional embodiment, the method further comprises:
[0030] Displaying the functions referenced in the table formula to be corrected in the formula explanation area, wherein the function includes the parameter meanings of the parameters;
[0031] Displaying the function explanation of the function and the parameter explanation corresponding to the meaning of the parameter in the function in the formula explanation area;
[0032] The table formula to be corrected is displayed in the formula editing area, and the error message is displayed when the cursor is located in the function identification area in the table formula to be corrected.
[0033] In an optional implementation, when the original table formula has a corresponding correct formula result, the method further includes:
[0034] Displaying the functions referenced in the original table formula in the formula explanation area, wherein the functions include parameter meanings of the parameters;
[0035] Displaying the function explanation of the function and the parameter explanation corresponding to the meaning of the parameter in the function in the formula explanation area;
[0036] The original table formula is displayed in the formula editing area, and when the cursor is located in the function identification area in the original table formula, the correct formula result is displayed.
[0037] In an optional implementation, when the cursor is located in the function identification area in the original table formula, displaying the correct formula result includes:
[0038] When the cursor is located in the function identification area of the first function referenced in the original table formula, displaying the correct formula result;
[0039] When the cursor is located in the function identification area of the nested function referenced in the original table formula, the formula result corresponding to the nested function is displayed.
[0040] In an optional embodiment, the method further comprises:
[0041] When the cursor is located in the parameter area corresponding to the parameter in the original table formula, the parameter value corresponding to the parameter is displayed;
[0042] The parameter meaning corresponding to the parameter is marked in the formula explanation area, and the parameter explanation of the parameter meaning is highlighted.
[0043] In an optional embodiment, the method further comprises:
[0044] According to the correct table formula and the error cause, the table formula to be corrected is corrected.
[0045] In an optional implementation, the correcting the table formula to be corrected according to the correct table formula and the error cause includes:
[0046] Displaying the table formula to be corrected in the formula editing area, and marking the erroneous elements in the table formula to be corrected;
[0047] Determine the display position of the error cause according to the erroneous element in the table formula to be corrected, and display the error cause at the display position;
[0048] The correct table formula is displayed in a table formula correction area, and in response to a table formula replacement operation, the table formula to be corrected is replaced with the correct table formula.
[0049] In an optional embodiment, the method further comprises:
[0050] Displaying the correct function referenced in the correct table formula in the formula explanation area, wherein the correct function includes the correct parameter meanings of the correct parameters;
[0051] The correct function explanation of the correct function and the correct parameter explanation corresponding to the correct parameter meaning in the correct function are displayed in the formula explanation area.
[0052] In an optional implementation, the metadata includes basic elements, data types, and content relevance, and the basic elements include a document identifier, a table identifier, and a table header;
[0053] The step of determining metadata of the table includes:
[0054] Determine the document where the table is located, and obtain the document identifier of the document;
[0055] Obtaining the table identifier of the table and the table header in the table, and identifying the data type of each column in the table;
[0056] For any header cell in the header, determine the header data filled in the header cell;
[0057] Determine other data types of other data filled in other cells of the column where the header cell is located, and determine the content correlation between the header data and the other data types.
[0058] In an optional implementation manner, determining the error cause corresponding to the table formula to be corrected according to the table formula to be corrected, the error information, and the error information explanation includes:
[0059] Providing the table formula to be corrected, the error information and the error information explanation to a target table formula error correction model;
[0060] Obtaining the error cause corresponding to the table formula to be corrected output by the target table formula correction model;
[0061] The determining a correct table formula according to the table formula to be corrected, the error cause and the metadata includes:
[0062] Providing the table formula to be corrected, the error cause and the metadata to the target table formula error correction model;
[0063] Obtain the correct table formula output by the target table formula error correction model.
[0064] In an optional implementation, the correcting the table formula to be corrected according to the correct table formula and the error cause includes:
[0065] Providing the correct table formula and the error cause to a target table formula error correction model, so that the target table formula error correction model detects whether the correct table formula has the error cause;
[0066] When the result output by the target table formula error correction model indicates that the correct table formula does not have the error cause, the table formula to be corrected is corrected based on the correct table formula and the error cause.
[0067] In an optional embodiment, before executing the method, the method further includes:
[0068] Obtain an error table formula in a sample table, sample error information corresponding to the error table formula, and a sample error explanation corresponding to the sample error information;
[0069] Determine the sample metadata in the sample table, and obtain the marked error reasons and the marked correct table formula;
[0070] The marked error cause corresponds to the error table formula, the sample error information and the sample error explanation;
[0071] The marked correct table formula corresponds to the sample metadata, the erroneous table formula and the marked error reason;
[0072] According to the following steps, the following iterative training is performed on the initial table formula error correction model to obtain the target table formula error correction model:
[0073] The error table formula, the sample error information and the sample error explanation are used as keys, and the marked error causes are provided as values to the initial table formula error correction model for learning;
[0074] The sample metadata, the erroneous table formula and the marked error cause are used as keys, and the marked correct table formula is provided as a value to an initial table formula error correction model for learning;
[0075] The marked error cause and the marked correct table formula are used as keys, and the error cause that does not exist in the marked correct table formula is provided as a value to the initial table formula error correction model for learning.
[0076] In an optional implementation, the sample metadata includes sample basic elements, sample data types, and sample content relevance, and the sample basic elements include a sample document identifier, a sample header, and a sample table identifier;
[0077] The determining of the sample metadata in the sample table includes:
[0078] Determine the sample document where the sample form is located, and obtain the sample document identifier of the sample document;
[0079] Obtain the sample table identifier of the sample table, the sample table header in the sample table, and identify the sample data types of each sample column in the sample table;
[0080] For any sample table header cell in the sample table header, determine the sample table header data filled in the sample table header cell;
[0081] Determine the other sample data types of the other sample data filled in the other sample cells in the column where the sample table header cell is located;
[0082] Determine the sample content relevance between the sample table header data and the other sample data types.
[0083] In the second aspect of the embodiments of the present application, there is also provided a processing device for table formulas, and the device includes:
[0084] A formula, information, and explanation acquisition module, configured to obtain a table formula to be corrected in a table, error information corresponding to the table formula to be corrected, and an error information explanation corresponding to the error information;
[0085] A cause determination module, configured to determine the error cause corresponding to the table formula to be corrected according to the table formula to be corrected, the error information, and the error information explanation;
[0086] A metadata determination module, configured to determine the metadata of the table;
[0087] A formula determination module, configured to determine a correct table formula according to the table formula to be corrected, the error cause, and the metadata.
[0088] In an optional implementation manner, the formula, information, and explanation acquisition module specifically includes:
[0089] A formula acquisition sub-module, configured to obtain an original table formula generated by a preset method, and detect whether there is a corresponding correct formula result for the original table formula;
[0090] A formula determination sub-module, configured to, when there is no corresponding correct formula result for the original table formula, determine the original table formula as the table formula to be corrected;
[0091] An information and explanation determination sub-module, configured to determine the error information corresponding to the table formula to be corrected, and the error information explanation corresponding to the error information.
[0092] In an optional implementation manner, the formula acquisition sub-module is specifically configured to:
[0093] Acquire a table in a document, and in response to a fill operation on a cell in the table, determine first data filled in the cell;
[0094] In a case where the first data is preset data, in response to a refilling operation on a cell in the table, determining second data to be refilled in the cell;
[0095] detecting whether the second data is a first type table formula, and marking the cell if the second data is not the first type table formula;
[0096] Wherein, the cell is marked according to a preset marking method, and the marking method is used to prompt that the cell will be subjected to artificial intelligence recognition;
[0097] In response to a confirmation operation of table formula generation, the second data is provided to a table formula generation model, and an original table formula output by the table formula generation model is obtained.
[0098] In an optional implementation, the formula acquisition submodule is further used for:
[0099] In the case where the second data is the first type of table formula, the second data is determined to be the original table formula.
[0100] In an optional implementation, the formula acquisition submodule is specifically used for:
[0101] Acquire a table in a document, and in response to a fill operation on a cell in the table, determine first data filled in the cell;
[0102] In the case where the first data is preset data, an entry for artificial intelligence to fill in a formula is displayed;
[0103] In response to a preset operation for filling in a formula entry for the artificial intelligence, an artificial intelligence input dialog box is displayed, wherein the artificial intelligence input dialog box is used to input a form formula requirement;
[0104] In response to an input operation of a table formula requirement, determining the table formula requirement input in the artificial intelligence input dialog box;
[0105] The table formula requirement is provided to a table formula generation model, and an original table formula output by the table formula generation model is obtained.
[0106] In an optional embodiment, the device further comprises:
[0107] A first function display module, used for displaying the function referenced in the table formula to be corrected in the formula interpretation area, wherein the function includes the parameter meaning of the parameter;
[0108] A first function explanation display module, used for displaying the function explanation of the function and the parameter explanation corresponding to the meaning of the parameter in the function in the formula explanation area;
[0109] The first formula display module is used to display the table formula to be corrected in the formula editing area, and display the error message when the cursor is located in the function identification area in the table formula to be corrected.
[0110] In an optional implementation, when the original table formula has a corresponding correct formula result, the device further includes:
[0111] A second function display module, used for displaying the function referenced in the original table formula in the formula interpretation area, wherein the function includes parameter meanings of parameters;
[0112] A second function explanation display module, used for displaying the function explanation of the function and the parameter explanation corresponding to the meaning of the parameter in the function in the formula explanation area;
[0113] A second formula display module, used for displaying the original table formula in the formula editing area;
[0114] The formula result display module is used to display the correct formula result when the cursor is located in the function identification area in the original table formula.
[0115] In an optional implementation, the formula result display module is specifically used for:
[0116] When the cursor is located in the function identification area of the first function referenced in the original table formula, displaying the correct formula result;
[0117] When the cursor is located in the function identification area of the nested function referenced in the original table formula, the formula result corresponding to the nested function is displayed.
[0118] In an optional embodiment, the device further comprises:
[0119] A parameter value display module, used for displaying the parameter value corresponding to the parameter when the cursor is located in the parameter area corresponding to the parameter in the original table formula;
[0120] The parameter explanation display module is used to mark the parameter meaning corresponding to the parameter in the formula explanation area and highlight the parameter explanation of the parameter meaning.
[0121] In an optional embodiment, the device further comprises:
[0122] A formula error correction module, configured to correct the table formula to be corrected according to the correct table formula and the error reason.
[0123] In an optional embodiment, the formula error correction module is specifically configured to:
[0124] Display the table formula to be corrected in a formula editing area, and mark the elements that go wrong in the table formula to be corrected;
[0125] Determine the display position of the error reason according to the elements that go wrong in the table formula to be corrected, and display the error reason at the display position;
[0126] Display the correct table formula in a table formula correction area, and in response to a table formula replacement operation, replace the table formula to be corrected with the correct table formula.
[0127] In an optional embodiment, the device further includes:
[0128] A correct function display module, configured to display the correct functions cited in the correct table formula in a formula explanation area, where the correct functions include the correct parameter meanings of correct parameters;
[0129] An explanation display module, configured to display the correct function explanations of the correct functions, and the correct parameter explanations corresponding to the correct parameter meanings in the correct functions in the formula explanation area.
[0130] In an optional embodiment, the metadata includes basic elements, data types, and content relevance, the basic elements include document identifiers, table identifiers, and table headers; the metadata determination module is specifically configured to:
[0131] Determine the document where the table is located, and obtain the document identifier of the document;
[0132] Obtain the table identifier of the table and the table header in the table, and identify the data types of each column in the table;
[0133] For any table header cell in the table header, determine the table header data filled in the table header cell;
[0134] Determine the other data types of the other data filled in the other cells in the column where the table header cell is located, and determine the content relevance between the table header data and the other data types.
[0135] In an optional embodiment, the reason determination module is specifically configured to:
[0136] Providing the table formula to be corrected, the error information and the error information explanation to a target table formula error correction model;
[0137] Obtaining the error cause corresponding to the table formula to be corrected output by the target table formula correction model;
[0138] The formula determination module is specifically used for:
[0139] Providing the table formula to be corrected, the error cause and the metadata to the target table formula error correction model;
[0140] Obtain the correct table formula output by the target table formula error correction model.
[0141] In an optional implementation, the formula error correction module is specifically used to:
[0142] Providing the correct table formula and the error cause to a target table formula error correction model, so that the target table formula error correction model detects whether the correct table formula has the error cause;
[0143] When the result output by the target table formula error correction model indicates that the correct table formula does not have the error cause, the table formula to be corrected is corrected based on the correct table formula and the error cause.
[0144] In an optional embodiment, the device further comprises:
[0145] A sample acquisition module, used to acquire an error table formula in a sample table, sample error information corresponding to the error table formula, and a sample error explanation corresponding to the sample error information;
[0146] A sample metadata determination module, used to determine the sample metadata in the sample table;
[0147] The error cause and table formula acquisition module is used to obtain the marked error cause and the marked correct table formula;
[0148] The marked error cause corresponds to the error table formula, the sample error information and the sample error explanation;
[0149] The marked correct table formula corresponds to the sample metadata, the erroneous table formula and the marked error reason;
[0150] The model training module is used to perform the following iterative training on the initial table formula error correction model according to the following steps to obtain the target table formula error correction model:
[0151] The error table formula, the sample error information and the sample error explanation are used as keys, and the marked error causes are provided as values to the initial table formula error correction model for learning;
[0152] The sample metadata, the erroneous table formula and the marked error cause are used as keys, and the marked correct table formula is provided as a value to an initial table formula error correction model for learning;
[0153] The marked error cause and the marked correct table formula are used as keys, and the error cause that does not exist in the marked correct table formula is provided as a value to the initial table formula error correction model for learning.
[0154] In an optional implementation, the sample metadata includes sample basic elements, sample data types, and sample content relevance, the sample basic elements include sample document identifiers, sample headers, and sample table identifiers; the sample metadata determination module is specifically used to:
[0155] Determine the sample document where the sample form is located, and obtain the sample document identifier of the sample document;
[0156] Acquire the sample table identifier of the sample table, the sample table header in the sample table, and identify the sample data type of each sample column in the sample table;
[0157] For any sample header cell in the sample header, determine the sample header data filled in the sample header cell;
[0158] Determine other sample data types of other sample data filled in other sample cells in the column where the sample header cell is located;
[0159] Determine the sample content relevance of the sample header data to the other sample data types.
[0160] In a third aspect of the embodiments of the present application, there is further provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0161] Memory, used to store computer programs;
[0162] The processor is used to implement the method for processing the table formula described in any one of the first aspects above when executing the program stored in the memory.
[0163] In a fourth aspect of the embodiments of the present application, a storage medium is further provided. Instructions are stored in the storage medium, and when it runs on a computer, it causes the computer to execute the processing method of the table formula described in any one of the above first aspects.
[0164] In a fifth aspect of the embodiments of the present application, a computer program product containing instructions is further provided. When it runs on a computer, it causes the computer to execute the processing method of the table formula described in any one of the above.
[0165] The technical solution provided by the embodiments of the present application is to obtain the table formula to be corrected in the table, the error information corresponding to the table formula to be corrected, and the error information explanation corresponding to the error information. According to the table formula to be corrected, the error information, and the error information explanation, determine the error reason corresponding to the table formula to be corrected, determine the metadata of the table, and according to the table formula to be corrected, the error reason, and the metadata, determine the correct table formula.
[0166] By using the table formula to be corrected, the error information, and the error information explanation to determine the error reason, and then using the table formula to be corrected, the error reason, and the metadata of the table to determine the correct table formula. In this way, processing the table formula to be corrected to obtain the correct table formula can help users obtain the correct table formula conveniently and quickly, improve the user experience and the correctness of the table formula, and is of great significance for the efficient use and error reduction of the table formula. Description of the Drawings
[0167] The drawings here are incorporated into the specification and constitute a part of this specification, showing the embodiments that conform to the present application, and are used together with the specification to explain the principles of the present application.
[0168] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0169] One or more embodiments are illustrated by the pictures in the corresponding drawings. These exemplary illustrations do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the drawings do not constitute a proportional limitation.
[0170] Figure 1 It is a schematic flowchart of the implementation process of a processing method for a table formula shown in the embodiments of the present application;
[0171] Figure 2It is a schematic diagram of an implementation flow of another method for processing a table formula shown in an embodiment of the present application;
[0172] Figure 3 A schematic diagram of an implementation flow of a model training method shown in an embodiment of the present application;
[0173] Figure 4 It is a schematic diagram of an implementation flow of another method for processing a table formula shown in an embodiment of the present application;
[0174] Figure 5 A schematic diagram of an implementation flow of a method for obtaining a table formula shown in an embodiment of the present application;
[0175] Figure 6 This is a schematic diagram of filling “=” in a cell shown in an embodiment of the present application;
[0176] Figure 7 A schematic diagram of a highlighted cell shown in an embodiment of the present application;
[0177] Figure 8 It is a schematic diagram of the implementation process of another table formula acquisition method shown in the embodiment of the present application;
[0178] Fig. 9 This is a schematic diagram showing an artificial intelligence formula filling entry shown in an embodiment of the present application;
[0179] Fig.10 A schematic diagram of displaying an artificial intelligence input dialog box shown in an embodiment of the present application;
[0180] Fig.11 A schematic diagram of a table formula input requirement in an artificial intelligence input dialog box shown in an embodiment of the present application;
[0181] Fig.12 A schematic diagram showing relevant information of a table formula to be corrected shown in an embodiment of the present application;
[0182] Fig.13 A schematic diagram showing relevant information of an original table formula shown in an embodiment of the present application;
[0183] Fig.14 A schematic diagram showing a formula result corresponding to a nested function shown in an embodiment of the present application;
[0184] Fig.15 A schematic diagram showing relevant information of parameters in an original table formula shown in an embodiment of the present application;
[0185] Fig.16A schematic diagram showing a comparison between a correct table formula and a table formula to be corrected shown in an embodiment of the present application;
[0186] Fig.17 It is a structural schematic diagram of a table formula processing device shown in an embodiment of the present application;
[0187] Fig.18 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0188] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0189] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0190] It should be noted that the table formulas involved in the embodiments of the present application actually refer to the function formulas in the table, such as the SUM function, the AVERAGE function, the VLOOKUP function, etc., which are different from the specific calculation formulas. For example, the calculation formula may be y=ax+b, and the table formula is different from this type of calculation formula.
[0191] like Figure 1 FIG. 1 is a schematic diagram of an implementation flow of a method for processing a table formula provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:
[0192] S101, obtaining a table formula to be corrected in a table, error information corresponding to the table formula to be corrected, and an error information explanation corresponding to the error information.
[0193] In an embodiment of the present application, in a table, a user can manually enter a table formula, or use artificial intelligence to automatically generate a table formula. The table formula manually entered by the user or generated by artificial intelligence in the table may be an erroneous table formula. In this case, the erroneous table formula can be regarded as a table formula to be corrected.
[0194] Based on this, the table formula to be corrected in the table can be obtained. The table formula to be corrected here can be the erroneous table formula manually input by the user or generated by artificial intelligence, and then processed to obtain the correct table formula. In addition, it is also necessary to obtain the error information corresponding to the table formula to be corrected and the error information explanation corresponding to the error information.
[0195] It should be noted that the error message corresponding to the table formula to be corrected may be, for example, #NAME?, #REF! or #VALUE!, etc., and there is a standard error message explanation for the error message. For example, for the error message #NAME?, the corresponding error message explanation may be that the function name is entered incorrectly when the formula is entered.
[0196] S102, determining the error cause corresponding to the table formula to be corrected according to the table formula to be corrected, the error information and the error information explanation.
[0197] In an embodiment of the present application, for a table formula to be corrected, error information corresponding to the table formula to be corrected, and an error information explanation corresponding to the error information, the error cause corresponding to the table formula to be corrected can be determined based on the table formula to be corrected, the error information, and the error information explanation.
[0198] It should be noted that the cause of the error may include syntax error, parameter error, full-width / half-width symbol error, operation logic error, etc., which is not limited in the embodiments of the present application.
[0199] S103, determining metadata of the table.
[0200] In the embodiment of the present application, in order to obtain the correct table formula, it is necessary to determine the metadata of the table, which means that the determination of the correct table formula requires the participation of the metadata of the table. The metadata here is essentially some loose metadata of the table, which will be described in detail later.
[0201] S104, determining the correct table formula according to the table formula to be corrected, the error cause and the metadata.
[0202] In an embodiment of the present application, for the table formula to be corrected in the table, the error cause corresponding to the table formula to be corrected, and the metadata of the table, the correct table formula can be determined based on the table formula to be corrected, the error cause, and the metadata.
[0203] Treating the table formula to be corrected in this way to obtain the correct table formula can help users obtain the correct table formula quickly and easily, improve the user experience and the correctness of the table formula, and is of great significance for the efficient use of table formulas and the reduction of errors.
[0204] Through the above description of the technical solution provided in the embodiment of the present application, the table formula to be corrected in the table, the error information corresponding to the table formula to be corrected, and the error information explanation corresponding to the error information are obtained, and the error cause corresponding to the table formula to be corrected is determined according to the table formula to be corrected, the error information and the error information explanation, the metadata of the table is determined, and the correct table formula is determined according to the table formula to be corrected, the error cause and the metadata.
[0205] The cause of the error is determined through the table formula to be corrected, the error message and the explanation of the error message, and then the correct table formula is determined through the table formula to be corrected, the error cause and the metadata of the table. The table formula to be corrected is processed in this way to obtain the correct table formula, which can help users obtain the correct table formula quickly and conveniently, improve the user experience and the correctness of the table formula, and is of great significance for the efficient use of table formulas and reducing errors.
[0206] Among them, in the embodiment of the present application, in the process of processing the table formula to be corrected, the correct table formula can be obtained with the help of artificial intelligence model. Figure 2 FIG. 1 is a schematic diagram of an implementation flow of another method for processing a table formula provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:
[0207] S201, obtaining a table formula to be corrected in a table, error information corresponding to the table formula to be corrected, and an error information explanation corresponding to the error information.
[0208] In the embodiment of the present application, this step is similar to the above-mentioned step S101, and the embodiment of the present application will not be described one by one here.
[0209] S202, providing the table formula to be corrected, error information and error information explanation to the target table formula error correction model.
[0210] S203, obtaining the error cause corresponding to the table formula to be corrected output by the target table formula correction model.
[0211] In an embodiment of the present application, for the table formula to be corrected in the table, the error information corresponding to the table formula to be corrected, and the error information explanation corresponding to the error information, the table formula to be corrected, the error information and the error information explanation can be provided to a target table formula error correction model, so as to obtain the error cause corresponding to the table formula to be corrected output by the target table formula error correction model.
[0212] It should be noted that, for the target table formula error correction model, it can be a neural network model, for example, it can be a large language model, and the large language model can be any one of the currently existing large language models, and the embodiments of the present application are not limited to this.
[0213] In addition, for the target table formula error correction model, it itself has learned the mapping relationship between the erroneous table formula, error information, error information explanation and error cause, thereby providing the table formula to be corrected, error information and error information explanation to the target table formula error correction model, and the target table formula error correction model can output the error cause corresponding to the table formula to be corrected.
[0214] S204, determining metadata of the table.
[0215] In an embodiment of the present application, the metadata of a table includes basic elements, data types, and content relevance, wherein the basic elements include a document identifier, a table identifier, and a table header, so that these loose metadata can be identified in a structured manner.
[0216] Based on this, determining the metadata of the table is essentially to determine the document where the table is located, obtain the document identifier of the document, obtain the table identifier of the table, and the header in the table, and identify the data type of each column in the table. For any header cell in the header, determine the header data filled in the header cell, determine the other data types of other data filled in other cells in the column where the header cell is located, and determine the content correlation between the header data and other data types.
[0217] For example, determine the table document where the table is located, obtain the table document name of the table document, obtain the table name of the table and the table header in the table, and identify the data type of each column in the table. For any header cell in the header, determine the header data filled in the header cell, determine the other data types of other data filled in other cells in the column where the header cell is located, and determine the content correlation between the header data and other data types.
[0218] It should be noted that for data types, it includes text, numbers, values (scientific and technological, percentage, etc.), currency, date / time, contact, progress, hyperlink, phone, email, etc. For document identification, it includes document name, document ID, etc. For table identification, it includes table name, table ID, etc. For table header, it generally refers to the first row of cells in the table.
[0219] In addition, for the content relevance between the header data and other data types, semantic recognition can be performed on the header data and other data types to determine the content relevance between the header data and other data types. In addition, the above-mentioned document may specifically refer to a document with a table inside, such as an Excel document, a Word document, a PDF document, or a PPT document, which is not limited in the embodiments of the present application.
[0220] S205, providing the table formula to be corrected, the error cause and metadata to the target table formula error correction model.
[0221] S206, obtaining the correct table formula output by the target table formula error correction model.
[0222] In an embodiment of the present application, for the table formula to be corrected in the table, the error cause corresponding to the table formula to be corrected, and the metadata of the table, the table formula to be corrected, the error cause, and the metadata can be provided to a target table formula correction model to obtain the correct table formula output by the target table formula correction model.
[0223] It should be noted that the target table formula error correction model has learned the mapping relationship between the erroneous table formula, the error cause, metadata and the correct table formula. Therefore, the table formula to be corrected, the error cause and metadata are provided to the target table formula error correction model, and the target table formula error correction model can output the correct table formula.
[0224] S207, correcting the table formula to be corrected according to the correct table formula and the error cause.
[0225] In the embodiment of the present application, after obtaining the correct table formula and the cause of the error, the user can be helped to gradually check the table formula to be corrected, that is, to correct the table formula to be corrected according to the correct table formula and the cause of the error. This can not only help the user to obtain the correct table formula quickly and conveniently, but also effectively solve the problem of standardization and correctness of the table formula written by the user.
[0226] In addition, for the correct table formula, it is necessary to check whether the above error reasons still exist. If the correct table formula does not have the above error reasons, the correct table formula and the error reasons can be output at this time, and the table formula to be corrected can be corrected according to the correct table formula and the error reasons. Among them, the correct table formula and the error reasons can be submitted to the target table formula error correction model for self-checking to check whether the correct table formula still has the above error reasons.
[0227] Specifically, the correct table formula and the error cause are provided to the target table formula error correction model, so that the target table formula error correction model can detect whether the correct table formula has an error cause. When the result output by the target table formula error correction model indicates that the correct table formula does not have an error cause, the table formula to be corrected can be corrected based on the correct table formula and the error cause.
[0228] It should be noted that the target table formula error correction model has learned the mapping relationship between the correct table formula, the cause of the error and the non-existence of the error cause in the correct table formula. Therefore, the correct table formula and the error cause are submitted to the target table formula error correction model for self-checking, and the output result indicates that the correct table formula does not have the error cause.
[0229] Among them, the target table formula error correction model can also be used to detect whether the correct table formula has a corresponding result value. When the result output by the target table formula error correction model indicates that the correct table formula does not have an error cause, and the correct table formula has a corresponding result value, the table formula to be corrected can be corrected based on the correct table formula and the error cause.
[0230] In addition, if the result output by the target table formula correction model indicates that there is an error in the correct table formula, and / or the correct table formula does not have a corresponding result value, step S201 can be re-executed to reprocess the table formula to be corrected. This is not limited to the embodiments of the present application.
[0231] In this way, in the process of processing the table formula to be corrected, the correct table formula can be obtained with the help of the artificial intelligence model, which can not only help users obtain the correct table formula quickly and conveniently, but also efficiently solve the problems of standardization and correctness of the table formula written by users.
[0232] In addition, in an embodiment of the present application, a model training method is provided to obtain the above-mentioned target table formula error correction model. Figure 3 As shown, it is a schematic diagram of an implementation flow of a model training method provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:
[0233] S301, obtaining an error table formula in a sample table, sample error information corresponding to the error table formula, and a sample error explanation corresponding to the sample error information.
[0234] In an embodiment of the present application, a sample document may be prepared, wherein a sample table exists, and an erroneous table formula exists in the sample table. Based on this, the erroneous table formula in the sample table is obtained. In addition, it is also necessary to obtain sample error information corresponding to the erroneous table formula in the sample table, and a sample error explanation corresponding to the sample error information.
[0235] S302, determining sample metadata in the sample table, and obtaining the marked error reasons and the marked correct table formulas.
[0236] In the embodiment of the present application, the sample metadata of the sample table includes sample basic elements, sample data types, and sample content relevance, wherein the sample basic elements include a sample document identifier, a sample header, and a sample table identifier.
[0237] Based on this, determining the sample metadata in the sample table is essentially to determine the sample document where the sample table is located, obtain the sample document identifier of the sample document, obtain the sample table identifier of the sample table, the sample header in the sample table, and identify the sample data type of each sample column in the sample table. For any sample header cell in the sample header, determine the sample header data filled in the sample header cell, determine the other sample data types of other sample data filled in other sample cells in the column where the sample header cell is located, and determine the sample content correlation between the sample header data and other sample data types.
[0238] In addition, it is also necessary to obtain the marked error reasons and the marked correct table formulas, so as to complete the preparation of the training data set for the initial table formula error correction model. The marked error reasons here are the manually marked error reasons, and the marked correct table formulas are also the manually marked correct table formulas. Among them, the marked error reasons correspond to the incorrect table formulas, sample error information, and sample error explanations; the marked correct table formulas correspond to the sample metadata, incorrect table formulas, and marked error reasons.
[0239] S303, according to the following steps, perform the following iterative training on the initial table formula error correction model to obtain the target table formula error correction model.
[0240] In an embodiment of the present application, after the preparation of the above-mentioned training data set, the following iterative training can be performed on the initial table formula error correction model according to the following steps S304 to S306 to obtain a target table formula error correction model.
[0241] It should be noted that the target table formula error correction model can be obtained after a preset number of iterations, or after all the above-mentioned training data sets have been used up. The embodiments of the present application do not limit this.
[0242] S304, using the error table formula, sample error information and sample error explanation as keys, and the marked error causes as values to provide to the initial table formula error correction model for learning.
[0243] In an embodiment of the present application, the erroneous table formula, sample error information and sample error explanation can be used as keys, and the marked error causes can be used as values to be provided to the initial table formula error correction model for learning.
[0244] It should be noted that for the initial table formula error correction model, what is learned is the key-value mapping relationship between the erroneous table formula, sample error information, sample error explanation, and the marked error cause, and the same or similar erroneous table formula, error information, and error explanation are subsequently provided to the target table formula error correction model. It can output the corresponding error cause based on this mapping relationship, and the embodiments of the present application are not limited to this.
[0245] S305, using the sample metadata, the erroneous table formula and the marked error reasons as keys, and the marked correct table formula as values to provide to the initial table formula error correction model for learning.
[0246] In an embodiment of the present application, the sample metadata of the sample table, the erroneous table formula and the marked error reasons can be used as keys, and the marked correct table formula can be used as values and provided to the initial table formula error correction model for learning.
[0247] It should be noted that, for the initial table formula error correction model, what it learns is the key-value mapping relationship between the sample metadata, the erroneous table formula and the marked error reasons, and the marked correct table formula. Subsequently, the same or similar metadata, erroneous table formula and error reasons are provided to the target table formula error correction model. It can rely on this mapping relationship to output the corresponding correct table formula. The embodiments of the present application are not limited to this.
[0248] S306, using the marked error cause and the marked correct table formula as keys, and providing the error cause that does not exist in the marked correct table formula as a value to the initial table formula error correction model for learning.
[0249] In an embodiment of the present application, the marked error causes and the marked correct table formulas can be used as keys, and the error causes that do not exist in the marked correct table formulas can be used as values and provided to the initial table formula error correction model for learning.
[0250] It should be noted that, for the initial table formula error correction model, what it learns is the key-value mapping relationship between the marked error causes and the marked correct table formulas, and the error causes that do not exist in the marked correct table formulas. Subsequently, the same or similar error causes and correct table formulas are provided to the target table formula error correction model. It can rely on this mapping relationship to detect that the error causes do not exist in the correct table formula. The embodiments of the present application are not limited to this.
[0251] After the above steps, the first-level mapping is the erroneous table formula, sample error information and sample error explanation as the key, and the marked error cause as the value, which are provided to the initial table formula error correction model for learning; the second-level mapping is the sample metadata of the sample table, the erroneous table formula and the marked error cause as the key, and the marked correct table formula as the value, which are provided to the initial table formula error correction model for learning; the third-level mapping is the marked error cause and the marked correct table formula as the key, and the marked error cause that does not exist in the marked correct table formula as the value, which are provided to the initial table formula error correction model for learning, and the final target table formula error correction model can be obtained. In the subsequent process of processing the table formula to be corrected, the correct table formula can be obtained with the help of an artificial intelligence model, which can not only help users quickly and easily obtain the correct table formula, but also efficiently solve the problems of standardization and correctness of user-written table formulas.
[0252] It should be noted that the processing flow of the above-mentioned first-level mapping, second-level mapping, and third-level mapping is essentially imitating the thinking process of people, that is, for an erroneous table formula, it is first necessary to determine the cause of the error, and then after knowing the cause of the error, the erroneous table formula can be corrected accordingly to obtain the correct table formula, and finally the correct table formula needs to be self-checked to verify whether the cause of the error still exists. Based on this, first of all, in order to determine the cause of the error of the erroneous table formula, it is necessary to use sample error information and sample error explanation, so the above-mentioned key-value pairs selected by the above-mentioned first-level mapping are selected, and secondly, in order to correct the erroneous table formula to obtain the correct table formula, it is necessary to use sample metadata under the guidance of the cause of the error to correct the erroneous table formula, so the above-mentioned key-value pairs selected by the above-mentioned second-level mapping are selected, and finally the correct table formula is self-checked, and the object of inspection (i.e., the cause of the error) needs to be informed, so the above-mentioned key-value pairs selected by the above-mentioned third-level mapping are selected.
[0253] In addition, in the embodiments of the present application, the table formula can be generated by manual input or by using an artificial intelligence model. If there is no corresponding correct formula result for the table formula, the table formula is an erroneous table formula, and it is processed as a table formula to be corrected to obtain a correct table formula. Based on this, Figure 4 FIG. 1 is a schematic diagram of an implementation flow of another method for processing a table formula provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:
[0254] S401, obtaining an original table formula generated in a preset manner, and detecting whether the original table formula has a corresponding correct formula result.
[0255] In the embodiment of the present application, an original table formula generated by a preset method is obtained, where the preset method includes manual input or an artificial intelligence model. And for the original table formula, it is necessary to detect whether the original table formula has a corresponding correct formula result.
[0256] It should be noted that the formula result refers to the result value output by the table formula after the table formula is executed. For example, for the SUM function, after the SUM function is executed, the SUM function outputs a sum, which is the formula result.
[0257] Among them, the original table formula can be generated by the artificial intelligence model, thereby obtaining the original table formula generated by the artificial intelligence model. For details, refer to Figure 5 The method for obtaining the table formula is shown.
[0258] Specifically, Figure 5 FIG. 1 is a schematic diagram of an implementation flow of a table formula acquisition method provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:
[0259] S501, obtaining a table in a document, and determining first data filled in the cell in response to a fill operation on the cell in the table.
[0260] In an embodiment of the present application, a user can use spreadsheet processing software to open a document (eg, a spreadsheet document) so as to obtain a table in the document. At this time, the target cells in the table are generally filled with certain data.
[0261] For the data filled in the target cells in the table, the user hopes to use the table formula to process it, so that the user can perform a fill operation in the cells of the table (usually referring to blank cells), so that the first data filled in the cells can be determined in response to the fill operation on the cells in the table.
[0262] S502 , when the first data is preset data, in response to a refilling operation on a cell in the table, determining second data to be refilled in the cell.
[0263] In an embodiment of the present application, for the first data filled in a (blank) cell, when the first data is preset data (for example, the preset data can be the character "=", or can also be the text "equals" and other data related to the use of table formulas), it indicates that the user wishes to use the table formula to process the data that has been filled in the cells in the table. At this time, the user will perform the fill operation on the cells in the table again to determine the second data that is filled in the cells again.
[0264] For example, for the first data filled in the (blank) cell, when the first data is "=", Figure 6 As shown, it means that the user wants to use the table formula to process the data that has been filled in the cells in the table. At this time, the user will perform the filling operation on the cells in the table again to determine the second data that is filled in the cells again.
[0265] S503, detecting whether the second data is a first type table formula, and marking the cell if the second data is not a first type table formula.
[0266] In an embodiment of the present application, for the second data filled again in the cell, detecting whether the second data is a first type of table formula (the first type of table formula refers to non-natural language requirements, but various specific table formulas, such as SUM function, AVERAGE function, VLOOKUP function, etc.) means detecting whether the second data is a specific table formula, for example, detecting whether the second data is SUM(D1:D4).
[0267] When the second data is not a first-type table formula, it means that what the user fills in is not a specific table formula, but a natural language requirement, which may be a requirement generated by a table formula. In this case, the cell is marked.
[0268] It should be noted that, for cells, the cells can be marked in a preset marking method, and the marking method is used to prompt that the cells will be recognized by artificial intelligence. Among them, the cells can be highlighted to prompt the user that the cells will be recognized by artificial intelligence. Figure 7 shown.
[0269] In addition, for the above-mentioned second data, when the second data is a first type of table formula, it means that the user is manually entering the table formula at this time, which means that the second data is the table formula manually filled in by the user. At this time, the second data can be determined as the original table formula, so that if the original table formula is an erroneous table formula in the future, it can be processed to obtain the correct table formula. In this way, in the manual formula writing mode, the manually entered erroneous formula can still be processed to obtain the correct table formula, and the manually entered erroneous formula can also be corrected (the specific correction method will be explained later), which can not only help users to obtain the correct table formula quickly and conveniently, but also efficiently solve the problems of standardization and correctness of user-written table formulas.
[0270] S504, in response to a confirmation operation of the table formula generation, providing the second data to the table formula generation model, and obtaining the original table formula output by the table formula generation model.
[0271] In an embodiment of the present application, after the above-mentioned processing, the cell is marked, prompting that the cell will undergo artificial intelligence recognition. After the above-mentioned second data is filled in, the user can execute a confirmation operation for the generation of the table formula, thereby responding to the confirmation operation for the generation of the table formula, providing the second data to the table formula generation model, and obtaining the original table formula output by the table formula generation model.
[0272] It should be noted that, for the table formula generation model, it can be a neural network model, for example, it can be a large language model, and the large language model can be any large language model currently available, and the embodiment of the present application does not limit this. In addition, in the process of the table formula generation model generating the original table formula, the metadata of the table can also be provided to the table formula generation model.
[0273] In addition, the original table formula can be generated by the artificial intelligence model, so that the original table formula generated by the artificial intelligence model can be obtained. For details, refer to Figure 8 Another method of obtaining a table formula is shown, which is the same as the above Figure 5 There are differences in the methods shown.
[0274] Specifically, Figure 8 FIG. 1 is a schematic diagram of an implementation flow of another table formula acquisition method provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:
[0275] S801, obtaining a table in a document, and determining first data filled in the cell in response to a fill operation on the cell in the table.
[0276] In the embodiment of the present application, this step is similar to the above-mentioned step S501, and the embodiment of the present application will not be described one by one here.
[0277] S802, when the first data is preset data, an entry for artificial intelligence to fill in the formula is displayed.
[0278] In the embodiment of the present application, for the first data filled in the cell, when the first data is the preset data, the artificial intelligence formula entry is displayed. For example, when the first data is "=", the artificial intelligence formula entry is displayed, such as Fig. 9 shown.
[0279] S803, in response to the preset operation for filling in the formula entry with artificial intelligence, an artificial intelligence input dialog box is displayed, and the artificial intelligence input dialog box is used to input the form formula requirements.
[0280] In the embodiment of the present application, for the artificial intelligence formula entry, the user can perform a pre-operation (such as a click operation), so that the artificial intelligence input dialog box can be displayed in response to the preset operation for the artificial intelligence formula entry, such as Fig.10 As shown, the artificial intelligence input dialog box is used to input table formula requirements.
[0281] S804, in response to the input operation of the table formula requirement, determining the table formula requirement input in the artificial intelligence input dialog box.
[0282] S805, providing the table formula requirement to the table formula generation model, and obtaining the original table formula output by the table formula generation model.
[0283] In the embodiment of the present application, the user can perform an input operation in the artificial intelligence input dialog box, so that the table formula requirement input in the artificial intelligence input dialog box can be determined in response to the input operation of the table formula requirement, such as Fig.11 shown.
[0284] For the table formula requirements input in the artificial intelligence input dialog box, the table formula requirements can be provided to the table formula generation model to obtain the original table formula output by the table formula generation model.
[0285] Among them, the user can perform a confirmation operation of table formula generation in the artificial intelligence input dialog box, and in response to the confirmation operation of table formula generation, the table formula requirement can be provided to the table formula generation model to obtain the original table formula output by the table formula generation model.
[0286] It should be noted that for the artificial intelligence input dialog box, it contains confirmation icons generated by table formulas, such as Fig.11The “>” icon shown, the user can click the icon to trigger the confirmation operation of the table formula generation, which is not limited to the embodiment of the present application.
[0287] After the above processing, the original table formula generated by the artificial intelligence model, or the original table formula generated by manual input can be obtained. The original table formula generated by the above two methods can be processed as follows.
[0288] S402: When there is no corresponding correct formula result for the original table formula, the original table formula is determined as the table formula to be corrected.
[0289] S403, determining the error information corresponding to the table formula to be corrected and the error information explanation corresponding to the error information.
[0290] In an embodiment of the present application, for the original table formula, when there is no corresponding correct formula result for the original table formula, the original table formula is determined as the table formula to be corrected, and then the error information corresponding to the table formula to be corrected and the error information explanation corresponding to the error information are determined.
[0291] S404, providing the table formula to be corrected, error information and error information explanation to the target table formula error correction model.
[0292] In the embodiment of the present application, the present application is similar to the above-mentioned step S202, and the embodiment of the present application will not be described one by one here.
[0293] S405, obtaining the error cause corresponding to the table formula to be corrected output by the target table formula correction model.
[0294] In the embodiment of the present application, the present application is similar to the above-mentioned step S203, and the embodiment of the present application will not be described one by one here.
[0295] S406, determining metadata of the table.
[0296] In the embodiment of the present application, the present application is similar to the above-mentioned step S204, and the embodiment of the present application will not be described one by one here.
[0297] S407, providing the table formula to be corrected, the error cause and metadata to the target table formula error correction model.
[0298] In the embodiment of the present application, the present application is similar to the above-mentioned step S205, and the embodiment of the present application will not be described one by one here.
[0299] S408, obtaining the correct table formula output by the target table formula error correction model.
[0300] In the embodiment of the present application, the present application is similar to the above-mentioned step S206, and the embodiment of the present application will not be described one by one here.
[0301] S409, providing the correct table formula and the error cause to the target table formula error correction model, so that the target table formula error correction model detects whether there is an error cause in the correct table formula.
[0302] S410, when the result output by the target table formula error correction model indicates that the correct table formula does not have an error cause, the table formula to be corrected is corrected according to the correct table formula and the error cause.
[0303] In an embodiment of the present application, the correct table formula and the error cause can be provided to a target table formula error correction model so that the target table formula error correction model can detect whether the correct table formula has an error cause.
[0304] When the result output by the target table formula error correction model indicates that there is no error cause in the correct table formula, the table formula to be corrected is corrected based on the correct table formula and the error cause.
[0305] In the process of processing the table formulas to be corrected in this way, the correct table formulas can be obtained with the help of artificial intelligence models, which can not only help users obtain the correct table formulas quickly and conveniently, but also effectively solve the problems of standardization and correctness of table formulas written by users.
[0306] In addition, in the embodiment of the present application, in order to facilitate the user to understand the table formula to be corrected, the relevant information of the table formula to be corrected can be displayed in the form of a preview. Based on this, for the table formula to be corrected, the function referenced in the table formula to be corrected can be displayed in the formula explanation area, wherein the function includes the parameter meaning of the parameter; the function explanation of the function and the parameter explanation corresponding to the parameter meaning in the function can be displayed in the formula explanation area; the table formula to be corrected is displayed in the formula editing area, and when the cursor is located in the function identification area in the table formula to be corrected, the error message is displayed.
[0307] For example, in response to a confirmation operation of table formula generation, a table formula requirement may be provided to a table formula generation model, and an original table formula output by the table formula generation model may be obtained. If the original table formula does not have a corresponding correct formula result, the original table formula may be determined as a table formula to be corrected. At this time, a function (VLOOKUP function) referenced in the table formula to be corrected may be displayed in the formula explanation area, wherein the function includes the parameter meanings of the parameters (search key value, range, index, sorted), and a function explanation of the function (e.g. Fig.12), and the corresponding parameter explanations in the function (e.g. Fig.12 In addition, the table formula to be corrected can be displayed in the formula editing area, and when the cursor is located in the function name area in the table formula to be corrected, the error message (#REF!) corresponding to the table formula to be corrected can be displayed in the form of a bubble, such as Fig.12 shown.
[0308] In addition, in order to facilitate users to understand the original table formula (i.e., the correct table formula), relevant information of the original table formula can be displayed in the form of a preview. Based on this, for the original table formula, if the original table formula has a corresponding correct formula result, it means that the original table formula is a correct table formula. At this time, the function referenced in the original table formula can be displayed in the formula interpretation area, wherein the function includes the parameter meaning of the parameter, the function interpretation of the function is displayed in the formula interpretation area, and the parameter interpretation corresponding to the parameter meaning in the function is displayed, the original table formula is displayed in the formula editing area, and the correct formula result is displayed when the cursor is located in the function identification area in the original table formula.
[0309] For example, in response to a confirmation operation of table formula generation, a table formula requirement may be provided to a table formula generation model, and an original table formula output by the table formula generation model may be obtained. If the original table formula has a corresponding correct formula result, the function (VLOOKUP function) referenced in the original table formula may be displayed in the formula interpretation area, wherein the function includes the parameter meanings of the parameters (search key value, range, index, sorted), and the function explanation of the function (e.g. Fig.12 ), and the corresponding parameter explanations in the function (e.g. Fig.12 In addition, the original table formula can be displayed in the formula editing area, and the correct formula result (100%) can be displayed in the form of a bubble when the cursor is in the function name area (VLOOKUP) in the original table formula, such as Fig.13 shown.
[0310] It should be noted that when the cursor is located in the function identification area in the original table formula, the correct formula result is displayed, so that the formula result can be previewed in real time, which allows users to quickly verify whether the table formula works as expected, thereby saving time and reducing errors.
[0311] Among them, in the embodiment of the present application, for the original table formula, it can be a multi-level function nesting, which can support the preview of the formula result of the inner function (i.e., the nested function). In addition, the parameter explanation of the inner function and the parameter value of the memory function can also be previewed.
[0312] Based on this, when the cursor is located in the function identification area of the first function referenced in the original table formula, the correct formula result is displayed; when the cursor is located in the function identification area of a nested function referenced in the original table formula, the formula result corresponding to the nested function is displayed. In this way, the formula results can be previewed level by level, which can help users better understand and debug complex table formulas and improve visual messages.
[0313] For example, when the cursor is located in the function name (VLOOKUP) area of the first function (VLOOKUP function) referenced in the original table formula, the correct formula result is displayed; when the cursor is located in the function name (CHOOSE) area of the nested function (CHOOSE function) referenced in the original table formula, the formula result corresponding to the nested function is displayed, such as Fig.14 shown.
[0314] When the cursor is in the parameter area corresponding to the parameter in the original table formula, the parameter value corresponding to the parameter is displayed, the parameter meaning corresponding to the parameter is marked in the formula explanation area, and the parameter explanation of the parameter meaning is highlighted. This allows real-time preview of the parameter reference range, which allows users to quickly verify whether the table formula works as expected, thereby saving time and reducing errors.
[0315] For example, when the cursor is located in the corresponding parameter area (G2) in the original table formula, the parameter value corresponding to the parameter is displayed, the parameter meaning (search key value) corresponding to the parameter is bolded in the formula interpretation area, and the parameter explanation of the parameter meaning is highlighted in the first line in the formula interpretation area, such as Fig.15 shown.
[0316] In an embodiment of the present application, the table formula to be corrected is processed to obtain the correct table formula, and the correct table formula can be compared with the table formula to be corrected. In this way, the table formula to be corrected can be corrected, and the table formula to be corrected can be replaced with one click, which effectively solves the problem of standardization and correctness of table formulas written by users.
[0317] Based on this, the table formula to be corrected is displayed in the formula editing area, and the erroneous elements in the table formula to be corrected are marked; according to the erroneous elements in the table formula to be corrected, the display position of the error cause is determined, and the error cause is displayed at the display position; the correct table formula is displayed in the table formula correction area, and in response to the table formula replacement operation, the table formula to be corrected is replaced with the correct table formula.
[0318] For example, the table formula to be corrected is displayed in the formula editing area, and the erroneous elements in the table formula to be corrected are marked with underscores. According to the erroneous elements in the table formula to be corrected, the display position of the error cause is determined: above the erroneous elements in the table formula to be corrected, so that the error cause can be displayed above the erroneous elements in the table formula to be corrected, and the correct table formula is displayed in the table formula correction area. There is a tab key in the table formula correction area. Clicking this key can achieve one-key replacement, that is, replacing the table formula to be corrected with the correct table formula, such as Fig.16 shown.
[0319] In addition, in order to facilitate the user to understand the correct table formula, the relevant information of the correct table formula can be displayed in the form of a preview. Based on this, the correct function referenced in the correct table formula can also be displayed in the formula explanation area, where the correct function includes the correct parameter meaning of the correct parameter; the correct function explanation of the correct function and the correct parameter explanation corresponding to the correct parameter meaning in the correct function are displayed in the formula explanation area.
[0320] Corresponding to the above method embodiment, the present application embodiment also provides a processing device for a table formula, such as Fig.17 As shown, the device may include: a formula, information, and explanation acquisition module 1710, a cause determination module 1720, a metadata determination module 1730, and a formula determination module 1740.
[0321] The formula, information, and explanation acquisition module 1710 is used to acquire a table formula to be corrected in a table, error information corresponding to the table formula to be corrected, and an error information explanation corresponding to the error information;
[0322] A cause determination module 1720, configured to determine the error cause corresponding to the table formula to be corrected according to the table formula to be corrected, the error information and the error information explanation;
[0323] A metadata determination module 1730, configured to determine metadata of the table;
[0324] The formula determination module 1740 is used to determine the correct table formula according to the table formula to be corrected, the error cause and the metadata.
[0325] In an optional implementation, the formula, information, and explanation acquisition module specifically includes:
[0326] The formula acquisition submodule is used to acquire the original table formula generated by a preset method and detect whether the original table formula has a corresponding correct formula result;
[0327] A formula determination submodule, used for determining the original table formula as the table formula to be corrected when there is no corresponding correct formula result for the original table formula;
[0328] The information and explanation determination submodule is used to determine the error information corresponding to the table formula to be corrected, and the error information explanation corresponding to the error information.
[0329] In an optional implementation, the formula acquisition submodule is specifically used for:
[0330] Acquire a table in a document, and in response to a fill operation on a cell in the table, determine first data filled in the cell;
[0331] In a case where the first data is preset data, in response to a refilling operation on a cell in the table, determining second data to be refilled in the cell;
[0332] detecting whether the second data is a first type table formula, and marking the cell if the second data is not the first type table formula;
[0333] Wherein, the cell is marked according to a preset marking method, and the marking method is used to prompt that the cell will be subjected to artificial intelligence recognition;
[0334] In response to a confirmation operation of table formula generation, the second data is provided to a table formula generation model, and an original table formula output by the table formula generation model is obtained.
[0335] In an optional implementation, the formula acquisition submodule is further used for:
[0336] In the case where the second data is the first type of table formula, the second data is determined to be the original table formula.
[0337] In an optional implementation, the formula acquisition submodule is specifically used for:
[0338] Acquire a table in a document, and in response to a fill operation on a cell in the table, determine first data filled in the cell;
[0339] In the case where the first data is preset data, an entry for artificial intelligence to fill in a formula is displayed;
[0340] In response to a preset operation for filling in a formula entry for the artificial intelligence, an artificial intelligence input dialog box is displayed, wherein the artificial intelligence input dialog box is used to input a form formula requirement;
[0341] In response to an input operation of a table formula requirement, determining the table formula requirement input in the artificial intelligence input dialog box;
[0342] The table formula requirement is provided to a table formula generation model, and an original table formula output by the table formula generation model is obtained.
[0343] In an optional embodiment, the device further comprises:
[0344] A first function display module, used for displaying the function referenced in the table formula to be corrected in the formula interpretation area, wherein the function includes the parameter meaning of the parameter;
[0345] A first function explanation display module, used for displaying the function explanation of the function and the parameter explanation corresponding to the meaning of the parameter in the function in the formula explanation area;
[0346] The first formula display module is used to display the table formula to be corrected in the formula editing area, and display the error message when the cursor is located in the function identification area in the table formula to be corrected.
[0347] In an optional implementation, when the original table formula has a corresponding correct formula result, the device further includes:
[0348] A second function display module, used for displaying the function referenced in the original table formula in the formula interpretation area, wherein the function includes parameter meanings of parameters;
[0349] A second function explanation display module, used for displaying the function explanation of the function and the parameter explanation corresponding to the meaning of the parameter in the function in the formula explanation area;
[0350] A second formula display module, used for displaying the original table formula in the formula editing area;
[0351] The formula result display module is used to display the correct formula result when the cursor is located in the function identification area in the original table formula.
[0352] In an optional implementation, the formula result display module is specifically used for:
[0353] When the cursor is located in the function identification area of the first function referenced in the original table formula, displaying the correct formula result;
[0354] When the cursor is located in the function identification area of the nested function referenced in the original table formula, the formula result corresponding to the nested function is displayed.
[0355] In an optional embodiment, the device further comprises:
[0356] A parameter value display module, used for displaying the parameter value corresponding to the parameter when the cursor is located in the parameter area corresponding to the parameter in the original table formula;
[0357] The parameter explanation display module is used to mark the parameter meaning corresponding to the parameter in the formula explanation area and highlight the parameter explanation of the parameter meaning.
[0358] In an optional embodiment, the device further comprises:
[0359] The formula correction module is used to correct the table formula to be corrected according to the correct table formula and the error cause.
[0360] In an optional implementation, the formula error correction module is specifically used to:
[0361] Displaying the table formula to be corrected in the formula editing area, and marking the erroneous elements in the table formula to be corrected;
[0362] Determine the display position of the error cause according to the erroneous element in the table formula to be corrected, and display the error cause at the display position;
[0363] The correct table formula is displayed in a table formula correction area, and in response to a table formula replacement operation, the table formula to be corrected is replaced with the correct table formula.
[0364] In an optional embodiment, the device further comprises:
[0365] A correct function display module, used for displaying the correct function referenced in the correct table formula in the formula interpretation area, wherein the correct function includes the correct parameter meanings of the correct parameters;
[0366] The explanation display module is used to display the correct function explanation of the correct function and the correct parameter explanation corresponding to the correct parameter meaning in the correct function in the formula explanation area.
[0367] In an optional implementation, the metadata includes basic elements, data types, and content relevance, and the basic elements include document identifiers, table identifiers, and table headers; the metadata determination module is specifically used to:
[0368] Determine the document where the table is located, and obtain the document identifier of the document;
[0369] Obtaining the table identifier of the table and the table header in the table, and identifying the data type of each column in the table;
[0370] For any header cell in the header, determine the header data filled in the header cell;
[0371] Determine other data types of other data filled in other cells of the column where the header cell is located, and determine the content correlation between the header data and the other data types.
[0372] In an optional implementation, the cause determination module is specifically configured to:
[0373] Providing the table formula to be corrected, the error information and the error information explanation to a target table formula error correction model;
[0374] Obtaining the error cause corresponding to the table formula to be corrected output by the target table formula correction model;
[0375] The formula determination module is specifically used for:
[0376] Providing the table formula to be corrected, the error cause and the metadata to the target table formula error correction model;
[0377] Obtain the correct table formula output by the target table formula error correction model.
[0378] In an optional implementation, the formula error correction module is specifically used to:
[0379] Providing the correct table formula and the error cause to a target table formula error correction model, so that the target table formula error correction model detects whether the correct table formula has the error cause;
[0380] When the result output by the target table formula error correction model indicates that the correct table formula does not have the error cause, the table formula to be corrected is corrected based on the correct table formula and the error cause.
[0381] In an optional embodiment, the device further comprises:
[0382] A sample acquisition module, used to acquire an error table formula in a sample table, sample error information corresponding to the error table formula, and a sample error explanation corresponding to the sample error information;
[0383] A sample metadata determination module, used to determine the sample metadata in the sample table;
[0384] The error cause and table formula acquisition module is used to obtain the marked error cause and the marked correct table formula;
[0385] The marked error cause corresponds to the error table formula, the sample error information and the sample error explanation;
[0386] The marked correct table formula corresponds to the sample metadata, the erroneous table formula and the marked error reason;
[0387] The model training module is used to perform the following iterative training on the initial table formula error correction model according to the following steps to obtain the target table formula error correction model:
[0388] The error table formula, the sample error information and the sample error explanation are used as keys, and the marked error causes are provided as values to the initial table formula error correction model for learning;
[0389] The sample metadata, the erroneous table formula and the marked error cause are used as keys, and the marked correct table formula is provided as a value to an initial table formula error correction model for learning;
[0390] The marked error cause and the marked correct table formula are used as keys, and the error cause that does not exist in the marked correct table formula is provided as a value to the initial table formula error correction model for learning.
[0391] In an optional implementation, the sample metadata includes sample basic elements, sample data types, and sample content relevance, the sample basic elements include sample document identifiers, sample headers, and sample table identifiers; the sample metadata determination module is specifically used to:
[0392] Determine the sample document where the sample form is located, and obtain the sample document identifier of the sample document;
[0393] Acquire the sample table identifier of the sample table, the sample table header in the sample table, and identify the sample data type of each sample column in the sample table;
[0394] For any sample header cell in the sample header, determine the sample header data filled in the sample header cell;
[0395] Determine other sample data types of other sample data filled in other sample cells in the column where the sample header cell is located;
[0396] Determine the sample content relevance of the sample header data to the other sample data types.
[0397] The present application also provides an electronic device, such as Fig.18 As shown, it includes a processor 181, a communication interface 182, a memory 183 and a communication bus 184, wherein the processor 181, the communication interface 182, and the memory 183 communicate with each other through the communication bus 184.
[0398] Memory 183, used for storing computer programs;
[0399] The processor 181 is used to execute the program stored in the memory 183 to implement the following steps:
[0400] Obtain a table formula to be corrected in a table, error information corresponding to the table formula to be corrected, and an error information explanation corresponding to the error information; determine the error cause corresponding to the table formula to be corrected based on the table formula to be corrected, the error information, and the error information explanation; determine the metadata of the table; determine the correct table formula based on the table formula to be corrected, the error cause, and the metadata.
[0401] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0402] The communication interface is used for communication between the above electronic device and other devices.
[0403] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0404] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0405] In another embodiment provided in the present application, a storage medium is also provided, in which instructions are stored. When the storage medium is run on a computer, the computer executes the method for processing the table formula described in any of the above embodiments.
[0406] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the method for processing the table formula described in any of the above embodiments.
[0407] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a storage medium, or transmitted from one storage medium to another storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0408] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0409] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0410] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A method for processing table formulas, It is characterized in that The method comprises: Obtaining a table formula to be corrected in a table, error information corresponding to the table formula to be corrected, and an error information explanation corresponding to the error information; Determine the error cause corresponding to the table formula to be corrected according to the table formula to be corrected, the error information and the error information explanation; determining metadata for the table; The correct table formula is determined according to the table formula to be corrected, the error cause and the metadata.
2. The method according to claim 1, It is characterized in that The obtaining of the table formula to be corrected in the table, the error information corresponding to the table formula to be corrected, and the error information explanation corresponding to the error information includes: Obtaining an original table formula generated in a preset manner, and detecting whether the original table formula has a corresponding correct formula result; In the case that the original table formula does not have a corresponding correct formula result, the original table formula is determined as the table formula to be corrected; Determine the error information corresponding to the table formula to be corrected and the error information explanation corresponding to the error information.
3. The method according to claim 2, It is characterized in that The obtaining of the original table formula generated in a preset manner includes: Acquire a table in a document, and in response to a fill operation on a cell in the table, determine first data filled in the cell; In a case where the first data is preset data, in response to a refilling operation on a cell in the table, determining second data to be refilled in the cell; detecting whether the second data is a first type table formula, and marking the cell if the second data is not the first type table formula; Wherein, the cell is marked according to a preset marking method, and the marking method is used to prompt that the cell will be subjected to artificial intelligence recognition; In response to a confirmation operation of table formula generation, the second data is provided to a table formula generation model, and an original table formula output by the table formula generation model is obtained.
4. The method according to claim 3, It is characterized in that The method further comprises: In the case where the second data is the first type of table formula, the second data is determined to be the original table formula.
5. The method according to claim 2, It is characterized in that The obtaining of the original table formula generated in a preset manner includes: Acquire a table in a document, and in response to a fill operation on a cell in the table, determine first data filled in the cell; In the case where the first data is preset data, an entry for artificial intelligence to fill in a formula is displayed; In response to a preset operation for filling in a formula entry for the artificial intelligence, an artificial intelligence input dialog box is displayed, wherein the artificial intelligence input dialog box is used to input a form formula requirement; In response to an input operation of a table formula requirement, determining the table formula requirement input in the artificial intelligence input dialog box; The table formula requirement is provided to a table formula generation model, and an original table formula output by the table formula generation model is obtained.
6. The method according to claim 2, It is characterized in that The method further comprises: Displaying the functions referenced in the table formula to be corrected in the formula explanation area, wherein the function includes the parameter meanings of the parameters; Displaying the function explanation of the function and the parameter explanation corresponding to the meaning of the parameter in the function in the formula explanation area; The table formula to be corrected is displayed in the formula editing area, and the error message is displayed when the cursor is located in the function identification area in the table formula to be corrected.
7. The method according to claim 2, It is characterized in that In the case where the original table formula has a corresponding correct formula result, the method further includes: Displaying the functions referenced in the original table formula in the formula explanation area, wherein the functions include parameter meanings of the parameters; Displaying the function explanation of the function and the parameter explanation corresponding to the meaning of the parameter in the function in the formula explanation area; The original table formula is displayed in the formula editing area, and when the cursor is located in the function identification area in the original table formula, the correct formula result is displayed.
8. The method according to claim 7, It is characterized in that The step of displaying the correct formula result when the cursor is located in the function identification area in the original table formula includes: When the cursor is located in the function identification area of the first function referenced in the original table formula, displaying the correct formula result; When the cursor is located in the function identification area of the nested function referenced in the original table formula, the formula result corresponding to the nested function is displayed.
9. The method according to claim 7, It is characterized in that The method further comprises: When the cursor is located in the parameter area corresponding to the parameter in the original table formula, the parameter value corresponding to the parameter is displayed; The parameter meaning corresponding to the parameter is marked in the formula explanation area, and the parameter explanation of the parameter meaning is highlighted.
10. The method according to claim 1, It is characterized in that The method further comprises: According to the correct table formula and the error cause, the table formula to be corrected is corrected.
11. The method according to claim 10, It is characterized in that The step of correcting the table formula to be corrected according to the correct table formula and the error cause includes: Displaying the table formula to be corrected in the formula editing area, and marking the erroneous elements in the table formula to be corrected; Determine the display position of the error cause according to the erroneous element in the table formula to be corrected, and display the error cause at the display position; The correct table formula is displayed in a table formula correction area, and in response to a table formula replacement operation, the table formula to be corrected is replaced with the correct table formula.
12. The method according to claim 11, It is characterized in that The method further comprises: Displaying the correct function referenced in the correct table formula in the formula explanation area, wherein the correct function includes the correct parameter meanings of the correct parameters; The correct function explanation of the correct function and the correct parameter explanation corresponding to the correct parameter meaning in the correct function are displayed in the formula explanation area.
13. The method according to claim 1, It is characterized in that The metadata includes basic elements, data types and content relevance, and the basic elements include document identifiers, table identifiers and table headers; The step of determining metadata of the table includes: Determine the document where the table is located, and obtain the document identifier of the document; Obtaining the table identifier of the table and the table header in the table, and identifying the data type of each column in the table; For any header cell in the header, determine the header data filled in the header cell; Determine other data types of other data filled in other cells of the column where the header cell is located, and determine the content correlation between the header data and the other data types.
14. The method according to claim 1, It is characterized in that The determining the error cause corresponding to the table formula to be corrected according to the table formula to be corrected, the error information and the error information explanation includes: Providing the table formula to be corrected, the error information and the error information explanation to a target table formula error correction model; Obtaining the error cause corresponding to the table formula to be corrected output by the target table formula correction model; The determining a correct table formula according to the table formula to be corrected, the error cause and the metadata includes: Providing the table formula to be corrected, the error cause and the metadata to the target table formula error correction model; Obtain the correct table formula output by the target table formula error correction model.
15. The method according to claim 10, It is characterized in that The step of correcting the table formula to be corrected according to the correct table formula and the error cause includes: Providing the correct table formula and the error cause to a target table formula error correction model, so that the target table formula error correction model detects whether the correct table formula has the error cause; When the result output by the target table formula error correction model indicates that the correct table formula does not have the error cause, the table formula to be corrected is corrected based on the correct table formula and the error cause.
16. The method according to claim 14, It is characterized in that Before executing the method, the method further includes: Obtain an error table formula in a sample table, sample error information corresponding to the error table formula, and a sample error explanation corresponding to the sample error information; Determine the sample metadata in the sample table, and obtain the marked error reasons and the marked correct table formula; The marked error cause corresponds to the error table formula, the sample error information and the sample error explanation; The marked correct table formula corresponds to the sample metadata, the erroneous table formula and the marked error reason; According to the following steps, the following iterative training is performed on the initial table formula error correction model to obtain the target table formula error correction model: The error table formula, the sample error information and the sample error explanation are used as keys, and the marked error causes are provided as values to the initial table formula error correction model for learning; The sample metadata, the erroneous table formula and the marked error cause are used as keys, and the marked correct table formula is provided as a value to an initial table formula error correction model for learning; The marked error cause and the marked correct table formula are used as keys, and the error cause that does not exist in the marked correct table formula is provided as a value to the initial table formula error correction model for learning.
17. The method according to claim 16, It is characterized in that The sample metadata includes sample basic elements, sample data types and sample content relevance, and the sample basic elements include sample document identifiers, sample headers and sample table identifiers; The determining of the sample metadata in the sample table includes: Determine the sample document where the sample form is located, and obtain the sample document identifier of the sample document; Acquire the sample table identifier of the sample table, the sample table header in the sample table, and identify the sample data type of each sample column in the sample table; For any sample header cell in the sample header, determine the sample header data filled in the sample header cell; Determine other sample data types of other sample data filled in other sample cells in the column where the sample header cell is located; Determine the sample content relevance of the sample header data to the other sample data types.
18. A table formula error correction device, It is characterized in that The device comprises: A formula, information, and explanation acquisition module, used to acquire a table formula to be corrected in a table, error information corresponding to the table formula to be corrected, and an error information explanation corresponding to the error information; A cause determination module, used to determine the error cause corresponding to the table formula to be corrected according to the table formula to be corrected, the error information and the error information explanation; A metadata determination module, used for determining metadata of the table; The formula determination module is used to determine the correct table formula according to the table formula to be corrected, the error cause and the metadata.
19. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any method described in claims 1-17 when executing a program stored in a memory.
20. A storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 17 is implemented.