Large model application method and device, equipment and medium

By using embedded models and desensitization rules to process question information in large model applications, the problem of difficulty in ensuring the security of sensitive information within users in large model applications is solved, and dual guarantees of information security and answer quality are achieved.

CN118568235APending Publication Date: 2024-08-30BEIJING 21VIANET DATA CENT
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410742882.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

It is difficult to ensure the security of users' internal sensitive information during the application of large models, which may lead to privacy leaks and security risks.

Method used

Use the pre-trained embedding model to map the words in the question information into vectors, conduct semantic similarity queries in the private knowledge base, obtain the target vectors and then map them into words, and use the preset desensitization rules to desensitize the sensitive information. Sensitive, ensuring that words that do not contain sensitive information and desensitized words are input into the large model to generate answer information.

Benefits of technology

It effectively improves the security of users' internal sensitive information during large model application, prevents leakage of sensitive information, and maintains the accuracy and quality of answer information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568235A
    Figure CN118568235A
Patent Text Reader

Abstract

The invention relates to the technical field of large models, in particular to a large model application method and device, equipment and a medium, and aims to improve the safety of sensitive information in a user in a large model application process. The method comprises the following steps of: aiming at question information input by a user, mapping each word contained in the question information into a vector by adopting a pre-trained embedding model; for each vector, performing semantic similarity query in a pre-stored private knowledge base to obtain a target vector matched with the semantics of the vector; reflecting each target vector into a target word; adopting a preset desensitization rule to desensitize sensitive information in the target word; and inputting the question information, the target words not containing the sensitive information and the desensitized target words containing the sensitive information into the large model, and obtaining answer information corresponding to the question information generated by the large model according to each target word, so that the security of the sensitive information in the user in the large model application process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of large model technology, and in particular to a large model application method, device, equipment and medium. Background Art

[0002] Big models, i.e. large machine learning models, such as the artificial intelligence language model GPT-3, the bidirectional encoder language representation model (Bidirectional Encoder Representations from Transformers, BERT), etc., are rapidly changing all walks of life, from language processing, image recognition to complex data analysis, and their applications are wide-ranging. These models are popular for their excellent predictive and analytical capabilities, and can provide unprecedented insights and automation levels. However, with the popularization of these technologies, the issues of data security and privacy protection have become increasingly severe and complex.

[0003] A key feature of large models is that they require large amounts of data for training. This data may include personal, sensitive, or otherwise protected information, which needs to be handled properly. If data is not managed properly, it may lead to privacy breaches and security risks. For example, a model may inadvertently leak personal information from its training data, or the output of a model may be used to infer sensitive information about an individual or organization.

[0004] In order to make the big model return the information that users want more accurately, the widely used solution is to adopt the retrieval enhancement generation (RAG) technology. In order to prevent privacy leakage, private big models are generally deployed and tuned, and the knowledge base plus the private big model are used to implement the application of generative artificial intelligence (AIGC). Some organizations that do not have high requirements for sensitive data access may adopt private knowledge bases plus public business models to achieve better application effects.

[0005] In order to ensure that their data is not put on the public Internet, many organizations are conducting private deployment and tuning of large models. However, since these tasks require strong AI technology theory and application background, these organizations often lack the support of relevant talents, which makes the use of large models less effective. Although some organizations use private knowledge base solutions, they need to call the interface of commercial public large models and provide some sensitive information related to user questions in the knowledge base to the public large model. Some public large models may use or leak this part of sensitive information uploaded by customers for some special reasons, causing losses to these organizations.

[0006] Therefore, how to improve the security of users' internal sensitive information during the application of large models is a technical problem that needs to be solved urgently. Summary of the invention

[0007] The present application provides a large model application method, device, equipment and medium for improving the security of user internal information during the large model application process.

[0008] In a first aspect, the present application provides a large model application method, the method comprising:

[0009] For the input question information, a pre-trained embedding model is used to map each word contained in the question information into a vector;

[0010] For each vector, a semantic similarity query is performed in a pre-saved private knowledge base to obtain a target vector that matches the semantics of the vector; each target vector is reversely mapped into a target word; and the sensitive information in the target word is desensitized using a preset desensitization rule;

[0011] The question information, the target words that do not contain sensitive information, and the target words that contain sensitive information and are desensitized are input into the large model to obtain answer information corresponding to the question information generated by the large model according to each target word.

[0012] In a possible implementation, after desensitizing sensitive information in the target word by using a preset desensitization rule, inputting the question information, the target word not containing sensitive information, and the desensitized target word containing sensitive information into the big model, and obtaining answer information corresponding to the question information generated by the big model according to each target word, the method further includes:

[0013] Determining whether there is sensitive information in the words contained in the question information;

