Method for implementing control of nas device based on large model and network attached storage device

CN121681489BActive Publication Date: 2026-08-21SHENZHEN GREEN CONNECTION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511646447.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-08-21
Estimated Expiration
2045-11-10

AI Technical Summary

Technical Problem

然而,随着NAS系统功能日益复杂,用户对其控制与管理的便捷性、智能化及安全性需求不断提升,现有NAS控制方式逐渐暴露出显著瓶颈:交互方式需用户主动适应机器逻辑,复杂多步骤任务操作效率低下;不同控制通道(如图形界面、命令行、编程接口)间存在功能孤岛,操作上下文无法无缝传递

Benefits of technology

本发明实施例中,接收用户输入的指令信息,获取预设的工具清单,根据工具清单对用户指令信息进行语义解析,提取用户指令信息的指令意图信息,结合用户指令信息对应的上下文信息将指令意图映射为指令任务,并根据指令对象以及约束条件,确定指令任务的逻辑依赖关系,根据逻辑依赖关系将指令任务分解为至少一个有序执行的任务步骤,在预设的工具清单中筛选每个任务步骤对应的目标工具,并根据每个任务步骤对应的目标工具,生成工具调用请求,根据工具调用请求在NAS设备中执行指令任务。可见,实施本发明能够使用户无需记忆复杂命令或操作多层导航菜单,仅需以自然语言表达需求,降低NAS高级功能的使用门槛,提高用户功能控制与交互的效率,提升指令意图识别的精准性,减少因识别意图模糊导致的执行偏差,将任务分解为有序步骤,减少因任务步骤执行混乱导致执行失败的问题,提升任务执行的准确性和可靠性,进而提高对NAS控制的准确性,NAS本地部署的大模型无需依赖云端处理,降低用户操作指令或任务泄露风险,提高数据安全性和可靠性,能够实现从用户指令到任务执行的端到端自动化,提高对NAS的控制效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121681489B_ABST
    Figure CN121681489B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, and discloses a method for realizing control of a network attached storage (NAS) device based on a large model and the NAS device, the method comprising the following steps: extracting instruction intention information of user instruction information according to a tool list, mapping the instruction intention into an instruction task in combination with context information of the user instruction information, determining a logical dependency relationship of the instruction task according to an instruction object and a constraint condition, determining a task step according to the logical dependency relationship, generating a tool calling request according to a target tool screened in the tool list, and executing the instruction task in the NAS device according to the tool calling request. It can be seen that the application can reduce the use threshold of high-level functions of the NAS, improve the user function control and interaction efficiency, the large model deployed locally in the NAS does not need to depend on cloud processing, reduces the risk of user operation instruction or task leakage, improves the data security and reliability, can realize end-to-end automation from user instructions to task execution, and improves the control efficiency of the NAS.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method for controlling NAS devices based on a large model and a network attached storage device. Background Technology

[0002] With the development of the digital age, Network Attached Storage (NAS) devices have been widely used in personal storage, home video storage, and enterprise office applications due to their large capacity, high reliability, and convenient network access and storage capabilities. They undertake core tasks such as data storage, file management, multimedia services (such as photo albums and video playback), and application deployment (such as Docker containers). However, as NAS systems become increasingly complex, users' demands for ease of control, intelligence, and security in their control and management are constantly increasing. Existing NAS control methods are gradually revealing significant bottlenecks: the interaction method requires users to actively adapt to the machine logic, and the operation efficiency of complex multi-step tasks is low; functional silos exist between different control channels (such as graphical interfaces, command lines, and programming interfaces), and the operation context cannot be seamlessly transferred.

[0003] Currently, the industry primarily employs three technical solutions for controlling NAS systems: graphical user interfaces (GUIs), command-line interfaces (COMAs), and application programming interfaces (APIs). However, these methods suffer from operational complexity and high learning curves, resulting in low control efficiency for ordinary users. Therefore, proposing a technical solution that reduces the operational difficulty of NAS functions and improves control efficiency is of paramount importance. Summary of the Invention

[0004] This invention provides a method for controlling NAS devices based on a large model and a network attached storage device, which can help reduce the difficulty of operating NAS functions and improve the control efficiency of NAS.

[0005] To address the aforementioned technical problems, the first aspect of this invention discloses a method for controlling NAS devices based on a large model, the method comprising: Receive user input instruction information, the instruction information including user instruction information and context information corresponding to the user instruction information; Obtain a preset tool list, which includes at least one tool and tool information for each tool, including a tool function description, operating range, and parameter requirements; The user instruction information is semantically parsed according to the tool list to extract the instruction intent information of the user instruction information, which includes the instruction intent, instruction object and constraints. The instruction intent is mapped to an instruction task by combining the context information corresponding to the user instruction information, and the logical dependency relationship of the instruction task is determined according to the instruction object and the constraint conditions. Based on the logical dependencies, the instruction task is decomposed into at least one ordered task step, and the task step includes a step operation type. Filter the target tool corresponding to each task step from the preset tool list, and generate a tool call request based on the target tool corresponding to each task step; The instruction task is executed on the NAS device according to the tool invocation request.

[0006] As an optional implementation, in the first aspect of the present invention, each of the task steps further includes a step object identifier and step constraints. The step of filtering the target tool corresponding to each task step from the preset tool list, and generating a tool invocation request based on the target tool corresponding to each task step, includes: For each task step, the step operation type corresponding to the current task step is matched with the tool function description of each tool in the tool list, and at least one tool corresponding to the current task step is selected. For each task step, the execution efficiency priority of each tool is determined based on the operation range and parameter requirements of each tool corresponding to the current task step, and the target tool corresponding to the current task step is determined based on the execution efficiency priority of each tool. A tool invocation request is generated based on the step object identifier, the step constraints, and the target tool corresponding to each task step.

[0007] As an optional implementation, in a first aspect of the invention, executing the instruction task in the NAS device according to the tool invocation request includes: The received tool call request is parsed to determine the object identifier of the functional object corresponding to the instruction task in the NAS device. Filter the resource adapters that match the object identifier from the preset adapter list. The resource adapters are pre-configured with parameter conversion rules. The resource adapter converts the tool call request into a function object call instruction corresponding to the function object according to the parameter conversion rule; The function object invocation instruction is sent to the function object in the NAS device, and the function object is controlled to execute the instruction task according to the function object invocation instruction.

[0008] As an optional implementation, in the first aspect of the present invention, the method further includes: During the execution of the instruction task in the NAS device according to the tool call request, after a task step is completed, the matching degree between the instruction task and the instruction intent is determined based on the execution result of the task step and the remaining unexecuted task steps, and it is determined whether the matching degree is lower than a preset matching degree threshold. When the matching degree is lower than the matching degree threshold, the context information is updated according to the execution result, and supplementary information is received from the user's input. The tool invocation request is updated based on the updated context information and the supplementary instruction information.

[0009] As an optional implementation, in the first aspect of the present invention, the method further includes: During the analysis of the instruction information, it is detected whether there is an instruction conflict between the instruction task and the NAS device. The instruction conflict includes at least one of logical conflict, state conflict and resource conflict. When the instruction task conflicts with the NAS device, a conflict prompt message corresponding to the instruction conflict is generated and the conflict prompt message is fed back to the user. Upon receiving the user's confirmation instruction to continue executing the instruction task, it is determined whether the instruction conflict violates the rigid constraint rules of the NAS device. If the instruction conflict does not violate the rigid constraint rules, the step of decomposing the instruction task into at least one ordered task step is executed, and risk avoidance parameters for each task step are generated.

[0010] As an optional implementation, in the first aspect of the present invention, the method further includes: Based on a preset sensitive operation feature library, identify whether there is a target sensitive operation in the tool call request. The sensitive operation feature library includes operation keywords and risk levels for each sensitive operation. When the tool call request contains the target sensitive operation, a verification request is generated according to the risk level corresponding to the target sensitive operation, and the verification request is fed back to the user. When the user input verification information is received, it is determined whether the verification information matches the risk level. If the verification information matches the risk level, the operation of executing the instruction task in the NAS device according to the tool call request is performed.

