Large model security access system and method
Through the collaborative work of secure clients, gateways and management platforms, encrypted connections and security policies are used to solve the security issues of large-model service access, and the security and compliance of data transmission and processing are achieved.
Patent Information
- Application Number
- CN202510819654.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-08-15
AI Technical Summary
The access security issues of large-scale service are becoming increasingly prominent, and it is urgent to build a systematic security protection system to deal with potential security risks.
It provides a large-model secure access system, including a security client, a security gateway and a security management platform, transmits data through encrypted WebSocket connections, and performs security detection and processing of requests and responses based on the security management platform's security policies to prevent malicious prompt words, sensitive information leakage and harmful content generation.
Ensure the security of data transmission and processing processes, prevent data leakage, prevent malicious content from spreading, and ensure that content complies with security and compliance requirements.
Smart Images

Figure CN120498848A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a large model security access system and method. Background Art
[0002] In recent years, the rapid development of artificial intelligence (AI) technology has driven the widespread application of large models. Leveraging their powerful semantic understanding, content generation, and reasoning capabilities, these models have gradually penetrated core sectors such as finance, healthcare, education, government affairs, and entertainment, becoming a crucial tool for enterprises' digital transformation and intelligent upgrades. The frequent use of large model services has become a daily routine, raising the issue of access security, necessitating the establishment of a systematic security protection system to address potential security risks. Summary of the Invention
[0003] To overcome the problems existing in the related art, the present application provides a large model security access system and method.
[0004] According to a first aspect of an embodiment of the present application, there is provided a large model security access system, comprising a security client, a security gateway, and a security management platform;
[0005] In response to the dialog operation, the secure client initiates a dialog request for the target large model service to the secure gateway via a WebSocket connection;
[0006] The security gateway performs a security check on the dialog request according to the security policy issued by the security management platform; if the security check passes, the dialog request is forwarded to the API interface of the target large model service;
[0007] The security gateway receives the response content returned by the target large model service, performs security processing on the response content according to the security policy issued by the security management platform, and forwards the security-processed response content to the security client.
[0008] According to a second aspect of an embodiment of the present application, a large model security access method is provided, which is applied to a security gateway, and the method includes:
[0009] Receives conversation requests sent by secure clients via WebSocket connections and performs security checks;
[0010] If the security check passes, the conversation request is forwarded to the API interface of the target large model service requested by the security client;
[0011] Receive the response content returned by the target large model service, perform security processing on the response content, and send the security processed response content to the security client.
[0012] According to a third aspect of an embodiment of the present application, a large model security access method is provided, which is applied to a security client, and the method includes:
[0013] In response to the dialog operation, a dialog request for the target large model service is initiated to the security gateway via a WebSocket connection, so that the security gateway performs a security check on the dialog request according to the security policy issued by the security management platform, and forwards the dialog request to the API interface of the target large model service if the check passes;
[0014] Receive the security-processed response content sent by the security gateway, where the security-processed response content is obtained by the security gateway performing security processing on the response content returned by the target large model service according to the security policy issued by the security management platform.
[0015] According to a fourth aspect of the embodiments of the present application, there is provided an electronic device, including:
[0016] A memory, one or more processors; the memory is coupled to the processor; wherein computer program code is stored in the memory, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method as described above.
[0017] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:
[0018] In this embodiment of the present application, data is transmitted between the client and gateway via an encrypted WebSocket connection, ensuring the security of data transmission and processing and preventing data leakage risks. Regarding communication content, the security gateway performs security checks and processing on requests and responses based on security policies issued by the security management platform, preventing malicious prompts, sensitive information leakage, and the generation of harmful content, ensuring that the content meets security and compliance requirements.
[0019] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0021] Figure 1 A schematic diagram of the composition of a large model access control system provided in an embodiment of the present application;
[0022] Figure 2 A schematic diagram of the architecture of a large-scale access control system provided in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of the access process of the large model access control system provided in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of the initialization phase of the large-scale access control system provided by an embodiment of the present application;
[0025] Figure 5 A schematic diagram of the client login phase of the large model access control system provided in an embodiment of the present application;
[0026] Figure 6 A schematic diagram of the access phase of the large-scale access control system provided by an embodiment of the present application;
[0027] Figure 7 A flowchart of a large model access control method applied to a security gateway provided in an embodiment of the present application;
[0028] Figure 8 A flowchart of a large model access control method applied to a security client provided in an embodiment of the present application;
[0029] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The technical solutions in the embodiments of the present application are described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application.
[0031] Next, the embodiments of the present application are described in detail.
[0032] The embodiment of the present application provides a large model access control system, such as Figure 1 As shown, the system may include: a security client 110 , a security gateway 120 and a security management platform 130 .
[0033] Among them, the security client serves as the interaction entrance between the user and the large model service. The security client communicates with the security gateway through a WebSocket connection. This connection method supports real-time, two-way data transmission and can encrypt data to ensure the confidentiality and integrity of the data during transmission.
[0034] As an intermediary layer, the security gateway performs security checks and processing on all incoming and outgoing requests and responses. Based on security policies issued by the security management platform, it filters, audits, and encrypts conversation requests and responses to prevent the spread of malicious content and data leaks.
[0035] The security management platform is used to centrally manage security policies. It can flexibly configure security rules according to different users, scenarios and needs to ensure the consistency of security policies across the entire system.
[0036] The three components are introduced in detail below.
[0037] The security client 110 in the embodiment of the present application refers to a software component deployed on a user terminal.
[0038] Specifically, the secure client provides a large model access interface that displays a list of authorized large models, allowing users to select specific large models for interactive operations based on their needs. Specifically, the secure client uses security mechanisms such as identity authentication and access control to ensure that users can only access the large model services they are authorized to use.
[0039] Optionally, according to the system type of the user terminal, the embodiment of the present application provides security clients of different system types (Windows, Linux, Android, IOS), such as Figure 2 shown.
[0040] Optionally, the security client of the embodiment of the present application can also monitor whether the user has any behavior of accessing the shadow big model. The so-called shadow big model refers to those similar big model service instances that are not authorized, not deployed through formal channels, or may have security risks. Specifically, the security client of the embodiment of the present application is based on a preset abnormal behavior detection mechanism, combined with technical means such as network traffic analysis, API call auditing, and user behavior pattern recognition, to comprehensively monitor the user's behavior in the process of accessing the big model service. Once it is found that the user has signs of interacting with the shadow big model, the security client will trigger an alarm and take corresponding security measures to ensure that the client's access to the big model service is always safe and controllable.
[0041] The security gateway 120 in this embodiment is a security device deployed at the network boundary or at a key network node. On one hand, the security gateway can act as a proxy for multiple big model services, forwarding verified conversation requests to a designated big model service based on the big model type or big model identifier requested by the security client. On the other hand, the security gateway can enforce security policies issued by the security management platform and detect interactions between security clients and big model services, including important functions such as data leakage detection and sensitive content inspection.
[0042] like Figure 2As shown in the figure, secure clients (such as mobile terminals and PCs) connect to the security gateway via WebSocket, while the security gateway communicates with the API interfaces of multiple large model services via HTTP / HTTPS protocols. As an intermediary layer, the security gateway is responsible for processing requests from secure clients, including authentication, request forwarding, and response processing, while also interacting with multiple large model services.
[0043] Optionally, the security gateway can generate security events when it detects security risks and report them to the security management platform, such as Figure 3 shown.
[0044] As a specific implementation, the security gateway may include the following modules:
[0045] Big model proxy module: used to forward the verified access request to the specified big model service API interface according to the big model type or big model identifier requested by the security client;
[0046] Data encryption and desensitization module: encrypts the storage and transmission of sensitive data to ensure the security of data during storage and transmission and prevent data leakage; desensitizes sensitive information and intercepts the upload of sensitive information.
[0047] The security management platform 130 of the embodiment of the present application is the core of ensuring the secure access of user terminals to the large model service, and works in conjunction with the security gateway and security client to ensure that the entire access process complies with the security policy. Figure 2 As shown, the security management platform can issue security policies to the security gateway, and users of security terminals can authenticate large model users on the security management platform. User authentication is one of the core functions of the security management platform. By verifying user identities, it ensures that only authorized users can access large model services, preventing unauthorized access and potential security threats.
[0048] Specifically, the security management platform includes the following modules:
[0049] User Management Module: Provides user management functionality, allowing administrators to add, delete, modify, and query large model users, such as registering new users, deleting users, modifying user information, and querying user information. Optionally, it supports user group management, allowing large model users to be grouped by department, role, or other logical relationships for easier batch management.
[0050] The user authentication module is used to verify the user's identity when the security client logs in, and when the verification is successful, it returns the IP address of the security gateway, the current user's authorized large model list, and the token of each large model service in the list to the security client.
[0051] Security policy configuration module: supports the formulation of security policies from multiple aspects such as user authentication, access control, data encryption, and behavior auditing, and deploys them to each managed security gateway to ensure that every link is safe and controllable when the user terminal accesses the large model service.
[0052] Security event viewing module: supports viewing security events reported by the security gateway.
[0053] Furthermore, the security management platform also includes the following modules:
[0054] Gateway management module: supports horizontal expansion, unified management of multiple security gateways, and flexible access to gateway nodes in different locations and sizes.
[0055] The authorization management module allows big model users to be bound to specific big model services, supporting the assignment of permissions to different users for different big model services. For example, different roles, such as administrator, general user, and auditor, can be defined based on organizational structure and responsibilities. Each role is assigned corresponding access rights, including access level and operation type for big model services. By binding user identities to roles, big model users can only access the resources and functions permitted by their roles.
[0056] It is worth mentioning that the Large Language Model (LLM) service mentioned in the embodiment of this application refers to an artificial intelligence service based on a large-scale pre-trained model, such as chatGPT, Gemini, Grok, KIMI, DeepSeek, etc. Figure 2 As shown, the large model service of the embodiment of the present application is deployed in the public cloud in the form of SaaS (Software as a Service), and provides services to the outside world through an API interface that complies with the OpenAPI specification.
[0057] It can be seen from the above technical solutions that the large model access control system of the embodiment of the present application has at least the following advantages:
[0058] Secure connection from client to gateway: The secure client communicates with the secure gateway through a WebSocket connection. WebSocket supports TLS / SSL encryption to ensure that data is encrypted during transmission between the client and the gateway, preventing data from being stolen or tampered with during transmission.
[0059] Secure forwarding from the gateway to the model service: The security gateway performs security checks on received requests before forwarding them to the target large model service API. The gateway can also encrypt and sign the API calls to prevent man-in-the-middle attacks.
[0060] Security processing of response content: The security gateway performs secondary security processing on the received response content, such as content filtering, desensitization, encryption, etc., to ensure that the content returned to the client complies with security policies.
[0061] The following describes the interaction process between the security client, security gateway, and security management platform. Specifically, the interaction process is divided into three stages: initialization stage, client login stage, and large model access stage.
[0062] It is worth mentioning that Figure 2 、 Figure 3 and the following Figure 4 、 Figure 5 and Figure 6 In this document, LLMSec Client refers to the security client, LLMSec Gateway refers to the security gateway, and LLMSec Manager refers to the security management platform.
[0063] The first stage, initialization stage
[0064] Initialization phase such as Figure 4 As shown:
[0065] Log in to the security management platform and add relevant information of the security gateway, including IP address, authentication user, connection password, etc.
[0066] The security management platform then calls the security gateway interface and sets the IP address of the security management platform on the security gateway. The security gateway subsequently uses this IP address to communicate with the security management platform.
[0067] The security management platform obtains information about the big model service, including the API IP address and token, providing the security management platform with a list of available big model services. The security management platform verifies the availability of the big model service. If so, it sends the authentication information to the security gateway, which then establishes communication with the big model service.
[0068] Create a large model user on the security management platform for client login and bind the large model user's authorized large model list.
[0069] Furthermore, the security management platform notifies the large model user to download the security client from the security management platform and install and log in.
[0070] The second stage, client login stage
[0071] Client login stage Figure 5 As shown:
[0072] Large model users download the security client from the security management platform and install it on the host machine.
[0073] Use the user information of the pre-created large model user to log in to the security client. The security management platform verifies the user's identity. After the verification is passed, the security client is notified of the security gateway IP address, connection password, and authorized large model list that can be connected.
[0074] The third stage, large model access stage
[0075] Large model access stage such as Figure 6 As shown:
[0076] The security client displays a list of authorized big models. The big model user selects the target big model service to access on the security client. The security client initiates a WebSocket connection request, which carries the token and identification information of the target big model service issued by the security management platform.
[0077] After receiving the WebSocket connection request from the security client, the security gateway extracts the token of the target large model service and verifies the validity of the token on the security management platform. If the verification is successful, it initiates a request to the target large model based on the identification information of the target large model service. If the verification fails, an error message is displayed.
[0078] The security gateway parses the conversation request sent by the security client based on the WebSocket connection, and performs security analysis and filtering. If the conversation request does not comply with the rules, it will prompt the security client that the request is unqualified and report the security incident to the security management platform. If it complies with the rules, the conversation request will be forwarded to the target large model service.
[0079] The large model service generates response content, the security gateway parses the response content, performs security analysis and filtering, and passes the filtered response content to the security client.
[0080] The following summarizes the login process and access process:
[0081] In response to the login operation, the security client collaborates with the security management platform to authenticate the current user. After the authentication is successful, the security client receives the IP address of the security gateway, the current user's authorized large model list, and the tokens of each large model service in the authorized large model list from the security management platform. The security client displays the authorized large model list through the large model access interface and generates a WebSocket connection request in response to the service selection operation. The WebSocket connection request carries the identification information of the target large model service requested by the current user and the token of the target large model service. The WebSocket connection request is sent to the security gateway based on the IP address of the security gateway.
[0082] The security gateway receives the WebSocket connection request, extracts the target large model service token from the WebSocket connection request, and sends the target large model service token to the security management platform to verify the validity of the token. If the verification is successful, a communication connection is established with the target large model service based on the identification information of the target large model service in the WebSocket connection request, and a WebSocket connection is established between the security client and the security gateway;
[0083] The secure client initiates a dialog request to the target large model service in response to the dialog operation;
[0084] The security gateway receives and parses the conversation request through a Websocket connection, and performs data security analysis and filtering on the conversation request based on the security policy issued by the security management platform. If the content is compliant, the conversation request is forwarded to the target large model service. If the content is not compliant, a prompt is returned to the security client, a security incident is generated, and it is reported to the security management platform.
[0085] The security gateway receives the response content returned by the target large model service, parses the response content, and performs data security analysis and filtering on the response content according to the security policy issued by the security management platform. If the content is compliant, it forwards the response content to the security client. Specifically, the above response content can be streaming response content.
[0086] During the interaction between the secure client and the target large model service, the security gateway is used to ensure data protection and privacy compliance. Firstly, data encryption technology is used to encrypt the storage and transmission of sensitive data within the large model, preventing data theft or tampering during transmission. Secondly, privacy-enhancing technologies such as anonymization and differential privacy are used to maximize user privacy protection and eliminate the risk of data leakage through the large model.
[0087] It can be seen from the above technical solutions that the large model access control system of the embodiment of the present application has at least the following advantages:
[0088] (1) Provide a unified large model access interface through a secure client, displaying all the user's authorized large model services;
[0089] (2) Control the use of different big models by different users, limiting access to the API interface of the corresponding big model service to only authorized big model users;
[0090] (3) Ensure the legal and compliant use of large models by implementing security policies, encrypting interactive content, and desensitizing sensitive data to eliminate the risk of data leakage through large models;
[0091] (4) Supports the management of multiple gateways and supports horizontal expansion.
[0092] Based on the same inventive concept, this application also provides a large model security access method, which is applied to a security gateway, such as Figure 7 As shown, the method includes:
[0093] Step 710: Receive a dialog request sent by the security client via the WebSocket connection and perform security checks;
[0094] Step 720: If the security check passes, the conversation request is forwarded to the API interface of the target large model service requested by the security client;
[0095] Step 730: Receive the response content returned by the target large model service, perform security processing on the response content, and send the security-processed response content to the security client.
[0096] As a specific implementation, the method further includes:
[0097] Receive a WebSocket connection request sent by a security client, wherein the WebSocket connection request includes identification information of a target large model service and a token of the target large model service issued by a security management platform;
[0098] The Token of the target large model service is forwarded to the security management platform to verify the validity of the Token. If the verification is successful, a communication connection with the target large model service is established based on the identification information of the target large model service, and a WebSocket connection is established with the security client.
[0099] Based on the same inventive concept, this application also provides a large model security access method, which is applied to a secure client, such as Figure 8 As shown, the method includes:
[0100] Step 810: In response to the dialog operation, a dialog request for the target large model service is initiated to the security gateway via a WebSocket connection, so that the security gateway performs a security check on the dialog request according to the security policy issued by the security management platform, and forwards the dialog request to the API interface of the target large model service if the check passes.
[0101] Step 820: Receive the security-processed response content sent by the security gateway. The security-processed response content is obtained by the security gateway performing security processing on the response content returned by the target large model service according to the security policy issued by the security management platform.
[0102] An embodiment of the present application provides an electronic device that may include a memory and one or more processors. The memory is configured to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device may perform the functions or steps of the above-described method embodiments.
[0103] The structure of the electronic device can refer to Figure 9 The structure of the electronic device 100 is shown.
[0104] Exemplarily, the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0105] An embodiment of the present application further provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes each function or step of the above method embodiment.
[0106] The computer-readable storage medium includes but is not limited to any one of the following: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0107] The embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps of the above method embodiment.
[0108] The electronic device, computer-readable storage medium, and computer program product provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0109] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes or replacements. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A large model security access system, characterized in that: Including security client, security gateway and security management platform; In response to the dialog operation, the secure client initiates a dialog request for the target large model service to the secure gateway via a WebSocket connection; The security gateway performs security testing on the session request according to the security policy issued by the security management platform; If the security check passes, the conversation request is forwarded to the API interface of the target large model service; The security gateway receives the response content returned by the target large model service, performs security processing on the response content according to the security policy issued by the security management platform, and forwards the security-processed response content to the security client.
2. The system according to claim 1, wherein: The security client generates a WebSocket connection request in response to the service selection operation and sends it to the security gateway. The WebSocket connection request carries the identification information of the target large model service selected by the current user and the token of the target large model service; The security gateway sends the Token of the target large model service to the security management platform to verify the validity of the Token. If the verification is successful, it creates a communication connection with the target large model service based on the identification information of the target large model service, and creates a WebSocket connection with the security client.
3. The system according to claim 2, characterized in that In response to the login operation, the security client collaborates with the security management platform to authenticate the current user. After the authentication is successful, the security client receives from the security management platform the IP address of the security gateway, the current user's authorized large model list, and the tokens of each large model service in the authorized large model list. The security client displays the authorized large model list through the large model access interface, generates a WebSocket connection request in response to the service selection operation, and sends the WebSocket connection request to the security gateway according to the IP address of the security gateway.
4. The system according to claim 1, wherein: The security client is used to identify and block access to shadow models.
5. The system according to claim 1, wherein: When the security gateway fails the security test, it generates a security event and reports it to the security management platform.
6. The system according to claim 1, wherein: The security gateway performs security processing on the response content, and the security processing includes encryption processing and desensitization processing.
7. The system according to claim 1, wherein: The security management platform manages multiple security gateways in response to the management operation.
8. The system according to claim 1, wherein: The security management platform registers the identity of the large model user in response to the registration operation.
9. The system according to claim 1, wherein: In response to the binding operation, the security management platform performs authorization binding on the big model user and the big model service.
10. A large model security access method, characterized in that: Applied to a security gateway, the method includes: Receives conversation requests sent by secure clients via WebSocket connections and performs security checks; If the security check passes, the conversation request is forwarded to the API interface of the target large model service requested by the security client; Receive the response content returned by the target large model service, perform security processing on the response content, and send the security processed response content to the security client.
11. The method according to claim 10, characterized in that The method further comprises: Receive a WebSocket connection request sent by a security client, wherein the WebSocket connection request includes identification information of a target large model service and a token of the target large model service issued by a security management platform; The Token of the target large model service is forwarded to the security management platform to verify the validity of the Token. If the verification is successful, a communication connection with the target large model service is established based on the identification information of the target large model service, and a WebSocket connection is established with the security client.
12. A large model security access method, characterized in that: Applied to a security client, the method includes: In response to the dialog operation, a dialog request for the target large model service is initiated to the security gateway via a WebSocket connection, so that the security gateway performs a security check on the dialog request according to the security policy issued by the security management platform, and forwards the dialog request to the API interface of the target large model service if the check passes; Receive the security-processed response content sent by the security gateway, where the security-processed response content is obtained by the security gateway performing security processing on the response content returned by the target large model service according to the security policy issued by the security management platform.
13. An electronic device, characterized in that: include: A memory, one or more processors; the memory is coupled to the processor; wherein computer program code is stored in the memory, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method according to any one of claims 10 to 12.
Citation Information
Cited By
Model service verification method and model service system
CN120832681A
Tool calling method and device, equipment, medium and program product
CN120915580A
A privatized large-scale model secure access control system and method
CN122419916A