Table data processing method and device, medium and program product
Through the collaborative mechanism between the preset model and the task processing engine, the tabular data processing tool is dynamically selected, which solves the problem of inefficiency of large models in complex tabular data processing, and realizes the full process automation and efficient processing from data reading to task execution.
Patent Information
- Application Number
- CN202510919333.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-07-04
AI Technical Summary
Large models are inefficient when processing complex tabular data, which is difficult to meet the diverse processing needs of users. In the prior art, tool matching and task generation rely on manual intervention, resulting in cumbersome and inefficient processing processes.
Through the collaboration mechanism between the preset model and the task processing engine, tool calling requirements are generated, and reading and processing tools are dynamically selected to realize the full process automation from data reading to task execution. Combined with the collaboration mechanism between the model and the engine, and using the collaboration mechanism between the model and the engine, the dynamic generation of tool calling requirements and processing tasks is realized, breaking through the limitations of manual intervention.
The accuracy and processing efficiency of tool matching are improved, and the results are presented in real time through the interactive interface, which solves the problems of cumbersome and low efficiency of processing processes, and realizes the automation and efficiency of table data processing.
Smart Images

Figure CN120407645A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and particularly to a method, device, medium and program product for processing tabular data. Background Art
[0002] When processing tabular data, tables containing millions of rows of data and complex multi-table association analysis scenarios are often encountered. Related technologies achieve intelligent processing of tabular data by utilizing large models. After learning the tool functions, large models can perform various data operations, basic operations and complex analyses.
[0003] In the process of implementing the inventive concept, at least the following problems exist in the related technologies: Due to the variety of data operation types, the efficiency of large models in learning tool functions is low, making it difficult to meet the diverse needs of users, thus resulting in low processing efficiency. Summary of the Invention
[0004] In view of the above problems, the present invention provides a method, device, equipment, medium and program product for processing tabular data.
[0005] According to a first aspect of the present invention, there is provided a method for processing tabular data, including: inputting the tabular data input by an object via an interaction interface and the associated processing request into a preset model to generate a tool call requirement corresponding to the above processing request, and sending the above tool call requirement to a task processing engine; inputting the tool information returned by the above task processing engine into the above preset model to obtain a plurality of target tools, the above plurality of target tools including a reading tool and a processing tool; in the case where it is determined that the above task processing engine has completed reading the above tabular data through the above reading tool, inputting the reading result and the function information of the above processing tool into the above preset model to obtain a processing task corresponding to the above processing request, and sending the above processing task to the above task processing engine; in response to receiving the execution result from the above task processing engine, displaying the above execution result on the above interaction interface.
[0006] The second aspect of the present invention provides a table data processing device, including: a requirement generation module, configured to input the table data input by an object via an interaction interface and the associated processing request into a preset model, generate a tool call requirement corresponding to the above-mentioned processing request, and send the above-mentioned tool call requirement to a task processing engine; a tool determination module, configured to input the tool information returned by the above-mentioned task processing engine into the above-mentioned preset model to obtain a plurality of target tools, and the above-mentioned plurality of target tools include a reading tool and a processing tool; a task generation module, configured to, when it is determined that the above-mentioned task processing engine completes reading the above-mentioned table data through the above-mentioned reading tool, input the reading result and the function information of the above-mentioned processing tool into the above-mentioned preset model to obtain a processing task corresponding to the above-mentioned processing request, and send the above-mentioned processing task to the above-mentioned task processing engine; a result display module, configured to, in response to receiving an execution result from the above-mentioned task processing engine, display the above-mentioned execution result on the above-mentioned interaction interface.
[0007] The third aspect of the present invention provides an electronic device, including: one or more processors; a memory, configured to store one or more computer programs, wherein the above-mentioned one or more processors execute the above-mentioned one or more computer programs to implement the steps of the above-mentioned method.
[0008] The fourth aspect of the present invention further provides a computer-readable storage medium, on which a computer program or instruction is stored, and when the above-mentioned computer program or instruction is executed by a processor, the steps of the above-mentioned method are implemented.
[0009] The fifth aspect of the present invention further provides a computer program product, including a computer program or instruction, and when the above-mentioned computer program or instruction is executed by a processor, the steps of the above-mentioned method are implemented.
[0010] According to the embodiments of the present invention, by inputting table data and a processing request into a preset model to generate a tool call requirement, interacting with a task processing engine to determine target tools, and then combining the reading result and the function information of the processing tool to generate and execute a processing task, this process utilizes the collaborative mechanism of the model and the engine, realizes the dynamic generation of tool call requirements and processing tasks, breaks through the limitation of manual intervention in tool matching and task generation in existing data processing, supports the full-process automation from data reading to task execution, and improves the accuracy of tool matching and processing efficiency. At the same time, by presenting the result in real time through the interaction interface, the problems of cumbersome processing flow and low efficiency are solved. Description of the Drawings
[0011] Through the following description of the embodiments of the present invention with reference to the drawings, the above-mentioned content and other objects, features, and advantages of the present invention will become clearer.
[0012] Figure 1Shows an application scenario diagram of a table data processing method, apparatus, device, medium, and program product according to an embodiment of the present invention.
[0013] Figure 2 Shows a flowchart of a table data processing method according to an embodiment of the present invention.
[0014] Figure 3 Shows a schematic architecture diagram of a table data processing method according to an embodiment of the present invention.
[0015] Figure 4 Shows a software architecture diagram of a table data processing method according to an embodiment of the present invention.
[0016] Figure 5 Shows a schematic diagram of an interaction interface of a table data processing method according to an embodiment of the present invention.
[0017] Figure 6 Shows an interaction flowchart of a table data processing method according to an embodiment of the present invention.
[0018] Figure 7 Shows a structural block diagram of a table data processing apparatus according to an embodiment of the present invention.
[0019] Figure 8 Shows a block diagram of an electronic device suitable for implementing a table data processing method according to an embodiment of the present invention. Detailed embodiments
[0020] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. In the following detailed description, for the sake of explanation, many specific details are set forth in order to provide a comprehensive understanding of the embodiments of the present invention. However, it is obvious that one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts of the present invention.
[0021] The terms used herein are merely for describing specific embodiments and are not intended to limit the present invention. The terms "including", "comprising", etc. used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0022] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0023] In the case of using expressions such as "at least one of A, B, and C", generally, it should be interpreted according to the meaning that those skilled in the art usually understand this expression (for example, "a system having at least one of A, B, and C" should include, but not be limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0024] In the technical solution of the present invention, the data involved (including but not limited to the data for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties. Moreover, the processing of relevant data, such as collection, storage, use, processing, transmission, provision, disclosure, and application, all comply with relevant laws, regulations, and standards, adopt necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or reject.
[0025] An embodiment of the present invention provides a method for processing tabular data, including: inputting the tabular data input by an object via an interaction interface and an associated processing request into a preset model to generate a tool call requirement corresponding to the processing request, and sending the tool call requirement to a task processing engine; inputting the tool information returned by the task processing engine into the preset model to obtain a plurality of target tools, where the plurality of target tools include a reading tool and a processing tool; in the case of determining that the task processing engine has completed reading the tabular data through the reading tool, inputting the reading result and the function information of the processing tool into the preset model to obtain a processing task corresponding to the processing request, and sending the processing task to the task processing engine; in response to receiving an execution result from the task processing engine, displaying the execution result on the interaction interface.
[0026] Figure 1 A diagram showing an application scenario of a method, apparatus, device, medium, and program product for processing tabular data according to an embodiment of the present invention is shown.
[0027] As Figure 1 shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, and a server 105. The network 104 is a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0028] Users can interact with the server 105 through the first terminal device 101, the second terminal device 102, and the third terminal device 103 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0029] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and so on.
[0030] The server 105 can be a server providing various services, such as a background management server (for example only) that supports the websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server can analyze and process data such as received user requests, and feedback the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0031] It should be noted that the table data processing method provided by the embodiments of the present invention can generally be executed by the server 105. Correspondingly, the table data processing device provided by the embodiments of the present invention can generally be set in the server 105. The table data processing method provided by the embodiments of the present invention can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Correspondingly, the table data processing device provided by the embodiments of the present invention can also be set in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.
[0032] It should be understood that Figure 1 the numbers of the first terminal device, the second terminal device, the third terminal device, the network, and the server in
[0033] are merely illustrative. According to the implementation requirements, there can be any number of first terminal devices, second terminal devices, third terminal devices, networks, and servers. Figure 1 the following will be based on Figures 2 - 6 the described scenario, and will describe in detail the table data processing method of the embodiments through
[0034] Figure 2 shows a flowchart of the table data processing method according to an embodiment of the present invention.
[0035] As shown Figure 2 in the figure, this embodiment includes operations S210 to S240.
[0036] In operation S210, the tabular data input by the object via the interaction interface and the associated processing request are input into a preset model to generate a tool call requirement corresponding to the processing request, and the tool call requirement is sent to the task processing engine.
[0037] In operation S220, the tool information returned by the task processing engine is input into the preset model to obtain multiple target tools, and the multiple target tools include a reading tool and a processing tool.
[0038] In operation S230, when it is determined that the task processing engine has completed reading the tabular data through the reading tool, the reading result and the function information of the processing tool are input into the preset model to obtain a processing task corresponding to the processing request, and the processing task is sent to the task processing engine.
[0039] In operation S240, in response to receiving the execution result from the task processing engine, the execution result is displayed on the interaction interface.
[0040] According to the embodiments of the present invention, with the acceleration of digital transformation, enterprises and organizations are facing increasingly complex data processing requirements. Especially when processing tabular data, it is often necessary to combine multiple tools and algorithms to complete specific tasks. By combining an artificial intelligence model (such as a large language model, Large Language Model, LLM) with tool calls and establishing a standardized interaction framework based on the Model Context Protocol (MCP), it is possible to automatically select and call appropriate tools according to the user's processing request, realizing the efficient processing of tabular data.
[0041] In the interaction interface, after the user inputs tabular data and a processing request, the input data is first preprocessed, including operations such as format verification and data cleaning, and is converted into a standardized format that can be understood by the preset model. As an intermediate protocol layer, MCP converts the input data into a standardized context format that can be understood by the preset model (such as LLM). Subsequently, the preset model performs a deep semantic analysis on the processing request, combines the structure and content features of the tabular data, intelligently generates a tool call requirement, and encapsulates the tool call requirement into a structured message through MCP and sends it to the task processing engine.
[0042] After receiving the tool call requirement, the task processing engine dynamically queries the available tool library, accurately identifies the set of tools that match the tool call requirement, and returns the tool information such as the name, function description, input and output formats of the tools to the preset model. After these information are re-input into the preset model through MCP, the preset model selects the optimal target tool from the candidate tools according to the core goal of the processing request and the specific characteristics of the table data, including two key components: the reading tool and the processing tool.
[0043] Send precise instructions to the task processing engine through MCP to give priority to calling the reading tool to parse the table data. The reading tool will accurately extract the target data from the table data according to the format specifications and data rules defined by MCP, and return the structured reading result to the preset model. After confirming that the data reading operation is completed, the reading result and the function information of the processing tool are jointly input into the preset model through MCP. Based on the unified context specified by MCP, the preset model comprehensively analyzes the data characteristics and tool capabilities to generate specific processing tasks, and the processing tasks will be organized into an executable instruction pipeline defined by MCP and sent to the task processing engine.
[0044] After the task processing engine completes all processing tasks, it will return the final execution result through MCP. At this time, the execution result can be further processed, such as format conversion, result verification, etc., and then visually displayed through the interaction interface. The display form will be intelligently adapted according to the type of the processing request and the characteristics of the execution result, supporting multiple MCP-compatible presentation methods such as table view, statistical chart, text summary, etc., to ensure that users can intuitively understand the processing result.
[0045] By inputting the table data and the processing request into the preset model to generate the tool call requirement, interacting with the task processing engine to determine the target tool, and then combining the reading result and the function information of the processing tool to generate and execute the processing task, this process utilizes the collaborative mechanism of the model and the engine, realizes the dynamic generation of the tool call requirement and the processing task, breaks through the limitation of manual intervention in tool matching and task generation in the existing data processing, supports the full-process automation from data reading to task execution, improves the accuracy of tool matching and the processing efficiency. At the same time, presenting the result in real time through the interaction interface solves the problems of cumbersome processing process and low efficiency.
[0046] Figure 3 The architecture diagram of the table data processing method according to an embodiment of the present invention is shown.
[0047] As Figure 3As shown in the figure, in the process framework of collaborative processing of tabular data 303 by a preset model 301 and an MCP server 302, the user first uploads the tabular data 303 to the preset model 301 as the data input source. At the same time, the requirements, questions, or instructions proposed by the user constitute a processing request 304, which is input into the preset model 301 together with the tabular data 303.
[0048] Relying on its semantic understanding and other capabilities, the preset model 301 processes the input tabular data 303 and processing request 304, and then passes the processing task 305 to the task processing engine 306 in the MCP server 302 for execution, thereby realizing the intelligent processing and analysis of the tabular data 303.
[0049] According to an embodiment of the present invention, the tool information returned by the task processing engine is input into the preset model to obtain multiple target tools, including: sending a tool call requirement to the task processing engine to select multiple candidate tools from the tool registration library of the task processing engine; inputting the function information of each candidate tool returned by the task processing engine into the preset model to determine multiple target tools that match the processing request from multiple candidate tools.
[0050] In the data processing flow, when the preset model generates a tool call requirement, the tool call requirement is standardized and encapsulated through the MCP and sent to the task processing engine. In this process, the standardization and consistency of the requirement description are ensured, enabling the task processing engine to accurately understand the processing intention.
[0051] After receiving the tool call requirement formatted by the MCP, the task processing engine filters candidate tools from its own tool registration library based on the metadata specification defined by the MCP. The MCP provides a unified description framework for each tool in the tool registration library (including function signatures, input / output formats, performance metrics, etc.), enabling the engine to quickly standardize the matching of the characteristics of the tool call requirement with the tool metadata, thereby accurately positioning the set of tools that may meet the requirements.
[0052] Obtain the function information of each candidate tool returned by the task processing engine through the MCP, and these function information all follow the context format specified by the MCP. The standardized description of the MCP ensures the comparability and consistency of the function information of different tools, laying a foundation for subsequent intelligent selection. These function information standardized by the MCP will be completely transmitted to the preset model, and specific algorithms inside the preset model will conduct in-depth analysis based on the structured data provided by the MCP.
[0053] The preset model uses the unified evaluation dimensions established by MCP (such as function matching degree, applicability, processing efficiency, etc.) to perform multi-dimensional comparison between the functions of each candidate tool and the processing request. MCP acts as a "ruler" for the evaluation criteria in this process, ensuring that the comparison between different tools is carried out under the same benchmark. By parsing the context data in MCP format, the preset model can accurately understand the ability boundaries and application scenarios of each tool.
[0054] After the intelligent operation of the preset model, the finally determined target tools are output through MCP. The selection of these target tools is completely based on the objective evaluation under the MCP specification, ensuring that they can accurately meet the requirements of the processing request in terms of function. MCP is also responsible for formatting the selection results into standard call instructions in this link to provide support for subsequent task processing.
[0055] Through the operation and judgment of the preset model, multiple target tools that match the processing request are determined from multiple candidate tools. These target tools can more accurately meet the requirements of the processing request in terms of function, provide more targeted support for subsequent tool calls and task processing, and ensure that the system can complete the corresponding tasks efficiently and accurately.
[0056] According to the embodiments of the present invention, inputting the function information of each candidate tool returned by the task processing engine into the preset model to determine multiple target tools that match the processing request from multiple candidate tools includes: extracting industry feature information from the processing request and tabular data, where the industry feature information includes business keywords and data structure features; determining a target knowledge base corresponding to the industry feature information from the preset industry knowledge base through semantic analysis; and analyzing the function information of each candidate tool according to the configuration requirements of the target knowledge base to extract multiple target tools that match the processing request from the candidate tools.
[0057] Extract industry feature information from the processing request and tabular data. This process uses natural language processing technology and data structure parsing methods to accurately identify business keywords (such as "risk assessment", "compliance audit", etc. in the financial field) and data structure features (such as the type, format or association relationship of specific fields in tabular data). These industry feature information can accurately reflect the industry attributes and data characteristics involved in the processing request.
[0058] Using the semantic analysis function, deeply match the extracted industry feature information with the preset industry knowledge base. Semantic analysis deeply understands the connotation of business keywords and the industry significance of data structure features, so as to locate the corresponding target knowledge base in the preset industry knowledge base.
[0059] For example, if the extracted business keywords involve medical image analysis and the data structure feature is in the format of medical images, the semantic analysis function will determine the target knowledge base related to medical image processing, which stores the professional knowledge, standards, and common processing patterns in this industry.
[0060] According to the configuration requirements of the target knowledge base, a detailed analysis is carried out on the function information of each candidate tool. The configuration requirements of the target knowledge base clarify the function standards, performance indicators, and other requirements necessary for processing tasks in this industry scenario. Against these requirements, key elements matching the processing request are extracted from the information such as the function description, technical parameters, and applicable scenarios of the candidate tools.
[0061] Through this targeted analysis, multiple target tools whose functions exactly meet the industry requirements and can effectively process the current task can be screened out from the candidate tools. This ensures that the tool selection not only conforms to the industry characteristics but also meets the specific requirements of the processing request, laying a solid foundation for subsequent tool invocation.
[0062] In addition, to optimize the invocation efficiency of the preset model and external tools, a three - level cache mechanism and an asynchronous invocation architecture can be adopted. Deploy a vector cache library on the model side, convert the frequently used tool invocation parameters (such as data reading paths, processing logic templates) into vector indexes and store them. During invocation, rapid retrieval is performed through similarity matching to reduce the time consumption of repeated reasoning. The external tool interfaces are encapsulated as a microservice cluster, and an adaptive thread pool is configured to dynamically adjust the concurrency according to the load. When consecutive identical - type invocation requests are detected, the batch processing mode is automatically triggered to merge multiple requests into a single invocation, reducing the communication overhead. Through these optimizations, the response time of tool invocation can be effectively reduced.
[0063] According to an embodiment of the present invention, the table processing method further includes: sending the tool identifiers of multiple target tools to the task processing engine, so that the task processing engine can perform structured reading of the table data using the reading tool among the multiple target tools based on the initial storage address of the table data.
[0064] The tool identifiers of multiple target tools are encapsulated according to MCP to form a standardized tool invocation request. The tool invocation request not only contains the unique identifier of the target tool but also attaches context metadata of the processing request, such as session identifier, timestamp, and invocation parameters, etc., to ensure that the task processing engine can accurately understand the invocation intention. Subsequently, this request is sent to the task processing engine through a secure and reliable communication channel.
[0065] After the task processing engine receives a tool call request, it first parses the initial storage address of the tabular data from the tool call request. The initial storage address can be the path of a local file, a network storage location, a database connection string, etc., which clarifies the physical storage location of the tabular data. Then, the task processing engine filters out the tools with tabular reading capabilities from the target tools and instantiates them.
[0066] When the reading tool is called, it accesses the tabular data according to the initial storage address. Subsequently, the reading tool uses the read function to load the file and identifies the header structure based on the number of header rows pre-input by the user. For multi-level headers, the read function automatically creates a hierarchical index object to convert the nested headers into a multi-level index with a hierarchical relationship. The reading tool further analyzes the data types of the headers to identify different types of fields such as text, numerical values, and dates.
[0067] During the reading process, the reading tool records the basic structure information of the tabular data, including the total number of rows, the total number of columns, and special situations such as the existence of merged cells. For merged cells, the reading tool applies specific algorithms for processing to ensure the integrity and accuracy of the data. For complex tabular layouts, such as nested tables or irregular structures, the reading tool adopts a recursive parsing strategy to extract the structure information layer by layer, and finally converts the entire tabular data into a structured data object, including the complete header hierarchical relationship and data content, providing a clear and standardized data basis for subsequent data processing and analysis.
[0068] According to an embodiment of the present invention, the reading result and the function information of the processing tool are input into a preset model to obtain a processing task corresponding to the processing request, including: combining and generating a prompt word template according to the initial storage address of the tabular data, the reading result, the processing request, the preset storage address of the execution result, and the preset code execution format; calling the preset model based on the prompt word template to generate code for processing the tabular data to form a processing task.
[0069] Dynamically construct a prompt word template based on the initial storage address of the tabular data, the reading result, the processing request, the preset storage address of the execution result, and the preset code execution format. During the construction process, the key features of the tabular data are first extracted from the reading result. For example, the theme of the tabular data can be determined by analyzing the headers and data content, and the data range is defined according to the number of rows and columns of the tabular data and the value range of the data. These information will be organized into a brief description of the tabular data and incorporated into the prompt word template.
[0070] For example, if the initial storage address is ". / excel / Gross Regional Product.xlsx" and the read result shows that the table headers are ['Region', 'Gross Product in 2022 (billion)', 'Industry', 'Gross Product in 2023 (billion)'], a table description is generated as follows: "In the table '. / excel / Gross Regional Product.xlsx', the table headers are ['Region', 'Gross Product in 2022 (billion)', 'Industry', 'Gross Product in 2023 (billion)']".
[0071] The processing request will be parsed into specific operation instructions. For example, if the processing request is "Which are the top three industries with the highest frequency in the table and write a new row", it will be transformed into a clear operation description and used as the third line content of the prompt word.
[0072] The preset storage address of the execution result will be formatted into a path representation that meets the requirements of the storage system, such as "Save to a new table under the '. / excel' folder", and the preset code execution format will be transformed into syntax and structure constraints for the generated code, such as "Only output computer programming languages (python code), and the output is 'python'".
[0073] Based on the generated prompt word template, a preset model is called. When calling, the prompt word template will be passed as input to the preset model, and the preset model will deeply analyze information such as the table description, operation instructions, and storage requirements in the prompt word based on its semantic understanding ability.
[0074] For simple processing requests, the preset model will quickly match appropriate data processing functions and logics to generate concise and clear code snippets. For complex processing requests, such as operations involving multi-table associations or data pivots, the preset model will build more complex code logics to ensure that all functions of the processing request can be implemented.
[0075] During the process of generating code, the preset model will fully consider the data types and structural characteristics of the table data and select the most suitable functions and methods to process different types of data. For example, for numerical data, mathematical functions will be preferred, and for text data, string processing functions will be used. The generated code will follow good code specifications, with clear comments and reasonable code structures to improve the readability and maintainability of the code.
[0076] If there are special data structures or formats in the table data, the preset model will add corresponding processing logics to the code to ensure that the code can correctly handle various abnormal situations. The finally generated code will be encapsulated into a complete processing task, including all processes of data reading, processing, and result storage, and can be directly called and executed by the execution engine to achieve the automated processing of table data.
[0077] According to an embodiment of the present invention, the table data processing method further includes: performing static syntax checking on the code through a preset model; and when it is determined that the checking is passed, sending the generated processing task to a task processing engine.
[0078] Automatically start the preset model to perform static syntax checking on the generated code. During the checking process, the preset model will carefully check each component of the code according to the syntax rules of the Python language. It will check whether the keywords in the code are spelled correctly, such as if, else, for, etc.; check whether the statement structure is complete, for example, whether each function definition contains a colon and correct indentation, and whether each code block has a reasonable hierarchical structure; check whether symbols such as parentheses and quotation marks appear in pairs and are used correctly. For the expressions in the code, the preset model will check whether the use of operators conforms to the syntax rules and whether variables are defined before use, etc.
[0079] The preset model will also perform more in-depth syntax analysis to check for problems such as unclosed statements, incorrect indentation, and mismatched parentheses in the code. It will simulate the execution flow of the code, check whether the scope of variables is reasonable, and whether the function calls pass the correct number and type of parameters. For complex code logic, the preset model will analyze control flow statements, such as loop and conditional statements, to ensure that their logic is correct and will not cause infinite loops or undefined behavior.
[0080] When it is determined that the code passes the static syntax check, the generated processing task is sent to the task processing engine. The processing task will be encapsulated into a task package containing the code, execution parameters, and context information. This task package will follow the interface specifications of the task processing engine and contain necessary metadata, such as task identification, the source of the processing request, execution priority, etc. The task package is sent to the task processing engine through a reliable communication mechanism to ensure that the task will not be lost or damaged during transmission. After receiving the task package, the task processing engine will prepare the execution environment according to the information therein and execute the code according to the predetermined process to complete the processing task of the table data. By accurately identifying syntax errors and logical hidden dangers before code execution, the exception rate during code execution is reduced, providing an efficient and reliable execution basis for subsequent table data processing.
[0081] According to an embodiment of the present invention, the table data processing method further includes: sending the processing task to an execution in a sandbox environment in the task processing engine; wherein, during the execution process, environmental verification is performed on the processing task, and the environmental verification includes determining at least one of whether the dependency package environment matches, whether third-party libraries are available, and whether the environment configuration is compatible; and when it is determined that the environmental verification is passed, the execution result is output.
[0082] Send the processing task to the Python sandbox environment in the task processing engine to execute the processing task. This sandbox uses lightweight container technology to achieve resource isolation, limiting the upper limit of memory usage to 512MB and the processor time quota to 30 seconds. Before task execution, the sandbox environment will automatically start the dependency resolver, build a virtual environment based on the files in the processing task, and generate a hash-locked dependency version to ensure environmental consistency.
[0083] The environmental verification stage adopts a multi-level verification strategy: First, scan the code import statements through a static analysis tool to extract the list of required third-party libraries; then call the module to dynamically check the installed package versions in the sandbox environment; finally, execute the smoke test cases to verify whether the key functions are running properly. For the problem of missing dependencies, trigger the error feature extraction mechanism. By parsing the error output of the command, use regular expressions to match the missing package names and version information, and generate a structured error log.
[0084] When it is determined that the environmental verification passes, output the execution result. This verification mechanism significantly improves the success rate of code execution and the stability of the system by dynamically monitoring resource usage and continuously iterating and optimizing.
[0085] According to an embodiment of the present invention, the table data processing method further includes: when it is determined that the result obtained from the environmental verification meets a preset condition, terminate the execution of the processing task; in response to receiving the structured error log generated when the task processing engine performs environmental verification, perform optimization and refactoring analysis on the code through a preset model.
[0086] When the environmental verification result meets the preset conditions (such as dependency package mismatch, third-party library unavailable, or environmental configuration conflict), immediately trigger the task termination mechanism. The monitoring module in the sandbox environment will detect abnormal signals during the environmental verification process in real time. Once it discovers situations such as missing key dependencies or incompatible environmental configurations, it will send a termination instruction to the task executor through the inter-process communication mechanism, and at the same time save the current execution context to avoid data loss. The termination process adopts a progressive strategy, first pausing the execution of the task thread, and then releasing the allocated system resources to ensure the clean state of the sandbox environment.
[0087] After receiving the structured error log generated by the task processing engine during environmental verification, input the log content into a preset model for optimization and refactoring analysis. The structured information such as the missing dependency name, version constraint, and error type contained in the structured error log will be converted into executable optimization instructions by the semantic parsing module of the preset model. The preset model will use abstract syntax tree technology to traverse the code structure, and locate the code segments that need to be modified according to the error characteristics. For example, add statements for missing third-party libraries, or adjust function call parameters to adapt to the environmental configuration.
[0088] During the refactoring analysis process, the preset model combines the functional logic of the code and environmental requirements to generate multiple sets of optimization solutions and evaluate their feasibility. After the refactoring is completed, the preset model performs static syntax checking and semantic verification on the optimized code to ensure that the refactoring does not introduce new errors. The optimized code, together with the updated dependency configuration file, forms a new processing task and is sent to the sandbox environment of the task processing engine for verification again until the environmental verification passes.
[0089] Through this automated error response and code refactoring mechanism, environmental incompatibility problems can be quickly solved, and the execution failure rate of the code caused by environmental problems can be reduced. At the same time, the feedback loop of the structured error log enables the preset model to continuously learn and optimize the refactoring strategy. With the accumulation of processing tasks, the model's efficiency in solving complex environmental problems has been significantly improved, realizing the evolution from passive response to active optimization, and ensuring the stability and compatibility of processing tasks in different environments.
[0090] According to an embodiment of the present invention, the table data processing method further includes: comparing the table data with the execution result according to the reading rules of the document processing library in the task processing engine to obtain a comparison result; based on the different content in the comparison result, marking and performing data verification in the execution result to generate a verification report, where the data verification includes at least one of format verification, range verification, and logical relationship verification; visually displaying the verification report and the execution result marked with different content through an interactive interface.
[0091] Call the document processing library in the task processing engine and parse the original table data and the target file after code execution according to the preset reading rules. With the help of the underlying interface, traverse the cell data of the source file and the target file row by row and column by column, and quickly locate the differences in dimensions such as values, texts, and formats through the hash value comparison technology. For numerical data, the comparison will be made within a tolerance range of ±10%, and values outside this range will be marked as outliers; for text data, the cosine similarity algorithm is used to calculate the similarity cosθ, and the specific calculation method is shown in formula (1):
[0092]
[0093] Where A and B respectively represent the eigenvalue of two text vectors, n represents the total number of text vector eigenvalues, and i represents the loop variable of the summation operation.
[0094] When the similarity is less than the preset value (80%), a difference mark is triggered, and at the same time, it is checked whether the character set contains illegal characters through regular expressions. The format verification module will automatically extract style attributes such as font, border, and alignment method, and generate a structured format descriptor for element-by-element comparison.
[0095] After obtaining the comparison results, perform visual annotation in the execution result document based on the differences. For cells with numerical differences, highlight them by filling them with red and adding a yellow border; mark text differences with green underlines; for cells with format differences, add a blue outer frame and record the specific difference items in the comment.
[0096] At the same time, start the multi-dimensional data verification process: the range verification module will make logical judgments based on the numerical ranges preset by the business rules (for example, the gross production value data must be positive), and the logical relationship verification will verify whether the row and column calculation relationships meet the preset rules (for example, whether the total column is equal to the sum of the sub-items) by constructing a data dependency graph. During the verification process, a verification report will be generated in real time to store the details of the differences, and the details of the differences include information such as the location of the differences, the type of differences (numerical / text / format), the comparison between the original value and the target value, and the basis of the verification rules.
[0097] Visualize and display the verification report and the annotated execution results through the interactive interface. The interactive interface adopts a split-screen mode on the left and right. The original table data is presented on the left, and the annotated execution results are shown on the right. The different cells are linked and displayed in real time with a dynamic highlighting effect. Users can use the comment system built into the interactive interface to add feedback, and automatically synchronize the feedback information to the code optimization module, thus forming a closed-loop process of verification - feedback - optimization to ensure the accuracy of the execution results and a high degree of matching with user requirements.
[0098] According to an embodiment of the present invention, the table data processing method further includes: in response to receiving the execution result from the task processing engine, analyze the execution result based on the prompt word template to obtain an analysis result; in the case where it is determined that the analysis result indicates that other tools need to be called to optimize the execution result, send a call requirement for the optimization tool to the task processing engine, so that the task processing engine calls the corresponding optimization tool to optimize the execution result according to the call requirement.
[0099] After receiving the execution result returned by the task processing engine, the original prompt word template will be automatically loaded, and semantic alignment analysis will be performed on the execution result with the processing requests, table descriptions, and other information in the prompt word template. Parse the content structure of the execution result through natural language processing technology. For example, for table operation tasks, extract data statistical values, filtered results, or format change records in the result, and perform two-way comparison with the original requirements of the user in the prompt word template (such as "statistical high-frequency industries", "write a new row", etc.). Preset evaluation rules will be used during the analysis process, such as checking whether the numerical calculation results are within a reasonable error range, whether the text processing results conform to semantic logic, and whether the format adjustment meets the storage requirements specified by the template, so as to generate a structured analysis result.
[0100] When the analysis result indicates that the execution result does not fully meet the user's requirements (for example, some data is missing in the statistical result, the format output does not conform to the template requirements, or there are logical errors), the specific dimensions that need to be optimized are automatically identified, and the call requirements for the optimization tool are generated based on the prompt word template. The call requirements will clearly define the optimization objectives (such as "supplement missing data rows", "correct numerical calculation logic", "adjust cell format"), input and output standards, and context constraints. For example, the storage path, data type requirements, etc. in the original prompt word template are followed. The call requirements will be encapsulated as a standardized message according to MCP, including the function tags (such as "data cleaning tool", "format conversion tool") of the optimization tool and the parameter list.
[0101] After the task processing engine receives the call requirements for the optimization tool, it will match the optimization tool with the corresponding function from the tool registration library. For example, it will call the data completion tool to process missing values, or start the format conversion tool to convert the result file into the specified format. The optimization tool will inherit the context information of the original prompt word template during the processing to ensure that the optimization logic is consistent with the user's initial requirements. For example, if the original prompt word template requires saving the result to a specific folder, the optimization tool will automatically follow this storage path. After the optimization is completed, the new execution result will be returned again for loop verification until the analysis result confirms that it fully meets the requirements of the prompt word template, forming a closed-loop processing flow to ensure the ultimate realization of the user's requirements.
[0102] Dynamically calling the optimization tool based on the analysis result to optimize the execution result, forming a closed-loop optimization mechanism, realizes the automatic optimization and iterative processing of the execution result, and improves the quality and adaptability of data processing.
[0103] Figure 4 The software architecture diagram of the tabular data processing method according to an embodiment of the present invention is shown.
[0104] As Figure 4 shown, the hierarchical architecture for processing tabular data includes the interaction logic between each layer. Among them, the application layer 401 serves as the user interaction entrance. When the user has an operation requirement, an instruction will be sent to the service layer 402 through the application programming interface request. For example, when the user performs operations such as file processing or data reasoning on the front-end interface, these requirements are all transmitted by the application layer 401.
[0105] The service layer 402 plays a core scheduling role. After receiving requests from the application layer 401, it interacts with the data layer 403 and the inference layer 404 respectively according to the type of demand. If file-related operations (such as reading, writing, and storing) are involved, the service layer 402 sends file operation requests to the data layer 403 and obtains file data and metadata when needed; if there is an inference task, the service layer 402 sends an inference request to the inference layer 404. After the inference is completed, the service layer 402 receives the inference result and returns the integrated feedback to the application layer 401 to ensure the smooth operation of the business process.
[0106] The data layer 403 focuses on the storage and management of file data, responds to the file operation requests of the service layer 402, and provides or saves file data and meta-information (such as file format, creation time, etc.). The inference layer 404 focuses on inference calculations. For the inference requests of the service layer 402, it performs operations using algorithms, models, etc., and outputs inference results to provide intelligent analysis capabilities for the business. Each layer collaborates with each other to jointly support the system to complete data processing and inference tasks.
[0107] According to an embodiment of the present invention, the table processing method further includes: when it is determined that the analysis result indicates that the execution result conforms to the processing request, a corresponding natural language response is displayed on the interaction interface according to the execution result.
[0108] After it is determined that the analysis result shows that the execution result completely conforms to the processing request, semantic abstraction and natural language conversion are performed on the execution result. First, the data structure of the execution result is parsed. For example, if the result is table data, key statistical values, filtering results, or operation conclusions (such as "the three industries with the highest frequency in the table are manufacturing, information technology, and finance") are extracted; if it is a file operation result, the operation status (such as "successfully saved to the specified folder") and key parameters (such as file name, storage path) are extracted.
[0109] According to the user's query intention in the prompt template, a natural language response is dynamically generated. For example, if the processing request is data statistics, the natural language response will include specific numerical values and trend analysis (such as "the region with the highest gross domestic product in 2023 is Province A, with a value of 1.28 trillion yuan, a growth of 5.2% compared with 2022"); if it is format adjustment, the natural language response will describe the details of the format change (such as "the font of the table header has been modified to Microsoft YaHei, size 12, bold display"). The content of the natural language response is semantically enhanced by combining the business background information of the table data (such as industry attributes, data meaning) to ensure that the natural language expression conforms to the professional habits of the user's field.
[0110] The generated natural language response is visualized through the interactive interface. The interactive interface can adopt a card-style layout, displaying the original table data or a thumbnail of the execution result on the left, and a natural language summary in rich text on the right. Key data is highlighted with labels (such as green font for growth data and red font for outliers). For execution results containing complex logic (such as data analysis after multi-condition filtering), the natural language response will be accompanied by a diagram of the logical deduction process to help users understand the basis for the result generation. Generating natural language responses in the interactive interface provides natural language visual feedback of the processing results, improves the user-friendly human-computer interaction, and facilitates user understanding of the execution results.
[0111] According to an embodiment of the present invention, the table data processing method also includes: using the semantic understanding function in the preset model to analyze the data content in the execution results to obtain the data change trend; based on the data change trend, generating a visual statistical chart for display in the interactive interface.
[0112] The pre-set model's semantic understanding function performs in-depth analysis of the data content in the execution results. First, lexical analysis identifies business keywords (such as "date," "sales," and "age distribution") in the table header fields. The model then infers the data type (numeric, categorical, or time series) based on the context. For numeric data, the pre-set model calculates the interquartile range and detects outliers to determine the data distribution. If the data conforms to a normal distribution and has minimal influence from extreme values (such as average employee age), the pre-set model automatically marks it as suitable for mean analysis. If significant outliers are present (such as revenue data), the model prioritizes the median. For categorical fields (such as "product category"), the pre-set model counts the frequency of each category and identifies the mode. It also calculates the standard deviation and variance, generating natural language explanations based on the business scenario (such as "The standard deviation of sales across regions is 253,000 yuan, indicating significant regional variations in sales performance").
[0113] Based on the above analysis results, the optimal visualization chart type is automatically selected. For time series data (such as "Monthly Sales"), a line chart with a trendline is generated, with the X-axis formatted using time labels (such as "YYYY-MM") and the Y-axis labeled with numerical ranges. For comparative categorical data (such as "Employee Satisfaction by Department"), a bar chart with error bars is generated, using industry-standard color schemes (such as blue for financial data). For percentage analysis (such as "Revenue Contribution by Product Line"), a doughnut-shaped pie chart with percentage labels is generated, highlighting components that contribute more than 20%. Data enhancement techniques are automatically applied during chart generation: moving average curves are added to line charts, data labels are added to bar charts, and effects are added to pie charts to highlight key categories.
[0114] The generated visual statistical chart will be displayed through the responsive components of the interactive interface. The interface adopts a split-screen layout with left and right sides. The left side is a collapsible data panel that supports users to switch different data subsets. The right side is the visualization area, which includes the main chart and the thumbnail navigation bar. Users can quickly locate the time period of interest by dragging the thumbnail, and specific values and year-on-year change rates will be displayed when the mouse hovers. Chart titles and descriptive texts, such as "Revenue Distribution of Each Product Line in Q1 2023 (The red area indicates a year-on-year decrease of more than 15%)", will be automatically generated according to the analysis results to help users quickly understand the meaning of the data.
[0115] Figure 5 The schematic diagram of the interactive interface of the table data processing method according to an embodiment of the present invention is shown.
[0116] As Figure 5 shown, the operation interface of the local table tool 501 demonstrates the data display and interaction process. The "Gross Regional Product Data Table" on the left presents data such as the gross regional product, population, type, and year of multiple provincial cities in tabular form, intuitively showing the basic information. The table dialogue 502 area on the right is the interaction area. The upload location 5021 for uploading table data is above, and the dialogue content 5022 between the tool assistant and the user is below. The self-function of the tool assistant is to analyze and process the uploaded table data, and lists the operation steps, including reading files, checking data, extracting specific city data, processing formats, sorting, and verification, clearly showing the processing logic of the table data. This helps users understand how the tools cooperate to complete data operations, realizing the combination of data display and interactive analysis.
[0117] By analyzing the execution result data with the semantic understanding function of the preset model, identifying the change trend and generating a visual statistical chart for display, the intelligent analysis and visual presentation of the data trend are realized, helping users intuitively grasp the data dynamics and improving the data interpretation efficiency and interactive experience.
[0118] Figure 6 The interactive flowchart of the table data processing method according to an embodiment of the present invention is shown.
[0119] As Figure 6 shown, the process of processing table data based on the preset model includes operations S1~S10. After the user side initiates an operation, the processing request and the table data are uploaded to the preset model. The preset model first reads the data structure, and then sends the tool call requirements to the task processing engine. The task processing engine calls the target tool according to the tool call requirements to complete the reading of the table data, and returns the reading result to the preset model.
[0120] The preset model constructs a prompt template based on the reading result, and then calls itself again to generate the code for operating table data. After encapsulating it as a processing task, it is sent to the task processing engine for execution. After the task processing engine finishes execution, it automatically starts the result verification mechanism, compares and analyzes the execution result with the original data, generates a verification report containing data differences, and feeds back both the execution result and the verification report to the preset model.
[0121] The preset model deeply analyzes the execution result, extracts key indicators and change trends, combines table content reading and multi-dimensional data analysis, and generates visual results. Finally, these results are presented in the form of an interactive report through the interaction interface on the user side, forming a complete closed loop from data input, processing to verification and analysis. This process significantly improves the automation degree and result accuracy of table data processing through hierarchical collaboration and intelligent feedback.
[0122] Based on the above table data processing method, the present invention also provides a table data processing device. The device will be described in detail below with reference to the figures.
[0123] Figure 7 The structural block diagram of the table data processing device according to an embodiment of the present invention is shown.
[0124] As Figure 7 shown, the table data processing device 700 of this embodiment includes a requirement generation module 710, a tool determination module 720, a task generation module 730, and a result display module 740.
[0125] The requirement generation module 710 is used to input the table data input by the object via the interaction interface and the associated processing request into the preset model, generate a tool call requirement corresponding to the above processing request, and send the above tool call requirement to the task processing engine. In one embodiment, the requirement generation module 710 can be used to execute the operation S210 described above, which will not be elaborated here.
[0126] The tool determination module 720 is used to input the tool information returned by the above task processing engine into the above preset model to obtain a plurality of target tools, and the above plurality of target tools include a reading tool and a processing tool. In one embodiment, the tool determination module 720 can be used to execute the operation S220 described above, which will not be elaborated here.
[0127] The task generation module 730 is used to, when it is determined that the above task processing engine has completed reading the above table data through the above reading tool, input the reading result and the function information of the above processing tool into the above preset model to obtain a processing task corresponding to the above processing request, and send the above processing task to the above task processing engine. In one embodiment, the task generation module 730 can be used to execute the operation S230 described above, which will not be elaborated here.
[0128] The result display module 740 is configured to display the execution result in the interaction interface in response to receiving the execution result from the above task processing engine. In one embodiment, the result display module 740 may be configured to perform the operation S240 described above, which will not be elaborated herein.
[0129] According to an embodiment of the present invention, any plurality of modules among the requirement generation module 710, the tool determination module 720, the task generation module 730, and the result display module 740 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the requirement generation module 710, the tool determination module 720, the task generation module 730, and the result display module 740 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner of integrating or packaging circuits, etc., implemented by hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in any suitable combination of several of them. Alternatively, at least one of the requirement generation module 710, the tool determination module 720, the task generation module 730, and the result display module 740 may be at least partially implemented as a computer program module, which can perform the corresponding functions when the computer program module is run.
[0130] It should be noted that the part of the table data processing device in the embodiment of the present invention corresponds to the part of the table data processing method in the embodiment of the present invention. For the description of the part of the table data processing device, please refer to the part of the table data processing method for details, which will not be elaborated herein.
[0131] Figure 8 A block diagram of an electronic device suitable for implementing the table data processing method according to an embodiment of the present invention is shown.
[0132] As Figure 8As shown, the electronic device 800 according to an embodiment of the present invention includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage section 808 into a random access memory (RAM) 803. The processor 801 can include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application-specific integrated circuit (ASIC)), etc. The processor 801 can also include on-board memory for caching purposes. The processor 801 can include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0133] In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. The processor 801 performs various operations of the method flow according to an embodiment of the present invention by executing the program in the ROM 802 and / or the RAM 803. It should be noted that the program can also be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 can also perform various operations of the method flow according to an embodiment of the present invention by executing the program stored in one or more memories.
[0134] According to an embodiment of the present invention, the electronic device 800 can further include an input / output (I / O) interface 805, and the input / output (I / O) interface 805 is also connected to the bus 804. The electronic device 800 can further include one or more of the following components connected to the input / output (I / O) interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read from it can be installed into the storage section 808 as needed.
[0135] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the methods according to the embodiments of the present invention are implemented.
[0136] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present invention, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the above-described ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803.
[0137] An embodiment of the present invention further includes a computer program product, which includes a computer program that contains program code for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program code is used to enable the computer system to implement the tabular data processing method provided by the embodiments of the present invention.
[0138] When the computer program is executed by the processor 801, the above functions defined in the system / apparatus of the embodiments of the present invention are executed. According to an embodiment of the present invention, the above-described systems, apparatuses, modules, units, etc. may be implemented by computer program modules.
[0139] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium and be downloaded and installed through the communication part 809, and / or be installed from the removable medium 811. The program code included in the computer program may be transmitted by any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0140] In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above-described functions defined in the system of the embodiments of the present invention are performed. According to an embodiment of the present invention, the above-described system, device, apparatus, module, unit, etc. can be implemented by computer program modules.
[0141] According to an embodiment of the present invention, program code for executing the computer program provided by the embodiments of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level procedures and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, such as Java, C++, Python, the "C" language, or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).
[0142] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0143] Those skilled in the art can understand that the features described in the various embodiments of the present invention can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present invention.
[0144] The embodiments of the present invention have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. Although the embodiments have been described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Without departing from the scope of the present invention, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the scope of the present invention.
Claims
1. A method for processing tabular data, characterized in that The method includes: Inputting the tabular data input by the object via the interaction interface and the associated processing request into a preset model, generating a tool call requirement corresponding to the processing request, and sending the tool call requirement to the task processing engine; Inputting the tool information returned by the task processing engine into the preset model to obtain multiple target tools, where the multiple target tools include a reading tool and a processing tool; In the case where it is determined that the task processing engine has completed reading the tabular data through the reading tool, inputting the reading result and the function information of the processing tool into the preset model to obtain a processing task corresponding to the processing request, and sending the processing task to the task processing engine; In response to receiving the execution result from the task processing engine, presenting the execution result on the interaction interface.
2. The method according to claim 1, characterized in that The inputting the tool information returned by the task processing engine into the preset model to obtain multiple target tools includes: Sending the tool call requirement to the task processing engine to select multiple candidate tools from the tool registration library of the task processing engine; Inputting the function information of each of the candidate tools returned by the task processing engine into the preset model to determine multiple target tools that match the processing request from the multiple candidate tools.
3. The method according to claim 2, wherein The inputting the function information of each of the candidate tools returned by the task processing engine into the preset model to determine multiple target tools that match the processing request from the multiple candidate tools includes: Extracting industry feature information from the processing request and the tabular data, where the industry feature information includes business keywords and data structure features; Determining a target knowledge base corresponding to the industry feature information from a preset industry knowledge base through a semantic analysis function; Analyzing the function information of each of the candidate tools according to the configuration requirements of the target knowledge base to extract multiple target tools that match the processing request from the candidate tools.
4. The method according to claim 1, wherein The method further includes: Sending the tool identifiers of the multiple target tools to the task processing engine so that the task processing engine performs structured reading of the tabular data using the reading tool among the multiple target tools based on the initial storage address of the tabular data.
5. The method according to claim 1, wherein The inputting the reading result and the function information of the processing tool into the preset model to obtain a processing task corresponding to the processing request includes: Combining and generating a prompt word template according to the initial storage address of the tabular data, the reading result, the processing request, the preset storage address of the execution result, and a preset code execution format; Invoking the preset model based on the prompt word template to generate code for processing the tabular data to form the processing task.
6. The method according to claim 5, wherein The method further includes: Performing static syntax checking on the code through the preset model; In the case where it is determined that the check passes, sending the generated processing task to the task processing engine.
7. The method according to claim 5, wherein The method further includes: Sending the processing task to be executed in a sandbox environment in the task processing engine; Among them, during the execution process, environmental verification is performed on the processing task, and the environmental verification includes at least one of determining whether the dependent package environment matches, whether the third-party library is available, and whether the environment configuration is compatible; When it is determined that the environmental verification passes, the execution result is output.
8. The method according to claim 7, wherein The method further includes: When it is determined that the result obtained from the environmental verification meets the preset conditions, the execution of the processing task is terminated; In response to receiving the structured error log generated when the task processing engine performs environmental verification, the code is analyzed for optimization and refactoring through the preset model.
9. The method according to claim 1, wherein The method further includes: The table data and the execution result are compared through the reading rules of the document processing library in the task processing engine to obtain a comparison result; Based on the different content in the comparison result, annotation is performed in the execution result and data verification is performed to generate a verification report, where the data verification includes at least one of format verification, range verification, and logical relationship verification; The verification report and the execution result marked with the different content are visually displayed through the interaction interface.
10. The method according to claim 5, wherein The method further includes: In response to receiving the execution result from the task processing engine, the execution result is analyzed based on the prompt word template to obtain an analysis result; When it is determined that the analysis result indicates that other tools need to be called to optimize the execution result, a call requirement for the optimization tool is sent to the task processing engine, so that the task processing engine calls the corresponding optimization tool to optimize the execution result according to the call requirement.
11. The method according to claim 10, characterized in that The method further includes: When it is determined that the analysis result indicates that the execution result meets the processing request, a corresponding natural language response is displayed on the interaction interface according to the execution result.
12. The method according to claim 1, characterized in that, The method further includes: Using the semantic understanding function in the preset model, the data content in the execution result is analyzed to obtain a data change trend; According to the data change trend, a visual statistical chart is generated for display on the interaction interface.
13. An electronic device, comprising: One or more processors; A memory for storing one or more computer programs, Characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 12.
14. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, The computer program or instruction, when executed by the processor, implements the steps of the method according to any one of claims 1 to 12.
15. A computer program product, characterized in that, Including a computer program, which, when executed by the processor, implements the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Decision engine configuration method and device based on large model, electronic equipment and medium
CN117540803A
Task execution method, device and equipment for large model agent
CN118886445A
Combined reasoning ability enhancing method based on large language model tool use
CN119358664A
Workflow engine data analysis method and system based on large model driving
CN119887102A
AI large model and low-code platform interactive integration method and system
CN119903506A
Cited By
Tool calling method and device, equipment, medium and program product
CN120915580A
Interface configuration method and device based on large language model, medium and electronic equipment
CN121681003A
Automatic processing method and system for research and development data based on keyword extraction
CN121996739A
A Method and System for Automated Processing of R&D Data Based on Keyword Extraction
CN121996739B