[0011] As an optional implementation, in the first aspect of the present invention, the method further includes: During the execution of the instruction task in the NAS device according to the tool call request, the execution status information of the currently executed task step is collected. The execution status information includes the step progress percentage, resource usage data, intermediate execution results, and abnormal prompt information. The execution status information is fed back to the user in a preset feedback format, which includes at least one of text prompts, progress bars, and intermediate result previews. When the task is completed or a user-triggered task termination instruction is received, an operation audit report is generated based on the execution status information of each task step, and the operation audit report is stored in the NAS device. The operation audit report is used to realize task traceability and / or data recovery.

[0012] A second aspect of the present invention discloses a network-attached storage device, the network-attached storage device comprising: A receiving module is used to receive instruction information input by the user, the instruction information including user instruction information and context information corresponding to the user instruction information; The acquisition module is used to acquire a preset tool list, which includes at least one tool and tool information for each tool, including a tool function description, operating range, and parameter requirements. The extraction module is used to perform semantic parsing on the user instruction information according to the tool list, and extract the instruction intent information of the user instruction information, the instruction intent information including instruction intent, instruction object and constraint conditions; The mapping module is used to map the instruction intent into an instruction task by combining the context information corresponding to the user instruction information, and to determine the logical dependency relationship of the instruction task according to the instruction object and the constraint conditions. The decomposition module is used to decompose the instruction task into at least one ordered task step according to the logical dependency relationship, wherein the task step includes step operation type. The filtering module is used to filter the target tool corresponding to each task step from the preset tool list, and generate a tool call request based on the target tool corresponding to each task step; An execution module is used to execute the instruction task in the NAS device according to the tool invocation request.

[0013] As an optional implementation, in the second aspect of the present invention, each of the task steps further includes a step object identifier and step constraints. The filtering module filters the target tool corresponding to each task step from a preset tool list, and generates a tool invocation request based on the target tool corresponding to each task step. Specifically, this includes: For each task step, the step operation type corresponding to the current task step is matched with the tool function description of each tool in the tool list, and at least one tool corresponding to the current task step is selected. For each task step, the execution efficiency priority of each tool is determined based on the operation range and parameter requirements of each tool corresponding to the current task step, and the target tool corresponding to the current task step is determined based on the execution efficiency priority of each tool. A tool invocation request is generated based on the step object identifier, the step constraints, and the target tool corresponding to each task step.

[0014] As an optional implementation, in a second aspect of the present invention, the execution module executes the instruction task in the NAS device according to the tool invocation request, specifically including: The received tool call request is parsed to determine the object identifier of the functional object corresponding to the instruction task in the NAS device. Filter the resource adapters that match the object identifier from the preset adapter list. The resource adapters are pre-configured with parameter conversion rules. The resource adapter converts the tool call request into a function object call instruction corresponding to the function object according to the parameter conversion rule; The function object invocation instruction is sent to the function object in the NAS device, and the function object is controlled to execute the instruction task according to the function object invocation instruction.

[0015] As an optional implementation, in a second aspect of the invention, the network-attached storage device further includes: The determination module is used to determine the matching degree between the instruction task and the instruction intent based on the execution result of the task step and the remaining unexecuted task steps after the execution of the instruction task in the NAS device according to the tool call request, and to determine whether the matching degree is lower than a preset matching degree threshold. The update module is used to update the context information according to the execution result when the matching degree is lower than the matching degree threshold, and to receive supplementary information from the user input. The update module is also used to update the tool call request based on the updated context information and the instruction supplement information.

[0016] As an optional implementation, in a second aspect of the invention, the network-attached storage device further includes: The detection module is used to detect whether there is a conflict between the instruction task and the NAS device. The instruction conflict includes at least one of logical conflict, state conflict and resource conflict. The first generation module is used to generate conflict prompt information corresponding to the command conflict when the command task conflicts with the NAS device, and to provide the conflict prompt information to the user. The first judgment module is used to determine whether the instruction conflict violates the rigid constraint rules of the NAS device after receiving the user's confirmation instruction to continue executing the instruction task. When the instruction conflict does not violate the rigid constraint rules, the decomposition module is triggered to execute the step of decomposing the instruction task into at least one ordered task step and generating risk avoidance parameters for each task step.

[0017] As an optional implementation, in a second aspect of the invention, the network-attached storage device further includes: The identification module is used to identify whether there is a target sensitive operation in the tool call request based on a preset sensitive operation feature library. The sensitive operation feature library includes operation keywords and risk levels for each sensitive operation. The second generation module is used to generate a verification request based on the risk level corresponding to the target sensitive operation when the tool call request contains the target sensitive operation, and to feed the verification request back to the user. The second judgment module is used to determine whether the verification information input by the user matches the risk level when the verification information is received. When the verification information matches the risk level, the execution module is triggered to execute the operation of executing the instruction task in the NAS device according to the tool call request.

[0018] As an optional implementation, in a second aspect of the invention, the network-attached storage device further includes: The acquisition module is used to acquire the execution status information of the currently executed task step during the execution of the instruction task in the NAS device by the execution module according to the tool call request. The execution status information includes the step progress percentage, resource usage data, intermediate execution results and abnormal prompt information. The feedback module is used to provide the user with the execution status information through a preset feedback format, wherein the feedback format includes at least one of text prompts, progress bars, and intermediate result previews. The third generation module is used to generate an operation audit report based on the execution status information of each task step when the instruction task is completed or a task termination instruction triggered by the user is received, and to store the operation audit report in the NAS device. The operation audit report is used to realize task traceability and / or data recovery.

[0019] A third aspect of the present invention discloses a network-attached storage device, the network-attached storage device comprising: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute some or all of the steps in the method for controlling NAS devices based on a large model according to any of the first aspects of the present invention.

[0020] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute some or all of the steps in the method for controlling a NAS device based on a large model as described in any of the first aspects of the present invention.

[0021] Compared with the prior art, the present invention has the following beneficial effects: In this embodiment of the invention, user-input instruction information is received, a preset tool list is obtained, the user instruction information is semantically parsed according to the tool list, the instruction intent information of the user instruction information is extracted, the instruction intent is mapped to instruction tasks by combining the context information corresponding to the user instruction information, and the logical dependencies of the instruction tasks are determined according to the instruction object and constraints. The instruction tasks are decomposed into at least one ordered task steps according to the logical dependencies, the target tool corresponding to each task step is selected from the preset tool list, and a tool call request is generated according to the target tool corresponding to each task step. The instruction task is executed in the NAS device according to the tool call request. As can be seen, implementing this invention enables users to express their needs using natural language without having to memorize complex commands or navigate multi-layered menus. This lowers the barrier to entry for advanced NAS functions, improves the efficiency of user function control and interaction, enhances the accuracy of command intent recognition, reduces execution deviations caused by ambiguous intent recognition, decomposes tasks into ordered steps, reduces execution failures caused by chaotic task steps, improves the accuracy and reliability of task execution, and thus improves the accuracy of NAS control. Large models deployed locally on the NAS do not need to rely on cloud processing, reducing the risk of user operation commands or task leakage, improving data security and reliability, and enabling end-to-end automation from user commands to task execution, thereby improving the efficiency of NAS control. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating a method for controlling a NAS device based on a large model, as disclosed in an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of a system for implementing functional control of NAS devices based on a large model, as disclosed in an embodiment of the present invention. Figure 3 This is a timing diagram of a method for controlling NAS devices based on a large model, as disclosed in an embodiment of the present invention. Figure 4 This is a flowchart illustrating another method for controlling NAS devices based on a large model, as disclosed in an embodiment of the present invention. Figure 5 This is a schematic diagram of the structure of a network-attached storage device disclosed in an embodiment of the present invention; Figure 6This is a schematic diagram of another network-attached storage device disclosed in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of another network-attached storage device disclosed in an embodiment of the present invention. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.

