Spreadsheet dialogue method and system based on large model

By parsing spreadsheets into standardized DataFrame objects and generating executable Python code, combined with a large model and a loop error correction mechanism, the problem of structured information loss and code execution failure when large models process extremely large amounts of data and complex format spreadsheets is solved, achieving efficient and accurate data processing and analysis.

CN121301339APending Publication Date: 2026-01-09XIAMEN MEIYA PICO INFORMATION CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511177569.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing technologies suffer from problems such as loss of structured information, context length limitations, and insufficient self-correction capabilities after code execution failures when processing extremely large amounts of data and complex spreadsheet formats, resulting in low levels of automation and success rates in data processing.

Method used

By parsing spreadsheets into standardized DataFrame objects, extracting summary information, and using a large model to generate executable Python code, combined with a loop error correction mechanism, corrective code is generated until successful execution, providing natural language responses.

Benefits of technology

It breaks through the limitations of large models on context length, improves the accuracy and robustness of data processing, significantly increases the success rate of automation, and provides a data analysis experience that is user-friendly for non-technical users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121301339A_ABST
    Figure CN121301339A_ABST
Patent Text Reader

Abstract

The invention discloses a large-model-based spreadsheet dialogue method and system, and the method comprises the steps: receiving a spreadsheet file uploaded by a user, carrying out the structural processing of a spreadsheet through an analysis tool, obtaining a standardized Dataframe object, and extracting summary information from the Dataframe object; in response to the received natural language question of the user for the spreadsheet, inputting the summary information and the user question as context into the large model, and generating an executable code for processing the question by the large model; extracting and executing an executable code, if code execution fails, triggering the loop calling of the large model to generate a modified new code, and executing again until a successful execution result is obtained or a preset iteration frequency is reached; and inputting the execution result and the user question into the large model as a context, and generating a user-oriented final natural language reply by the large model. According to the method, the coping capacity of the model to a complex data processing task is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electronic spreadsheet interaction, and in particular to an electronic spreadsheet conversation method and system based on a large model. BACKGROUND

[0002] Electronic spreadsheets (such as Microsoft Excel) are indispensable tools in daily office work and data analysis. In various industries, people need to extract, filter, count and analyze information from massive electronic spreadsheet data to assist decision-making. However, this process often involves many repetitive mechanical operations, such as writing complex formulas, using filters, and performing pivot table analysis, which have a high learning and usage threshold for non-technical users.

[0003] In recent years, with the rapid development of large language model (LLM) technology, it has become possible to interact with electronic spreadsheet data through natural language using its powerful natural language understanding and processing capabilities. However, the existing technology has the following shortcomings:

[0004] Limitations of direct text conversion: One common method is to directly convert electronic spreadsheet data into plain text as the input context of the large language model. The biggest drawback of this method is that it loses the structured information of the electronic spreadsheet, such as the correspondence between rows, columns, and cells, as well as complex formats such as merged cells. In addition, the maximum context length limit (i.e. tokens) of the large language model also makes this method unable to handle ultra-large data volume electronic spreadsheets containing hundreds of rows of data. At the same time, the reliability and accuracy of the large language model are poor when dealing with complex mathematical and statistical analysis tasks.

[0005] Limitations of existing intelligent methods: Although some methods based on large models for table data processing have been proposed in the industry, such methods often focus more on interactive processing and step display. For complex non-interactive tasks that require processing of ultra-large data volume and require high success rate and high robustness, the automation capability and fault tolerance need to be further improved, especially in the self-correction ability after code execution failure, a complete closed-loop mechanism has not yet been formed.

[0006] Therefore, there is an urgent need for a new technical solution to overcome the shortcomings of existing technology, especially to solve the problem of structured information loss and context length limit when large models process ultra-large data volume electronic spreadsheets containing complex formats, and to generate executable code to achieve accurate and reliable statistical analysis of data, while having an effective code execution failure loop correction mechanism, thereby significantly improving the automation level and success rate of data processing. SUMMARY

[0007] In order to solve the above technical problems in the prior art, the present application provides a large model-based spreadsheet dialogue method and system to solve the above technical problems.

[0008] According to a first aspect of the present application, a large model-based spreadsheet dialogue method is provided, comprising:

[0009] S1: receiving a user-uploaded spreadsheet file, structurally processing the spreadsheet by using an analysis tool, obtaining a standardized Dataframe object, and extracting summary information from the Dataframe object;

[0010] S2: in response to receiving a user's natural language question about the spreadsheet, inputting the summary information and the user question as context into a large model to generate executable code for processing the question by the large model;

[0011] S3: extracting and executing the executable code, if the code execution fails, triggering a loop to call the large model to generate a revised new code, and re-executing until a successful execution result is obtained or a preset iteration number is reached;

[0012] S4: inputting the execution result and the user question as context into the large model to generate a final natural language reply to the user by the large model.

[0013] In some specific embodiments, the summary information includes table name, row number, column number, column name, column data type, and sample data.

[0014] In some specific embodiments, in S1, for merged cells, the cells are split and all filled with the values of the original merged cells.

[0015] In some specific embodiments, the executable code is in Python language and is based on the pandas library for data filtering, filtering, statistics, and calculation.

[0016] In some specific embodiments, S3 specifically includes, when the code execution fails, providing the failure information, the original user instruction, and the previously generated code as new input to the large model to generate a revised code by the large model through error analysis.

[0017] In some specific embodiments, the preset iteration number is not more than 5 times.

[0018] According to a second aspect of the present application, a computer-readable storage medium is provided, which stores one or more computer programs, and the one or more computer programs are executed by a computer processor to implement the above method.

[0019] According to a third aspect of the present application, a large model-based spreadsheet dialogue system is provided, comprising:

[0020] The spreadsheet preprocessing unit is configured to receive spreadsheet files uploaded by users, perform structured processing on the spreadsheet using a parsing tool to obtain standardized DataFrame objects, and extract summary information from the DataFrame objects.

[0021] The user intent parsing unit is configured to respond to a user's natural language question about a spreadsheet by inputting a summary information and the user's question as context into the large model, which then generates executable code to process the question.

[0022] The execution and loop error correction unit is configured to extract and execute executable code. If the code execution fails, it triggers a loop to call the large model to generate new corrected code and re-execute it until a successful execution result is obtained or the preset number of iterations is reached.

[0023] The response unit is configured to input the execution result and the user's question as context into the large model, which then generates the final natural language response for the user.

[0024] In some specific embodiments, the summary information includes table name, number of rows, number of columns, column names, column data types, and sample data. For merged cells, the cells are split and filled with the values ​​of the original merged cells.

[0025] In some specific embodiments, the executable code is written in Python and uses the pandas library for data filtering, statistics and calculations.

[0026] In some specific embodiments, when code execution fails, the failure information, the original user instructions, and the previously generated code are provided as new inputs to the large model, which then performs error analysis and generates corrected code.

[0027] In some specific embodiments, the preset number of iterations is no more than 5.

[0028] This invention proposes a spreadsheet-based dialog method and system based on a large model, which has the following technical advantages:

[0029] First, this invention effectively solves two core problems faced by existing large language models when processing spreadsheets: loss of structured information and limitations on context length. By parsing and caching the spreadsheet data and having the large model generate executable Python code for processing, this method avoids directly inputting massive amounts of data as context into the large model, thus overcoming the limitation on the number of tokens. This enables the invention to efficiently and accurately process spreadsheets containing thousands or even more rows of data, and is compatible with complex scenarios such as multiple worksheets, merged cells, and different data types—something that traditional methods of directly processing large models cannot achieve.

[0030] Secondly, this invention significantly improves the accuracy and reliability of data processing through an innovative "large model + code generation" technical approach. Compared to relying on the reasoning capabilities of large models for mathematical statistics, generating and executing computer code written in mature Python libraries (such as Pandas) ensures the accuracy of statistical analysis results. This not only solves the problem of large models performing poorly in complex mathematical and statistical analyses but also greatly improves the robustness of data processing.

[0031] Finally, this invention introduces a unique cyclic error correction mechanism, significantly improving the automation success rate of tasks. When the code generated by the large model fails to execute for various reasons, the system can automatically feed back the failure information to the large model, which then performs error analysis and generates new corrective code. This closed-loop process greatly reduces the need for manual intervention, making the entire data processing workflow more intelligent and efficient, thereby providing non-technical users with an unprecedented, conversational data analysis experience. Attached Figure Description

