Large model response content processing method and device, equipment, medium and product
By processing large model response content in segments using a sliding window and performing multi-dimensional sensitive information detection and desensitization, the problem of privacy leakage and business loss caused by sensitive information in large model response content has been solved, improving response speed and quality.
Patent Information
- Application Number
- CN202511476683.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2026-02-27
AI Technical Summary
The response content generated by the large model when processing user requests may contain sensitive information, leading to user privacy leaks or business losses. The centralized processing in the existing technology causes business delays and affects user experience.
The sliding window technique is used to divide the response content of the large model into multiple segments to be detected. Sensitive information is detected through the rule layer, model layer and business layer, and desensitization is performed separately. Then the segments are spliced together to form the target response content.
Without blocking the response of large models, real-time desensitization of sensitive information was achieved, improving response speed and user privacy security, reducing latency, and improving response quality.
Smart Images

Figure CN121580427A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computers, network security, etc., and particularly relates to a large model response content processing method and device, equipment, medium and product. BACKGROUND
[0002] With the development of large language models (LLM, referred to as large models), their application in natural language processing, intelligent customer service, intelligent question answering and other fields is becoming more and more widespread.
[0003] When processing user requests, large models may generate response content containing sensitive information, which may lead to user privacy leakage or business loss. Therefore, it is particularly important to detect and desensitize sensitive information in the response content of large models.
[0004] In related technologies, all response content of large models is usually collected for sensitive information detection and desensitization processing, and then forwarded to the client after processing, which may cause business lag and affect user experience. SUMMARY
[0005] The present disclosure provides a large model response content processing method, device, equipment, medium and product.
[0006] According to an aspect of the present disclosure, a large model response content processing method is provided, comprising: based on a sliding window, intercepting original response content of a large model to obtain a plurality of pieces of to-be-detected content; detecting sensitive information for each piece of to-be-detected content respectively, and desensitizing the sensitive information to obtain a plurality of pieces of desensitized content; and splicing the plurality of pieces of desensitized content to obtain target response content.
[0007] According to another aspect of the present disclosure, a large model response content processing device is provided, comprising: an intercepting module configured to intercept original response content of a large model based on a sliding window to obtain a plurality of pieces of to-be-detected content; a processing module configured to detect sensitive information for each piece of to-be-detected content respectively, and desensitize the sensitive information to obtain a plurality of pieces of desensitized content; and a splicing module configured to splice the plurality of pieces of desensitized content to obtain target response content.
[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of the above aspects.
[0009] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method according to any one of the aspects described above.
[0010] According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of the aspects described above.
[0011] According to the embodiments of the present disclosure, the response speed of the large model can be improved.
[0012] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0013] The accompanying drawings are used to better understand the present scheme, and do not limit the present disclosure. Among them:
[0014] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;
[0015] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;
[0016] Figure 3 is a schematic diagram of the acquisition process of the content to be detected according to the embodiments of the present disclosure;
[0017] Figure 4 is a schematic diagram of the sensitive information detection and desensitization processing process according to the embodiments of the present disclosure;
[0018] Figure 5 is a schematic diagram of the splicing process of the multi-segment desensitized content according to the embodiments of the present disclosure;
[0019] Figure 6 is a schematic diagram according to a third embodiment of the present disclosure;
[0020] Figure 7 is a schematic diagram of an electronic device for implementing the processing method of the large model response content according to the embodiments of the present disclosure. DETAILED DESCRIPTION
[0021] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0022] Figure 1 This is a schematic diagram based on the first embodiment of this disclosure. This embodiment provides a method for processing large model response content, such as... Figure 1 As shown, the method includes:
[0023] 101. Based on a sliding window, the original response content of the large model is truncated to obtain multiple contents to be detected.
[0024] 102. Desensitize each segment of the content to be detected separately to obtain multiple segments of desensitized content.
[0025] 103. The multiple desensitized content segments are spliced together to obtain the target response content.
[0026] The method in this embodiment can be executed by the server.
[0027] A sliding window is a technique for managing and processing data streams. Its core idea is to process the data within a window by sliding it across the data stream. The window moves forward over time or as data processing progresses, gradually covering the entire data stream. The window size can be fixed or dynamically changing.
[0028] The original response content refers to the response content generated by the large model, which may contain sensitive information.
[0029] The target response content refers to the response content after it has been anonymized, and the target response content is ultimately fed back to the user.
[0030] In the context of large models, the data stream mentioned above is specifically the raw response content of the large model. That is, by using a sliding window, the raw response content can be divided into multiple segments of content to be detected.
[0031] The original response content is generated in the form of a data stream. For example, each time a word is generated, taking the sliding window size as the data volume N as an example, assuming that the original response content includes the first word, the second word, the third word, and the fourth word, and assuming that the sum of the data volume of the first word and the second word is N, and the sum of the data volume of the third word and the fourth word is N, then the first word and the second word can be regarded as one segment of content to be detected, and the third word and the fourth word can be regarded as another segment of content to be detected.
[0032] The above example assumes that the content to be detected in different segments does not overlap. In practical applications, the content to be detected in different segments may also contain some overlapping content. For example, the first and second segmented words can be considered as one segment of content to be detected, while the second and third segmented words can be considered as another segment of content to be detected.
[0033] After obtaining the content to be detected in each segment, sensitive information detection is performed on each segment. After detecting sensitive information, the sensitive information is desensitized to obtain the desensitized content corresponding to each segment.
[0034] The acquisition and processing of different segments of the content to be detected can be performed in parallel. For example, when the second segment of the content to be detected is acquired through a sliding window, sensitive information detection and desensitization processing can be performed on the first segment of the content to be detected that has already been acquired in parallel, which can improve processing efficiency.
[0035] After obtaining multiple de-identified content segments, they are spliced together to obtain the target response content.
[0036] In this embodiment, the original response content of the large model is divided into multiple segments to be detected based on a sliding window. Sensitive information detection is performed on each segment separately. It is not necessary to wait for all the original response content to be collected before sensitive information detection is performed. This can reduce the latency of the target response content. Thus, the response content can be desensitized without blocking the response of the large model as much as possible, protecting user privacy and business security, and improving the response speed of the large model.
[0037] Figure 2 This is a schematic diagram based on the second embodiment of this disclosure. This embodiment provides a method for processing large model response content, such as... Figure 2 As shown, the method includes:
[0038] 201. Cache the original response content of the large model, wherein the original response content includes: multiple content units.
[0039] 202. Analyze each content unit to obtain the parsed content units.
[0040] 203. Combine the parsed content units located within the sliding window into a single piece of content to be detected.
[0041] In this context, a content unit refers to the basic unit that makes up the original response content. For example, if a large model generates a word segment each time, then each word segment can be considered as a content unit.
[0042] After generating each content unit, the large model caches that content unit.
[0043] Each content unit is parsed to obtain the parsed content unit, which refers to the valid data part. For example, a large model generates JSON format content units. After parsing the JSON format content units, a token sequence is obtained. Then, sensitive information detection and processing can be performed on the token sequence number.
[0044] One or more parsed content units located within the sliding window are concatenated into a single piece of content to be detected.
[0045] Figure 3 This is a schematic diagram illustrating the process of acquiring the content to be detected according to an embodiment of this disclosure.
[0046] like Figure 3 As shown, the original response content is continuously generated in units of content. After the large model generates each content unit, each content unit is cached. The content units are usually in JSON format. Then, a parser can be used to parse each content unit to obtain the corresponding parsed content units.
[0047] The sliding window is movable, sliding across the parsed content units. At a given sliding position, the parsed content units within the sliding window are concatenated into a segment of content to be detected. As the original response content is continuously generated and the sliding window moves, multiple segments of content to be detected are obtained.
[0048] After obtaining each segment of content to be detected, the segment is sent to the processor, which is used to perform sensitive information detection and subsequent processing on each segment of content to be detected.
[0049] After sending each segment of content to be detected to the processor, the storage space occupied by the corresponding content unit and the parsed content unit can be released so that subsequent data can continue to use this storage space, thereby improving resource utilization.
[0050] In this embodiment, by parsing the content units, the content to be detected can be obtained based on the parsed content units, which can improve the effectiveness of the content to be detected and improve the accuracy and efficiency of subsequent sensitive information detection and processing.
[0051] 204. Perform sensitive information detection on each segment of the content to be detected, and desensitize the sensitive information to obtain multiple segments of desensitized content.
[0052] Among them, multiple dimensions of sensitive information detection can be performed on each segment of the content to be detected.
[0053] Specifically, for each segment of content to be detected, a rule layer is used to determine whether the segment of content to be detected contains sensitive information; if the result of the rule layer is that it does not contain sensitive information, a model layer is used to determine whether the content to be detected contains sensitive information; if the result of the model layer is that it does not contain sensitive information, a business layer is used to determine whether the content to be detected contains sensitive information.
[0054] The rule layer can perform keyword matching or regular expression detection.
[0055] Taking keyword matching as an example, at least one keyword can be preset, and the content to be detected can be judged to see if it contains the preset keyword. If it does, it indicates that the content to be detected contains sensitive information. When there are multiple keywords, the matching process for multiple keywords can be performed in parallel, improving processing efficiency.
[0056] The model layer refers to the pre-trained detection model. The input of the detection model is the content to be detected, and the output is a binary classification result, i.e. whether it contains sensitive information. This detection model is a deep learning model, specifically the BERT model.
[0057] The detection model described above can be hot-updated, meaning that the detection model can be updated without restarting the service.
[0058] The business layer refers to the detection process that uses pre-configured business logic. For example, a business script can be dynamically loaded, and this script can be used to determine whether the content to be detected contains sensitive information.
[0059] When the detection results in any dimension contain sensitive information, the detected sensitive information can be desensitized.
[0060] Specifically, if the judgment result of the rule layer, the model layer, or the business layer is included, the current level corresponding to the sensitive information is determined; the processing strategy corresponding to the current level is adopted to de-identify the sensitive information; wherein, different levels correspond to different processing strategies.
[0061] Among them, the correspondence between levels and processing strategies can be pre-configured, and after the current level of sensitive information is determined, the corresponding processing strategy is used for processing.
[0062] Figure 4 This is a schematic diagram of the sensitive information detection and desensitization process provided in the embodiments of this disclosure.
[0063] like Figure 4 As shown, the pre-configured levels can include: dangerous, safe, and suspicious, with corresponding processing strategies of: intercept, allow, and log.
[0064] Therefore, if the current level of sensitive information is dangerous, it will be intercepted. Specifically, at least part of the sensitive information can be replaced with a specific identifier (such as *). For example, if the sensitive information is a mobile phone number, the middle four digits of the number can be replaced with *. Additionally, the information can be logged as an anomaly.
[0065] If the current level of sensitive information is secure, then the sensitive information can be allowed to pass through, meaning it can be directly reported to the user.
[0066] If the current level of sensitive information is suspicious, it can be logged as an anomaly and processed further based on a preset strategy. This further processing may include manual review; if the review is successful, the information is allowed to pass; otherwise, it is blocked.
[0067] In addition, high-risk or suspicious sensitive information can be recorded in the anomaly log.
[0068] When the current level is determined, if the result obtained by the rule layer or model layer contains sensitive information, the level can be considered dangerous. For the business layer, it can be graded based on confidence level. For example, when the business layer processes the data, it can determine the confidence level value. If it is less than the first threshold (e.g., 0.6), the current level is determined to be dangerous. If it is greater than the second threshold (e.g., 0.9), the current level is determined to be safe. If it is between the first and second thresholds, the current level is determined to be suspicious.
[0069] In this embodiment, by detecting sensitive information from multiple dimensions, more comprehensive detection of sensitive information can be achieved, improving reliability. Furthermore, different processing strategies can be used to achieve hierarchical management of sensitive information, improving processing effectiveness.
[0070] 205. The multiple desensitized content segments are spliced together to obtain the target response content.
[0071] Specifically, the category of each segment of de-identified content can be determined, and the category includes: factual content, or creative content; if the category is factual content, the corresponding de-identified content is subject to fact verification; or, if the category is creative content, the corresponding de-identified content is generated to obtain generated de-identified content; semantic fusion is performed on the de-identified content that has passed fact verification and / or the generated de-identified content to obtain fused content; coherence verification is performed on the fused content, and the fused content that has passed coherence verification is used as the target response content.
[0072] In the semantic fusion process, multi-head attention processing can be applied to the desensitized content verified by facts and / or the generated desensitized content to obtain intermediate fusion results; updated memory information is obtained based on the initial memory information and the intermediate fusion results; and the fused content is obtained based on the dialogue state machine and the updated memory information.
[0073] Figure 5 This is a schematic diagram of the splicing process of multiple desensitized content segments provided in the embodiments of this disclosure.
[0074] like Figure 5 As shown, for each segment of desensitized content, we can first determine its category, which includes factual content or creative content.
[0075] Specifically, multiple de-identified content segments can be combined into a de-identified content set. Each segment of de-identified content in this set is then input into a pre-trained classification model, and the output is the category of that de-identified content segment. This classification model can specifically be a CNN+BiLSTM classifier.
[0076] For factual content, it can be verified; for creative content, it can be generated.
[0077] The fact verification process can include: knowledge graph verification and coverage detection.
[0078] For specific knowledge graph verification, you can link to authoritative websites, such as Wikipedia, to find the knowledge graph content corresponding to the anonymized content.
[0079] Coverage detection can specifically employ ROUGE-L detection, a commonly used metric in automatic text summarization and machine translation evaluation. Based on ROUGE-L detection, the de-identified content and knowledge graph content are processed to evaluate the overall structure and logical coherence of the de-identified content. If the ROUGE-L metric of a certain segment of de-identified content meets the preset conditions, it indicates that the de-identified content has passed factual verification.
[0080] The creative generation process may include: Prompt semantic extension and style transfer processing.
[0081] For example, a prompt message can be pre-configured for the large model. Based on this prompt message, the desensitized content can be expanded. Then, a pre-trained model (such as StyleGAN) can be used to regenerate the expanded content. The core elements of the target style (such as artistic style, visual features, aesthetic features, etc.) can be extracted and transferred to the generated content. This allows the content generated by the large model to conform to specific style specifications while maintaining the core semantics, resulting in the generated desensitized content.
[0082] Obtain desensitized content that has been verified through facts, and / or, after generating the desensitized content, merge it to obtain merged content.
[0083] Specifically, multi-head attention processing can be applied to the desensitized content verified by facts, and / or the generated desensitized content, to obtain intermediate fusion features; updated memory features can be obtained based on historical memory features and the intermediate fusion features; and the fused content can be obtained based on the dialogue state machine and the updated memory features.
[0084] In this scenario, assuming the desensitized content verified by facts is the first text and the generated desensitized content is the second text, features can be extracted from the first and second texts respectively to obtain the first text features and the second text features. The first and second text features are then input into multiple pre-configured attention heads. For each attention head, a set of weighted features can be obtained. These weighted features are obtained by performing attention processing on the first and second text features using that attention head. Then, the multiple sets of weighted features from the multiple attention heads are fused, for example, by first concatenating them and then processing them through a linear layer to obtain intermediate fused features.
[0085] Since the original response content is continuously generated, the first and second texts are obtained based on the original response content. Therefore, the first and second texts are also constantly updated. Thus, intermediate fusion features of different rounds can be obtained based on the first and second texts at different times.
[0086] Historical memory features are vectors that record historical context, with initial values preset, such as an all-zero vector. They can then be updated based on the intermediate fusion features from each round.
[0087] For example, after obtaining the intermediate fusion features of the first round, the historical memory features of the first round (preset initial values) and the intermediate fusion features of the first round are fused together to obtain the fusion features of the first round; the fusion features of the first round are used as the historical memory features of the second round, and then fused with the intermediate fusion features of the second round to obtain the fusion features of the second round, and so on, to achieve continuous updating of historical memory features.
[0088] Historical memory features and intermediate fusion features can be fused using recurrent neural networks or attention mechanisms.
[0089] A dialogue state machine is used to track the progress of the interaction, determine the current semantic context, and decide on the subsequent processing logic to ensure that the output is consistent with the context.
[0090] For example, a dialogue state machine can determine the next operation based on the current state and the input information (intermediate fusion features), thereby obtaining fused content, that is, content that incorporates contextual information.
[0091] In this way, we can obtain fused content that incorporates contextual information, making the final target response more reasonable and coherent, and improving the response quality.
[0092] After obtaining the fused content, its coherence is evaluated, such as by performing coherence verification based on the BERT model, and the fused content that meets the requirements is taken as the target response content.
[0093] Once the target response content is obtained, it is fed back to the user.
[0094] Figure 6 The diagram is based on the third embodiment of the present disclosure. This embodiment provides a processing device for large model response content. The device 600 includes: an interception module 601, a processing module 602, and a splicing module 603.
[0095] The truncation module is used to truncate the original response content of a large model based on a sliding window to obtain multiple segments of the content to be detected.
[0096] The processing module is used to detect sensitive information in each segment of the content to be detected and to de-sensitize the sensitive information to obtain multiple segments of de-sensitized content.
[0097] The splicing module is used to splice the multiple desensitized content segments to obtain the target response content.
[0098] In some embodiments, the interception module 601 is further configured to:
[0099] The original response content of the cached large model includes multiple content units;
[0100] Each content unit is parsed to obtain the parsed content units;
[0101] The parsed content units located within the sliding window are concatenated into a single piece of content to be detected.
[0102] In some embodiments, the processing module 602 is further configured to:
[0103] For each segment of content to be detected, a rule layer is used to determine whether each segment of content to be detected contains sensitive information;
[0104] If the rule layer's judgment result is "not included", the model layer is used to determine whether the content to be detected contains sensitive information.
[0105] If the model layer's judgment result is "not included", the business layer is used to determine whether the content to be detected contains sensitive information.
[0106] In some embodiments, the processing module 602 is further configured to:
[0107] If the judgment result of the rule layer, the model layer, or the business layer is included, the current level corresponding to the sensitive information is determined;
[0108] The sensitive information is de-identified using the processing strategy corresponding to the current level; different levels correspond to different processing strategies.
[0109] In some embodiments, the splicing module 603 is further used for:
[0110] Determine the category of each segment of desensitized content, including: factual content, or creative content;
[0111] If the category is factual content, the corresponding de-identified content is verified; or, if the category is creative content, the corresponding de-identified content is generated to obtain the generated de-identified content.
[0112] Semantic fusion is performed on the de-identified content that has been verified through facts, and / or the generated de-identified content, to obtain fused content;
[0113] The fused content is subjected to coherence verification, and the fused content that passes the coherence verification is used as the target response content.
[0114] In some embodiments, the splicing module 603 is further used for:
[0115] Multi-head attention processing is applied to the desensitized content that has been verified through facts, and / or the generated desensitized content, to obtain intermediate fusion features;
[0116] Based on historical memory features and the intermediate fusion features, the updated memory features are obtained;
[0117] The fused content is obtained based on the dialogue state machine and the updated memory features.
[0118] It is understood that the same or similar content in different embodiments of this disclosure can be referred to each other.
[0119] It is understood that the terms "first" and "second" in the embodiments of this disclosure are only used for distinction and do not indicate the degree of importance or the order of events.
[0120] It is understandable that, unless otherwise specified, the order of steps in the process indicates that the temporal relationship between these steps is not limited.
[0121] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0122] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0123] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device 700 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0124] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. The RAM 703 may also store various programs and data required for the operation of the electronic device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 707 is also connected to the bus 704.
[0125] Multiple components in electronic device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of displays, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows electronic device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0126] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the method for processing large model response content. For example, in some embodiments, the method for processing large model response content may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the method for processing large model response content described above may be performed. Alternatively, in other embodiments, computing unit 701 may be configured by any other suitable means (e.g., by means of firmware) to perform processing methods for large model response content.
[0127] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0128] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable task processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0129] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0130] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0131] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0132] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0133] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0134] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for processing large model response content, characterized in that, include: Based on a sliding window, the original response content of a large model is truncated to obtain multiple segments of content to be detected; Sensitive information detection is performed on each segment of the content to be detected, and the sensitive information is then desensitized to obtain multiple segments of desensitized content. The multiple desensitized content segments are spliced together to obtain the target response content.
2. The method according to claim 1, characterized in that, The method involves using a sliding window to extract the original response content of a large model, resulting in multiple segments of content to be detected, including: The original response content of the cached large model includes multiple content units; Each content unit is parsed to obtain the parsed content units; The parsed content units located within the sliding window are concatenated into a single piece of content to be detected.
3. The method according to claim 1, characterized in that, The process of performing sensitive information detection on each segment of the content to be detected includes: For each segment of content to be detected, a rule layer is used to determine whether each segment of content to be detected contains sensitive information; If the rule layer's judgment result is "not included", the model layer is used to determine whether the content to be detected contains sensitive information. If the model layer's judgment result is "not included", the business layer is used to determine whether the content to be detected contains sensitive information.
4. The method according to claim 3, characterized in that, The process of desensitizing sensitive information includes: If the judgment result of the rule layer, the model layer, or the business layer is included, the current level corresponding to the sensitive information is determined; The sensitive information is de-identified using the processing strategy corresponding to the current level; different levels correspond to different processing strategies.
5. The method according to claim 1, characterized in that, The process of concatenating the multiple de-identified content segments to obtain the target response content includes: Determine the category of each segment of desensitized content, including: factual content, or creative content; If the category is factual content, the corresponding de-identified content is verified; or, if the category is creative content, the corresponding de-identified content is generated to obtain the generated de-identified content. Semantic fusion is performed on the de-identified content that has been verified through facts, and / or the generated de-identified content, to obtain fused content; The fused content is subjected to coherence verification, and the fused content that passes the coherence verification is used as the target response content.
6. The method according to claim 5, characterized in that, The semantic fusion of the de-identified content verified by facts, and / or the generated de-identified content, to obtain fused content includes: Multi-head attention processing is applied to the desensitized content that has been verified through facts, and / or the generated desensitized content, to obtain intermediate fusion features; Based on historical memory features and the intermediate fusion features, the updated memory features are obtained; The fused content is obtained based on the dialogue state machine and the updated memory features.
7. A processing device for large model response content, characterized in that, include: The truncation module is used to truncate the original response content of a large model based on a sliding window to obtain multiple segments of the content to be detected. The processing module is used to detect sensitive information in each segment of the content to be detected and to de-sensitize the sensitive information to obtain multiple segments of de-sensitized content. The splicing module is used to splice the multiple desensitized content segments to obtain the target response content.
8. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.
10. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.