[0026] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0027] This invention discloses a method for controlling NAS devices based on a large model and a network attached storage device. It enables users to express their needs using natural language without needing to memorize complex commands or navigate multi-layered menus, thus lowering the barrier to entry for advanced NAS functions, improving the efficiency of user function control and interaction, enhancing the accuracy of command intent recognition, reducing execution deviations caused by ambiguous intent recognition, decomposing tasks into ordered steps to reduce execution failures due to chaotic task execution, and improving the accuracy and reliability of task execution. This, in turn, improves the accuracy of NAS control. The large model deployed locally on the NAS does not rely on cloud processing, reducing the risk of user operation commands or task leakage, improving data security and reliability, and achieving end-to-end automation from user commands to task execution, thereby improving NAS control efficiency. Detailed explanations follow.

[0028] Example 1 Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for controlling a NAS device based on a large model, as disclosed in an embodiment of the present invention. Please refer to... Figure 2 , Figure 2 This is a schematic diagram of the structure of a system for implementing functional control of NAS devices based on a large model, as disclosed in an embodiment of the present invention. Figure 1 The method for controlling NAS devices based on a large model, as described above, can be applied to... Figure 2 The system described herein, which enables functional control of NAS devices based on a large model, can be deployed within the NAS device (Network Attached Storage). This system may include a dialogue module, a middleware service module, a large model service module, and an operation service module; however, this embodiment of the invention does not impose limitations. Figure 1 As shown, this method for controlling NAS devices based on a large model can include the following operations: 101. Receive user input instructions.

[0029] In this embodiment of the invention, optionally, such as Figure 2 As shown, the system for controlling NAS devices based on a large model is deployed within the NAS device. This system can include a dialogue module, a middleware service module, a large model service module, and an operation service module. The dialogue module can include a user interaction front-end and a dialogue application. The user interaction front-end provides an interface for user input and system feedback, which can be a web interface, desktop application, or mobile APP. It receives user input instructions, such as natural language instructions, and displays the relevant responses and execution results from the large model. The dialogue application provides a client-side dialogue communication page for users, such as a dialogue application in a web, mobile APP, or desktop application. Its core is to provide a streaming dialogue interface for receiving user natural language instructions and presenting the final responses and execution results to the user in a streaming manner. This invention is not limited to this.

[0030] In this embodiment of the invention, optionally, such as Figure 2 As shown, the middleware service module may include AI capability middleware service, which is the core scheduling and coordination hub of this system. It is responsible for the session management, context maintenance and process scheduling of the entire task. The middleware service module receives instruction information from the dialogue module through the gRPC protocol, and then transmits the instruction information to the large model service module and calls the large model service module. Specifically, the middleware service module can call the large model service module through the internal API, that is, call the local large model service to understand the intent of the instruction information. This invention does not limit this.

[0031] In this embodiment of the invention, optionally, please refer to [the relevant documentation / reference]. Figure 3 , Figure 3 This is a timing diagram of a method for controlling a NAS device based on a large model, as disclosed in an embodiment of the present invention. The dialogue module can receive user-inputted command information, which may include user commands and corresponding context information. The user commands may include professional commands and / or natural language commands input by the user, and the context information may include dialogue information before and after the user inputs the command information, execution result information, etc. After receiving the user-inputted command information, the dialogue module can send the command information to the middleware service module. Specifically, the dialogue module can send the command information to the middleware service module via the gRPC protocol; this invention does not impose limitations.

[0032] 102. Obtain a preset tool list, which includes at least one tool and tool information for each tool.

[0033] In this embodiment of the invention, optionally, the tool list includes at least one tool and tool information for each tool. The tool information includes a description of the tool's function, its operating scope, and parameter requirements, such as calling services or tools like photo albums or file managers. This invention does not impose any limitations.

[0034] 103. Perform semantic parsing on user command information based on the tool list to extract the command intent information from the user command information.

[0035] In this embodiment of the invention, optionally, the large model service module can perform deep semantic analysis on user instruction information based on the tool function description, operation scope, and parameter requirements in the tool list. For example, it can match keywords in the user instruction information with the tool function description, operation scope, and parameter requirements in the tool list to extract the instruction intent information of the user instruction information. The instruction intent information includes the instruction intent, the instruction object, and constraints. The constraints may include one or more of time range, format requirements, and permission restrictions. For example, when the user instruction information includes "search for pets and create a regular album", the instruction intent includes searching for pet pictures and creating an album, the instruction object is the album and pet-related pictures in the album, and the constraint is creating a regular album. This invention does not impose any limitations.

[0036] 104. Combine the context information corresponding to the user instruction information to map the instruction intent to the instruction task, and determine the logical dependency relationship of the instruction task according to the instruction object and constraints.

[0037] In this embodiment of the invention, optionally, the large model service module can map the instruction intent into instruction tasks by combining the context information corresponding to the user instruction information, and determine the logical dependency relationship of the instruction tasks according to the instruction object and constraints, such as the order of "searching and filtering pet pictures, compressing pictures, moving pictures, and generating albums". This invention does not limit this.

[0038] 105. Decompose the instruction task into at least one ordered task step based on logical dependencies. The task step includes the step operation type.

[0039] In this embodiment of the invention, optionally, such as Figure 2 As shown, the large model service module includes a local large model service, which is a large language model (LLM) instance deployed locally on the NAS device. It serves as the intelligent decision-making brain of the entire system. The large model service module is called by the middleware service module through an internal interface and is responsible for deep semantic analysis, intent understanding, and task planning. Specifically, the large model service module can perform deep semantic analysis and intent understanding on instruction information to determine the instruction task corresponding to the instruction information and decompose the instruction task into at least one ordered task step. For example, after analyzing the user's instruction information, if the instruction task is "search for pets and create a regular album", the ordered task steps obtained after decomposing the instruction task may include: 1. scanning the image library, 2. using AI recognition technology to filter specific photos, and 3. calling the album application and creating a new album using the specific photos. This invention does not limit the scope of the instruction task.

[0040] In this embodiment of the invention, optionally, the large model service module can decompose the instruction task into at least one ordered task step according to the logical dependency relationship. The task step may include the step operation type, the step object identifier, and the step constraint conditions, which are not limited in this invention.

[0041] 106. Filter the target tool corresponding to each task step from the preset tool list, and generate a tool call request based on the target tool corresponding to each task step.

[0042] In this embodiment of the invention, optionally, such as Figure 2As shown, this system uses the Model Context Protocol (MCP) as a resource operation arm, which is the executor used to perform specific operations. Therefore, the preset tool list includes MCP tools. The large model service module selects the target tool corresponding to each task step from the preset tool list and generates a tool call request based on the target tool corresponding to each task step. That is, the large model service module generates a structured MCP tool call request according to the planned steps, which is a structured call request that conforms to the MCP protocol. For example, it calls services or tools such as photo album and file manager in sequence. After generating the tool call request, the large model service module sends the tool call request to the middle platform service module.

[0043] 107. Execute command tasks in the NAS device according to the tool call request.

[0044] In this embodiment of the invention, optionally, the middleware service module communicates with the operation service module via standard input / output (STDIO) to send tool call requests and their corresponding parameters to the operation service module. The operation service module encapsulates various resource adapters and can convert general MCP commands into specific calls to other applications or services in the NAS, thereby enabling control over other applications or services in the NAS.

[0045] In this embodiment of the invention, optionally, such as Figure 2 As shown, other applications and services in the NAS are the final objects of control, including but not limited to one or more of the following: photo album service, music service, video service, file management service, Docker management service, system configuration service, third-party plugins, and synchronization service. After the operation service module completes the instruction task in the NAS device according to the tool call request, it can return the execution result to the middleware service module. For example, it can return the identified image ID list and the information of successful album creation to the middleware service module through standard output (STDOUT). The middleware service module returns the final success information or execution log to the dialog application step by step through the gRPC streaming connection. This invention does not limit this.