[0032] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments and, together with the description, serve to explain the principles of the invention. Other embodiments and many anticipated advantages of the embodiments will be readily recognized as they become better understood through reference to the following detailed description. Other features, objects, and advantages of this application will become more apparent from reading the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0033] Figure 1 This is a flowchart of a large-model-based spreadsheet dialogue method according to an embodiment of this application;

[0034] Figure 2 This is a flowchart of code execution in a specific embodiment of this application;

[0035] Figures 3a-3c This is a schematic diagram of code output for different problems in a specific embodiment of this application;

[0036] Figures 4a-4c This is a schematic diagram illustrating a large-scale model response to different problems in a specific embodiment of this application;

[0037] Figure 5 This is a framework diagram of a large-model-based spreadsheet dialogue system according to a specific embodiment of this application;

[0038] Figure 6 This is a schematic diagram of the structure of a computer system used to implement the electronic device of the present application. Detailed Implementation

[0039] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0040] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0041] Figure 1 A flowchart of a large-model-based spreadsheet dialogue method according to an embodiment of this application is shown. Figure 1 As shown, the method includes the following steps:

[0042] S1: Receives spreadsheet files uploaded by users, uses parsing tools to perform structured processing on the spreadsheets, obtains standardized DataFrame objects, and extracts summary information from the DataFrame objects.

[0043] In a specific implementation, the summary information includes the table name, number of rows, number of columns, column names, column data types, and sample data. For merged cells, the cells are split and filled with the values ​​of the original merged cells.

[0044] S2: In response to receiving a natural language question from the user regarding the spreadsheet, the summary information and the user question are input into the large model as context, and the large model generates executable code to process the question.

[0045] S3: Extract and execute executable code. If the code execution fails, trigger a loop to call the large model to generate new corrected code and re-execute it until a successful execution result is obtained or the preset number of iterations is reached.

[0046] In a specific embodiment, the executable code is written in Python and uses the pandas library for data filtering, statistics, and calculations. When code execution fails, the failure information, the original user instructions, and the previously generated code are provided as new input to the large model, which then performs error analysis and generates corrected code. In a preferred example, the preset number of iterations does not exceed 5.

[0047] S4: Input the execution result and the user's question together as context into the large model, which then generates the final natural language response for the user.

[0048] In a specific embodiment, the spreadsheet dialogue method based on a large model proposed in this application proceeds as follows: A user uploads a structured spreadsheet, which is parsed and cached using a Python tool, and summary information is extracted. When the user asks a question about the spreadsheet's content, the summary information, along with the query result, is used as context to invoke the large model. The large model understands the user's intent, generates Python code to solve the problem, compiles and executes the code, and then uses the result, along with the user's question, as context to invoke the large model again, which provides the final response. Specifically, this can be divided into the following three stages:

[0049] Phase 1: Spreadsheet Upload and Preprocessing. This phase includes two steps:

[0050] Step 1: Users upload spreadsheets. To facilitate Python parsing and understanding of large models, the spreadsheets must meet the following requirements:

[0051] 1) The first row must be the header, and only the first row is the header; from the second row onwards, all rows contain actual data.

[0052] 2) Try to ensure that the names of each column in the table header are accurate and unambiguous;

[0053] 3) Primarily two-dimensional data, with no other unstructured data such as objects, images, or attachments.

[0054] Step 2: Python parsing and summary extraction. The spreadsheet uploaded in Step 1 is parsed using Python code, and summary information is extracted from it:

[0055] 1) Using the pandas dependency package, read the spreadsheet file and parse it into a DataFrame that is easy to store and process. Perform the following preprocessing to organize the data content:

[0056] a) For cases with multiple worksheets, define multiple DataFrames for storage;

[0057] b) For merged cells, split the cells and fill them all with the values ​​from the original merged cells;

[0058] c) For date and time data, convert the format uniformly, such as "YYYY-MM-DD:hh:mm:ss".

[0059] 2) Extract the following summary information to facilitate the large model's understanding of the spreadsheet data:

[0060] a) File name; understand the background, purpose, and subject of the spreadsheet data;