[0014] If not, the subsequent step is to combine the question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information into a large model to obtain the answer information corresponding to the question information generated by the large model according to each target word.

[0015] In a possible implementation manner, if the words included in the question information contain sensitive information, the method further includes:

[0016] Using the desensitization rule to desensitize sensitive information in the question information;

[0017] The step of inputting the question information, the target words not containing sensitive information, and the desensitized target words containing sensitive information into the large model, and obtaining the answer information corresponding to the question information generated by the large model according to each target word includes:

[0018] The desensitized question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information are input into the large model, and the answer information corresponding to the desensitized question information generated by the large model according to each target word is obtained.

[0019] In a possible implementation, the method further includes:

[0020] The desensitization rule is used to restore the desensitized target words containing sensitive information in the answer information to generate answer information before desensitization.

[0021] In a possible implementation, the adopting a preset desensitization rule to desensitize sensitive information in the target word includes:

[0022] According to the correspondence between each sensitive information and the desensitized information contained in the desensitization rule, the sensitive information in the target word is replaced with the desensitized information.

[0023] In a possible implementation manner, the process of saving the vectors in the private knowledge base includes:

[0024] The embedding model is used to map each word in a pre-stored user internal knowledge base into a vector; and each vector is stored in the private knowledge base.

[0025] In a second aspect, the present application provides a large model application device, the device comprising:

[0026] A mapping module, for mapping each word contained in the input question information into a vector using a pre-trained embedding model;

[0027] The desensitization module is used to perform a semantic similarity query in a pre-saved private knowledge base for each vector to obtain a target vector that matches the semantics of the vector; de-map each target vector into a target word; and use a preset desensitization rule to desensitize sensitive information in the target word;

[0028] The application module is used to input the question information, the target words that do not contain sensitive information, and the target words that contain sensitive information and are desensitized into the large model, and obtain the answer information corresponding to the question information generated by the large model according to each target word.

[0029] In a possible implementation, the desensitizing module is also used to determine whether there is sensitive information in the words contained in the question information; if not, the subsequent step of combining the question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information into a large model to obtain the answer information corresponding to the question information generated by the large model according to each target word.

[0030] In a possible implementation manner, the desensitization module is further configured to use the desensitization rule to desensitize sensitive information in the question information;

[0031] The application module is also used to input the desensitized question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information into the large model, and obtain the answer information corresponding to the desensitized question information generated by the large model according to each target word.

[0032] In a possible implementation, the desensitization module is further configured to use the desensitization rule to restore the desensitized target words containing sensitive information in the answer information to generate answer information before desensitization.

[0033] In a possible implementation, the desensitization module is specifically configured to replace the sensitive information in the target word with the desensitized information according to the correspondence between each sensitive information and the desensitized information included in the desensitization rule.

[0034] In a possible implementation, the mapping module is further configured to use the embedding model to map each word in a pre-stored user internal knowledge base into a vector; and store each vector in the private knowledge base.

[0035] In a third aspect, the present application provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any method described in the first aspect when executing a computer program stored in the memory.

[0036] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any method described in the first aspect.

[0037] In a fifth aspect, the present application provides a computer program product, comprising: a computer program code, when the computer program code is run on a computer, the computer executes the steps of any method described in the first aspect.

[0038] In an embodiment of the present application, for the question information input by the user, a pre-trained embedding model is used to map each word contained in the question information into a vector; for each vector, a semantic similarity query is performed in a pre-saved private knowledge base to obtain a target vector that matches the semantics of the vector; and each target vector is inversely mapped into a target word; a preset desensitization rule is used to desensitize the sensitive information in the target word; then the question information, the target word that does not contain sensitive information, and the target word that contains sensitive information and is desensitized are input into the big model, and the answer information corresponding to the question information generated by the big model according to each target word is obtained, thereby improving the security of the user's internal sensitive information during the application of the big model. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the implementation methods in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technology descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.

[0040] Figure 1 A schematic diagram of a large model application process provided for some embodiments of the present application;

[0041] Figure 2 A schematic diagram of the structure of a large model device provided for some embodiments of the present application;

[0042] Figure 3 A schematic diagram of the structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of this application clearer, this application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the embodiments described in this application are only part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0044] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0045] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0046] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0047] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0048] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0049] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0050] Before introducing the large model application method provided by the embodiment of the present application, in order to facilitate understanding, the technical background of the embodiment of the present application is first introduced.

[0051] Big models, i.e. large machine learning models such as GPT-3, BERT, etc., are rapidly changing all walks of life, with a wide range of applications from language processing, image recognition to complex data analysis. These models are popular for their excellent predictive and analytical capabilities, providing unprecedented insights and automation levels. However, with the popularization of these technologies, the issues of data security and privacy protection are becoming more and more severe and complex.