[0046] It is evident that implementation Figure 1The described method for controlling NAS devices based on a large model can receive user-input commands. Users do not need to memorize complex commands or navigate multi-layered navigation menus; they only need to express their needs in natural language, lowering the barrier to entry for advanced NAS functions and improving the efficiency of user control and interaction. The method acquires a pre-defined tool list, performs semantic parsing on user commands based on this list, extracts the command intent information, maps the command intent to command tasks by combining the context information, and determines the logical dependencies of the command tasks based on the command object and constraints. Based on these logical dependencies, the command tasks are decomposed into at least one ordered execution step, improving command intent recognition. The accuracy of the system is improved, reducing execution deviations caused by ambiguous intent recognition. Tasks are broken down into ordered steps, reducing execution failures caused by chaotic task steps, thus improving the accuracy and reliability of task execution and consequently enhancing the accuracy of NAS control. The system filters the target tool corresponding to each task step from a pre-defined tool list and generates a tool call request based on the target tool for each task step. The system then executes the command task on the NAS device according to the tool call request. Large models deployed locally on the NAS do not rely on cloud processing, reducing the risk of user operation commands or task leakage, improving data security and reliability, and enabling end-to-end automation from user commands to task execution, thereby improving the efficiency of NAS control.

[0047] In an optional embodiment, executing instruction tasks in the NAS device based on a tool invocation request may include the following operations: The received tool call request is parsed to determine the object identifier of the functional object corresponding to the instruction task in the NAS device; Filter the resource adapters that match the object identifier from the preset adapter list. The resource adapters are pre-configured with parameter conversion rules. The resource adapter converts tool call requests into function object call instructions corresponding to the function objects according to parameter conversion rules; The function object invocation command is sent to the function object in the NAS device, and the function object is controlled to execute the command task according to the function object invocation command.

[0048] In this optional embodiment, optionally, such as Figure 2As shown, the operation service module parses the received tool call request. Specifically, it can parse the tool call request through the MCP protocol parser to determine the object identifier of the functional object corresponding to the instruction task in the NAS device, such as the album application identifier of the album application. The operation service module can filter resource adapters that match the object identifier in the preset adapter list, such as the album application adapter. The resource adapters are pre-configured with parameter conversion rules, which are not limited in this embodiment.

[0049] In this optional embodiment, optionally, such as Figure 2 As shown, the resource adapter converts tool call requests into function object call instructions corresponding to function objects according to parameter conversion rules. For example, for file management services, it converts them into command line instructions containing paths and operators; for photo album services, it converts them into API call parameters containing media IDs and filter conditions; for Docker services, it converts them into HTTP requests containing container names and operation instructions. Then, the function object call instructions are sent to the function objects in the NAS device, and the function objects are controlled to execute instruction tasks according to the function object call instructions. This embodiment does not limit the scope of the function object call instructions.

[0050] As can be seen, implementing this optional embodiment can convert general tool call requests into exclusive instructions that can be recognized by each functional object through a preset resource adapter, without the need to develop call logic separately for different applications, thereby achieving unified scheduling of multiple applications / services within the NAS and improving the control efficiency and accuracy of the NAS device.

[0051] In another alternative embodiment, the method for controlling NAS devices based on a large model may further include the following operations: During the execution of instruction tasks in the NAS device according to the tool call request, after a task step is completed, the matching degree between the instruction task and the instruction intent is determined based on the execution result of the task step and the remaining unexecuted task steps, and it is determined whether the matching degree is lower than the preset matching degree threshold. When the matching degree is lower than the matching degree threshold, update the context information according to the execution result and receive supplementary information from user input. The tool call request is updated based on the updated context information and supplementary instruction information.

[0052] In this optional embodiment, optionally, such as Figure 2As shown, during the process of the operation service module executing instruction tasks in the NAS device according to the tool call request, after the operation service module completes a task step, it feeds back the execution result of the task step to the large model service module through the middle platform service module. When the task step is executed successfully, the execution result may include a success flag and output data, such as a list of identified image IDs, a successful album creation flag, etc. When the task step fails, the execution result may include a failure flag and error data. After receiving the execution result, the large model service module can update the task progress table according to the execution result and display the visual progress bar data to the user in real time through the dialogue module. This embodiment is not limited.

[0053] In this optional embodiment, optionally, such as Figure 2 As shown, the large model service module can determine the matching degree between the instruction task and the instruction intent based on the execution result of the task step and the remaining unexecuted task steps, and determine whether the matching degree is lower than a preset matching degree threshold. When the matching degree is greater than or equal to the matching degree threshold, and the task step is the last step, the execution result is encapsulated into the final result, such as... Figure 3 As shown, when the task step is not the last step, if the tool call in the subsequent steps is different from that of this step, the execution result of the current step can be used as the new context, and the large model service module can make the next decision, forming a loop until all steps are completed. This embodiment does not limit this.

[0054] In this optional embodiment, optionally, such as Figure 2 As shown, when the matching degree is lower than the matching degree threshold, the large model service module updates the context information according to the execution result and receives the instruction supplement information input by the user through the dialogue module. When the user does not input instruction supplement information, this parameter is set to empty. The large model service module updates the tool call request according to the updated context information and instruction supplement information, and then sends the updated tool call request to the operation service module through the middle platform service module to execute the instruction task on the NAS device. This embodiment does not limit this.

[0055] As can be seen, implementing this optional embodiment can determine the matching degree between the instruction task and the instruction intent based on the execution result of the task step and the remaining unexecuted task steps after the completion of the task step, and determine whether the matching degree is lower than a preset matching degree threshold. When the matching degree is lower than the matching degree threshold, the context information is updated according to the execution result, and supplementary instruction information is received by the user. The tool call request is updated according to the updated context information and supplementary instruction information, which improves the fit between task execution and user intent. Moreover, it can dynamically adapt to changes in user needs during task execution, improve user flexibility, and ensure that even if there are execution deviations or changes in needs, the core user intent can still be completed through dynamic adjustment, avoiding task termination due to deviations in the prior art and improving the overall completion rate of instruction tasks.

[0056] In yet another alternative embodiment, the method for controlling NAS devices based on a large model may further include the following operations: The system detects whether there are command conflicts between the command task and the NAS device. Command conflicts include at least one of the following: logical conflicts, state conflicts, and resource conflicts. When a command conflict occurs between the command task and the NAS device, a conflict prompt message is generated and the user is notified of the conflict prompt message. Upon receiving a confirmation instruction from the user to continue executing the task, it determines whether the instruction conflict violates the rigid constraint rules of the NAS device. If the instruction conflict does not violate the rigid constraint rules, it executes the step of decomposing the task into at least one ordered task step and generates risk avoidance parameters for each task step.

[0057] In this optional embodiment, optionally, such as Figure 2 As shown, during the analysis of command information, the large model service module detects whether there are command conflicts between the command task and the NAS device. Command conflicts include at least one of logical conflicts, state conflicts, and resource conflicts. Specifically, logical conflicts may include logical contradictions in the command intent, such as deleting a file being edited, or "delete operation" and "backup operation" pointing to the same object at the same time; state conflicts may include conflicts between the command task and the current state of applications or services in the NAS device, such as starting an already running application; resource conflicts may include conflicts between the resource requirements of the command task and the existing resources of the NAS device, or the resources that the command task needs to operate on are beyond the scope of user permissions, which is not limited in this embodiment.

[0058] In this optional embodiment, optionally, such as Figure 2As shown, when there is a conflict between the instruction task and the NAS device, the large model service module can generate a conflict prompt message corresponding to the instruction conflict and provide feedback to the user through the dialogue module. For example, it may remind the user whether to continue executing the instruction task. When the dialogue module receives the user's confirmation instruction to continue executing the instruction task, the large model service module determines whether the instruction conflict violates the rigid constraint rules of the NAS device. Rigid constraint rules may include rules such as the system partition cannot be deleted and the core service cannot be interrupted. When the instruction conflict does not violate the rigid constraint rules, the large model service module performs the step of decomposing the instruction task into at least one ordered task step and generates risk avoidance parameters for each task step, such as creating a temporary snapshot. These risk avoidance parameters are used to restore the execution result of the task step within a certain period of time after the task step is completed. This embodiment does not limit this.

