Method and system for protecting safety of cue words of large model
By disassembling the big model prompt word template into a configurable template, dynamically synthesize and encrypt it, and combining watermark technology, the problem of prompt word leakage is solved, information security and protection capabilities are improved, and industry knowledge attributes are protected.
Patent Information
- Application Number
- CN202411877376.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-01-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the cooperation model between service providers and customers, existing security measures are difficult to effectively prevent the leakage of big model prompt words, resulting in the easy copying of industry knowledge attributes and capabilities and losing competitive advantages.
By disassembling the prompt word template into a configurable template, dynamically synthesize and add watermarks, and encrypting it, ensuring that only authorized users can access and understand the prompt word information, combining watermark technology and encryption algorithms to prevent leakage.
It effectively prevents the leakage of prompt words, improves information security and protection capabilities, protects industry knowledge attributes from illegal acquisition or abuse, and allows customers to adjust the content of prompt words to meet customized needs.
Smart Images

Figure CN119323059A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing technology security, and in particular to a method and system for protecting the security of large model prompt words. Background Art
[0002] With the rapid development of artificial intelligence technology, large pre-trained language models (LPLMs) have become the core technology for realizing various intelligent applications. However, in practical applications, especially in application scenarios involving specific industry knowledge, in order to give the model industry-specific knowledge attribute capabilities, it is usually necessary to call and guide the output of the model by designing sophisticated prompts. These prompts are a series of carefully constructed text instructions that can guide the model to complete specific tasks.
[0003] In the cooperation model between service providers and clients, service providers need to use the large model provided by clients to realize industry applications. In this model, a major problem faced by service providers is how to protect the prompt words from being completely leaked while meeting the client's needs for adjusting the prompt words. This is because if the prompt words are fully known to Party A or any third party with access to the model log, the industry knowledge attribute capabilities built by Party B may be easily copied, thereby losing competitive advantage.
[0004] Currently, the industry is in urgent need of an innovative solution that can display the key content of the prompt words to meet the adjustment needs of Party A while ensuring that the prompt words are not fully learned, thereby avoiding potential leakage risks. Although existing security measures such as access control and data encryption can ensure data security to a certain extent, they are often difficult to effectively prevent the leakage of prompt words in practical applications, especially in scenarios where prompt words need to be input into large models. Therefore, it is particularly important to develop a new solution that can both meet usage needs and ensure data security. Summary of the invention
[0005] In order to solve the problem in the prior art that the prompt words of the large model are directly transmitted from the client to the server without encryption, which increases the risk of information leakage and thus weakens the information security and confidentiality of the prompt words, a method and system for protecting the security of the prompt words of the large model are proposed, which effectively prevent the leakage of the prompt words, improve the security of information, and enhance the ability to protect against potential threats, thereby more effectively protecting the constructed industry knowledge attributes from being illegally obtained or abused.
[0006] A method for protecting the security of a large model prompt word, comprising: S1: Basic prompt word protection: The staff sets a prompt word template composed of different functional modules according to the business scenario type; the prompt word template is disassembled into a configurable prompt word template; the configurable prompt word template includes a specific part and a hidden part; S2: Synthesize dynamic prompt words and add watermarks: The user selects the business scenario type through the client interface; inputs a specific part of the prompt word according to the guide word of the business scenario type; dynamically synthesizes the specific part of the prompt word with the hidden part of the configurable prompt word template in S1 and adds watermark information corresponding to the current business scenario type to form a dynamic prompt word; S3: prompt word encryption: encrypt the dynamic prompt word in S2 to obtain the encrypted dynamic prompt word; S4: prompt word decryption: the dynamic prompt word encrypted in S3 is sent to the server through a secure link; the server uses a preset decryption key to decrypt the encrypted dynamic prompt word to obtain the decrypted dynamic prompt word; S5: Construct the server-side prompt word: Concatenate the watermark verification instruction set by the server staff and the dynamic prompt word decrypted by S4 in the order of the watermark verification instruction first, to form the server-side prompt word; S6: large model output result: input the prompt word of the server version of S5 into the large model for processing, and obtain the large model output result corresponding to the prompt word of the server version; the large model includes: Tongyi Qianwen, LLaMA, MOSS, ChatGPT transparent large pre-trained language model; S7: Result feedback: The large model output result corresponding to the prompt word of the S6 server version is returned to the client interface for display.
[0007] Preferably, the method of disassembling the prompt word template into the configurable prompt word template in step S1 is: leaving blank the prompt word part that allows customers to modify arbitrarily; the blank is used as a specific part of the configurable prompt word template; and the part that customers are not allowed to modify is used as a hidden part of the configurable prompt word template.
[0008] Preferably, the specific steps of synthesizing the dynamic prompt words in step S2 are: A1: Match the configurable prompt word template according to the selected business scenario type; A2: The user enters a specific part of the prompt word according to the guide word of the business scenario type; A3: Fill the specific part of the prompt word into the specific part of the configurable prompt word template of A1, and merge it with the hidden part of the configurable prompt word template of A1 to obtain a complete prompt word.
[0009] Preferably, the adding of watermark is to add specified watermark information to the dynamically synthesized complete prompt word, and different business scenario types correspond to different watermark information; the watermark information can only be seen on the server side, and the types of watermark information include: string type; the encryption operation includes: code obfuscation and DES encryption technology.
[0010] Preferably, the large model in step S6 is called through a Python script, and the specific method is: B1: Select the type of large model to be called and the API interface of the model; install the third-party library required by the model according to the type of large model; B2: Write code to call the API interface, and send the server-side prompt words as the input of the big model to the big model through the API interface; B3: Get the output result returned by the large model from the API interface and end the call to the API interface.
[0011] Preferably, the Python script also includes synthesis logic for dynamic prompt word synthesis, encryption and decryption logic for prompt word encryption and prompt word decryption, and a hidden key; the encryption and decryption logic is implemented through a dynamic link library; the client calls the encryption of the dynamic link library to implement the encryption operation on the prompt word, and the server calls the decryption of the dynamic link library to implement the decryption operation on the prompt word; the hidden key is a specific string or bit sequence used to encrypt and decrypt the prompt word.
[0012] Preferably, the specific operation of processing the server-side prompt word input large model in step S6 is: C1: The large model extracts the decrypted watermark information of the dynamic prompt word according to the watermark verification instruction, and determines whether the decrypted watermark information contains the watermark information added by the client, that is, whether it is the watermark information corresponding to the current business scenario type; C2: If the judgment result of C1 is that the watermark verification matches, the large model further processes the decrypted prompt word content in the server-side prompt word and outputs the corresponding result; otherwise, the large model directly outputs the result that the watermark verification does not match.
[0013] A system for protecting the security of large model prompt words, comprising: Database: The database contains the hidden part of configurable prompt word templates for different business scenario types; The client terminal includes: a user interface for a user to input or select a specific part of a prompt word; a synthesis encryption module for synthesizing the specific part of the prompt word with a hidden part of a configurable prompt word template in a database to obtain a dynamic prompt word and performing encryption operation; a sending module for sending the synthesized and encrypted dynamic prompt word to a server terminal; and a display module for displaying the output result of the large model of the server terminal; Server: a decryption module that decrypts the received client request input to obtain the decrypted request; a prompt word construction module that adds a watermark verification instruction to the decrypted request to form a server-side prompt word; a big model module that inputs the server-side prompt word into the big model to obtain the big model output result corresponding to the server-side prompt word, and a return module that returns the big model module output result to the client user interface.
[0014] Preferably, the synthesis encryption module includes: a synthesis submodule for synthesizing a specific part of an input prompt word and a configurable prompt word template in a database by using a Python script; a watermark adding submodule for adding watermark information corresponding to the current business scenario type to the synthesized prompt word output by the synthesis submodule; and an encryption submodule for encrypting the synthesized prompt word after the watermark is added output by the watermark adding submodule.
[0015] Preferably, the prompt word building module includes: The watermark verification instruction setting submodule includes: an information extraction instruction setting unit for instructing the large model to extract the decrypted watermark information of the dynamic prompt word after decryption; a watermark judgment instruction setting unit for instructing the large model to determine whether the decrypted watermark information contains the watermark information added by the client, that is, whether it is the watermark information corresponding to the current business scenario type; a continuing instruction setting unit for instructing the large model to process the decrypted prompt word content in the server-side prompt word if the watermark verification result matches; and an ending instruction setting unit for instructing the large model to directly output the watermark result if the watermark verification result does not match. Prompt word merging submodule: splice the instructions output by the information extraction instruction setting unit, watermark verification instruction setting unit, continuation instruction setting unit and end instruction setting unit in the watermark verification prompt word setting submodule and the decrypted request output by the decryption module to obtain the prompt word merging submodule of the server version prompt word.
[0016] Beneficial effects: The present invention proposes a method and system for protecting the security of large model prompt words. By adding watermarks and encryption operations to prompt words, the leakage of prompt words can be effectively prevented, the security of information is improved, and the protection against potential threats is enhanced, thereby more effectively protecting the constructed industry knowledge attributes from being illegally obtained or abused. The present invention realizes the standardization and modular design of prompt words by setting a prompt word template composed of different functional modules, each module having specific input and output specifications; by disassembling the prompt word template into a configurable prompt word template structure, and then through dynamic synthesis technology, it allows Party A to adjust part of the content of the prompt word while keeping the core prompt word structure unchanged, so as to adapt to different application scenarios and Party A's needs.
[0017] The present invention combines watermark technology and encryption algorithm with prompt words, which can effectively prevent the leakage of prompt words. Watermark technology can embed iconic information without changing the original content of the prompt words. These iconic information can be used to track and verify the ownership and integrity of the content; while encryption technology ensures that only authorized users can access and understand the information in the prompt words by performing complex conversions on the prompt words that need to be transmitted. The combination of these two technologies applied to prompt words not only improves the security of information, but also enhances the protection against potential threats, thereby more effectively protecting important prompt words from being illegally obtained or abused. At the same time, the present invention constructs a configurable prompt word template, which can not only prevent key parts from being leaked, but also allow customers to adjust part of the content of the prompt words, while meeting customized needs and improving security performance.
[0018] By using a transparent large-scale pre-trained language model, the most appropriate model architecture can be selected according to the needs of specific professional fields, thus avoiding the problems or mismatch risks that may arise from the use of fixed models. This flexibility reduces repeated development and waste of resources due to inappropriate models, ensuring the stable operation of the system. By being able to adjust the underlying model at will, the associated risks are further reduced and the adaptability and efficiency of the system are improved. Therefore, this method is easy to implement and has a wide range of application potentials. It can effectively serve multiple professional fields, including but not limited to financial consumer protection review, legal consultation, medical advice, and financial analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A flow chart of a method for protecting the security of large model prompt words.
[0020] Figure 2 An architecture diagram of a system for protecting large model prompt word security.
[0021] Figure 3 Schematic diagram of the client input interface. DETAILED DESCRIPTION
[0022] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0023] like Figure 1 As shown, the specific steps of a method for protecting the security of large model prompt words are: S1: Basic prompt word protection: The staff sets a prompt word template composed of different functional modules according to the business scenario type; the prompt word template is disassembled into a configurable prompt word template; the configurable prompt word template includes a specific part and a hidden part; Specifically, the disassembly is to leave blank the part of the prompt word that the customer is allowed to modify at will; the blank is used as a specific part of the configurable prompt word template; the part that the customer is not allowed to modify is used as a hidden part of the configurable prompt word template; S2: Dynamic prompt word synthesis: The user selects the business scenario type through the client interface; inputs a specific part of the prompt word according to the guide word of the business scenario type; dynamically synthesizes the input specific part with the hidden part of the configurable prompt word template in S1 and adds watermark information to form a dynamic prompt word; Specifically, the dynamic prompt word synthesis is to fill the specific part of the input keyword into the blank space of the configurable prompt word template according to the guide word of the business scenario type to form a complete prompt word; the watermark addition is to add the specified watermark information to the dynamically synthesized complete prompt word, and different business scenario types correspond to different watermark information; the watermark information can only be seen on the server side, and the type of the watermark information includes: string type; S3: prompt word encryption: encrypt the dynamic prompt word in S2 to obtain the encrypted prompt word; Specifically, the encryption operation includes: code obfuscation and DES encryption technology; S4: prompt word decryption: the prompt word encrypted in S3 is sent to the server through a secure link; the server uses a preset decryption key to decrypt the encrypted prompt word to obtain a decrypted dynamic prompt word; S5: Construct the server-side prompt word: Concatenate the watermark verification instruction set by the server staff and the dynamic prompt word decrypted by S4 in the order of the watermark verification instruction first, to form the server-side prompt word; S6: large model output result: input the prompt word of the server version of S5 into the large model for processing, and obtain the large model output result corresponding to the prompt word of the server version; the large model includes: Tongyi Qianwen, LLaMA, MOSS, ChatGPT and other transparent large pre-trained language models; Specifically, the large model is called through a Python script; the Python script also includes synthesis logic for dynamic prompt word synthesis, encryption and decryption logic for prompt word encryption and prompt word decryption, and a hidden key; the encryption and decryption logic is implemented through a dynamic link library; the client calls the encryption of the dynamic link library to implement the encryption operation of the prompt word, and the server calls the decryption of the dynamic link library to implement the decryption operation of the prompt word; the hidden key is a specific string or bit sequence used to encrypt and decrypt the prompt word; S7: Result feedback: Return the output result of S6 to the client interface for display.
[0024] like Figure 2 As shown, a system for protecting the security of large model prompt words includes: Database: The database contains the hidden part of configurable prompt word templates for different business scenario types; The client terminal includes: a user interface for a user to input or select a specific part of a prompt word; a synthesis encryption module for synthesizing the specific part of the prompt word with a hidden part of a configurable prompt word template in a database to obtain a complete prompt word and performing encryption operation; a sending module for sending the synthesized encrypted prompt word to a server terminal; and a display module for displaying the output result of the large model of the server terminal; Server: a decryption module that decrypts the received client request input to obtain the decrypted request; a prompt word construction module that adds a watermark verification instruction to the decrypted request to form a server-side prompt word; a big model module that inputs the server-side prompt word into the big model to obtain the big model output result corresponding to the server-side prompt word, and a return module that returns the big model module output result to the client user interface.
[0025] Specifically, the synthesis encryption module includes: a synthesis submodule that uses a Python script to synthesize a specific part of an input prompt word and a configurable prompt word template in a database; a watermark adding submodule that adds watermark information corresponding to the current business scenario type to the synthesized prompt word output by the synthesis submodule; and an encryption submodule that performs an encryption operation on the synthesized prompt word after the watermark is added output by the watermark adding submodule.
[0026] Specifically, the prompt word construction module includes: The watermark verification instruction setting submodule includes: an information extraction instruction setting unit for instructing the large model to extract the decrypted watermark information of the dynamic prompt word after decryption; a watermark judgment instruction setting unit for instructing the large model to determine whether the decrypted watermark information contains the watermark information added by the client, that is, whether it is the watermark information corresponding to the current business scenario type; a continuing instruction setting unit for instructing the large model to process the decrypted prompt word content in the server-side prompt word if the watermark verification result matches; and an ending instruction setting unit for instructing the large model to directly output the watermark result if the watermark verification result does not match. Prompt word merging submodule: splice the instructions output by the information extraction instruction setting unit, watermark verification instruction setting unit, continuation instruction setting unit and end instruction setting unit in the watermark verification prompt word setting submodule and the decrypted request output by the decryption module to obtain the prompt word merging submodule of the server version prompt word.
[0027] The specific implementation process is: Implementation step 1: Basic prompt word protection 1. Template definition: define different prompt word templates for industry applications. For example, the prompt word template can be divided into role-playing, thinking tree steps, legal basis, recommended opinions and formatted output. Specifically, the prompt word module can be divided into the following parts: Role-playing part: setting up roles and scenes for dialogue or text generation.
[0028] Thinking tree step part: steps that guide the model to make logical judgments or reasoning.
[0029] Legal Basis Section: Provides laws, regulations, standards, etc. within a specific industry or field.
[0030] Recommendations section: Generates suggestions or solutions to specific problems.
[0031] Formatting output part: Ensure that the output results meet specific format requirements.
[0032] Among them, the role-playing part, the thinking tree step part and the formatted output part can be hidden as fixed templates, while the other parts can be adjusted according to the needs of Party A.
[0033] 2. Configurable disassembly: Disassemble the prompt words into independent, configurable modules according to the template.
[0034] 3. Add watermark: Add a predefined text watermark at the beginning of the prompt word, and verify whether the watermark exists through the large model.
[0035] Implementation step 2: Dynamic prompt word synthesis 1. Modular input: such as Figure 3As shown, Party A is allowed to select the business scenario type through the interface and select or enter a specific part of the prompt word, such as legal basis or recommendation.
[0036] Specifically, Party A enters a specific part of the prompt word in the following format, where {} represents the content filled in by Party A: --Watermark information: xxbank --Read the following product description information: [The program analyzes the content to be reviewed and fills in here] --Product type determination: Determine the product type based on the following product type description. If the content is empty, proceed to the next step.
[0037] {Critical Illness Insurance}: {The product introduction section includes insurance products such as critical illness insurance and critical illness insurance}.
[0038] --Determine whether the product information is compliant according to the definition of the following review points.
[0039] Name of review points: {Illegal promise of guaranteed returns}.
[0040] Review key points positioning logic: focus on analyzing information containing {dividends, income content}.
[0041] Review definition: {Fixed dividends must not be promised in the product description}.
[0042] 2. Dynamic synthesis: Dynamically synthesize complete prompt words based on Party A’s input.
[0043] Specifically, dynamic synthesis needs to first match the corresponding prompt word template according to the business scenario type selected by Party A, synthesize the corresponding prompt word template with Party A's input to obtain the synthesized prompt word, and then splice the watermark information; The content of the dynamic synthesis complete prompt word is in the form of: Complete prompt word = watermark information + synthetic prompt word 3. Encryption processing: Before sending the request, the synthesized prompt word is encrypted; specifically, code obfuscation and DES encryption technology can be used to ensure that the specific merging logic cannot be easily identified and cracked.
[0044] Implementation Step 3: Client Script Execution 1. Script provision: Develop a client-side Python script to handle the synthesis and encryption of prompt words.
[0045] 2. Obfuscation and encryption: Implement code obfuscation and encryption logic in the script to hide the key and synthesis logic.
[0046] Specifically, the encryption and decryption are implemented by calling the dynamic link library, and part of the code for the client to send a request to the server is shown in Table 1.
[0047] Table 1 Part of the code of the client sending a request to the server
[0048] 3. Request sending: The client script sends the encrypted request to Party B’s server.
[0049] Implementation step 4: Server-side request decryption 1. Secure communication: Party B’s server is configured with security protocols such as SSL / TLS to ensure the security of communication between the client and the server.
[0050] 2. Request decryption: After receiving the request, the server uses the decryption key preset in the Python script to decrypt the request.
[0051] Specifically, the server accepts requests through Python scripts, and the code for calling the function that decrypts the request on the server is as follows: prompt = des_decrypt(prompt, key) The code of the function for decrypting the request on the server is shown in Table 2.
[0052] Table 2 Code of the server-side decryption request function
[0053] 3. Model call: After decryption is successful, the request is passed to the large model for processing and the result is returned.
[0054] Specifically, the request passed to the large model is composed of the decrypted prompt word and the watermark verification instruction. The content of the request can be: Request = watermark verification instruction + decrypted prompt word The watermark verification prompt is: "Verification steps: verify whether the decrypted prompt contains xxbank, if it does, execute it, if not, prompt that the parsing failed."
[0055] Specifically, in order to prevent the client or a third party from obtaining the complete prompt word through model logs, network proxies, etc., the client or service provider provides a general model, and uses the Python script provided by the service provider to call the model. The script will encrypt the prompt word and send the request through a secure link. The encryption key in the script is hidden and obfuscated to prevent the prompt word information from being obtained through script reverse engineering.
[0056] It should be noted that the above-described specific implementations can enable those skilled in the art to more fully understand the invention, but do not limit the invention in any way. Therefore, although this specification has described the invention in detail with reference to the drawings and embodiments, those skilled in the art should understand that the invention can still be modified or replaced by equivalents. In short, all technical solutions and improvements that do not deviate from the spirit and scope of the invention should be included in the protection scope of the patent for the invention.
Claims
1. A method for protecting the security of large model prompt words, characterized in that: S1: Basic prompt word protection: The staff sets prompt word templates consisting of different functional modules according to the business scenario type; Decomposing the prompt word template into configurable prompt word templates; The configurable prompt word template includes a specific part and a hidden part; S2: Synthesize dynamic prompt words and add watermarks: The user selects the business scenario type through the client interface; inputs a specific part of the prompt word according to the guide word of the business scenario type; Dynamically synthesizing the specific part of the prompt word with the hidden part of the configurable prompt word template S1 and adding watermark information corresponding to the current business scenario type to form a dynamic prompt word; S3: prompt word encryption: encrypt the dynamic prompt word in S2 to obtain the encrypted dynamic prompt word; S4: prompt word decryption: the dynamic prompt word encrypted in S3 is sent to the server through a secure link; the server uses a preset decryption key to decrypt the encrypted dynamic prompt word to obtain the decrypted dynamic prompt word; S5: Construct the server-side prompt word: Concatenate the watermark verification instruction set by the server staff and the dynamic prompt word decrypted by S4 in the order of the watermark verification instruction first, to form the server-side prompt word; S6: large model output result: input the prompt word of the server version of S5 into the large model for processing, and obtain the large model output result corresponding to the prompt word of the server version; the large model includes: Tongyi Qianwen, LLaMA, MOSS, ChatGPT transparent large pre-trained language model; S7: Result feedback: The large model output result corresponding to the prompt word of the S6 server version is returned to the client interface for display.
2. A method for protecting the security of large model prompt words according to claim 1, characterized in that: The method of disassembling the prompt word template into the configurable prompt word template in step S1 is: leaving blank the prompt word part that allows the customer to modify arbitrarily; the blank is used as the specific part of the configurable prompt word template; The portion that is not allowed to be modified by the customer is regarded as a hidden portion of the configurable prompt word template.
3. A method for protecting the security of large model prompt words according to claim 1 or 2, characterized in that: The specific steps of the dynamic prompt word synthesis described in step S2 are: A1: Match the configurable prompt word template according to the selected business scenario type; A2: The user enters a specific part of the prompt word according to the guide word of the business scenario type; A3: Fill the specific part of the prompt word into the specific part of the configurable prompt word template of A1, and merge it with the hidden part of the configurable prompt word template of A1 to obtain a complete prompt word.
4. A method for protecting the security of large model prompt words according to claim 1, characterized in that: The adding of watermark is to add the specified watermark information to the dynamically synthesized complete prompt word, and different business scenario types correspond to different watermark information; The watermark information can only be seen on the server side. The types of the watermark information include: string type; the encryption operations include: code obfuscation and DES encryption technology.
5. A method for protecting the security of large model prompt words according to claim 1, characterized in that: The large model described in step S6 is called through a Python script, and the specific method is as follows: B1: Select the type of large model to be called and the API interface of the model; install the third-party library required by the model according to the type of large model; B2: Write code to call the API interface, and send the server-side prompt words as the input of the big model to the big model through the API interface; B3: Get the output result returned by the large model from the API interface and end the call to the API interface.
6. A method for protecting the security of large model prompt words according to claim 5, characterized in that: The Python script also includes synthesis logic for dynamic prompt word synthesis, encryption and decryption logic for prompt word encryption and prompt word decryption, and a hidden key; the encryption and decryption logic is implemented through a dynamic link library; the client calls the encryption of the dynamic link library to implement the encryption operation on the prompt word, and the server calls the decryption of the dynamic link library to implement the decryption operation on the prompt word; the hidden key is a specific string or bit sequence used to encrypt and decrypt the prompt word.
7. A method for protecting the security of large model prompt words according to claim 1, characterized in that: The specific operation of the server-side prompt word input large model for processing in step S6 is: C1: The large model extracts the decrypted watermark information of the dynamic prompt word according to the watermark verification instruction, and determines whether the decrypted watermark information contains the watermark information added by the client, that is, whether it is the watermark information corresponding to the current business scenario type; C2: If the judgment result of C1 is that the watermark verification matches, the large model further processes the decrypted prompt word content in the server-side prompt word and outputs the corresponding result; otherwise, the large model directly outputs the result that the watermark verification does not match.
8. A system for protecting the security of large model prompt words formed based on the method described in any one of claims 1 to 7, characterized in that: include: Database: The database contains the hidden part of configurable prompt word templates for different business scenario types; The client terminal includes: a user interface for a user to input or select a specific part of a prompt word; a synthesis encryption module for synthesizing the specific part of the prompt word with a hidden part of a configurable prompt word template in a database to obtain a dynamic prompt word and performing encryption operation; a sending module for sending the synthesized and encrypted dynamic prompt word to a server terminal; and a display module for displaying the output result of the large model of the server terminal; Server: a decryption module that decrypts the received client request input to obtain the decrypted request; a prompt word construction module that adds a watermark verification instruction to the decrypted request to form a server-side prompt word; a big model module that inputs the server-side prompt word into the big model to obtain the big model output result corresponding to the server-side prompt word, and a return module that returns the big model module output result to the client user interface.
9. A system for protecting the security of large model prompt words according to claim 8, characterized in that: The synthesis encryption module includes: a synthesis submodule for synthesizing a specific part of an input prompt word and a configurable prompt word template in a database by using a Python script; a watermark adding submodule for adding watermark information corresponding to the current business scenario type to the synthesized prompt word output by the synthesis submodule; and an encryption submodule for encrypting the synthesized prompt word after the watermark is added output by the watermark adding submodule.
10. A system for protecting the security of large model prompt words according to claim 8, characterized in that: The prompt word building module includes: The watermark verification instruction setting submodule includes: an information extraction instruction setting unit for instructing the large model to extract the decrypted watermark information of the dynamic prompt word after decryption; a watermark judgment instruction setting unit for instructing the large model to determine whether the decrypted watermark information contains the watermark information added by the client, that is, whether it is the watermark information corresponding to the current business scenario type; a continuing instruction setting unit for instructing the large model to process the decrypted prompt word content in the server-side prompt word if the watermark verification result matches; and an ending instruction setting unit for instructing the large model to directly output the watermark result if the watermark verification result does not match. Prompt word merging submodule: splice the instructions output by the information extraction instruction setting unit, watermark verification instruction setting unit, continuation instruction setting unit and end instruction setting unit in the watermark verification prompt word setting submodule and the decrypted request output by the decryption module to obtain the prompt word merging submodule of the server version prompt word.
Citation Information
Patent Citations
Program development assisting method based on AIGC, storage medium and equipment
CN116991990A
ERP (Enterprise Resource Planning) system large model calling method and equipment based on open cue word and medium
CN118503396A
Protection method and system for preventing file tampering based on adaptive security mechanism
CN118551416A
Natural language anonymization method and device using large language model and storage medium
CN118627131A
Large-model-oriented hybrid reasoning method, device, equipment, medium and product
CN118798353A