[0052] A key feature of large models is that they require large amounts of data for training. This data may include personal, sensitive, or otherwise protected information, which needs to be handled properly. If data is not managed properly, it may lead to privacy breaches and security risks. For example, a model may inadvertently leak personal information from its training data, or the output of a model may be used to infer sensitive information about an individual or organization.

[0053] In order to enable the big model to return the information that users want more accurately, the widely used solution is to adopt RAG technology. In order to prevent privacy leakage, private big models are generally deployed and tuned, and the knowledge base plus private big models are used to implement AIGC applications. Some organizations that do not have high requirements for sensitive data access may adopt private knowledge bases plus public business models to achieve better application effects.

[0054] In order to ensure that their data is not put on the public Internet, many organizations are conducting private deployment and tuning of large models. However, since these tasks require strong AI technology theory and application background, these organizations often lack the support of relevant talents, which makes the use of large models less effective. Although some organizations use private knowledge base solutions, they need to call the interface of commercial public large models and provide some sensitive information related to user questions in the knowledge base to the public large models. Some public large models may use or leak this part of sensitive information uploaded by customers for some special reasons, causing losses to these organizations.

[0055] Based on this, in order to improve the security of user's internal sensitive information during the application of a large model, the present application provides a large model application method, device, equipment and medium. In this method, for the input question information, a pre-trained embedding model is used to map each word contained in the question information into a vector; for each vector, a semantic similarity query is performed in a pre-saved private knowledge base to obtain a target vector that matches the semantics of the vector; each target vector is reversely mapped into a target word; the sensitive information in the target word is desensitized using a preset desensitization rule; the question information, the target word that does not contain sensitive information, and the target word that contains sensitive information and is desensitized are input into the large model to obtain the answer information corresponding to the question information generated by the large model according to each target word.

[0056] Embodiment 1:

[0057] Figure 1 A schematic diagram of a large model application process provided for some embodiments of the present application, such as Figure 1 As shown, the process includes the following steps:

[0058] S101: For input question information, use a pre-trained embedding model to map each word included in the question information into a vector.

[0059] The large model application method provided in the embodiment of the present application is applied to an electronic device, which may be a PC, a server, a smart phone, etc.

[0060] In order to prevent user information leakage and accurately use the large model to generate the answer information required by the user, the question information input by the user can be received first, and a pre-trained embedding model is used for the input question information to map each word contained in the question information into a vector. Among them, the embedding model can be an embedding model that directly uses some large models that can be privately deployed, or a traditional embedding model based on natural language processing (Nature Language Processing, NLP). Specifically, the training process of the embedding model can refer to the existing technology and will not be repeated here.

[0061] S102: For each vector, a semantic similarity query is performed in a pre-stored private knowledge base to obtain a target vector that semantically matches the vector.

[0062] In order to further prevent the leakage of user information and accurately generate answer information containing the user's internal information, a private knowledge base containing the user's internal information can be pre-saved, that is, the vectors mapped to the words containing the user's internal information in the private knowledge base. For each vector mapped to a word contained in the question information, a semantic similarity query method can be used to determine the target vector whose semantics are highly correlated with the vector, that is, the target vector that matches the vector semantics. Among them, according to the semantic similarity, a vector whose semantic similarity exceeds a preset value can be determined as a target vector; or a preset number of vectors with high semantic similarity can be determined as target vectors. The size of the preset number can be freely set according to actual needs, and this application does not limit this. For example, if the word contained in the question information is product, then the three target vectors with high semantic similarity to the "product vector" mapped to the word "product" are product 1 vector, product 2 vector and product 3 vector.

[0063] S103: De-map each target vector into a target word; and desensitize sensitive information in the target word using a preset desensitization rule.

[0064] In order to ensure the smooth application of the large model, each target vector can be first de-mapped into a target word. In a possible implementation, if the amount of information corresponding to the target word obtained by de-mapping the target vector is too large, the amount of information can be compressed by using methods such as de-duplication, summarization and refinement to meet the requirements of the context size of the large model.

[0065] In order to ensure the security of the user's internal sensitive information during the application of the large model, after obtaining the definition of sensitive information by the relevant industry or user, desensitization rules can be pre-set. Use the preset desensitization rules to determine whether there is sensitive information in the target word. If not, it means that there is no sensitive information of the user in the target word, and there is no need to desensitize the target word. If yes, it means that there is sensitive information of the user in the target word, and the sensitive information in the target word needs to be desensitized. The desensitization method is to replace the original information with some non-sensitive similar information, that is, to replace the sensitive information in the target word with the preset non-sensitive approximate information corresponding to the sensitive information. For example, use 13600000000 to replace the real mobile phone number, and use a pseudonym to replace the real name. The advantage of using this method is to try to preserve the original semantic information contained in the sensitive word to facilitate a more satisfactory response in the subsequent steps.