[0059] As can be seen, implementing this optional embodiment can detect whether there is a command conflict between the command task and the NAS device. When there is a command conflict between the command task and the NAS device, a conflict prompt message corresponding to the command conflict is generated and fed back to the user. After receiving the user's confirmation instruction to continue executing the command task, it is determined whether the command conflict violates the rigid constraint rules of the NAS device. When the command conflict does not violate the rigid constraint rules, the step of decomposing the command task into at least one ordered task step is executed, and risk avoidance parameters for each task step are generated. The conflict risk can be avoided in advance before the task is executed. Through the dual protection of user confirmation and rigid constraints, the stability and reliability of the system operation are guaranteed.

[0060] In yet another alternative embodiment, the method for controlling NAS devices based on a large model may further include the following operations: Based on a pre-defined sensitive operation feature library, the system identifies whether a target sensitive operation exists in the tool call request. The sensitive operation feature library includes the operation keywords and risk level for each sensitive operation. When a tool call request contains a target sensitive operation, a verification request is generated based on the risk level corresponding to the target sensitive operation, and the verification request is fed back to the user. When the user inputs verification information, it is determined whether the verification information matches the risk level. If the verification information matches the risk level, the operation of executing the instruction task in the NAS device according to the tool call request is performed.

[0061] In this optional embodiment, optionally, such as Figure 2As shown, the operation service module identifies whether a target sensitive operation exists in the tool call request based on a preset sensitive operation feature library. The sensitive operation feature library includes operation keywords and risk levels for each sensitive operation. Sensitive operations may include deleting a single file, formatting a storage partition, modifying administrator privileges, uninstalling system applications, etc. The risk levels of sensitive operations are pre-configured in the system. For example, the risk levels are divided into three levels. Level 1 may include operations such as deleting a single file, Level 2 may include operations such as formatting a storage partition and uninstalling system applications, and Level 3 may include operations such as modifying administrator privileges. This embodiment does not limit the scope of the risk levels.

[0062] In this optional embodiment, optionally, such as Figure 2 As shown, when a tool call request contains a target sensitive operation, the operation service module can generate a verification request based on the risk level corresponding to the target sensitive operation. For example, when the risk level corresponding to the target sensitive operation is level one, the verification request can require the user to enter a local PIN code for verification; when the risk level corresponding to the target sensitive operation is level two, the verification request can require the user to enter a login password and an email verification code for dual verification; when the risk level corresponding to the target sensitive operation is level three, the verification request can require the current user and the backup administrator to perform dual verification. After generating the verification request, the verification request can be fed back to the user through the dialogue module. When the dialogue module receives the verification information entered by the user, the operation service module determines whether the verification information matches the risk level. When the verification information matches the risk level, the operation of executing the instruction task in the NAS device according to the tool call request is executed. This embodiment does not impose any limitations.

[0063] As can be seen, implementing this optional embodiment can identify whether a target sensitive operation exists in a tool call request based on a preset sensitive operation feature library. When a target sensitive operation exists in a tool call request, a verification request is generated according to the risk level corresponding to the target sensitive operation, and the verification request is fed back to the user. When the user inputs verification information, it is determined whether the verification information matches the risk level. When the verification information matches the risk level, the operation of executing the instruction task in the NAS device according to the tool call request is executed. This can achieve precise protection of sensitive operations, match the verification strength according to the risk level, improve the security of risky operations while avoiding the impact of excessive verification on efficiency, balance security and user experience, effectively prevent malicious or erroneous operations, protect the core data and system configuration security in the NAS device, and reduce the risk of data leakage or system damage.

[0064] In yet another alternative embodiment, the method for controlling NAS devices based on a large model may further include the following operations: During the execution of command tasks in the NAS device according to the tool call request, the execution status information of the currently executed task steps is collected. The execution status information includes the step progress percentage, resource usage data, intermediate execution results, and abnormal prompts. The system provides users with feedback on the execution status through preset feedback formats, including at least one of text prompts, progress bars, and intermediate result previews. When the task is completed or a user-triggered task termination command is received, an operation audit report is generated based on the execution status information of each task step, and the operation audit report is stored in the NAS device. The operation audit report is used to realize task traceability and / or data recovery.

[0065] In this optional embodiment, during the execution of the instruction task according to the tool call request, the operation service module collects the execution status information of the currently executing task steps in real time. The execution status information may include the step progress percentage, resource usage data, intermediate execution results, and abnormal prompt information. The step progress percentage is calculated by the node completion degree of the preset execution process nodes of the task steps. The resource usage data may specifically include the CPU utilization rate, memory usage rate, storage IO rate, and network bandwidth usage of the NAS device. The collection frequency can be once every 100ms to ensure data real-time performance. The intermediate execution results can be dynamically generated according to the task type. For example, file management tasks may return the names, paths, and quantities of matched files; album creation tasks may return the list of identified media file IDs; and application control tasks may return the application start / stop status codes. The abnormal prompt information includes error codes, error reasons, and preliminary troubleshooting suggestions that occur during execution. This embodiment does not limit this.

[0066] In this optional embodiment, the operation service module can optionally feed back the collected execution status information to the dialogue module through the middleware service module. The dialogue module then presents the information to the user synchronously through a variety of preset feedback formats. The feedback formats may include at least one of text prompts, progress bars, and intermediate result previews. Text prompts are pushed in real time using short natural language sentences, such as "60% of the pet photo filtering has been completed, and 32 files have been matched so far." Progress bars use visual graphics to display the overall progress of the entire instruction task and the subdivided progress of the current step. The progress bar color changes with the status (e.g., blue when executing normally, red when abnormal, and gray when paused). Intermediate result previews allow users to click to view details. For example, clicking "Matched Files List" allows previewing the thumbnails, names, and modification times of the first 10 matched files, and clicking "Resource Usage Details" allows viewing real-time change curves of data such as CPU and memory usage, thus achieving an intuitive presentation of the execution status. This embodiment is not limited to these methods.

[0067] In this optional embodiment, when all task steps are completed or a task termination command triggered by the user through the application is received, an operation audit report is generated based on the execution status information of each task step. That is, the operation audit report is automatically generated by summarizing the data of the entire process. The operation audit report may include user instruction information, task step breakdown details, tool call logs, execution result summary, and full process timestamp. The operation audit report can be stored in the NAS device. The operation audit report is used to realize task traceability and / or data recovery. Specifically: when the user needs to trace historical operations, he / she can input instructions through the application, filter the corresponding operation audit report according to the instructions, and decrypt and display it; when there is a misoperation (such as accidentally deleting files or incorrectly creating albums) or the execution result does not meet expectations, the user can locate the problem link through the audit report, and combine the intermediate execution results, tool call parameters, etc. recorded in the audit report with the temporary snapshot function of the NAS device to quickly trace the original state of the data and realize accurate recovery after the misoperation.

[0068] As can be seen, implementing this optional embodiment can collect the execution status information of the current task step during the execution of the instruction task according to the tool call request and provide feedback to the user in multiple forms. When the task is completed or a termination instruction is received, an operation audit report is generated and stored in the NAS device for task traceability and / or data recovery. It can realize transparent control of the entire instruction task execution process, allowing users to keep track of the execution progress, resource usage, and abnormal situations in real time, avoiding blind waiting or execution failure without prompts, and effectively improving the intuitiveness and controllability of the interaction. At the same time, it provides complete evidence for operation traceability, greatly reducing the cost of troubleshooting. With the snapshot function, it supports accurate recovery after erroneous operations, further ensuring the security of core data and system configuration, and reducing the risk of data loss or system failure. Moreover, it is compatible with multiple types of NAS control task scenarios, enhancing security and maintainability while taking into account system versatility, and balancing user experience and functional practicality.