[0061] b) Names of multiple worksheets, and understand the theme of each worksheet;

[0062] c) Number of rows and columns; understand the basic structure of the table.

[0063] d) Column names; understand the meaning of each column of data;

[0064] e) Understand the data type of each column, and the format, patterns, and value range of each column's data;

[0065] f) Sample data for each column to understand the true situation and distribution patterns of each column's data.

[0066] Phase Two: User Feedback and Code Processing. This phase consists of two steps:

[0067] Step 1: Code Generation. When a user asks a question about the spreadsheet content, the summary information extracted in Step 2 of the first stage, along with the user's question, is integrated as context. The larger model is then invoked to understand the user's intent and needs, generating Python code to solve the problem. Note the following:

[0068] 1) To facilitate subsequent code execution, the Python code generated by the large model should be easy to identify and extract, such as requiring structured output or wrapping code blocks with special characters:

[0069] 2) Additional current time information should be provided, including year, date, time, and even weekday, to help the large model understand vague conditions such as "today, tomorrow, Wednesday, this month, last year" in user queries.

[0070] Step 2: Code Execution. Extract code blocks from the text generated in Step 1, execute the code to complete various tasks such as searching, filtering, deduplication, calculation, and statistics. To improve the success rate of code execution, the large model is called repeatedly (it is recommended not to exceed 5 times). Figure 2 A flowchart illustrating the code execution of a specific embodiment of this application is shown, as follows: Figure 2 As shown, the framework process includes:

[0071] 1) Exception handling is performed when the current code is executed:

[0072] a) If the execution is successful, extract the execution result, end the loop, and proceed to the third stage;

[0073] b) If an exception is thrown, proceed to step 2).

[0074] 2) Integrate the exception information captured in 1), the currently executing code, the summary information extracted in step 2 of the first stage, and the user questions as context, call the large model for understanding, improvement, and error correction, and generate new code;

[0075] 3) Extract the code from 2) and execute it to start the next loop.

[0076] In a specific application example, the specific implementation of this application is as follows:

[0077] (1) User-uploaded dataset. As the first step of the implementation example, the user uploaded a dataset of recruitment information from a Tianjin recruitment website.

[0078] (2) Python parsing and summary extraction results. Based on step 2 of the first stage, the table uploaded by the user in step 1 needs to be parsed and preprocessed, and the following preprocessed results are obtained:

[0079] 1) The dataset is a standard two-dimensional table with only one worksheet, no merged cells, mainly text, and no unstructured objects such as images and videos;

[0080] 2) Store the data in a DataFrame named df;

[0081] 3) Standardize the format of all date and time data in the df file;

[0082] 4) Extract the following summary information:

[0083] a) Table name: Tianjin Recruitment Data; Worksheet name: sheet1

[0084] b) Number of rows and columns: 5041 rows, 11 columns;

[0085] c) Column information:

[0086] i. Job title, string, such as HR / Administration Specialist, Mechanical and Electrical Repairman, Real Estate Salesperson, etc.;

[0087] ii. Name of the hiring company, string, such as Tianjin *** Real Estate Brokerage Co., Ltd., Tianjin *** Medical Laboratory Co., Ltd., ** (Tianjin) Technology Testing Co., Ltd., etc.;

[0088] iii. Salary, string, such as 5-6 thousand / month, 10,000-15,000 / month, 12,000-15,000 / month, etc.;

[0089] iv. Work location, string, such as Tianjin-Wuqing District, Tianjin-Jinnan District, Tianjin, etc.;

[0090] v. update time, string, such as 11-17, 10-04, 11-16, etc.;

[0091] vi. Enterprise type, string, such as private company, state-owned enterprise, listed company, etc.;

[0092] vii. Benefits, string, such as five social insurances and one housing fund, transportation allowance, regular physical examination, housing / car subsidy, performance bonus, five social insurances and one housing fund, transportation allowance, communication allowance, regular physical examination, not specified, etc.

[0093] viii. Work experience requirements, string, such as 2 years of experience, 3-4 years of experience, no experience required, etc.

[0094] ix. Educational requirements, string, such as associate degree, bachelor's degree, master's degree, etc.

[0095] x. Number of people to be hired, such as 0, 1, 2, etc.