[0066] In a possible implementation, since different industries or users may have certain differences in the definition of sensitive information, the identification and desensitization of sensitive information can also be achieved based on a desensitization model. Specifically, after obtaining the definition of sensitive information by the relevant industry or user, the desensitization model for identifying and processing sensitive information can be fine-tuned, and the fine-tuned desensitization model can be used to identify and desensitize sensitive information. That is, the target word is input into the pre-fine-tuned desensitization model, and the target word that does not contain sensitive information or the target word that contains sensitive information and is desensitized is obtained from the output of the desensitization model.

[0067] S104: Input the question information, the target words that do not contain sensitive information, and the target words that contain sensitive information and are desensitized into the big model, and obtain the answer information corresponding to the question information generated by the big model according to each target word.

[0068] If, according to the preset desensitization rules, it is determined that there is no sensitive information in the target word, the question information and the target word that does not contain sensitive information can be directly input into the large model, that is, sent to the server to which the large model belongs, and the answer information corresponding to the question information generated by the large model according to the target word is obtained, that is, the answer information corresponding to the question information generated by the large model according to each target word and sent by the server to which the large model belongs is received. Since there is no sensitive information in the target word, that is, there is no user's internal sensitive information, the security of the user's internal sensitive information during the application of the large model is guaranteed. Correspondingly, if there is sensitive information in the target word, the question information, the target word that does not contain sensitive information, and the target word that contains sensitive information and is desensitized can be input into the large model, and the answer information corresponding to the question information generated by the large model according to the target word that does not contain sensitive information and the target word that contains sensitive information and is desensitized is obtained; since the desensitized target word will not leak the user's internal sensitive information, the security of the user's internal sensitive information during the application of the large model is guaranteed.

[0069] In an embodiment of the present application, a pre-saved private knowledge base can be used to filter out target words corresponding to question information, and sensitive information in the target words can be disguised, and the target words that do not contain sensitive information and the disguised sensitive information, i.e., the desensitized target words, can be sent to the server to which the large model belongs, thereby realizing the privacy protection of conversation information data from the electronic device end to the server end to which the large model belongs. This can not only prevent users from using private large models to cause unsatisfactory question-and-answer results, but also achieve docking with excellent commercial large models to produce ideal responses while avoiding the leakage of sensitive information. Using the technology of this application, users can not only use excellent public commercial large models to obtain satisfactory application results, but also fully protect the user's privacy information from being transmitted and processed in the public network and large models.

[0070] In an embodiment of the present application, for the question information input by the user, a pre-trained embedding model is used to map each word contained in the question information into a vector; for each vector, a semantic similarity query is performed in a pre-saved private knowledge base to obtain a target vector that matches the semantics of the vector; and each target vector is inversely mapped into a target word; a preset desensitization rule is used to desensitize the sensitive information in the target word; then the question information, the target word that does not contain sensitive information, and the target word that contains sensitive information and is desensitized are input into the big model, and the answer information corresponding to the question information generated by the big model according to each target word is obtained, thereby improving the security of the user's internal sensitive information during the application of the big model.

[0071] Embodiment 2:

[0072] In order to further ensure the security of the user's internal sensitive information, based on the above embodiment, in the embodiment of the present application, after the preset desensitization rules are used to desensitize the sensitive information in the target words, the question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information are input into the big model, and before the answer information corresponding to the question information generated by the big model according to each target word is obtained, the method also includes:

[0073] Determining whether there is sensitive information in the words contained in the question information;

[0074] If not, the subsequent step is to combine the question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information into a large model to obtain the answer information corresponding to the question information generated by the large model according to each target word.

[0075] Since the question information input by the user may also contain sensitive information, in order to further ensure the security of the user's internal sensitive information, before sending the question information to the server to which the large model belongs, it is possible to first determine whether there is sensitive information in the words contained in the question information based on the type of sensitive information contained in the preset desensitization rules. For example, the types of sensitive information include mobile phone numbers and names. Then determine whether there is a mobile phone number or a name in the words contained in the question information.

[0076] If it does not exist, it means that the question information does not contain sensitive information. Then, the subsequent steps can be to send the target words that do not contain sensitive information and the desensitized target words that contain sensitive information to the server to which the large model belongs, and receive the answer information corresponding to the question information generated by the large model according to each target word sent by the server to which the large model belongs.

[0077] In an embodiment of the present application, before sending the question information to the server to which the large model belongs, it is first determined whether there is sensitive information in the words contained in the question information. After determining that it does not contain sensitive information, the question information is sent to the server to which the large model belongs, thereby ensuring that no sensitive information of the user is sent to the external network, further ensuring the security of the user's internal sensitive information.