[0069] Example 2 Please see Figure 4 , Figure 4 This is a flowchart illustrating a method for controlling a NAS device based on a large model, as disclosed in an embodiment of the present invention. Figure 4 The method for controlling NAS devices based on a large model, as described above, can also be applied to... Figure 2 The system described herein, which enables functional control of NAS devices based on a large model, can be deployed within the NAS device. This system may include a dialogue module, a middleware service module, a large model service module, and an operation service module; however, this embodiment of the invention does not impose limitations. Figure 4 As shown, this method for controlling NAS devices based on a large model can include the following operations: 201. Receive user input instructions.

[0070] 202. Obtain a preset tool list, which includes at least one tool and tool information for each tool.

[0071] 203. Perform semantic parsing on user command information based on the tool list to extract the command intent information from the user command information.

[0072] 204. Combine the context information corresponding to the user instruction information to map the instruction intent to the instruction task, and determine the logical dependency relationship of the instruction task according to the instruction object and constraints.

[0073] 205. Decompose the instruction task into at least one ordered task step based on logical dependencies. The task step includes the step operation type.

[0074] 206. For each task step, match the step operation type corresponding to the current task step with the tool function description of each tool in the tool list, and filter out at least one tool corresponding to the current task step.

[0075] In this embodiment of the invention, optionally, each task step also includes a step object identifier and step constraints. For example, in the task of searching for pets and creating a regular photo album, the step object identifier of the task step of scanning the image library can represent the identifier of the image library, and the step constraints can include the range of the image library to be scanned. For each task step, the large model service module can match the step operation type corresponding to the current task step with the tool function description of each tool in the tool list, and filter out at least one tool corresponding to the current task step. For example, the step operation type of the task step of scanning the image library can include the scanning type, and the corresponding tools can include photo album tools and file manager tools. This invention does not impose any limitations.

[0076] 207. For each task step, determine the execution efficiency priority of each tool based on its operational scope and parameter requirements, and determine the target tool for the current task step based on the execution efficiency priority of each tool.

[0077] In this embodiment of the invention, optionally, the large model service module can determine the execution efficiency priority of each tool based on the operation range and parameter requirements of each tool corresponding to the current task step, and determine the target tool corresponding to the current task step based on the execution efficiency priority of each tool. Among them, the album tool is directly used to access the album, and its execution efficiency priority for scanning the image library is higher than that of the file manager tool. Therefore, the album tool can be determined as the target tool for the task step of scanning the image library. This invention does not limit this.

[0078] 208. Generate a tool call request based on the step object identifier, step constraints, and target tool corresponding to each task step.

[0079] In this embodiment of the invention, optionally, the large model service module can generate a tool call request based on the step object identifier, step constraints, and target tool corresponding to each task step. Specifically, it can generate a structured call request that conforms to the MCP protocol. The tool call request may include the target tool identifier, standardized input parameters, output format requirements, and timeout threshold, etc. The standardized input parameters can be encapsulated according to the model context protocol and may include file path, operation mode, etc., which are not limited in this invention.

[0080] 209. Execute command tasks on the NAS device according to the tool call request.

[0081] In this embodiment of the invention, for other descriptions of steps 201-205 and 209, please refer to the detailed description of steps 101-1054 and 107 in Embodiment 1 of the invention. These descriptions will not be repeated in this embodiment of the invention.

[0082] It is evident that implementation Figure 4The described method for controlling NAS devices based on a large model can receive user-input commands. Users do not need to memorize complex commands or navigate multi-layered navigation menus; they only need to express their needs in natural language, lowering the barrier to entry for advanced NAS functions and improving the efficiency of user control and interaction. It acquires a pre-defined toolset, performs semantic parsing on user commands based on the toolset, extracts the command intent information, maps the command intent to a command task based on the context information, and determines the logical dependencies of the command task based on the command object and constraints. Based on these logical dependencies, the command task is decomposed into at least one ordered execution step, improving the accuracy of command intent recognition and reducing execution deviations caused by ambiguous intent recognition. Decomposing the task into ordered steps reduces execution failures caused by chaotic task step execution, improving the accuracy and reliability of task execution, and thus improving the accuracy of NAS control. The method also matches the step operation type corresponding to the current task step with the toolset. The system matches the tool function descriptions of each tool to select at least one tool corresponding to the current task step. Based on the operational scope and parameter requirements of each tool for the current task step, it determines the execution efficiency priority of each tool and identifies the target tool for the current task step. Using the step object identifier, step constraints, and target tool for each task step, it generates a tool call request. This improves the accuracy of tool calls, reduces execution delays or resource waste caused by tool call errors, and thus enhances the task execution efficiency of the NAS device. It also improves the accuracy and completeness of the generated tool call requests, thereby increasing the success rate of tool calls. Based on the tool call request, the system executes the command task on the NAS device. Large-scale models deployed locally on the NAS do not rely on cloud processing, reducing the risk of user operation command or task leakage, improving data security and reliability, and achieving end-to-end automation from user commands to task execution, thereby improving the control efficiency of the NAS.

[0083] Example 3 Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a network-attached storage device disclosed in an embodiment of the present invention. Figure 5 The described network-attached storage device may include an intelligent server or intelligent platform for receiving user input instructions and generating tool invocation instructions for the network-attached storage device. The intelligent server may include a NAS server or a cloud server; this embodiment of the invention is not limited to these. Figure 5 As shown, the network-attached storage device may include: The receiving module 301 is used to receive instruction information input by the user, including user instruction information and context information corresponding to the user instruction information; The acquisition module 302 is used to acquire a preset tool list. The tool list includes at least one tool and tool information for each tool. The tool information includes a tool function description, operating range, and parameter requirements. The extraction module 303 is used to perform semantic parsing of user instruction information based on the tool list and extract instruction intent information from the user instruction information. The instruction intent information includes instruction intent, instruction object and constraint conditions. The mapping module 304 is used to map the instruction intent to the instruction task by combining the context information corresponding to the user instruction information, and to determine the logical dependency relationship of the instruction task according to the instruction object and the constraints. Decomposition module 305 is used to decompose instruction tasks into at least one ordered task step according to logical dependencies, and the task step includes step operation type. The filtering module 306 is used to filter the target tool corresponding to each task step from the preset tool list, and generate a tool call request based on the target tool corresponding to each task step. The execution module 307 is used to execute instruction tasks in the NAS device according to the tool invocation request.

[0084] It is evident that implementation Figure 5 The described network-attached storage device (NAS) can receive user-input commands, eliminating the need for users to memorize complex commands or navigate multi-layered menus. Users can simply express their needs in natural language, lowering the barrier to entry for advanced NAS functions and improving the efficiency of user control and interaction. It acquires a pre-defined tool list, performs semantic parsing on user commands based on this list, extracts the command intent, maps the intent to a task, and determines the logical dependencies of the task based on the command object and constraints. Then, it decomposes the task into at least one ordered execution step, improving the accuracy of command intent recognition. To reduce execution deviations caused by ambiguous intent, tasks are broken down into ordered steps, reducing execution failures due to chaotic task step execution, improving the accuracy and reliability of task execution, and thus enhancing the accuracy of NAS control. A preset tool list is used to select the target tool for each task step, and a tool call request is generated based on the target tool for each task step. The command task is then executed on the NAS device according to the tool call request. Large models deployed locally on the NAS do not rely on cloud processing, reducing the risk of user operation commands or task leakage, improving data security and reliability, and enabling end-to-end automation from user commands to task execution, thus improving the efficiency of NAS control.

[0085] In an optional embodiment, such as Figure 6As shown, each task step also includes a step object identifier and step constraints; The filtering module 306 filters the target tool corresponding to each task step from the preset tool list, and generates a tool call request based on the target tool corresponding to each task step in the following specific ways: For each task step, match the step operation type corresponding to the current task step with the tool function description of each tool in the tool list, and filter out at least one tool corresponding to the current task step. For each task step, determine the execution efficiency priority of each tool based on its operational scope and parameter requirements, and then determine the target tool for the current task step based on the execution efficiency priority of each tool. Based on the step object identifier, step constraints, and target tool corresponding to each task step, a tool invocation request is generated.