[0096] xi. Company size, string, such as 150-500 people, 1000-5000 people, 10000 people or more, etc.;

[0097] xii. The company's business areas, such as pharmaceuticals / biotechnology, medical / nursing / hygiene, automotive, etc.

[0098] (3) User Questions and Code Processing. In step 1 of the second phase, the user raised the following questions in three separate instances:

[0099] 1) Question 1: How many positions are offered by Meituan?

[0100] 2) Question 2: How many positions do not require work experience? What percentage of these positions are filled?

[0101] 3) Question 3: I studied computer science, graduated from a junior college, live in Dongli District, do not want to work in another city, and have no requirements for salary and benefits. What job recommendations would you like?

[0102] By using the summary extraction results from the first stage as the context of the large model, the large model analyzes the user's question, considers how to extract the required data from the table, and translates the implementation into Python code. The complete prompt is:

[0103]

[0104]

[0105]

[0106] First, the Qwen / Qwen3-8B) analysis and processing function is invoked, and the following text is output: 1) Output text for question 1:

[0107]

[0108]

[0109] 2) Output text for question 2:

[0110]

[0111]

[0112]

[0113] 3) Output text for question 3:

[0114]

[0115]

[0116]

[0117] Extract the code, compile and execute it, and obtain the following output:

[0118] 1) Code output for question 1: such as Figure 3a The code output diagram is shown in the image.

[0119] 2) Code output for question 2: such as Figure 3a The code output diagram is shown in the image.

[0120] 3) Code output for question 3: such as Figure 3a The code output diagram is shown in the image.

[0121] (4) Results Summary and Large Model Response

[0122] In the third stage, the code execution results output from step 2 of the second stage are summarized and sent to the large model, which then answers the user's question based on these results. The specific responses are as follows:

[0123] 1) Response to the large model in question 1: such as Figure 4a A schematic diagram of the large model response;

[0124] 2) Response to the large model in question 2: such as Figure 4b A schematic diagram of the large model response;

[0125] 3) Response to the large model in question 3: such as Figure 4c A schematic diagram of the large model response;

[0126] This invention provides a spreadsheet data analysis method based on a large model combined with code processing. It effectively solves the problem in existing technologies where large models are limited by context length constraints and imprecise mathematical calculation capabilities, making them unable to handle tasks such as spreadsheet data filtering, complex calculations, and statistical analysis. This method converts user-uploaded spreadsheet data into a standardized dataframe format and extracts key summary information as the basis for the large model's understanding of the data. It then combines natural language processing capabilities to analyze user needs, generate feasible solutions, and automatically generate executable Python code to complete data processing and calculation tasks. Finally, it provides accurate analysis reports based on the code execution results. This solution fully leverages the natural language understanding capabilities of the large model while compensating for its limitations in mathematical calculations and context length through code processing. It automates the entire data processing workflow and can be widely applied to scenarios such as report analysis, bill reconciliation, indicator statistics, and large-screen dialogues. It significantly improves the model's ability to handle complex data processing tasks and provides strong technical support for enterprise-level data analysis.

[0127] Figure 5 Figure 3 illustrates a framework diagram of a large-model-based spreadsheet dialogue system according to an embodiment of this application. The system includes a spreadsheet preprocessing unit 501, a user intent parsing unit 502, an execution and loop error correction unit 503, and a response unit 504. The spreadsheet preprocessing unit 501 is configured to receive a spreadsheet file uploaded by a user, perform structured processing on the spreadsheet using a parsing tool to obtain standardized DataFrame objects, and extract summary information from the DataFrame objects. The user intent parsing unit 502 is configured to, in response to receiving a natural language question from a user regarding the spreadsheet, input the summary information and the user question as context into the large model, which then generates executable code to handle the question. The execution and loop error correction unit 503 is configured to extract and execute the executable code. If the code execution fails, it triggers a loop call to the large model to generate corrected new code and re-executes it until a successful execution result is obtained or a preset number of iterations is reached. The response unit 504 is configured to input the execution result and the user question as context into the large model, which then generates a final natural language response for the user.

[0128] The following is for reference. Figure 6 It shows a schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0129] like Figure 6 As shown, the computer system includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 602 or programs loaded from storage section 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of system 600. CPU 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0130] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a liquid crystal display (LCD) and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card and a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.