[0078] Embodiment 3:

[0079] In order to further prevent the leakage of sensitive information within the user, on the basis of the above embodiments, in the embodiment of the present application, if there is sensitive information in the words contained in the question information, the method further includes:

[0080] Using the desensitization rule, desensitize the sensitive information contained in the question information;

[0081] The step of inputting the question information, the target words not containing sensitive information, and the desensitized target words containing sensitive information into the large model, and obtaining the answer information corresponding to the question information generated by the large model according to each target word includes:

[0082] The desensitized question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information are input into the large model, and the answer information corresponding to the desensitized question information generated by the large model according to each target word is obtained.

[0083] In order to further prevent the leakage of sensitive information within the user, if it is determined that there is sensitive information in the words contained in the question information, the preset desensitization rules can be used to desensitize the sensitive information contained in the question information. Specifically, the process of desensitizing sensitive information can refer to the above embodiment, which will not be repeated here.

[0084] The desensitized question information, target words that do not contain sensitive information, and desensitized target words that contain sensitive information can be input into the big model to obtain answer information corresponding to the desensitized question information generated by the big model according to each target word.

[0085] In an embodiment of the present application, if it is determined that the question information contains sensitive information, the sensitive information in the question information is first desensitized, and then the desensitized question information is sent to the server to which the large model belongs, thereby ensuring that no sensitive information of the user is sent to the external network, further ensuring the security of the user's internal sensitive information.

[0086] Embodiment 4:

[0087] In order to further improve the readability of the answer information, based on the above embodiments, in the embodiment of the present application, the method further includes:

[0088] The desensitization rule is used to restore the desensitized target words containing sensitive information in the answer information to generate answer information before desensitization.

[0089] Since the answer information generated by the large model does not contain sensitive information, if the user does not want to see sensitive information, the answer information generated by the large model can be directly displayed to the user without restoration. If some users, especially internal users, want to obtain answer information containing sensitive information, the answer information generated by the large model needs to be restored to obtain the answer information containing the original sensitive information.

[0090] The restoration method is to use the preset desensitization rules to restore the desensitized target words containing sensitive information in the answer information, and then generate the answer information before desensitization. Since the sensitive type contained in the desensitized target words will not change, it still belongs to the type of sensitive information. For example, the type of sensitive information contained in the desensitization rules is a mobile phone number. If the sensitive information 13988888888 is replaced with 13600000000, then 13600000000 can be replaced with 13988888888.

[0091] In the embodiment of the present application, not only the protection method of sensitive information in the interaction process with the server to which the large model belongs is included, but also the restoration method of sensitive information is provided. Not only the outbound transmission of desensitized information is realized, but also the restoration of sensitive information to the user is realized, that is, desensitization and restoration can be completely automatically controlled by the method provided by the present application, and the user is not aware of it.

[0092] Embodiment 5:

[0093] In order to further ensure the security of sensitive information within the user, on the basis of the above embodiments, in the embodiment of the present application, the use of preset desensitization rules to desensitize sensitive information in the target word includes:

[0094] According to the correspondence between each sensitive information and the desensitized information contained in the desensitization rule, the sensitive information in the target word is replaced with the desensitized information.

[0095] In order to further ensure the security of the user's internal sensitive information, the sensitive information in the target word can be replaced with the desensitized information according to the correspondence between each sensitive information and the desensitized information contained in the preset desensitization rule. The desensitized information can be a word of the same type as the sensitive information.

[0096] Specifically, a regular expression may be used to store the corresponding relationship between each sensitive information and the desensitized information. For example, Zhang San corresponds to Li Si, and the mobile phone number 13988888888 corresponds to 13600000000, etc.

[0097] In an embodiment of the present application, the sensitive information in the target word can be replaced with the desensitized information according to the correspondence between each sensitive information and the desensitized information contained in the desensitization rule, thereby disguising the sensitive information and further ensuring the security of the user's internal sensitive information.

[0098] Embodiment 6:

[0099] In order to further ensure the security of sensitive information within the user, on the basis of the above embodiments, in the embodiment of the present application, the use of preset desensitization rules to desensitize sensitive information in the target word includes:

[0100] The target word is input into a pre-fine-tuned desensitization model to obtain a target word that does not contain sensitive information or a target word that contains sensitive information and is desensitized and output by the desensitization model.

[0101] Since different industries or users may have different definitions of sensitive information, in a possible implementation, the identification and desensitization of sensitive information can also be achieved based on a desensitization model. Specifically, the desensitization model for identifying and processing sensitive information can be fine-tuned after obtaining the definition of sensitive information by the relevant industry or user, and the fine-tuned desensitization model can be used to identify and desensitize sensitive information. That is, the target word is input into the pre-fine-tuned desensitization model, and the target word that does not contain sensitive information or the target word that contains sensitive information and is desensitized is obtained from the output of the desensitization model.

