Text processing method and system based on large model, electronic equipment and storage medium
By using ciphertext detection model and defense prompt information processing technology in the large model, the problem of insufficient security in processing sensitive financial information is solved, effective defense against encrypted input text attacks is achieved, and the overall security of the system is improved.
Patent Information
- Application Number
- CN202411760251.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-04
AI Technical Summary
Large models have insufficient security problems when processing sensitive financial information, especially when facing attacks on encrypted input text, the existing technology security protection mechanism is easily bypassed.
By obtaining the account information of the target object, obtaining the original text output from the large model, and using the pre-trained ciphertext detection model for ciphertext detection. Defensive prompt information is sent to the big model side based on the ciphertext detection information, and the original text is modified based on this information on the big model side to generate the target text.
It effectively prevents the leakage of sensitive financial information, improves the reliability and security of large models when processing sensitive financial information, and thus prevents and deals with ciphertext attack threats against large models.
Smart Images

Figure CN119557907A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology and can be applied to the field of financial technology, and in particular to a text processing method and system, electronic device, and storage medium based on a large model. Background Art
[0002] Large models can be used to perform tasks such as text classification, content recommendation, and indicator development trend analysis. For example, in the field of financial technology, large models can be applied to tasks such as classification of financial information, provision of financial consulting services, and prediction of financial indicators. However, these large models will inevitably be exposed to a large amount of sensitive information during training and application, including users' bank account information, personal identity information, transaction data or payment data, which makes large models a potential target for attack. Attackers may use large models to perform illegal information acquisition tasks or leak sensitive information by inputting questions or feedback containing hidden instructions. Although current large models are usually able to cope with plaintext attacks, when attackers use encrypted input text to input instructions, the model's security protection mechanism is still at risk of being bypassed. Therefore, how to improve the reliability and security of large models when processing sensitive financial information, and thus enhance the security of large models, has become an urgent problem to be solved. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to propose a text processing method and system, electronic device, and storage medium based on a big model, aiming to improve the reliability and security of the big model when processing sensitive financial information, thereby enhancing the security of the big model.
[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a text processing method based on a large model, the method comprising:
[0005] Get the target object's account information;
[0006] Obtaining the original text output by the large model end according to the account information;
[0007] Performing ciphertext detection on the original text through a pre-trained ciphertext detection model to obtain ciphertext detection information; wherein the ciphertext detection information includes ciphertext indication information, and the ciphertext indication information indicates that the original text is ciphertext;
[0008] Sending defense prompt information to the large model end according to the ciphertext indication information;
[0009] At the large model end, the original text is modified according to the defense prompt information to obtain a target text.
[0010] In some embodiments, performing ciphertext detection on the original text using a pre-trained ciphertext detection model to obtain ciphertext detection information includes:
[0011] Performing feature extraction on the original text to obtain text features;
[0012] Obtaining the distribution of the text features to obtain text distribution information;
[0013] The ciphertext indication information is generated based on the account information and the text distribution information.
[0014] In some embodiments, after sending the defense prompt information to the large model end according to the ciphertext indication information, the method further includes:
[0015] Constructing a question file according to the defense prompt information, the account information and the original text; wherein each of the question files includes one of the original texts, and each of the question files has a timestamp;
[0016] Calculate the generation frequency of the problem file according to the timestamp and the account information to obtain the problem file frequency;
[0017] Generate abnormal prompt information based on the frequency of the problem file;
[0018] Performing anomaly detection on the problem file according to the anomaly prompt information and the frequency of the problem file to obtain file detection information; wherein the file detection information includes anomaly detection information, and the anomaly detection information indicates that the original text in the problem file is plain text;
[0019] The ciphertext detection model is fine-tuned according to the anomaly detection information and the problem file.
[0020] In some embodiments, before performing ciphertext detection on the original text using a pre-trained ciphertext detection model to obtain ciphertext detection information, the method further includes:
[0021] Construct attack sub-model and identification sub-model based on neural network model;
[0022] Get the target plain text from the preset data set;
[0023] Encrypting the target plaintext text by using the attack sub-model to obtain a target encrypted text;
[0024] The identification sub-model is pre-trained according to the target plaintext text and the target encrypted text to obtain the ciphertext detection model.
[0025] In some embodiments, encrypting the target plaintext text by using the attack sub-model to obtain the target encrypted text includes:
[0026] Encrypting the target plaintext to obtain an intermediate encrypted text;
[0027] Perform encryption weight calculation based on the intermediate encrypted text and at least two preset ciphertext mapping tables to obtain an encryption weight of each of the ciphertext mapping tables;
[0028] Selecting the maximum weight from all the encryption weights;
[0029] Select a target mapping table from the ciphertext mapping tables having the maximum weight;
[0030] The intermediate encrypted text is encrypted according to the target mapping table to obtain the target encrypted text.
[0031] In some embodiments, at the large model end, modifying the original text according to the defense prompt information to obtain the target text includes:
[0032] Acquire the text distribution information according to the defense prompt information;
[0033] Determine the interval where the text distribution information is located to obtain a target distribution interval;
[0034] Obtaining a text modification template of the target distribution interval to obtain a target modification template;
[0035] The original text is modified according to the target modification template to obtain the target text.
[0036] In some embodiments, after modifying the original text according to the defense prompt information to obtain the target text at the large model end, the method further includes:
[0037] Sending an abnormal prompt query request to the ciphertext detection end, where the ciphertext detection end generates abnormal prompt query information according to the abnormal prompt query request;
[0038] In a case where the abnormal prompt query information includes the abnormal prompt information, generating an abnormal prompt text according to the abnormal prompt information;
[0039] The target text is updated according to the abnormal prompt text.
[0040] To achieve the above-mentioned purpose, a second aspect of the embodiment of the present application proposes a text processing system based on a large model, the system comprising:
[0041] Account acquisition module, used to obtain the account information of the target object;
[0042] A text acquisition module, used to acquire the original text output by the large model end according to the account information;
[0043] A ciphertext detection module, configured to perform ciphertext detection on the original text by using a pre-trained ciphertext detection model to obtain ciphertext detection information; wherein the ciphertext detection information includes ciphertext indication information, and the ciphertext indication information indicates that the original text is ciphertext;
[0044] An information feedback module, used for sending defense prompt information to the large model end according to the ciphertext indication information;
[0045] The text modification module is used to modify the original text according to the defense prompt information at the large model end to obtain the target text.
[0046] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0047] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0048] The present application proposes a text processing method and system based on a large model, an electronic device, and a storage medium, which first obtains the account information of the target object, and obtains the original text output by the large model end according to the account information, and then performs ciphertext detection on the original text through a pre-trained ciphertext detection model to obtain ciphertext detection information; wherein the ciphertext detection information includes ciphertext indication information, and the ciphertext indication information characterizes that the original text is ciphertext. Finally, defense prompt information is sent to the large model end according to the ciphertext indication information, and the original text is modified according to the defense prompt information at the large model end to obtain the target text. Therefore, the text processing method based on the large model shown in the embodiment of the present application effectively prevents the leakage of sensitive financial information by performing ciphertext detection on the output text of the large model end and modifying the output text according to the ciphertext detection information, thereby improving the reliability and security of the large model when processing sensitive financial information, thereby preventing and responding to ciphertext attack threats against the large model and protecting the security of the large model. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is an optional flowchart of the text processing method based on the large model provided in the embodiment of the present application;
[0050] Figure 2This is another optional flow chart of the text processing method based on the large model provided in the embodiment of the present application;
[0051] Figure 3 yes Figure 2 Flow chart of step S203 in FIG.
[0052] Figure 4 yes Figure 1 Flow chart of step S103 in FIG.
[0053] Figure 5 yes Figure 1 Flow chart of step S105 in FIG.
[0054] Figure 6 This is another optional flow chart of the text processing method based on the large model provided in the embodiment of the present application;
[0055] Figure 7 This is another optional flow chart of the text processing method based on the large model provided in the embodiment of the present application;
[0056] Figure 8 It is a structural diagram of a text processing system based on a large model provided in an embodiment of the present application;
[0057] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0061] First, some nouns involved in this application are analyzed:
[0062] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0063] Natural language processing (NLP): NLP uses computers to process, understand and apply human languages (such as Chinese, English, etc.). NLP is a branch of artificial intelligence and an interdisciplinary subject between computer science and linguistics. It is often referred to as computational linguistics. Natural language processing includes grammatical analysis, semantic analysis, and text understanding. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining. It involves data mining related to language processing, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computing.
[0064] Information Extraction: A text processing technology that extracts specified types of entity, relationship, event and other factual information from natural language text and forms structured data output. Information extraction is a technology that extracts specific information from text data. Text data is composed of some specific units, such as sentences, paragraphs, and chapters. Text information is composed of some small specific units, such as characters, words, phrases, sentences, paragraphs, or a combination of these specific units. Extracting noun phrases, names, place names, etc. from text data are all text information extraction. Of course, the information extracted by text information extraction technology can be various types of information.
[0065] Large Models: In the field of artificial intelligence, large models refer to deep learning models with a large number of parameters, which usually require a large amount of data and computing resources to train. Large models have a wide range of applications and can be used to process data such as text, images, voice, and video. In natural language processing, large models can understand and generate natural language, providing rich language understanding and generation capabilities to handle tasks including but not limited to text classification, sentiment analysis, question-answering systems, machine translation, and text summarization. For example, in the financial field, large models can be applied to tasks such as classifying financial information, providing financial consulting services, and predicting financial indicators.
[0066] However, large models will inevitably come into contact with a large amount of sensitive information during training and application, including users' bank account information, personal identity information, transaction data or payment data, which makes large models a potential target for attack. Attackers may use large models to perform illegal information acquisition tasks or leak sensitive information by inputting questions or feedback containing hidden instructions. Although current large models are generally able to cope with plaintext attacks, there is still a risk that the model's security protection mechanism will be bypassed when attackers use encrypted input text to input instructions.
[0067] Based on this, the embodiments of the present application provide a text processing method and system, electronic device, and storage medium based on a big model, aiming to improve the reliability and security of the big model when processing sensitive financial information, thereby enhancing the security of the big model.
[0068] The large model-based text processing method and system, electronic device and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the large model-based text processing method in the embodiments of the present application is described.
[0069] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0070] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0071] The text processing method based on a large model provided in the embodiment of the present application relates to the field of artificial intelligence technology. The text processing method based on a large model provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server side, and can also be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements a text processing method based on a large model, etc., but is not limited to the above forms.
[0072] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0073] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0074] Figure 1It is an optional flowchart of the text processing method based on a large model provided in an embodiment of the present application. The large model in the embodiment of the present application can be a BERT (Bidirectional Encoder Representations from Transformers) model, a transformer model, an ELMO (Deep contextualized word representations) model, a GPT model or a GPT-2 model, etc. Figure 1 The method may include but is not limited to steps S101 to S105.
[0075] Step S101, obtaining the target object's account information;
[0076] Step S102, obtaining the original text output by the large model end according to the account information;
[0077] Step S103, performing ciphertext detection on the original text through a pre-trained ciphertext detection model to obtain ciphertext detection information; wherein the ciphertext detection information includes ciphertext indication information, and the ciphertext indication information indicates that the original text is ciphertext;
[0078] Step S104, sending defense prompt information to the large model end according to the ciphertext indication information;
[0079] Step S105, at the large model end, modify the original text according to the defense prompt information to obtain the target text.
[0080] In steps S101 to S105 shown in the embodiment of the present application, the account information of the target object is first obtained, and the original text output by the large model end is obtained according to the account information, and then the original text is ciphered through the pre-trained ciphertext detection model to obtain ciphertext detection information; wherein, the ciphertext detection information includes ciphertext indication information, and the ciphertext indication information characterizes that the original text is ciphertext. Finally, defense prompt information is sent to the large model end according to the ciphertext indication information, and at the large model end, the original text is modified according to the defense prompt information to obtain the target text. Therefore, the text processing method based on the large model shown in the embodiment of the present application effectively prevents the leakage of sensitive financial information by performing ciphertext detection on the original text output by the large model end and modifying the original text according to the ciphertext detection information, thereby improving the reliability and security of the large model when processing sensitive financial information, thereby preventing and responding to ciphertext attack threats against the large model and protecting the security of the large model.
[0081] In step S101 of some embodiments, the target object may be a product analyst, risk manager, etc. Taking the fintech scenario as an example, the target object may be a policyholder, financial advisor, investment banker, asset manager, etc. The account information may include but is not limited to at least one of the following: user name, personal identity information, device information, geographic location information, IP address and device information, access permission information and contact information, etc.
[0082] In step S102 of some embodiments, the original text is generated by the large model end according to the text input by the target object into the large model end. The text input by the target object into the large model end may be a data query request, a text classification request, an operation query request, etc. For example, it may be a loan interest rate query request, an insurance classification request, and a stock trading process query request in a financial technology scenario, which may include financial consulting information queried by the user, financial indicator prediction information, transaction process records, payment operation guidance information, or other information related to financial services, such as: loan interest rate, repayment plan, loan conditions, credit score, insurance terms, premiums, coverage, and claim process. Since the existing large model only sets a sensitive information security protection mechanism for the plain text output by the large model, when the user requires the large model to output in the form of ciphertext, the output text of the large model may contain financial sensitive information. Therefore, it is necessary to obtain the output text corresponding to the account from the large model end as the original text based on the acquired account information, and then perform ciphertext detection on the original text to prevent the large model end from outputting financial sensitive information in the form of ciphertext.
[0083] See also Figure 2 In some embodiments, before step S103, the text processing method based on the large model may include but is not limited to steps S201 to S204:
[0084] Step S201, constructing an attack sub-model and an identification sub-model based on a neural network model;
[0085] Step S202, obtaining a target plain text from a preset data set;
[0086] Step S203, encrypting the target plain text by attacking the sub-model to obtain the target encrypted text;
[0087] Step S204, pre-training the identification sub-model according to the target plaintext and the target encrypted text to obtain a ciphertext detection model.
[0088] In step S201 of some embodiments, the attack sub-model may be composed of a weight generation unit, a mapping table selection unit and a text encryption unit. The weight generation unit is used to assign encryption weights to a preset ciphertext mapping table according to the target plaintext text, the mapping table selection unit selects the target mapping table from the ciphertext mapping table according to the encryption weight, and the text encryption unit is used to encrypt the target plaintext text according to the ciphertext mapping table. The encryption weight can be obtained by training other models before pre-training the identification sub-model, or can be obtained during the pre-training process of the identification sub-model, or can be randomly assigned. The identification sub-model may be composed of a feature extraction unit and a ciphertext mapping unit. The feature extraction unit is used to capture and understand the deep semantic information in the original text and extract text features, and the ciphertext mapping unit is used to obtain text distribution information according to text features. In addition, the weight generation unit and the feature extraction unit can be constructed based on a BERT model, a transformer model, an ELMO model, a GPT model or a GPT-2 model, etc., and the ciphertext mapping unit can be constructed based on a CNN network, a FNN network, a LSTM model or a PLSR model, etc.
[0089] In step S204 of some embodiments, the identification sub-model is pre-trained according to the target plain text and the target encrypted text to obtain the ciphertext detection model. Specifically, firstly, an adversarial loss function is constructed according to the target plain text and the target encrypted text, and then the identification sub-model is pre-trained by the adversarial loss function to obtain the ciphertext detection model. The specific process of constructing the adversarial loss function according to the target plain text and the target encrypted text can be expressed by the following formula:
[0090]
[0091] Where L represents the adversarial loss function, x represents the target plaintext, G(x) represents the target encrypted text obtained by encrypting the target plaintext by the attack sub-model, and D represents the score of the identification sub-model on whether the target plaintext or the target encrypted text belongs to the ciphertext, and the value range of the score is [0,1].
[0092] In steps S201 to S204 shown in the embodiment of the present application, an attack sub-model and an identification sub-model based on a neural network model are first constructed, and then a target plaintext text is obtained from a preset data set, and the target plaintext text is encrypted through the attack sub-model to obtain a target encrypted text. Finally, the identification sub-model is pre-trained according to the target plaintext text and the target encrypted text to obtain a ciphertext detection model, so that the ciphertext is effectively identified through the ciphertext detection model, thereby effectively defending against encryption attacks against large models.
[0093] See also Figure 3In some embodiments, step S203 may include but is not limited to steps S301 to S305:
[0094] Step S301, encrypting the target plain text to obtain an intermediate encrypted text;
[0095] Step S302, performing encryption weight calculation based on the intermediate encrypted text and at least two preset ciphertext mapping tables to obtain the encryption weight of each ciphertext mapping table;
[0096] Step S303, selecting the maximum weight from all encryption weights;
[0097] Step S304, selecting a target mapping table from the ciphertext mapping tables with the largest weight;
[0098] Step S305, encrypt the intermediate encrypted text according to the target mapping table to obtain the target encrypted text.
[0099] In step S301 of some embodiments, the target plaintext text may be encrypted by means of cyclic encryption, wherein the number of cycles is randomly generated. Specifically, in each cycle, the intermediate encrypted text output by the text encryption unit in the previous cycle is first re-input into the weight generation unit, and then the weight generation unit performs encryption weight calculation based on the intermediate encrypted text of the previous cycle and at least two preset ciphertext mapping tables to obtain the encryption weight of each ciphertext mapping table, and the mapping table selection unit selects the target mapping table based on the encryption weight, and finally the text encryption unit encrypts the encrypted text output in the previous cycle based on the target mapping table to obtain the intermediate encrypted text output in the current cycle, until the cycle ends, and the intermediate encrypted text output in the last cycle is used as the target encrypted text. It should be noted that in the first cycle, the target plaintext text is input into the weight generation unit.
[0100] In step S302 of some embodiments, each ciphertext mapping table is used to describe the encryption of the intermediate encrypted text according to an encryption method, and the specific encryption method may include but is not limited to: Caesar encryption, Morse code encryption and American Standard Code for Information Interchange (ASCII) encryption. It should be noted that in each cycle, the encryption weight of each ciphertext mapping table is regenerated.
[0101] In step S303 of some embodiments, when the number of cycles is 1, the maximum weight is selected from all encrypted weights. When the number of cycles is greater than 1, for each cycle, the maximum weight is selected from all encrypted weights of the current cycle.
[0102] In step S304 of some embodiments, when the number of cycles is 1, the target mapping table is selected from the ciphertext mapping table with the largest weight. When the number of cycles is greater than 1, for each cycle, the target mapping table is selected from the ciphertext mapping table with the largest weight.
[0103] In the steps S301 to S305 shown in the embodiment of the present application, the target plaintext is first encrypted to obtain an intermediate encrypted text, and encryption weights are calculated based on the intermediate encrypted text and at least two preset ciphertext mapping tables to obtain the encryption weights of each ciphertext mapping table. Then, the maximum weight is selected from all encryption weights, and the target mapping table is selected from the ciphertext mapping table with the maximum weight. Finally, the intermediate encrypted text is encrypted according to the target mapping table to obtain the target encrypted text. Therefore, the text processing method based on the large model shown in the embodiment of the present application can select an encryption method using the encryption weights generated by the model, and encode the target plaintext according to the selected encryption method to obtain the target encrypted text, so that the encryption method of the target plaintext has a certain randomness, and then when the identification sub-model is pre-trained by the target encrypted text and the target plaintext text, the generalization ability of the identification sub-model and the recognition ability of the ciphertext are improved.
[0104] In step S103 of some embodiments, the ciphertext detection model is used to extract and analyze the text features of the original text, such as the language pattern, character frequency, and word structure of the text, and then determine whether the original text is ciphertext, and finally output ciphertext detection information. The ciphertext detection information includes: ciphertext indication information and plaintext indication information. Among them, the plaintext indication information indicates that the original text is plaintext, and the ciphertext indication information indicates that the original text is ciphertext. For example, the plaintext indication information can be represented by a specific value of 0, and the ciphertext indication information can be represented by a specific value of 1.
[0105] In step S104 of some embodiments, a defense prompt message may be sent to the large model end according to the ciphertext indication information. The defense prompt message is used to prompt the large model end that the output text of a specific account is ciphertext, and it is necessary to pay attention to potential security issues and take corresponding defense measures, such as adjusting the output text. For example, if the defense prompt message prompts the large model end that the output text of account A1 is ciphertext, the large model end replaces the output text with the text "Hello, this is a secret".
[0106] See also Figure 4 In some embodiments, step S103 may include but is not limited to steps S401 to S403:
[0107] Step S401, extracting features from the original text to obtain text features;
[0108] Step S402, obtaining the distribution of text features to obtain text distribution information;
[0109] Step S403: Generate ciphertext indication information based on the account information and text distribution information.
[0110] In step S401 of some embodiments, the original text may be subjected to feature extraction through the BERT model to obtain text features, wherein the text features may include but are not limited to at least one of the following: character frequency features, character distribution features, character pair occurrence frequency features, word distribution features or sentence-level distribution features, and grammatical structure features.
[0111] In step S402 of some embodiments, the ciphertext mapping unit may be composed of a multi-layer perceptron (MLP) layer and a normalization function. First, the text feature is mapped to a numerical value through the MLP layer, and the numerical value represents the possibility that the original text is ciphertext. Finally, the numerical value is converted into text distribution information through the normalization function, and the text distribution information represents the probability that the original text is ciphertext. Among them, the normalization function can be a Sigmad function, which is a commonly used activation function. The Sigmad function can map any real value to a range from 0 to 1, thereby expressing it as a probability value. In the present application, the output value of the Sigmad function is the text distribution information. If the text distribution information is close to 1, it means that the original text is likely to be ciphertext; if the text distribution information is close to 0, it means that the original text is unlikely to be ciphertext. For example, if the text distribution information is 0.98, it means that the text distribution information is close to 1, indicating that the original text is likely to be ciphertext; if the text distribution information is 0.10, it means that the text distribution information is close to 0, indicating that the original text is unlikely to be ciphertext.
[0112] In step S403 of some embodiments, ciphertext indication information can be generated based on the account information and the text distribution information. Specifically, the text distribution information is first compared with the preset ciphertext discrimination threshold to obtain the ciphertext comparison information. If the ciphertext comparison information represents that the text distribution information is greater than the ciphertext discrimination threshold, the ciphertext indication information is generated according to the account information and the ciphertext comparison information. Among them, the specific ciphertext discrimination threshold can be 0.8, or it can be set by a person skilled in the art, or it can be generated during the pre-training process of the ciphertext detection model, and this application does not limit it. For example, when the ciphertext discrimination threshold is 0.97 and the text distribution information is 0.9, the ciphertext comparison information can be 1, representing that the text distribution information is greater than the ciphertext discrimination threshold. When the ciphertext discrimination threshold is 0.7 and the text distribution information is 0.9, the ciphertext comparison information can be 0, representing that the text distribution information is less than the ciphertext discrimination threshold.
[0113] In steps S401 to S403 shown in the embodiment of the present application, first, feature extraction is performed on the original text to obtain text features, then the distribution of the text features is obtained to obtain text distribution information, and finally, ciphertext indication information is generated based on the account information and the text distribution information, so as to detect whether the original text is ciphertext, so as to effectively identify the original text containing ciphertext, and further defend against ciphertext attacks.
[0114] In step S104 of some other embodiments, output prompt information is sent to the large model end according to the plain text indication information, and the output prompt information is used to prompt the large model end that the output text for the input text of a specific account is plain text, and the original text can be directly displayed. For example, account A2 inputs a request to query the trend forecast of stock G1, and the output prompt information can be "Request for querying the trend forecast of stock G1 for account A2, the output text of the large model is plain text".
[0115] In step S105 of some embodiments, the original text is modified according to the defense prompt information on the large model side to obtain the target text. The specific text modification method for the original text may include but is not limited to at least one of the following: removing the ciphertext in the original text, replacing part of the ciphertext, or randomly adding characters to the ciphertext.
[0116] See also Figure 5 In some embodiments, step S105 may also include but is not limited to steps S501 to S504:
[0117] Step S501, obtaining text distribution information according to the defense prompt information;
[0118] Step S502, determining the interval where the text distribution information is located, and obtaining a target distribution interval;
[0119] Step S503, obtaining a text modification template of a target distribution interval to obtain a target modification template;
[0120] Step S504, modifying the original text according to the target modification template to obtain the target text.
[0121] In step S502 of some embodiments, the target distribution interval is determined from the candidate distribution interval according to the text distribution information. Each candidate distribution interval corresponds to a probability interval, which describes the probability range of the original text being ciphertext, and different probability intervals reflect the different possibilities of the original text containing ciphertext attacks. It should be noted that the minimum value in all candidate distribution intervals is greater than or equal to the ciphertext discrimination threshold. For example, when the ciphertext discrimination threshold is 0.88, the candidate distribution interval B1 and the candidate distribution interval B2 can be set, wherein the candidate distribution interval B1 can be (0.88, 0.92], and the candidate distribution interval B2 can be (0.92, 1], then the candidate distribution interval B1 indicates that the risk of the original text containing ciphertext is relatively small, while the candidate distribution interval B2 indicates that the original text has a high risk of ciphertext attack. When the text distribution information C1 is 0.90, the candidate distribution interval B1 is used as the target distribution interval, and when the text distribution information C2 is 0.98, the candidate distribution interval B2 is used as the target distribution interval, wherein the ciphertext attack risk contained in the text distribution information C1 is lower than the ciphertext attack risk contained in the text distribution information C2. Therefore, it is necessary to set different text modification methods for different candidate distribution intervals.
[0122] In step S503 of some embodiments, each candidate distribution interval has a corresponding text modification template, and each text modification template is pre-generated according to a text modification method. Therefore, after the target distribution interval is determined, the target modification template can be determined.
[0123] In step S504 of some embodiments, after determining the target modification template, the target text can be generated according to the original text and the target modification template. For example, when the target distribution interval is the candidate distribution interval B1, the text modification method corresponding to the target modification template is to randomly add characters to the ciphertext. The target modification template contains information describing the selection of the insertion position and the method of inserting characters. Therefore, according to the target modification template, additional characters can be randomly inserted into the original text to obtain the target text, thereby making the sensitive financial information that may be contained in the original text difficult to interpret. When the target distribution interval is a higher candidate distribution interval, the text modification method corresponding to the target modification template can be to remove the ciphertext in the original text, and then remove the ciphertext in the original text to prevent the sensitive financial information that may be contained in the original text from being obtained.
[0124] In the steps S501 to S504 shown in the embodiment of the present application, the text distribution information is first obtained according to the defense prompt information, and the interval where the text distribution information is located is determined to obtain the target distribution interval. Then, the text modification template of the target distribution interval is obtained to obtain the target modification template, and the original text is modified according to the target modification template to obtain the target text. Therefore, the text processing method based on the large model of the embodiment of the present application improves the flexibility of the large model in dealing with different ciphertext attack risks by setting different text modification methods for text distribution information of different sizes.
[0125] See also Figure 6 In some embodiments, after step S105, the text processing method based on the large model further includes but is not limited to steps S601 to S605:
[0126] Step S601, constructing a question file according to the defense prompt information, the account information and the original text; wherein each question file includes an original text, and each question file has a timestamp;
[0127] Step S602, calculating the generation frequency of the problem file according to the timestamp and the account information to obtain the problem file frequency;
[0128] Step S603, generating abnormal prompt information based on the frequency of the problem file;
[0129] Step S604, performing anomaly detection on the problem file according to the anomaly prompt information and the frequency of the problem file to obtain file detection information; wherein the file detection information includes anomaly detection information, and the anomaly detection information indicates that the original text in the problem file is plain text;
[0130] Step S605: fine-tune the ciphertext detection model according to the anomaly detection information and the problem file.
[0131] In step S601 of some embodiments, each question file is used to describe that an original text output by the large model based on the same account is detected to contain ciphertext. Each question file contains a corresponding original text, ensuring a detailed record of the original text, thereby making the original text traceable. In addition, each question file has a timestamp for recording the construction time of the question file.
[0132] In step S602 of some embodiments, the problem file frequency is used to describe the frequency of problem file generation in the same account. The problem file frequency can be obtained by calculating the generation frequency of the problem file according to the timestamp and account information. Specifically, all problem files can be obtained according to a specific period, and the problem files can be classified according to the account information. Then, for each account information, the generation frequency of the problem file is calculated according to the timestamp to obtain the problem file frequency. For example, the period can be 24 hours, 48 hours or other specific durations, and this application does not make specific restrictions. The frequency of problem file generation can be 100 times within 24 hours, 10 times within 12 minutes or other specific frequencies, and this application does not make specific restrictions. The timestamp can be set to 23:08:59 on October 15, 2022, or it can be set to 23:34 on September 20, and it can also be set to other forms according to the actual needs of those skilled in the art, and this application does not make specific restrictions.
[0133] In step S603 of some embodiments, the abnormal prompt information is used to describe that the frequency of the problem file is greater than the preset abnormal prompt threshold. If the abnormal prompt information indicates that the frequency of the problem file is greater than the abnormal prompt threshold, it indicates that the large model end may be subject to a ciphertext attack from an attacker, and it is necessary to further confirm whether the target object is performing a ciphertext attack on the large model, or whether the ciphertext detection model mistakenly detects the plaintext as ciphertext. Among them, the specific value of the abnormal prompt threshold can be 50 times within 24 hours and 20 times within 10 minutes, and other specific values can also be selected according to the needs of technical personnel in this field, and this application does not limit it.
[0134] In step S604 of some embodiments, anomaly detection is performed on the problem file according to the anomaly prompt information to obtain file detection information. The problem file may be directly detected for anomalies according to the anomaly prompt information through a pre-trained anomaly detection model to obtain the file detection information; or the staff may first determine whether the original text in the problem file is ciphertext or plaintext according to the anomaly prompt information to obtain the anomaly detection category of the problem file, input the anomaly detection category into the anomaly detection model, and then perform anomaly detection on the problem file according to the anomaly detection category through the anomaly detection model to obtain the file detection information.
[0135] In step S605 of some embodiments, the anomaly detection information characterizes that the original text in the problem file is plain text, but the ciphertext detection model detects the original text as ciphertext. At this point, the anomaly detection information and the ciphertext indication information are inconsistent, and the ciphertext detection model needs to be fine-tuned according to the anomaly detection information and the problem file. Specifically, first, the original text in the problem file is obtained as the fine-tuning input text according to the anomaly detection information, and then the ciphertext detection model is fine-tuned according to the fine-tuning input text. Among them, fine-tuning the ciphertext detection model includes but is not limited to adjusting at least one of the following hyperparameters: the number of hidden layers, the number of hidden units in each hidden layer, the number of attention heads in each hidden layer, the learning rate, the batch size, or the training rounds. In addition, the model architecture can also be fine-tuned.
[0136] In some other embodiments, the file detection information also includes normal detection information, which indicates that the original text in the problem file is non-ciphertext, and the ciphertext detection model detects the original text as ciphertext. At this time, the abnormal detection information and the ciphertext indication information are consistent, and network security control of the account information is required based on the abnormal detection information and the account information. Specifically, measures for network security control of account information may include, but are not limited to, at least one of the following: restricting access rights, restricting accessible areas, account locking, activity monitoring, or system log auditing, and this application does not make specific restrictions.
[0137] Steps S601 to S605 shown in the embodiment of the present application first construct a problem file based on the defense prompt information, account information and original text; wherein each problem file includes an original text, and each problem file has a timestamp. Then, the generation frequency of the problem file is calculated according to the timestamp and account information to obtain the problem file frequency, and abnormal prompt information is generated based on the problem file frequency, and then the problem file is detected for abnormality according to the abnormal prompt information and the problem file frequency to obtain file detection information; wherein the file detection information includes abnormal detection information, and the abnormal detection information characterizes that the original text in the problem file is plain text. Finally, the ciphertext detection model is fine-tuned according to the abnormal detection information and the problem file. Therefore, the text processing method based on the large model shown in the embodiment of the present application performs abnormal detection on the original text in the problem file according to the generation frequency of the problem file, so as to fine-tune the ciphertext detection model according to the abnormal detection information, thereby improving the accuracy and efficiency of the ciphertext detection model in actual ciphertext detection.
[0138] See also Figure 7 In some embodiments, after step S105, the text processing method based on the large model may also include but is not limited to steps S701 to S703:
[0139] Step S701, sending an abnormal prompt query request to the ciphertext detection terminal, and generating abnormal prompt query information at the ciphertext detection terminal according to the abnormal prompt query request;
[0140] Step S702, when the abnormal prompt query information includes abnormal prompt information, generating abnormal prompt text according to the abnormal prompt information;
[0141] Step S703: update the target text according to the abnormal prompt text.
[0142] In step S701 of some embodiments, an abnormal prompt query request is used to obtain abnormal prompt query information from the ciphertext detection end. The abnormal prompt query request may include but is not limited to account information. The ciphertext detection end can respond to the abnormal prompt query request. Query the abnormal prompt information according to the account information. If the abnormal prompt information is queried, the abnormal prompt query information is constructed according to the account information and the abnormal prompt information; if the abnormal prompt information is not queried, the abnormal prompt query information is constructed only according to the account information. Then, the abnormal prompt information is sent to the large model end according to the abnormal prompt query request.
[0143] In step S702 of some embodiments, the abnormal prompt text is used to prompt the target object that the target object's account has received original text containing ciphertext from the large model multiple times. For example, the abnormal prompt text may be "Hello, it is detected that the account has received more than 25 ciphertexts between November 2, 2024 and November 3, 2024. Please pay attention to whether it is you who is operating the account."
[0144] In step S703 of some embodiments, the specific method of updating the target text according to the abnormal prompt text may include but is not limited to any of the following: replacing the target text with the abnormal prompt text, adding the abnormal prompt text in front of or after the target text, or displaying the abnormal prompt text in a pop-up window.
[0145] In the steps S701 to S703 shown in the embodiment of the present application, an abnormal prompt query request is first sent to the ciphertext detection end, and at the ciphertext detection end, abnormal prompt query information is generated according to the abnormal prompt query request, and then, when the abnormal prompt query information contains abnormal prompt information, abnormal prompt text is generated according to the abnormal prompt information, and the target text is updated according to the abnormal prompt text. Therefore, the text processing method based on the large model shown in the embodiment of the present application can provide a ciphertext attack risk warning to the user by outputting the abnormal prompt text at the large model end according to the abnormal prompt information, thereby helping the user to better manage and reduce security risks.
[0146] It should be noted that, in some other embodiments, the function of the ciphertext detection end can be implemented by the text processing system based on the large model as shown in the present application. Specifically, the large model end first generates an abnormal prompt query request, and sends the abnormal prompt query request to the text processing system of the large model. Then, in the text processing system of the large model, abnormal prompt query information is generated according to the abnormal prompt query request, and the abnormal prompt query information is sent to the large model end. Finally, at the large model end, when the abnormal prompt query information contains abnormal prompt information, an abnormal prompt text is generated according to the abnormal prompt information, and the target text is updated according to the abnormal prompt text.
[0147] See also Figure 8 The embodiment of the present application also provides a text processing system based on a large model, which can implement the above-mentioned text processing method based on a large model, and the system includes:
[0148] An account acquisition module 801 is used to acquire the account information of a target object;
[0149] The text acquisition module 802 is used to acquire the original text output by the large model terminal 810 according to the account information;
[0150] The ciphertext detection module 803 is used to perform ciphertext detection on the original text through a pre-trained ciphertext detection model to obtain ciphertext detection information; wherein the ciphertext detection information includes ciphertext indication information, and the ciphertext indication information indicates that the original text is ciphertext;
[0151] The information feedback module 804 is used to send defense prompt information to the large model end 810 according to the ciphertext indication information;
[0152] The text modification module 811 is used to modify the original text according to the defense prompt information at the large model end 810 to obtain the target text.
[0153] The specific implementation of the large model-based text processing system is basically the same as the specific implementation of the large model-based text processing method described above, and will not be repeated here.
[0154] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned large model-based text processing method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0155] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0156] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0157] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the large model-based text processing method of the embodiment of this application;
[0158] Input / output interface 903, used to implement information input and output;
[0159] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0160] A bus 905 that transmits information between the various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0161] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0162] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned large model-based text processing method.
[0163] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0164] The text processing method based on a large model, the text processing system based on a large model, the electronic device and the storage medium provided in the embodiment of the present application first encrypt the target plaintext text to obtain the intermediate encrypted text, and calculate the encryption weight according to the intermediate encrypted text and at least two preset ciphertext mapping tables to obtain the encryption weight of each ciphertext mapping table. Then, the maximum weight is selected from all the encryption weights, and the target mapping table is selected from the ciphertext mapping table with the maximum weight. Finally, the intermediate encrypted text is encrypted according to the target mapping table to obtain the target encrypted text. Therefore, the text processing method based on a large model shown in the embodiment of the present application can select the encryption method using the encryption weight generated by the model, and encode the target plaintext text according to the selected encryption method to obtain the target encrypted text, so that the encryption method of the target plaintext text has a certain randomness, and then when the identification sub-model is pre-trained by the target encrypted text and the target plaintext text, the generalization ability of the identification sub-model and the recognition ability of the ciphertext are improved.
[0165] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0166] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0167] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0168] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0169] The terms "including" and "having" and any variations thereof in the specification of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or inherent to these processes, methods, products or apparatuses.
[0170] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0171] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0172] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0173] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0174] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0175] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A text processing method based on a large model, characterized in that: The method comprises: Get the target object's account information; Obtaining the original text output by the large model end according to the account information; Performing ciphertext detection on the original text through a pre-trained ciphertext detection model to obtain ciphertext detection information; wherein the ciphertext detection information includes ciphertext indication information, and the ciphertext indication information indicates that the original text is ciphertext; Sending defense prompt information to the large model end according to the ciphertext indication information; At the large model end, the original text is modified according to the defense prompt information to obtain a target text.
2. The method according to claim 1, characterized in that The ciphertext detection is performed on the original text by using a pre-trained ciphertext detection model to obtain ciphertext detection information, including: Performing feature extraction on the original text to obtain text features; Obtaining the distribution of the text features to obtain text distribution information; The ciphertext indication information is generated based on the account information and the text distribution information.
3. The method according to claim 2, characterized in that After sending the defense prompt information to the large model end according to the ciphertext indication information, the method further includes: Constructing a question file according to the defense prompt information, the account information and the original text; wherein each of the question files includes one of the original texts, and each of the question files has a timestamp; Calculate the generation frequency of the problem file according to the timestamp and the account information to obtain the problem file frequency; Generate abnormal prompt information based on the frequency of the problem file; Performing anomaly detection on the problem file according to the anomaly prompt information and the frequency of the problem file to obtain file detection information; wherein the file detection information includes anomaly detection information, and the anomaly detection information indicates that the original text in the problem file is plain text; The ciphertext detection model is fine-tuned according to the anomaly detection information and the problem file.
4. The method according to claim 3, characterized in that Before performing ciphertext detection on the original text by using a pre-trained ciphertext detection model to obtain ciphertext detection information, the method further includes: Construct attack sub-model and identification sub-model based on neural network model; Get the target plain text from the preset data set; Encrypting the target plaintext text by using the attack sub-model to obtain a target encrypted text; The identification sub-model is pre-trained according to the target plaintext text and the target encrypted text to obtain the ciphertext detection model.
5. The method according to claim 4, characterized in that The step of encrypting the target plain text by using the attack sub-model to obtain the target encrypted text includes: Encrypting the target plaintext to obtain an intermediate encrypted text; Perform encryption weight calculation based on the intermediate encrypted text and at least two preset ciphertext mapping tables to obtain an encryption weight of each of the ciphertext mapping tables; Selecting the maximum weight from all the encryption weights; Select a target mapping table from the ciphertext mapping tables having the maximum weight; The intermediate encrypted text is encrypted according to the target mapping table to obtain the target encrypted text.
6. The method according to claim 2, characterized in that The process of modifying the original text according to the defense prompt information to obtain the target text at the large model end includes: Acquire the text distribution information according to the defense prompt information; Determine the interval where the text distribution information is located to obtain a target distribution interval; Obtaining a text modification template of the target distribution interval to obtain a target modification template; The original text is modified according to the target modification template to obtain the target text.
7. The method according to claim 6, characterized in that After the original text is modified according to the defense prompt information at the large model end to obtain the target text, the method further includes: Sending an abnormal prompt query request to the ciphertext detection end, where the ciphertext detection end generates abnormal prompt query information according to the abnormal prompt query request; In a case where the abnormal prompt query information includes the abnormal prompt information, generating an abnormal prompt text according to the abnormal prompt information; The target text is updated according to the abnormal prompt text.
8. A text processing system based on a large model, characterized in that: The system comprises: Account acquisition module, used to obtain the account information of the target object; A text acquisition module, used to acquire the original text output by the large model end according to the account information; A ciphertext detection module, configured to perform ciphertext detection on the original text by using a pre-trained ciphertext detection model to obtain ciphertext detection information; wherein the ciphertext detection information includes ciphertext indication information, and the ciphertext indication information indicates that the original text is ciphertext; An information feedback module, used for sending defense prompt information to the large model end according to the ciphertext indication information; The text modification module is used to modify the original text according to the defense prompt information at the large model end to obtain the target text.
9. An electronic device, characterized in that The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the large model-based text processing method described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the large model-based text processing method according to any one of claims 1 to 7 is implemented.