[0086] It is evident that implementation Figure 6The described network-attached storage device (NAS) can receive user-input commands, eliminating the need for users to memorize complex commands or navigate multi-layered menus. Users can simply express their needs in natural language, lowering the barrier to entry for advanced NAS functions and improving the efficiency of user control and interaction. It acquires a pre-defined tool list, performs semantic parsing on user commands, extracts the command intent, and maps the intent to a task based on the context. The device then determines the logical dependencies of the task based on the command object and constraints, decomposing the task into at least one ordered execution step. This improves the accuracy of command intent recognition, reduces execution deviations caused by ambiguous intent, and reduces execution failures due to chaotic task execution, thus improving the accuracy and reliability of task execution and ultimately enhancing NAS control accuracy. Finally, it matches the operation type of the current task step with each tool in the tool list. The system matches tool function descriptions to select at least one tool corresponding to the current task step. Based on the operational scope and parameter requirements of each tool for the current task step, it determines the execution efficiency priority of each tool and identifies the target tool for the current task step. Using the step object identifier, step constraints, and target tool for each task step, it generates a tool invocation request. This improves the accuracy of tool invocation, reduces execution delays or resource waste caused by tool invocation errors, and thus enhances the task execution efficiency of the NAS device. It also improves the accuracy and completeness of the generated tool invocation request, thereby increasing the success rate of tool invocation. Based on the tool invocation request, the system executes the command task on the NAS device. Large-scale models deployed locally on the NAS do not rely on cloud processing, reducing the risk of user operation command or task leakage, improving data security and reliability, and enabling end-to-end automation from user commands to task execution, thereby improving the control efficiency of the NAS.

[0087] In another alternative embodiment, such as Figure 6 As shown, the specific methods by which the execution module 307 executes instruction tasks in the NAS device according to the tool invocation request include: The received tool call request is parsed to determine the object identifier of the functional object corresponding to the instruction task in the NAS device; Filter the resource adapters that match the object identifier from the preset adapter list. The resource adapters are pre-configured with parameter conversion rules. The resource adapter converts tool call requests into function object call instructions corresponding to the function objects according to parameter conversion rules; The function object invocation command is sent to the function object in the NAS device, and the function object is controlled to execute the command task according to the function object invocation command.

[0088] It is evident that implementation Figure 6 The described network-attached storage device can convert common tool call requests into unique instructions that can be recognized by each functional object through a preset resource adapter, without the need to develop call logic separately for different applications. This enables unified scheduling of multiple applications / services within the NAS, improving the efficiency and accuracy of NAS device control.

[0089] In yet another alternative embodiment, such as Figure 6 As shown, the network-attached storage device may further include: The determination module 308 is used to determine the matching degree between the instruction task and the instruction intent based on the execution result of the task step and the remaining unexecuted task steps after the execution of the instruction task in the NAS device according to the execution request of the execution module 307, and to determine whether the matching degree is lower than the preset matching degree threshold. The update module 309 is used to update the context information based on the execution result when the matching degree is lower than the matching degree threshold, and to receive supplementary information from user input instructions; The update module 309 is also used to update the tool call request based on the updated context information and instruction supplementary information.

[0090] It is evident that implementation Figure 6 The described network-attached storage device, after completing a task step, determines the matching degree between the instruction task and the instruction intent based on the execution result of that task step and the remaining unexecuted task steps, and judges whether the matching degree is lower than a preset matching degree threshold. When the matching degree is lower than the matching degree threshold, it updates the context information based on the execution result and receives supplementary instruction information input by the user. It updates the tool call request based on the updated context information and supplementary instruction information, improving the fit between task execution and user intent. Moreover, it can dynamically adapt to changes in user needs during task execution, improving user flexibility. By updating the context in real time and adjusting the tool call request, it ensures that even if there are execution deviations or changes in needs, the core user intent can still be completed through dynamic adjustments, avoiding task termination due to deviations in the prior art and improving the overall completion rate of instruction tasks.

[0091] In yet another alternative embodiment, such as Figure 6 As shown, the network-attached storage device may further include: The detection module 310 is used to detect whether there is a conflict between the command task and the NAS device. The command conflict includes at least one of the following: logical conflict, state conflict and resource conflict. The first generation module 311 is used to generate conflict prompt information corresponding to the command conflict when there is a command conflict between the command task and the NAS device, and to provide the conflict prompt information to the user. The first judgment module 312 is used to determine whether the instruction conflict violates the rigid constraint rules of the NAS device after receiving the confirmation instruction for continuing to execute the instruction task input by the user. When the instruction conflict does not violate the rigid constraint rules, the decomposition module 305 is triggered to execute the step of decomposing the instruction task into at least one ordered task step and generating risk avoidance parameters for each task step.

[0092] It is evident that implementation Figure 6 The described network-attached storage device can detect command conflicts between the command task and the NAS device. When a command conflict occurs, it generates a conflict warning message and sends it to the user. Upon receiving a confirmation message from the user to continue executing the command task, it determines whether the command conflict violates the rigid constraint rules of the NAS device. If the command conflict does not violate the rigid constraint rules, it executes a step to decompose the command task into at least one ordered execution step and generates risk avoidance parameters for each task step. This allows for the early avoidance of conflict risks before task execution. Through the dual protection of user confirmation and rigid constraints, the system's operational stability and reliability are guaranteed.

[0093] In yet another alternative embodiment, such as Figure 6 As shown, the network-attached storage device may further include: The identification module 313 is used to identify whether there is a target sensitive operation in the tool call request based on a preset sensitive operation feature library. The sensitive operation feature library includes the operation keywords and risk level of each sensitive operation. The second generation module 314 is used to generate a verification request based on the risk level corresponding to the target sensitive operation when there is a target sensitive operation in the tool call request, and to provide the verification request to the user. The second judgment module 315 is used to determine whether the verification information matches the risk level when it receives the verification information input by the user. When the verification information matches the risk level, it triggers the execution module 307 to execute the operation of executing the instruction task in the NAS device according to the tool call request.

[0094] It is evident that implementation Figure 6The described network-attached storage device can identify whether a target sensitive operation exists in a tool call request based on a preset sensitive operation feature library. When a target sensitive operation is found in the tool call request, a verification request is generated according to the risk level corresponding to the target sensitive operation, and the verification request is sent back to the user. When the user inputs verification information, it is determined whether the verification information matches the risk level. When the verification information matches the risk level, the operation of executing the command task in the NAS device according to the tool call request is executed. This can achieve precise protection of sensitive operations, match the verification strength according to the risk level, improve the security of risky operations while avoiding the impact of excessive verification on efficiency, balance security and user experience, effectively prevent malicious or accidental operations, protect the core data and system configuration security in the NAS device, and reduce the risk of data leakage or system damage.

[0095] In yet another alternative embodiment, such as Figure 6 As shown, the network-attached storage device may further include: The acquisition module 316 is used to acquire the execution status information of the currently executed task steps during the execution of the instruction task in the NAS device by the execution module 307 according to the tool call request. The execution status information includes the step progress percentage, resource usage data, intermediate execution results and abnormal prompt information. Feedback module 317 is used to provide the user with execution status information through a preset feedback format, which includes at least one of text prompts, progress bars, and intermediate result previews. The third generation module 318 is used to generate an operation audit report based on the execution status information of each task step when the instruction task is completed or a task termination instruction triggered by the user is received, and to store the operation audit report in the NAS device. The operation audit report is used to realize task traceability and / or data recovery.