[0102] In an embodiment of the present application, the target word can be input into a fine-tuned desensitization model to obtain the target word that does not contain sensitive information or the target word that contains sensitive information and is desensitized, which is output by the desensitization model, thereby disguising the sensitive information and further ensuring the security of the user's internal sensitive information.

[0103] Embodiment 7:

[0104] In order to prevent the leakage of the user's internal privacy data, i.e., sensitive information, and to use the large model to generate answer information adapted to the user's internal system, based on the above embodiments, in the embodiment of the present application, the process of saving the vector in the private knowledge base includes:

[0105] The embedding model is used to map each word in a pre-stored user internal knowledge base into a vector; and each vector is stored in the private knowledge base.

[0106] In order to prevent the leakage of the user's internal privacy data, that is, sensitive information, and use the large model to generate answer information that is adapted to the user's internal system, the embedding model can be privately deployed and the knowledge base of the user's internal information, that is, each word in the user's internal knowledge base, can be mapped into a vector through the embedding model and saved in the preset private knowledge base.

[0107] In an embodiment of the present application, a privately deployed embedding model can be used and each word in the user's internal knowledge base can be mapped into a vector through the embedding model and saved in a preset private knowledge base, so as to prevent the leakage of the user's internal privacy data, i.e., sensitive information, while using a large model to generate answer information that is adapted to the user's internal system.

[0108] Embodiment 8:

[0109] Based on the same technical concept, on the basis of the above embodiments, in the embodiments of the present application, a large model application device is provided. Figure 2 A schematic diagram of a large model application device provided in some embodiments of the present application. Figure 2 As shown, the device comprises:

[0110] A mapping module 201 is used to map each word contained in the input question information into a vector using a pre-trained embedding model;

[0111] The desensitization module 202 is used to perform a semantic similarity query in a pre-stored private knowledge base for each vector to obtain a target vector that matches the semantics of the vector; de-map each target vector into a target word; and desensitize sensitive information in the target word using a preset desensitization rule;

[0112] The application module 203 is used to input the question information, the target words without sensitive information and the target words containing sensitive information and after desensitization into the big model, and obtain the answer information corresponding to the question information generated by the big model according to each target word.

[0113] In a possible implementation, the desensitizing module 202 is also used to determine whether there is sensitive information in the words contained in the question information; if not, the subsequent step of combining the question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information into a large model to obtain the answer information corresponding to the question information generated by the large model according to each target word.

[0114] In a possible implementation manner, the desensitization module 202 is further configured to use the desensitization rule to desensitize sensitive information in the question information;

[0115] The application module 203 is also used to input the desensitized question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information into the large model, and obtain the answer information corresponding to the desensitized question information generated by the large model according to each target word.

[0116] In a possible implementation, the desensitization module 202 is further configured to use the desensitization rule to restore the desensitized target words containing sensitive information in the answer information to generate answer information before desensitization.

[0117] In a possible implementation, the desensitization module 202 is specifically configured to replace the sensitive information in the target word with the desensitized information according to the correspondence between each sensitive information and the desensitized information included in the desensitization rule.

[0118] In a possible implementation, the mapping module 201 is further configured to use the embedding model to map each word in a pre-stored user internal knowledge base into a vector; and store each vector in the private knowledge base.

[0119] In an embodiment of the present application, for the question information input by the user, a pre-trained embedding model is used to map each word contained in the question information into a vector; for each vector, a semantic similarity query is performed in a pre-saved private knowledge base to obtain a target vector that matches the semantics of the vector; and each target vector is inversely mapped into a target word; a preset desensitization rule is used to desensitize the sensitive information in the target word; then the question information, the target word that does not contain sensitive information, and the target word that contains sensitive information and is desensitized are input into the big model, and the answer information corresponding to the question information generated by the big model according to each target word is obtained, thereby improving the security of the user's internal sensitive information during the application of the big model.

[0120] Embodiment 9:

[0121] Based on the same inventive concept, on the basis of the above embodiments, the embodiment of the present application further provides an electronic device, which can realize the functions of the telephone switching device mentioned above. Figure 3 A schematic diagram of the structure of an electronic device provided in some embodiments of the present application. Figure 3 As shown, the electronic device includes: a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304;

[0122] The memory 303 stores a computer program. When the program is executed by the processor 301, the processor 301 performs the following steps:

[0123] For the input question information, a pre-trained embedding model is used to map each word contained in the question information into a vector;

