A large model calling method and device, electronic equipment and storage medium
By performing risk detection and risk mitigation on the instructions and results during the large model invocation process, the security issues in the model invocation process are resolved, and safe and reliable model invocation and sensitive information management are achieved.
Patent Information
- Application Number
- CN202610831638.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-10
- Publication Date
- 2026-08-25
AI Technical Summary
In existing technical solutions, model invocation carries risks, especially when attacks bypass the input phase, making it difficult to guarantee system security.
By performing risk detection on the first instruction and the first result, and then performing risk removal processing on the generated first result to ensure the security of the input, and by performing sensitive information identification and desensitization processing on the result, the final second result is generated.
It improves the security of the large model calling process, ensures the reliability of inputs and the security of outputs, and provides dynamic risk assessment and management of sensitive information.
Smart Images

Figure CN122633284A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, electronic device, and storage medium for calling large models. Background Technology
[0002] Model Context Protocol (MCP) is an emerging protocol used to standardize connections and communication between AI applications such as Large Language Models (LLMs) and external tools and data sources (collectively referred to as MCP servers). However, existing technologies often perform risk detection in isolation, that is, they only determine whether the input is an attack type, but when an attack bypasses the input stage, it is difficult to guarantee the security of the system. Summary of the Invention
[0003] This invention provides a method, apparatus, electronic device, and storage medium for calling large models, in order to solve the problem of calling risks in traditional model calling.
[0004] According to one aspect of the present invention, a method for invoking a large model is provided, the method comprising: The first instruction is determined and a risk detection is performed on it. The first instruction is used to invoke the large model. If the first instruction passes the risk detection, then the first result is generated based on the first instruction; The first result is subjected to risk detection, and based on the risk detection results, the first result is de-risked to generate the second result.
[0005] According to another aspect of the present invention, a large model recall device is provided, the device comprising: The first instruction detection module is used to determine the first instruction and perform risk detection on the first instruction. The first instruction is used to call the large model. The first result generation module is used to generate a first result based on the first instruction if the first instruction passes the risk detection. The second result generation module is used to perform risk detection on the first result, and based on the risk detection results, to perform risk removal processing on the first result and generate the second result.
[0006] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory that is communicatively connected to at least one processor; wherein, The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to execute the large model invocation method of any embodiment of the present invention.
[0007] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the large model invocation method of any embodiment of the present invention.
[0008] The technical solution of this invention improves the security of large model invocation by determining a first instruction and performing risk detection on the first instruction, which is used to call a large model; if the first instruction passes the risk detection, a first result is generated based on the first instruction; the first result is subjected to risk detection, and based on the risk detection result, the first result is de-risked to generate a second result, thereby achieving secure invocation of large models.
[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0010] 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.
[0011] Figure 1 This is a flowchart of a large model invocation method provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of another large model invocation method provided in Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of a large model calling device according to Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements the large model calling method of the present invention. Detailed Implementation
[0012] 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 should fall within the scope of protection of the present invention.
[0013] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0014] Example 1 Figure 1 The flowchart below illustrates a method for calling a large model, as provided in Embodiment 1 of the present invention. This embodiment is applicable to situations requiring secure model invocation. The method can be executed by a large model invocation device, which can be implemented in hardware and / or software and can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes: S110. Determine the first instruction and perform risk detection on the first instruction. The first instruction is used to call the large model.
[0015] The first instruction can be issued by the first object to control the MCP server to generate the content desired by the first object. The first instruction can be used to generate images, text, videos, etc. The MCP server is used to perform operations such as database queries and API calls based on the instructions issued by the object.
[0016] The first object submits a first instruction based on natural language expression through the front-end interface and transmits it via the HTTPS protocol. After the first instruction is issued, a risk detection is performed on the first instruction to determine whether the issued first instruction is risky.
[0017] Optionally, a first instruction is determined, and a risk detection is performed on the first instruction, including: The first information is determined and sent to the process orchestrator; the first information includes the first instruction and the session context corresponding to the first instruction. The process orchestrator sends the initial information to the session manager's risk detection engine for risk detection.
[0018] The first user submits a natural language-based initial instruction through the front-end interface. The front-end automatically appends the user's identity information and security token, which are then transmitted to the workflow orchestrator via HTTPS. Compared to the standard MCP that directly processes raw input, this method establishes a secure channel and authentication foundation at the entry point.
[0019] Upon receiving a request, the workflow orchestrator generates a unique session ID (session_id) and binds it to the session context, providing a traceable basis for subsequent end-to-end security audits. The workflow orchestrator sends the object input plaintext and session context to the risk detection engine of the Session Manager (SM). A security detection step is inserted before LLM processing to curb malicious commands at the source. The Session Manager (SM) performs risk detection. The detection results are written to the audit system in real time, including structured data such as risk type, confidence level, and remedial recommendations. This establishes a complete security forensics chain, meeting compliance requirements.
[0020] Existing solutions perform security checks on each tool call in isolation, failing to conduct dynamic risk assessments based on the complete historical context of the entire user session. By sending the original text and session context to the Session Manager (SM)'s risk detection engine through the workflow orchestrator, dynamic risk assessment is achieved.
[0021] Optionally, the session manager risk detection engine includes the following risk detection features: Based on regular expressions and feature library detection, determine whether the first piece of information belongs to the preset attack mode; Based on the bidirectional pre-trained model of the Transformer encoder, the instruction semantic risk of the first information is determined. Based on the historical information of the first object corresponding to the first information, the degree of abnormal behavior is determined.
[0022] Regular expressions use specific character rules and formulas to batch match and search for fixed formats, sensitive keywords, and illegal sentence structures in text. A feature library can be a collection of databases storing sensitive keywords, illegal sentence structures, malicious instruction formats, and risky text features. The Transformer Encoder bidirectional pre-trained model (BERT model) is a pre-trained language model that uses the Transformer Encoder as its network structure and simultaneously incorporates bidirectional contextual information during the pre-training phase to learn deep semantic features of the text, achieving accurate semantic understanding.
[0023] When performing risk detection on the first instruction, known attack patterns can be detected based on regular expressions and feature libraries; a lightweight BERT model can be used to understand the semantic risks of the instruction; and the degree of abnormal behavior can be determined based on the historical information of the first object corresponding to the first information.
[0024] S120. If the first instruction passes the risk detection, then the first result is generated based on the first instruction.
[0025] After the first instruction passes the risk detection, it can be determined that the first instruction is a sufficiently safe instruction, and the first result can be directly generated using the first instruction.
[0026] Optionally, a first result is generated based on the first instruction, including: The first instruction is sent to a pre-trained large language model for semantic understanding and to generate a tool call request. The process orchestrator forwards the tool call request and the session context of the first instruction to the model context protocol client; The process orchestrator receives call feedback from the model context protocol client; the call feedback includes object information, tool type, and parameter content; The process orchestrator forwards the call feedback to the strategy engine, which then generates a call decision; the call decision includes at least the binary authorization result and the specific call decision. The target MCP server is determined based on the call decision, and the first result is generated.
[0027] The first instruction after passing risk detection is sent to the LLM for intent understanding. This ensures that the LLM receives safe and reliable input, improving inference quality. The LLM parses the user intent and generates a call response, including object information, tool type, and parameter content.
[0028] The process orchestrator sends the call feedback generated by the LLM to the MCP client. The MCP client forwards the call feedback to the Access Manager (AM). The Access Manager (AM) generates a call decision through its own policy engine. The call decision includes at least a binary authorization result (allow or deny) and a specific call decision.
[0029] When authorization fails, the Access Manager (AM) logs detailed audit information, the MCP client returns structured error messages to the workflow orchestrator, and the LLM generates user-friendly prompts. This ensures both security and a good user experience. After successful authorization, the AM forwards the request to the target MCP server via an mTLS authentication channel, ensuring the confidentiality and integrity of inter-service communication. The target MCP server executes the specific tool logic (such as database queries and API calls). The execution results are returned via the AM's secure channel.
[0030] Optionally, the strategy engine generates invocation decisions, including: Invocation decisions are generated based on role-based access control and attribute-based access control.
[0031] Role-based access control (RBAC) assigns system permissions to roles instead of directly to users; users indirectly obtain access to corresponding system resources through their assigned roles. Attribute-based access control (ABAC) dynamically determines whether a user is allowed to access system resources based on a comprehensive assessment of multiple factors, including user attributes, resource attributes, and environment attributes.
[0032] When the strategy engine generates call decisions, it does so based on role-based access control and attribute-based access control.
[0033] S130. Perform risk detection on the first result, and based on the risk detection results, perform risk removal processing on the first result to generate the second result.
[0034] After generating the first result, the first result can be re-tested, and based on the risk detection results, the first result can be de-risked to generate the second result, which can then be fed back to the object that issued the first instruction.
[0035] Optionally, both SM and AM can be packaged and deployed with the MCP host (such as an AI application platform) in the same process or on the same physical / virtual machine. This improves performance, allows components to communicate locally (such as inter-process communication and memory sharing), reduces latency, and enables simple deployment without the need to manage additional network endpoints and service discovery.
[0036] Optionally, SM can be deployed on the same node as each MCP host instance in Sidecar mode. It shares a lifecycle and communicates via a local network (such as localhost) for high-speed communication.
[0037] AM is deployed as a separate, centralized service in the core area of the internal network, and clients of all MCP host instances remotely connect to this service.
[0038] Achieving a balance between performance and control, SM localization ensures low latency on critical paths, while AM centralization enables unified policy management and security auditing; independent scaling allows SM to be scaled independently based on session concurrency (simply by horizontally scaling the MCP host cluster), or AM clusters to be scaled independently based on tool call pressure.
[0039] Optionally, both SM and AM can be deployed as independent, horizontally scalable microservice clusters. The MCP host dynamically locates SM and AM instances through a service discovery mechanism.
[0040] This results in a significant enhancement in scalability and elasticity, allowing each component to scale up or down independently and precisely according to the load; high availability, eliminating single points of failure through clustering; and technological heterogeneity, where SM and AM can adopt the technology stack best suited to their respective tasks.
[0041] By adopting the technical solution of this application, a first instruction is determined and risk detection is performed on the first instruction, which is used to call a large model; if the first instruction passes the risk detection, a first result is generated based on the first instruction; the first result is subjected to risk detection, and based on the risk detection result, the first result is de-risked to generate a second result, thereby improving the security method of calling a large model and realizing the secure calling of a large model.
[0042] Example 2 Figure 2 This invention provides a flowchart of another large model invocation method. This embodiment further optimizes the risk detection process for the first result in the aforementioned embodiments, based on the above embodiments. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the large model invocation method in this embodiment may include the following steps: S210. Determine the first instruction and perform risk detection on the first instruction. The first instruction is used to call the large model.
[0043] S220. If the first instruction passes the risk detection, then the first result is generated based on the first instruction.
[0044] S230. Identify the sensitive information type of the first result and determine the sensitive information type and sensitivity level corresponding to the first result.
[0045] The first result returned by the workflow orchestrator is sent to the SM for output risk detection. The SM performs in-depth content analysis to compensate for the security deficiencies in the output of the standard MCP fully trusted tool. Sensitive information types include, but are not limited to, the following: PII identification: Detects personal information such as name and mobile phone number; Business sensitive data identification: Detects business sensitive information according to customized strategies; Consistency verification: Verifies the matching degree between the first result and the function of the model that generated the first result.
[0046] S240. Based on the risk detection results, perform risk removal processing on the first result to generate the second result.
[0047] Optionally, the first result may be subjected to risk mitigation processing, including: If the sensitivity level is high, the first result will not be sent to the first object corresponding to the first execution. If the sensitivity level is medium, then the first result should be desensitized. If the sensitivity level is low, then the first result is directly used as the second result.
[0048] The output detection results and corresponding handling actions are recorded in the audit system, further improving the security audit chain. The SM returns detection results and security recommendations to the orchestrator. This provides security guidance for response generation, selecting processing strategies based on the output detection results to ensure the final output is secure and controllable. If the sensitivity level is high, the first result is not sent to the first object corresponding to the first execution; if the sensitivity level is medium, the first result is anonymized; if the sensitivity level is low, the first result is directly used as the second result.
[0049] By adopting the technical solution of this application, if the first instruction passes the risk detection, a first result is generated based on the first instruction; the sensitive information type of the first result is identified to determine the sensitive information type and sensitivity level corresponding to the first result; based on the risk detection result, the first result is de-risked to generate a second result, which can realize risk prediction of the first result, determine whether there is sensitive information, and de-sensitize it, thereby realizing intelligent calling of the model.
[0050] Example 3 Figure 3 This invention provides a structural block diagram of a large model retrieval device, applicable to situations requiring secure model retrieval. This large model retrieval device can be implemented in hardware and / or software and can be configured in an electronic device with data processing capabilities. Figure 3 As shown, the large model calling device in this embodiment may include: a first instruction detection module 310, a first result generation module 320, and a second result generation module 330. Wherein: The first instruction detection module 310 is used to determine the first instruction and perform risk detection on the first instruction, which is used to call the large model; The first result generation module 320 is used to generate a first result based on the first instruction if the first instruction passes the risk detection. The second result generation module 330 is used to perform risk detection on the first result, and based on the risk detection result, to perform risk removal processing on the first result and generate the second result.
[0051] Based on the above embodiments, optionally, a first instruction is determined, and risk detection is performed on the first instruction, including: The first information is determined and sent to the process orchestrator; the first information includes the first instruction and the session context corresponding to the first instruction. The process orchestrator sends the initial information to the session manager's risk detection engine for risk detection.
[0052] Based on the above embodiments, optionally, the risk detection of the session manager risk detection engine includes: Based on regular expressions and feature library detection, determine whether the first piece of information belongs to the preset attack mode; Based on the bidirectional pre-trained model of the Transformer encoder, the instruction semantic risk of the first information is determined. Based on the historical information of the first object corresponding to the first information, the degree of abnormal behavior is determined.
[0053] Based on the above embodiments, optionally, generating a first result based on a first instruction includes: The first instruction is sent to a pre-trained large language model for semantic understanding and to generate a tool call request. The process orchestrator forwards the tool call request and the session context of the first instruction to the model context protocol client; The process orchestrator receives call feedback from the model context protocol client; the call feedback includes object information, tool type, and parameter content; The process orchestrator forwards the call feedback to the strategy engine, which then generates a call decision; the call decision includes at least the binary authorization result and the specific call decision. The target MCP server is determined based on the call decision, and the first result is generated.
[0054] Based on the above embodiments, optionally, the strategy engine generates invocation decisions, including: Invocation decisions are generated based on role-based access control and attribute-based access control.
[0055] Based on the above embodiments, optionally, risk detection is performed on the first result, including: The first result is used to identify the sensitive information type and the degree of sensitivity of the first result.
[0056] Based on the above embodiments, optionally, the first result can be subjected to risk removal processing, including: If the sensitivity level is high, the first result will not be sent to the first object corresponding to the first execution. If the sensitivity level is medium, then the first result should be desensitized. If the sensitivity level is low, then the first result is directly used as the second result.
[0057] The large model calling device provided in the embodiments of the present invention can execute the large model calling method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0058] Example 4 Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0059] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0060] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0061] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as large model invocation methods.
[0062] In some embodiments, the large model invocation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the large model invocation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the large model invocation method by any other suitable means (e.g., by means of firmware).
[0063] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0064] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0065] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0066] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0067] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0068] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0069] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0070] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for calling a large model, characterized in that, include: The first instruction is determined and a risk detection is performed on the first instruction, which is used to invoke the large model; If the first instruction passes the risk detection, then a first result is generated based on the first instruction; The first result is subjected to risk detection, and based on the risk detection results, the first result is de-risked to generate the second result.
2. The method according to claim 1, characterized in that, Determine the first instruction and perform risk detection on the first instruction, including: First information is determined and sent to the process orchestrator; the first information includes the first instruction and the session context corresponding to the first instruction. The process orchestrator sends the first information to the session manager's risk detection engine for risk detection.
3. The method according to claim 2, characterized in that, The session manager risk detection engine detects risks, including: Based on regular expressions and feature library detection, determine whether the first information belongs to a preset attack mode; Based on the bidirectional pre-trained model of the Transformer encoder, the instruction semantic risk of the first information is determined. Based on the historical information of the first object corresponding to the first information, the degree of abnormal behavior is determined.
4. The method according to claim 1, characterized in that, Generate a first result based on the first instruction, including: The first instruction is sent to a pre-trained large language model for semantic understanding and to generate a tool call request. The process orchestrator forwards the tool invocation request and the session context of the first instruction to the model context protocol client; The process orchestrator receives call feedback from the model context protocol client; the call feedback includes object information, tool type, and parameter content; The process orchestrator forwards the call feedback to the strategy engine, which generates a call decision; the call decision includes at least a binary authorization result and a specific call decision. The target MCP server is determined based on the call decision, and the first result is generated.
5. The method according to claim 4, characterized in that, The strategy engine generates invocation decisions, including: Invocation decisions are generated based on role-based access control and attribute-based access control.
6. The method according to claim 1, characterized in that, Risk detection is performed on the first result, including: The first result is subjected to sensitive information type identification to determine the sensitive information type and sensitivity level corresponding to the first result.
7. The method according to claim 6, characterized in that, The first result is subjected to risk removal processing, including: If the sensitivity level is high, then the first result will not be sent to the first object corresponding to the first execution. If the sensitivity level is medium, then the first result is desensitized. If the sensitivity level is low, then the first result is directly used as the second result.
8. A large model calling device, characterized in that, include: The first instruction detection module is used to determine the first instruction and perform risk detection on the first instruction, which is used to call the large model; The first result generation module is used to generate a first result based on the first instruction if the first instruction passes the risk detection. The second result generation module is used to perform risk detection on the first result, and based on the risk detection results, to perform risk removal processing on the first result and generate the second result.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the large model invocation method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the large model invocation method of any one of claims 1-7.