[0096] It is evident that implementation Figure 6The described network-attached storage device can collect the execution status information of the current task step during the execution of instructions based on tool invocation requests and provide feedback to the user in multiple forms. When the task is completed or a termination instruction is received, an operation audit report is generated and stored on the NAS device for task traceability and / or data recovery. It enables transparent management and control of the entire instruction task execution process, allowing users to keep track of execution progress, resource usage, and anomalies in real time, avoiding blind waiting or execution failures without prompts, and effectively improving the intuitiveness and controllability of the interaction. At the same time, it provides complete evidence for operation traceability, significantly reducing the cost of troubleshooting. With the snapshot function, it supports accurate recovery after erroneous operations, further ensuring the security of core data and system configuration, and reducing the risk of data loss or system failure. Moreover, it is compatible with multiple types of NAS control task scenarios, enhancing security and maintainability while taking into account system versatility, and balancing user experience and functional practicality.

[0097] Example 4 Please see Figure 7 , Figure 7 This is a schematic diagram of another network-attached storage device disclosed in an embodiment of the present invention. Figure 7 As shown, the network-attached storage device may include: Memory 401 storing executable program code; Processor 402 coupled to memory 401; The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the method for controlling NAS devices based on a large model as described in Embodiment 1 or Embodiment 2 of the present invention.

[0098] Example 5 This invention discloses a computer storage medium storing computer instructions. When these computer instructions are invoked, they are used to execute some or all of the steps in any of the methods for controlling NAS devices based on a large model disclosed in Embodiment 1 of this invention.

[0099] Example 7 This invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the method for controlling a NAS device based on a large model as described in Embodiment 1 or Embodiment 2.

[0100] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0101] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0102] Finally, it should be noted that the method for controlling NAS devices based on a large model and the network attached storage device disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for controlling NAS devices based on a large model, characterized in that, The method includes: Receive user input instruction information, the instruction information including user instruction information and context information corresponding to the user instruction information; Obtain a preset tool list, which includes at least one tool and tool information for each tool, including a tool function description, operating range, and parameter requirements; The user instruction information is semantically parsed according to the tool list to extract the instruction intent information of the user instruction information, which includes the instruction intent, instruction object and constraints. The instruction intent is mapped to an instruction task by combining the context information corresponding to the user instruction information, and the logical dependency relationship of the instruction task is determined according to the instruction object and the constraint conditions. Based on the logical dependencies, the instruction task is decomposed into at least one ordered task step, and the task step includes a step operation type. Filter the target tool corresponding to each task step from the preset tool list, and generate a tool call request based on the target tool corresponding to each task step; Execute the instruction task in the NAS device according to the tool invocation request; In addition, each of the task steps also includes a step object identifier and step constraints; The step of filtering the target tool corresponding to each task step from the preset tool list, and generating a tool invocation request based on the target tool corresponding to each task step, includes: For each task step, the step operation type corresponding to the current task step is matched with the tool function description of each tool in the tool list, and at least one tool corresponding to the current task step is selected. For each task step, the execution efficiency priority of each tool is determined based on the operation range and parameter requirements of each tool corresponding to the current task step, and the target tool corresponding to the current task step is determined based on the execution efficiency priority of each tool. A tool invocation request is generated based on the step object identifier, the step constraints, and the target tool corresponding to each task step.

2. The method for controlling NAS devices based on a large model according to claim 1, characterized in that, The step of executing the instruction task in the NAS device according to the tool invocation request includes: The received tool call request is parsed to determine the object identifier of the functional object corresponding to the instruction task in the NAS device. Filter the resource adapters that match the object identifier from the preset adapter list. The resource adapters are pre-configured with parameter conversion rules. The resource adapter converts the tool call request into a function object call instruction corresponding to the function object according to the parameter conversion rule; The function object invocation instruction is sent to the function object in the NAS device, and the function object is controlled to execute the instruction task according to the function object invocation instruction.

3. The method for controlling NAS devices based on a large model according to claim 1, characterized in that, The method further includes: During the execution of the instruction task in the NAS device according to the tool call request, after a task step is completed, the matching degree between the instruction task and the instruction intent is determined based on the execution result of the task step and the remaining unexecuted task steps, and it is determined whether the matching degree is lower than a preset matching degree threshold. When the matching degree is lower than the matching degree threshold, the context information is updated according to the execution result, and supplementary information is received from the user's input. The tool invocation request is updated based on the updated context information and the supplementary instruction information.

4. The method for controlling NAS devices based on a large model according to claim 1, characterized in that, The method further includes: Detect whether there is a command conflict between the command task and the NAS device, and the command conflict includes at least one of logical conflict, state conflict and resource conflict; When the instruction task conflicts with the NAS device, a conflict prompt message corresponding to the instruction conflict is generated and the conflict prompt message is fed back to the user. Upon receiving the user's confirmation instruction to continue executing the instruction task, it is determined whether the instruction conflict violates the rigid constraint rules of the NAS device. If the instruction conflict does not violate the rigid constraint rules, the step of decomposing the instruction task into at least one ordered task step is executed, and risk avoidance parameters for each task step are generated.

5. The method for controlling NAS devices based on a large model according to claim 1, characterized in that, The method further includes: Based on a preset sensitive operation feature library, identify whether there is a target sensitive operation in the tool call request. The sensitive operation feature library includes operation keywords and risk levels for each sensitive operation. When the tool call request contains the target sensitive operation, a verification request is generated according to the risk level corresponding to the target sensitive operation, and the verification request is fed back to the user. When the user input verification information is received, it is determined whether the verification information matches the risk level. If the verification information matches the risk level, the operation of executing the instruction task in the NAS device according to the tool call request is performed.

6. The method for controlling NAS devices based on a large model according to claim 1, characterized in that, The method further includes: During the execution of the instruction task in the NAS device according to the tool call request, the execution status information of the currently executed task step is collected. The execution status information includes the step progress percentage, resource usage data, intermediate execution results, and abnormal prompt information. The execution status information is fed back to the user in a preset feedback format, which includes at least one of text prompts, progress bars, and intermediate result previews. When the task is completed or a user-triggered task termination instruction is received, an operation audit report is generated based on the execution status information of each task step, and the operation audit report is stored in the NAS device. The operation audit report is used to realize task traceability and / or data recovery.

7. A network-attached storage device, characterized in that, The network-attached storage device includes: A receiving module is used to receive instruction information input by the user, the instruction information including user instruction information and context information corresponding to the user instruction information; The acquisition module is used to acquire a preset tool list, which includes at least one tool and tool information for each tool, including a tool function description, operating range, and parameter requirements. The extraction module is used to perform semantic parsing on the user instruction information according to the tool list, and extract the instruction intent information of the user instruction information, the instruction intent information including instruction intent, instruction object and constraint conditions; The mapping module is used to map the instruction intent into an instruction task by combining the context information corresponding to the user instruction information, and to determine the logical dependency relationship of the instruction task according to the instruction object and the constraint conditions. A decomposition module is used to decompose the instruction task into at least one ordered task step according to the logical dependency relationship, wherein the task step includes a step operation type. The filtering module is used to filter the target tool corresponding to each task step from the preset tool list, and generate a tool call request based on the target tool corresponding to each task step; The execution module is used to execute the instruction task in the NAS device according to the tool invocation request; In addition, each of the task steps also includes a step object identifier and step constraints; The filtering module filters the target tool corresponding to each task step from a preset tool list, and generates a tool invocation request based on the target tool corresponding to each task step. Specifically, this includes: For each task step, the step operation type corresponding to the current task step is matched with the tool function description of each tool in the tool list, and at least one tool corresponding to the current task step is selected. For each task step, the execution efficiency priority of each tool is determined based on the operation range and parameter requirements of each tool corresponding to the current task step, and the target tool corresponding to the current task step is determined based on the execution efficiency priority of each tool. A tool invocation request is generated based on the step object identifier, the step constraints, and the target tool corresponding to each task step.

8. A network-attached storage device, characterized in that, The network-attached storage device includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the method for controlling the NAS device based on a large model as described in any one of claims 1-6.

9. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked, are used to execute the method for controlling NAS devices based on a large model as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Dynamic tool selection and optimization system and method for large model external tool calling

    CN119166318A

  • Computer console instruction generation and execution method, system, equipment and medium

    CN119962517A