[0124] For each vector, a semantic similarity query is performed in a pre-saved private knowledge base to obtain a target vector that matches the semantics of the vector; each target vector is reversely mapped into a target word; and the sensitive information in the target word is desensitized using a preset desensitization rule;

[0125] The question information, the target words that do not contain sensitive information, and the target words that contain sensitive information and are desensitized are input into the large model to obtain answer information corresponding to the question information generated by the large model according to each target word.

[0126] In a possible implementation, the processor 301 is also used to determine whether there is sensitive information in the words contained in the question information; if not, the subsequent step of combining the question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information into a large model to obtain answer information corresponding to the question information generated by the large model according to each target word.

[0127] In a possible implementation, the processor 301 is also used to desensitize sensitive information in the question information using the desensitization rule; input the desensitized question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information into the big model, and obtain the answer information corresponding to the desensitized question information generated by the big model according to each target word.

[0128] In a possible implementation, the processor 301 is further configured to use the desensitization rule to restore the desensitized target words containing sensitive information in the answer information to generate answer information before desensitization.

[0129] In a possible implementation, the processor 301 is further configured to replace the sensitive information in the target word with the desensitized information according to the correspondence between each sensitive information and the desensitized information included in the desensitization rule.

[0130] In a possible implementation, the processor 301 is further configured to use the embedding model to map each word in a pre-stored user internal knowledge base into a vector; and store each vector in the private knowledge base.

[0131] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0132] The communication interface 302 is used for communication between the electronic device and other devices.

[0133] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0134] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0135] In an embodiment of the present application, for the question information input by the user, a pre-trained embedding model is used to map each word contained in the question information into a vector; for each vector, a semantic similarity query is performed in a pre-saved private knowledge base to obtain a target vector that matches the semantics of the vector; and each target vector is inversely mapped into a target word; a preset desensitization rule is used to desensitize the sensitive information in the target word; then the question information, the target word that does not contain sensitive information, and the target word that contains sensitive information and is desensitized are input into the big model, and the answer information corresponding to the question information generated by the big model according to each target word is obtained, thereby improving the security of the user's internal sensitive information during the application of the big model.

[0136] Embodiment 10:

[0137] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, in which a computer program executable by a processor is stored. When the program runs on the processor, the processor implements the following steps when executing:

[0138] For the input question information, a pre-trained embedding model is used to map each word contained in the question information into a vector;

[0139] For each vector, a semantic similarity query is performed in a pre-saved private knowledge base to obtain a target vector that matches the semantics of the vector; each target vector is reversely mapped into a target word; and the sensitive information in the target word is desensitized using a preset desensitization rule;

[0140] The question information, the target words that do not contain sensitive information, and the target words that contain sensitive information and are desensitized are input into the large model to obtain answer information corresponding to the question information generated by the large model according to each target word.

[0141] In a possible implementation, after desensitizing sensitive information in the target word by using a preset desensitization rule, inputting the question information, the target word not containing sensitive information, and the desensitized target word containing sensitive information into the big model, and obtaining answer information corresponding to the question information generated by the big model according to each target word, the method further includes:

[0142] Determining whether there is sensitive information in the words contained in the question information;

[0143] If not, the subsequent step is to combine the question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information into a large model to obtain the answer information corresponding to the question information generated by the large model according to each target word.

[0144] In a possible implementation manner, if the words included in the question information contain sensitive information, the method further includes:

[0145] Using the desensitization rule to desensitize sensitive information in the question information;

[0146] The step of inputting the question information, the target words not containing sensitive information, and the desensitized target words containing sensitive information into the large model, and obtaining the answer information corresponding to the question information generated by the large model according to each target word includes:

[0147] The desensitized question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information are input into the large model, and the answer information corresponding to the desensitized question information generated by the large model according to each target word is obtained.

[0148] In a possible implementation, the method further includes:

[0149] The desensitization rule is used to restore the desensitized target words containing sensitive information in the answer information to generate answer information before desensitization.

[0150] In a possible implementation, the adopting a preset desensitization rule to desensitize sensitive information in the target word includes:

[0151] According to the correspondence between each sensitive information and the desensitized information contained in the desensitization rule, the sensitive information in the target word is replaced with the desensitized information.

[0152] In a possible implementation manner, the process of saving the vectors in the private knowledge base includes:

[0153] The embedding model is used to map each word in a pre-stored user internal knowledge base into a vector; and each vector is stored in the private knowledge base.

[0154] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical storage such as CD, DVD, BD, HVD, etc., and semiconductor storage such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD), etc.