[0131] Specifically, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs the functions defined in the methods of this application. It should be noted that the computer-readable storage medium of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. The computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable storage medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0132] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0134] The modules described in the embodiments of this application can be implemented in software or in hardware.

[0135] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the electronic device, the electronic device: receives a user request, parses it using a syntax parser to obtain the target component table identifier, and compares it with a local blacklist cache; if a match is not found, the request is submitted to a distributed file storage database for operation; it determines whether a component-level exception has occurred based on the database response information; if it is determined to be a component-level exception, the target component table identifier is submitted to a blacklist counter; the blacklist counter counts the number of exceptions in the component table within the time window based on a preset time window and an exception count threshold; if the threshold is reached, a blacklist writing process is triggered; the component table identifiers that meet the blacklisting conditions are written to the blacklist cache and broadcast to all component service instances via a message queue.

[0136] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A spreadsheet dialogue method based on a large model, characterized in that, include: S1: Receive the spreadsheet file uploaded by the user, use a parsing tool to perform structured processing on the spreadsheet to obtain a standardized DataFrame object, and extract summary information from the DataFrame object; S2: In response to receiving a natural language question from a user regarding a spreadsheet, the summary information and the user question are input into the large model as context, and the large model generates executable code for processing the question; S3: Extract and execute the executable code. If the code execution fails, trigger a loop to call the large model to generate the corrected new code and re-execute it until a successful execution result is obtained or the preset number of iterations is reached. S4: Input the execution result and the user question together as context into the large model, and the large model generates the final natural language response for the user.

2. The spreadsheet dialogue method based on a large model according to claim 1, characterized in that, The summary information includes table name, number of rows, number of columns, column names, column data types, and sample data.

3. The spreadsheet dialogue method based on a large model according to claim 1, characterized in that, In step S1, for merged cells, the cells are split and filled with the values ​​of the original merged cells.

4. The spreadsheet dialogue method based on a large model according to claim 1, characterized in that, The executable code is written in Python and uses the pandas library for data filtering, statistics, and calculation.

5. The spreadsheet dialogue method based on a large model according to claim 1, characterized in that, Specifically, S3 includes providing the failure information, the original user instruction, and the previously generated code as new inputs to the large model when the code execution fails, so that the large model can perform error analysis and generate corrected code.

6. The spreadsheet dialogue method based on a large model according to claim 1 or 5, characterized in that, The preset number of iterations shall not exceed 5.

7. A computer-readable storage medium having one or more computer programs stored thereon, characterized in that, When the one or more computer programs are executed by a computer processor, they perform the method according to any one of claims 1-6.

8. A spreadsheet dialog system based on a large model, characterized in that, include: The spreadsheet preprocessing unit is configured to receive spreadsheet files uploaded by users, perform structured processing on the spreadsheet using a parsing tool to obtain standardized DataFrame objects, and extract summary information from the DataFrame objects. The user intent parsing unit is configured to respond to receiving a natural language question from a user regarding a spreadsheet, inputting the summary information and the user question as context into a large model, and having the large model generate executable code for processing the question; The execution and loop error correction unit is configured to extract and execute the executable code. If the code execution fails, it triggers a loop to call the large model to generate the corrected new code and re-executes it until a successful execution result is obtained or a preset number of iterations is reached. The response unit is configured to input the execution result and the user's question as context into the large model, and the large model generates a final natural language response for the user.

9. A spreadsheet dialog system based on a large model according to claim 8, characterized in that, The summary information includes table name, number of rows, number of columns, column name, column data type, and sample data. For merged cells, the cells are split and filled with the original merged cell values.

10. A spreadsheet dialog system based on a large model according to claim 8, characterized in that, The executable code is written in Python and uses the pandas library for data filtering, statistics, and calculation.

11. A spreadsheet dialog system based on a large model according to claim 8, characterized in that, When the code execution fails, the failure information, the original user instructions, and the previously generated code are provided as new inputs to the large model, which then performs error analysis and generates corrected code.

12. A large-model-based spreadsheet dialog system according to claim 8 or 11, characterized in that, The preset number of iterations shall not exceed 5.