[0155] In an embodiment of the present application, for the question information input by the user, a pre-trained embedding model is used to map each word contained in the question information into a vector; for each vector, a semantic similarity query is performed in a pre-saved private knowledge base to obtain a target vector that matches the semantics of the vector; and each target vector is inversely mapped into a target word; a preset desensitization rule is used to desensitize the sensitive information in the target word; then the question information, the target word that does not contain sensitive information, and the target word that contains sensitive information and is desensitized are input into the big model, and the answer information corresponding to the question information generated by the big model according to each target word is obtained, thereby improving the security of the user's internal sensitive information during the application of the big model.

[0156] Based on the same inventive concept, the embodiment of the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any large model application method discussed above. Since the principle of solving the problem by the above computer program product is similar to that of the large model application method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.

[0157] In an embodiment of the present application, for the question information input by the user, a pre-trained embedding model is used to map each word contained in the question information into a vector; for each vector, a semantic similarity query is performed in a pre-saved private knowledge base to obtain a target vector that matches the semantics of the vector; and each target vector is inversely mapped into a target word; a preset desensitization rule is used to desensitize the sensitive information in the target word; then the question information, the target word that does not contain sensitive information, and the target word that contains sensitive information and is desensitized are input into the big model, and the answer information corresponding to the question information generated by the big model according to each target word is obtained, thereby improving the security of the user's internal sensitive information during the application of the big model.

[0158] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0159] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0160] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0162] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A large model application method, characterized in that: The method comprises: For the input question information, a pre-trained embedding model is used to map each word contained in the question information into a vector; For each vector, a semantic similarity query is performed in a pre-saved private knowledge base to obtain a target vector that matches the semantics of the vector; each target vector is reversely mapped into a target word; and the sensitive information in the target word is desensitized using a preset desensitization rule; The question information, the target words that do not contain sensitive information, and the target words that contain sensitive information and are desensitized are input into the large model to obtain answer information corresponding to the question information generated by the large model according to each target word.

2. The method according to claim 1, characterized in that After desensitizing the sensitive information in the target words by using the preset desensitization rules, the question information, the target words not containing sensitive information, and the desensitized target words containing sensitive information are input into the big model, and before obtaining the answer information corresponding to the question information generated by the big model according to each target word, the method further includes: Determining whether there is sensitive information in the words contained in the question information; If not, the subsequent step is to combine the question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information into a large model to obtain the answer information corresponding to the question information generated by the large model according to each target word.

3. The method according to claim 2, characterized in that If the words included in the question information contain sensitive information, the method further includes: Using the desensitization rule to desensitize sensitive information in the question information; The step of inputting the question information, the target words not containing sensitive information, and the desensitized target words containing sensitive information into the large model, and obtaining the answer information corresponding to the question information generated by the large model according to each target word includes: The desensitized question information, the target words that do not contain sensitive information, and the desensitized target words that contain sensitive information are input into the large model, and the answer information corresponding to the desensitized question information generated by the large model according to each target word is obtained.

4. The method according to claim 1 or 3, characterized in that: The method further comprises: The desensitization rule is used to restore the desensitized target words containing sensitive information in the answer information to generate answer information before desensitization.

5. The method according to claim 1, characterized in that The method of using a preset desensitization rule to desensitize sensitive information in a target word includes: According to the correspondence between each sensitive information and the desensitized information contained in the desensitization rule, the sensitive information in the target word is replaced with the desensitized information.

6. The method according to claim 1, characterized in that The method of using a preset desensitization rule to desensitize sensitive information in a target word includes: The target word is input into a pre-fine-tuned desensitization model to obtain a target word that does not contain sensitive information or a target word that contains sensitive information and is desensitized and output by the desensitization model.

7. The method according to claim 1, characterized in that The process of saving the vectors in the private knowledge base includes: The embedding model is used to map each word in a pre-stored user internal knowledge base into a vector; and each vector is stored in the private knowledge base.

8. A large model application device, characterized in that: The device comprises: A mapping module, for mapping each word contained in the input question information into a vector using a pre-trained embedding model; The desensitization module is used to perform a semantic similarity query in a pre-saved private knowledge base for each vector to obtain a target vector that matches the semantics of the vector; de-map each target vector into a target word; and use a preset desensitization rule to desensitize sensitive information in the target word; The application module is used to input the question information, the target words that do not contain sensitive information, and the target words that contain sensitive information and are desensitized into the large model, and obtain the answer information corresponding to the question information generated by the large model according to each target word.

9. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in any one of claims 1-7 according to the obtained program instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Method and system for privacy data protection in big data analysis process

    CN119416250A

  • Information processing method and device based on large model, electronic equipment and storage medium

    CN119557528A

  • Financial data processing method, electronic equipment and computer readable medium

    CN120805193A

  • Content sharing method and device and electronic equipment

    CN121009572A

  • Rag data query method, apparatus and device based on privacy protection, and medium

    WO2026077344A1