Information processing method and device, electronic equipment, storage medium and program product
Patent Information
- Application Number
- CN202611088326.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-09
AI Technical Summary
然而,上述方案多面向完整报文或单分片处理,难以兼顾大模型服务常用的流式响应场景中敏感信息被拆分至多个分片时的准确还原
[0009]应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。
Smart Images

Figure CN122891307A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to the fields of large model technology, network security technology and intelligent agent technology, specifically to information processing methods, devices, electronic devices, storage media and program products. Background Technology
[0002] With the rapid development of large language models and intelligent agent technologies, sensitive information such as access keys, tokens, identity identifiers, and business parameters often appear in user requests and model responses during client-side invocation of large models for inference. To reduce the risk of sensitive information leakage, related technologies typically employ methods such as manual desensitization on the client side, gateway rule filtering, application-layer prompt word preprocessing, or ordinary reverse proxy text replacement. However, these solutions are mostly geared towards processing complete messages or single fragments, making it difficult to accurately restore sensitive information when it is split into multiple fragments in the streaming response scenarios commonly used in large model services. Summary of the Invention
[0003] This disclosure provides an information processing method, apparatus, electronic device, storage medium, and program product.
[0004] According to one aspect of this disclosure, an information processing method is provided, comprising: when a first response information from a service node that matches a target session includes at least one target character, in response to a second response information from the service node that matches the target session, concatenating the first response information and the second response information to obtain a third response information; restoring a first character sequence in the third response information to a second character sequence according to a target mapping relationship, wherein the first character sequence includes at least one target character, the target mapping relationship indicates a substitution relationship between the first character sequence and the second character sequence, and the second character sequence indicates sensitive information carried by the target session; and determining a target response information that matches the target session based on the processed third response information.
[0005] According to another aspect of this disclosure, an information processing apparatus is provided, comprising: a splicing module, configured to splice the first response information and the second response information to obtain third response information in response to a second response information from a service node that matches the target session, provided that the first response information from a service node matches the target session and includes at least one target character; a restoration module, configured to restore a first character sequence in the third response information to a second character sequence according to a target mapping relationship, wherein the first character sequence includes at least one target character, the target mapping relationship indicates a substitution relationship between the first character sequence and the second character sequence, and the second character sequence indicates sensitive information carried by the target session; and a determination module, configured to determine the target response information that matches the target session based on the processed third response information.
[0006] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.
[0007] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods described above.
[0008] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described above.
[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0010] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0011] Figure 1 An exemplary system architecture for which information processing methods and apparatus can be applied according to embodiments of this disclosure is illustrated schematically;
[0012] Figure 2 A flowchart illustrating an information processing method according to an embodiment of the present disclosure is shown schematically.
[0013] Figure 3 A flowchart illustrating an information processing method according to another embodiment of the present disclosure is shown schematically;
[0014] Figure 4 A flowchart illustrating an information processing method according to another embodiment of the present disclosure is shown schematically;
[0015] Figure 5 A flowchart illustrating an information processing method according to another embodiment of the present disclosure is shown schematically;
[0016] Figure 6 A flowchart illustrating an information processing method according to another embodiment of the present disclosure is shown schematically;
[0017] Figure 7 A block diagram of an information processing apparatus according to embodiments of the present disclosure is schematically shown.
[0018] Figure 8A block diagram of an electronic device suitable for implementing an information processing method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation
[0019] 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.
[0020] With the rapid development of large language models and intelligent agent technologies, many applications complete inference and task execution by calling large model interfaces. During this process, the interaction requests and responses between the client and the upstream large model or intelligent agent service often contain sensitive information such as access keys, tokens, credentials, identity identifiers, internal addresses, and business parameters. Sending this sensitive information directly to the upstream model service poses a risk of sensitive information leakage. Therefore, it is typically necessary to anonymize sensitive information in the request direction sent by the client and restore the anonymized content in the response direction returned by the upstream large model or intelligent agent. This ensures that the upstream service only accesses the anonymized data throughout the entire process, while the content obtained by the client is consistent with its original, true sensitive information.
[0021] In related technologies, the solutions relevant to this invention mainly include the following categories. The first category is client-side manual desensitization or log desensitization, where the caller manually deletes, replaces, or hides sensitive information before sending the request, or only masks sensitive fields when the log is written to disk. This type of solution usually lacks transparency and requires explicit modification of the business code. The second category is rule-based sensitive information filtering by gateways or network application firewalls. Regular expression rules are configured in application interface gateways, security gateways, network application firewalls, or data loss prevention systems to intercept, replace, or block sensitive fields in requests or responses. This type of solution is mostly applicable to complete Hypertext Transfer Protocol (HTTP) messages or structured fields. The third category is prompt word preprocessing desensitization for large model applications. The prompt word text is scanned and sensitive information is replaced in the model calling software development kit or application layer. The model then attempts to restore the text after returning. This type of solution is usually strongly coupled with a specific application. The fourth category is ordinary reverse proxy text replacement. A proxy performs string replacement or regular expression replacement in the request and response bodies to achieve sensitive information hiding and restoration. This type of solution mainly processes the entire request / response. The fifth category is single-shard replacement for streaming responses, which performs string replacement independently for each shard in Server Sent Events (SSE) or streaming shards, without maintaining cross-shard state.
[0022] However, the aforementioned technologies all have significant shortcomings. First, manual desensitization on the client side relies on business code cooperation, making it difficult to cover all call paths and achieve non-intrusive integration with existing toolchains. General gateways, network application firewalls, or data loss protection systems mainly focus on blocking, alarming, or field masking, typically without maintaining a two-way mapping between real sensitive information and falsified values, making it difficult to accurately restore the original content in the response direction. Second, existing desensitization solutions often only focus on "whether sensitive information is masked," ignoring the impact of desensitization processing on model request speed and model output. On the one hand, if sensitive information matching, mapping query, and response restoration are all processed serially and blocked on the request chain, it will increase the latency of large model calls, affecting the interactive experience of agent tasks. On the other hand, if the falsified values generated after desensitization differ significantly from the original sensitive information in length, character set, prefix / suffix, separator, field structure, or format rules, it may change the model's understanding of the context, disrupting protocol field validation, tool parameter generation, or multi-round context reference relationships, thereby affecting the model's output. Furthermore, if the generated falsified values from regular expression replacements do not maintain the original format, it may disrupt the format validation of upstream services, the model context structure, or protocol compatibility. If they are directly replaced with fixed placeholders, it may also affect the model's subsequent references to the context. Therefore, it is necessary to protect sensitive information while maintaining low latency in the request chain and ensuring that the generated falsified values have a consistent or compatible format with the original values.
[0023] Furthermore, conventional static data masking solutions are mostly geared towards complete text or complete HTTP packets. While they can handle non-streaming responses, they struggle to handle streaming responses like SSE commonly used in large model services. In SSE streaming responses, the same sensitive information falsified values may be split across multiple event or data shards. If string replacement is performed only within a single shard, cross-shard omissions are likely. Caching too much streaming content to handle cross-shard issues would disrupt the real-time performance of large model interactions, increasing first-word latency and end-to-end latency. Therefore, it is necessary to balance the accuracy of non-streaming whole-packet restoration with the real-time performance of streaming shard restoration. On the other hand, single-shard streaming replacement cannot identify falsified values split across multiple streaming shards, resulting in clients receiving unrestored falsified values and violating transparent proxy semantics. While rectifying and caching before processing can solve the cross-shard issue, it sacrifices the streaming experience, preventing users from seeing the model output in real time. Furthermore, the SSE structures of different large models or intelligent agent protocols vary greatly, with different field names, event types, and request body structures. If each protocol implements its own desensitization logic, the maintenance cost is high and it is difficult to extend. The general replacement logic is difficult to reuse, and when adding a new protocol, it is often necessary to repeatedly implement the parsing, extraction, and replacement logic.
[0024] Furthermore, agent tasks typically consist of multiple HTTP requests, and the same logical session may span multiple session identifiers, multiple interface paths, and various request body formats. If each HTTP request or connection generates a mapping independently, the same real sensitive information will correspond to different falsified values in different rounds, different interfaces, or different asynchronous responses, leading to inconsistencies in the credential identifiers seen by the upstream model in different rounds. Since the upstream model relies on context continuity for inference and tool calls, inconsistent falsified values will prevent the model from determining that multiple locations are referencing the same credential, potentially generating contradictory tool parameters or incorrectly treating the same credential as multiple credentials, thus disrupting the reference relationship to the same credential in multiple rounds of context. Simultaneously, response reconstruction relies on the reverse mapping from falsified values to real sensitive information. If a subsequent response contains a falsified value generated by a historical request, and the current request does not hold the corresponding mapping, reconstruction cannot be completed, leading to falsified values leaking to the client or being reconstructed as incorrect real values, resulting in context confusion, inconsistent tool parameters, and response reconstruction failures.
[0025] Furthermore, most current mainstream large-scale models have incorporated extended thinking capabilities. These capabilities include a signature field along with the model's output thinking content to verify its integrity and prevent client-side tampering and resubmission. If a transparent proxy modifies the thinking content in the response (restoring a false value to genuine sensitive information), the client's saved thinking content will no longer match the signature. In the next request, if the proxy again desensitizes the genuine sensitive information to a false value, the thinking content will be restored to a version consistent with the signature, but the original signature will be discarded, ultimately causing upstream signature verification to fail. This type of signature verification mechanism is prevalent in large-scale models with thinking patterns, and related desensitization schemes have not considered compatibility with this common scenario.
[0026] In view of this, embodiments of the present disclosure provide an information processing method, comprising: when a first response information from a service node that matches a target session includes at least one target character, in response to a second response information from the service node that matches the target session, concatenating the first response information and the second response information to obtain a third response information; according to a target mapping relationship, restoring a first character sequence in the third response information to a second character sequence, wherein the first character sequence includes at least one target character, the target mapping relationship indicates the substitution relationship between the first character sequence and the second character sequence, and the second character sequence indicates sensitive information carried by the target session; and determining a target response information that matches the target session based on the processed third response information.
[0027] Through the above embodiments of this disclosure, in the case where false values after desensitization processing under streaming response are divided into two adjacent segments, the previous response information and the current response information are spliced together and restored, which can improve the detection effect of false values and avoid abnormal response results.
[0028] Figure 1 An exemplary system architecture for which information processing methods and apparatus can be applied according to embodiments of this disclosure is illustrated schematically.
[0029] like Figure 1 As shown, in the system architecture 100 of this embodiment, an application 125 is installed on a terminal device 110. A user 140 can interact with the application 125 via the terminal device 110 and / or an attached device of the terminal device 110.
[0030] In some embodiments, application 125 can be downloaded and installed on terminal device 110. In some embodiments, application 125 can also be accessed in other ways, such as through a web page. Figure 1 In the system architecture 100, in response to the application 125 being launched, the terminal device 110 can display the interface 150 of the application 125.
[0031] In some embodiments, terminal device 110 can communicate with server 130 to provide services to application 125. Terminal device 110 can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, terminal device 110 can also support any type of user-facing interface. Application 125 can be various types of computing systems / servers capable of providing computing power, including but not limited to mainframes, edge computing nodes, and computing devices in cloud environments.
[0032] In some embodiments, application 125 can provide interaction capabilities with an intelligent agent. Application 125 may include an application specifically designed to provide services to an intelligent agent, or an application integrated with an intelligent agent. Although Figure 1 The image shows a single application, but in reality, multiple applications can be installed on the terminal device 110.
[0033] In embodiments of this application, multiple intelligent agents 160 can be deployed locally on terminal device 110 or remotely. When deployed remotely, terminal device 110 can directly invoke the intelligent agents, or it can invoke them via a proxy node 130, such as a reverse proxy server, service mesh, Hypertext Transfer Protocol middleware, Software Development Kit interceptor, or browser plugin. Exemplarily, intelligent agent 160 can have intelligent dialogue and task processing capabilities. Terminal device 110 provides an interface 150 that can present interactions with intelligent agent 160. In interface 150, user 140 can initiate task requests to intelligent agent 160 by inputting natural language (e.g., text input or voice input). Optionally, user 140 can upload online or offline file dialogues to instruct intelligent agent 160 to assist in completing various tasks.
[0034] In the embodiments of this application, during interaction with user 140, intelligent agent 160 can respond to user 140's requests and handle tasks instructed by the user. In some embodiments, during task processing, intelligent agent 160 can invoke one or more tools 165 to assist in task execution and the provision of task results as needed. These tools 165 can be any type of tool, such as text generation tools, file reading tools, information search tools, online or offline databases, image processing tools, chart generation tools, web page creation tools, etc.
[0035] In some embodiments, system architecture 100 may further include a management node for multiple agents 160, which can interact with the agents 160. In some examples, the management node may, in response to a task request from user 140, determine the task requirements corresponding to the task request. The management node may then, based on the task requirements, assign the task request to the agent 160 that matches the task requirements, requesting that agent 160 to execute the task. In other examples, the management node may also determine an execution plan for the task based on the task requirements. The execution plan may indicate one or more subtasks required to complete the task. The management node may assign these one or more subtasks to one or more agents 160, which will then execute their respective subtasks. Regarding the management node, in some examples, the management node may be implemented by one of the multiple agents 160. In other examples, the management node may be implemented by a machine learning model, such as a language model.
[0036] In some embodiments, agent 160 may be constructed based on one or more machine learning models. In some embodiments, the machine learning model on which agent 160 is based may include at least a language model, such as a large language model. In some embodiments, the machine learning model on which agent 160 is based may include a multimodal model capable of handling multiple modal inputs, such as text input, visual input (e.g., images, videos), audio input, etc. These machine learning models may include content-generating models capable of generating corresponding outputs based on model inputs. In some embodiments, the machine learning model may receive text-modal model inputs (e.g., natural language and / or machine language) and / or non-text-modal model inputs (e.g., images, speech, videos, etc.), and may obtain corresponding model outputs based on model inputs and prompts, thereby completing the task execution.
[0037] It should be noted that the information processing method provided in this embodiment can generally be executed by the proxy node 130. Accordingly, the information processing device provided in this embodiment can also be located in the proxy node 130.
[0038] It should be understood that Figure 1 The number of terminal devices and intelligent agents shown is merely illustrative. Depending on implementation needs, any number of terminal devices and intelligent agents can be included.
[0039] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of any type of information, such as user personal information, comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and they do not violate public order and good morals.
[0040] In the technical solution disclosed herein, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0041] It should be noted that the sequence numbers of the operations in the following methods are for descriptive purposes only and should not be considered as indicating the execution order of the operations. Unless explicitly stated otherwise, the method does not need to be executed in the exact order shown.
[0042] Figure 2 A flowchart illustrating an information processing method according to an embodiment of the present disclosure is shown schematically.
[0043] like Figure 2 As shown, the method includes operations S210~S230.
[0044] In operation S210, if the first response information from the service node that matches the target session includes at least one target character, in response to the second response information from the service node that matches the target session, the first response information and the second response information are concatenated to obtain the third response information.
[0045] In this embodiment, the service node can refer to an upstream large model server or an intelligent agent server. It is understood that the aforementioned large model server or intelligent agent server parses and analyzes the conversation information in the target conversation by running one or more generative large models, and outputs corresponding response information. The type of generative large model can be a large language model that processes text input and outputs corresponding response information, or it can be a multimodal generative model, such as one that can process multimodal inputs such as text input, visual input, and audio input, and output corresponding response information.
[0046] In this embodiment, the target session can refer to the logical session between the client and the service node. The session information sent to the service node via the proxy node can be session information that has undergone desensitization processing. It is understood that the session information sent by the client may include sensitive information, which is the real sensitive value (true value). The proxy node can perform desensitization processing on the session information by replacing the real sensitive value in the session information with the corresponding false value.
[0047] The first response information can refer to the event block or text block returned by the service node in the SSE streaming mode. Specifically, it can also be the incremental information extracted by the protocol adapter from the event block returned by the service node, such as text increment, thought increment, content increment, etc.
[0048] It is understandable that during streaming output, due to its transmission mechanism, a complete sensitive information falsified value may be split, resulting in the first and second halves of the falsified value belonging to different event blocks or text blocks. In this embodiment, the target character can be either the character included in the first half of the falsified value or the character included in the second half of the falsified value.
[0049] For example, if the first response information includes the first half of the false value indicating that the false value has been split, then the second response information could refer to the incremental text fragment returned by the service node that matches the target session and is time-sequentially located after the first response field. As another example, if the first response information includes the second half of the false value indicating that the false value has been split, then the second response information could refer to the incremental text fragment returned by the service node that matches the target session and is time-sequentially located before the first response field.
[0050] If the first response information hits at least one target character, it indicates that the sensitive information falsity has been split, which may result in the first response information including the first half or the second half of the falsity, while the other part of the falsity is in the second response information. Therefore, the first response information and the second response information can be concatenated to obtain the concatenated information, which is the third response information. Then, the sensitive information is restored from the third response information.
[0051] In operation S220, according to the target mapping relationship, the first character sequence in the third response information is restored to the second character sequence. The first character sequence includes at least one target character. The target mapping relationship indicates the substitution relationship between the first character sequence and the second character sequence. The second character sequence indicates the sensitive information carried by the target session.
[0052] In this embodiment of the disclosure, the target mapping relationship can refer to the mapping relationship between the first character sequence and the second character sequence. This mapping relationship is a bidirectional mapping relationship for sensitive information, and can be specifically stored in a bidirectional mapping table for sensitive information. The first character sequence can be a false value generated when the original sensitive information is desensitized, and the second character sequence is a real value that has a mapping relationship with the first character sequence, that is, the original sensitive information that needs to be protected and carried by the client.
[0053] Optionally, after obtaining the third response information, the target mapping relationship can be determined from the sensitive information bidirectional mapping table based on the first character sequence in the third response information, thereby determining the second character sequence. After determining the second character sequence, the first character sequence included in the third response information can be restored to the second character sequence.
[0054] In operation S230, the target response information that matches the target session is determined based on the processed third response information.
[0055] In this embodiment, it can be detected whether the processed third response information includes the target character. If the processed third response information includes the target character, it indicates that there is still information in the processed third response information that needs to be restored, such as the text ending with a falsified suffix. In this case, the third response information needs to be cached, and after receiving the next response information, the third response information is concatenated with the next response information, and the detection and restoration process is performed. If the processed third response information does not include the target character, nor does it include any complete falsified value, then the processed third response information can be used as the target response information matching the target session.
[0056] Furthermore, the third response information may also include complete false values. For example, it can be determined whether the third response information includes complete false values by matching the false values stored in the sensitive information bidirectional mapping table. If it is determined that the third response information includes complete false values, it is also necessary to perform a replacement operation on the detected complete false values to restore the false values to the corresponding real sensitive values. The real sensitive values corresponding to the false values can be determined through the sensitive information bidirectional mapping table.
[0057] It is understood that, in the case of a false value being split into two adjacent segments under streaming response, the embodiments of this disclosure concatenate the previous incremental text with the current incremental text and restore it, which can improve the detection effect of false values and avoid abnormal response results.
[0058] According to embodiments of this disclosure, the method further includes: verifying the first response information based on a set of reference sequences; caching the first response information if the first response information meets the verification conditions; and determining the first response information as the target response information matching the target session if the first response information does not meet the verification conditions, wherein the set of reference sequences includes at least one reference character sequence, the at least one reference character sequence includes the first character sequence, and the at least one reference character sequence is used to replace its respective sensitive character sequence.
[0059] In this embodiment of the disclosure, the reference sequence set may refer to a set including at least one reference character sequence. The reference character sequence included in this set is a false value used to replace the sensitive character sequence during the request direction desensitization process. Validating the first response information may refer to verifying whether there is a correlation between the first response information and the reference character sequence included in the reference sequence set. For example, if the first response information includes the first character sequence, that is, the first response information includes the complete false value. Or, for example, if the first response information includes a component of the first character sequence, such as a prefix or suffix of the first character sequence, that is, the tail segment of the first response information includes the prefix of the false value, or the head segment of the first response information includes the suffix of the false value. In the case where there is a correlation between the first response information and the reference character sequence, the first response information can be considered to meet the validation conditions.
[0060] If the first response information meets the verification conditions, it can be cached to wait for the next response information. After receiving the next response information, it can be concatenated and restored, or concatenated and restored with the previous response information.
[0061] If the first response information does not meet the verification conditions, it can be assumed that the first response information does not include false values and their prefixes and suffixes. In other words, the first response information does not need to be desensitized and restored. In this case, the first response information can be determined as the target response information that matches the target session, and then the target response information can be directly returned to the client.
[0062] This embodiment of the disclosure distinguishes between response information that needs to be cached and restored and target response information that can be directly returned to the client by verifying the conditions. This can accurately identify the response information that needs to be restored and avoid the problem of missing restoration.
[0063] According to embodiments of this disclosure, the first response information and the second response information are adjacent response information in the response information stream returned by the service node; the method further includes, after caching the first response information: sending reference response information to the client that initiated the target session, the reference response information being used to maintain the session connection between the service node and the client; and, if the target response information matching the target session is determined based on the processed third response information, sending the target response information to the client.
[0064] In this embodiment of the disclosure, the reference response information may refer to the keep-alive annotation or keep-alive bytes sent by the proxy node, i.e. the execution subject of this method, to the client during the caching of the first response information, for maintaining the session connection liveness. For example, it may be an SSE comment line, an empty data event, or a heartbeat frame allowed by the protocol. The reference response information may not carry specific business data or model response content to avoid changing the business semantics, and at the same time to prevent the connection between the client and the upstream service from being closed due to empty output or timeout during the waiting period.
[0065] While maintaining the connection, for example, the proxy node can continue to receive the second response information, and concatenate the first and second response information to obtain the third response information. Then, it can restore the third response information. If the target response information matching the target session is determined based on the processed third response information, the target response information can be sent to the client.
[0066] This embodiment of the disclosure can avoid the client triggering a timeout or reconnection mechanism due to not receiving data for a long time by sending reference response information to the client during the cache waiting period, thereby avoiding the session connection being disconnected and maintaining the connection state of the current session.
[0067] According to embodiments of this disclosure, the verification conditions include at least one of the following: the tail segment of the first response information includes at least one reference character, which is a prefix character of a reference character sequence; the head segment of the first response information includes at least one reference character, which is a suffix character of a reference character sequence; the first response information includes a reference character sequence.
[0068] In this embodiment, if the tail segment of the first response information includes at least one reference character, it indicates that the reference character sequence to which the reference character belongs has been segmented into two response messages. The first response information includes the prefix character of the reference character sequence. In this case, the first response information can be cached first, waiting to receive the second response information, which is the response information adjacent to the first response information in the streaming information stream and sequentially following the first response information. After receiving the second response information, the first response information and the second response information can be concatenated to obtain the third response information, and the reference character sequence in the third response information can be restored to its original true value.
[0069] If the header segment of the first response information includes at least one reference character, it means that the reference character sequence to which the reference character belongs has been split into two response information. The first response information includes the suffix character of the reference character sequence. In this case, the previous response information adjacent to the first response information is read from the cache and concatenated. The reference character sequence in the concatenated response information is then restored to its original true value.
[0070] If the first response message includes a reference character sequence, it means that the first response message contains a complete false value, and is not a prefix or suffix of a false value. In this case, the reference character sequence included in the first response message can be directly replaced with the corresponding true value and then sent to the client.
[0071] By setting the above-mentioned verification conditions, the embodiments of this disclosure can accurately identify false values in the response information received in the streaming response scenario, thereby reducing the probability of missing restoration in the streaming response scenario.
[0072] Figure 3 A flowchart illustrating an information processing method according to another embodiment of this disclosure is shown schematically, such as... Figure 3 As shown, the method includes operations S301 to S312.
[0073] In operation S301, in response to receiving a streaming response fragment, incremental text is extracted using the protocol adapter.
[0074] After receiving an SSE event block or data fragment from an upstream service, the proxy node calls the text extraction interface of the protocol adapter to extract the payload text to be processed from the event block or data fragment, such as the content of the SSE data field, incremental text of thought content, etc.
[0075] In operation S302, the current incremental text is concatenated with the text cached in the previous session.
[0076] The incremental text extracted from the current segment is concatenated with the text fragment temporarily cached in the previous round due to prefix matching to form the text to be detected. It should be noted that in actual application, if there is no cached text, operation S302 can be skipped and operation S303 and subsequent operations can be executed directly.
[0077] In operation S303, determine whether the concatenated text matches a complete false value.
[0078] For example, a multi-pattern matching algorithm can be used to detect whether the concatenated text contains any complete false value from the current session's false value set. If a match is found, operation S304 is executed; otherwise, operation S306 is executed.
[0079] In operation S304, the false value is replaced with the true value.
[0080] If a complete false value is hit, the false value is replaced with the corresponding real sensitive information according to the mapping relationship between the false value and the real value.
[0081] In operation S305, write back the current event and output it.
[0082] For example, the replaced text can be written back to an SSE event or data block via a protocol adapter and sent to the client.
[0083] In operation S306, determine whether the end of the concatenated text is a false prefix.
[0084] If no complete false value is found, check if the end of the concatenated text is a prefix of any false value. If so, it means the false value may be split into subsequent segments, and operation S308 is executed; otherwise, operation S307 is executed.
[0085] When operating S307, output the current event.
[0086] If the concatenated text does not end with a false prefix, it means that the current fragment does not involve crossing fragment boundaries, and the current event is directly output to the client.
[0087] When operating S308, determine whether the event type has changed.
[0088] Check if the event type of the current event is different from the previous cached event type. If a switch occurs, event content with different semantics cannot be concatenated together, and operation S309 needs to be executed; otherwise, operation S312 is executed.
[0089] During operation S309, refresh the cache.
[0090] If the event type is switched, the currently cached text is discarded or output as an independent event to prevent the incorrect splicing of text with different semantics.
[0091] When operating S310, cache the current text or event.
[0092] When the last part is a false prefix, the current concatenated text can be cached in the session buffer and concatenated again when the next fragment arrives.
[0093] When operating S311, a keep-alive signal is output.
[0094] While waiting for the next fragment, to prevent the client connection from closing due to timeout, send a keep-alive signal allowed by the protocol, such as an SSE comment line.
[0095] Operating S312, waiting for the next slice.
[0096] End the current fragment processing, wait for the next SSE event block to arrive, and continue to execute operation S301.
[0097] According to embodiments of this disclosure, the method further includes, upon receiving signature information that matches the first response information: caching the first response information and the signature information; establishing a mapping relationship between a replacement identifier and the first response information and the signature information; and sending the target response information and the replacement identifier to the client that initiated the target session.
[0098] In this embodiment, the signature information may refer to the signature field sent by the upstream service along with the first response information. The signature information can be used to verify the integrity of the thought content. However, after the response restores the false value to the real sensitive information, the thought content actually stored on the client containing the real sensitive information will be inconsistent with the thought content containing the false value corresponding to the upstream service's signature. Therefore, related technologies typically discard the original signature to prevent the client from performing invalid verification. However, in the next round of dialogue requests, the proxy will again desensitize the real sensitive information to a false value. At this time, the thought content is restored to a version consistent with the signature, but the original signature has been discarded, causing the upstream signature verification to fail.
[0099] To address the aforementioned issues, this embodiment of the present disclosure, upon receiving signature information matching the first response information, can first associate and store the first response information and signature information in a global signature cache. Then, a mapping relationship is established between a replacement identifier and the first response information and signature information. The replacement identifier uses a special format invisible to the client interface, such as a zero-width character sequence. Next, the replacement identifier can be used as a key, and the anonymized first response information (i.e., the thought content containing a false value) and the signature information (i.e., the original signature value) can be written together into the global signature cache as the values corresponding to this key. Finally, the client initiating the target session sends the target response information and the replacement identifier.
[0100] Taking the response information as the thought content as an example, an additional thought content fragment event can be constructed. This event carries the replacement identifier and is appended to the original thought content before being sent, so that the client automatically carries the identifier when storing or caching the thought content. At the same time, the proxy node discards the original signature increment event and does not send the signature information to the client, preventing the client from directly saving the original signature.
[0101] This embodiment of the disclosure establishes a mapping relationship between the replacement identifier and the first response information and signature information; and sends the target response information and replacement identifier to the client that initiates the target session, which can avoid the problem of signature verification failure due to modification of the response content.
[0102] Figure 4 A flowchart illustrating an information processing method according to another embodiment of this disclosure is shown schematically, such as... Figure 4 As shown, the method includes operations S410 to S460.
[0103] When operating S410, receive the streaming response returned by the service node.
[0104] The proxy node receives the SSE streaming response returned by the upstream large model service. This response may contain two types of events related to extended thinking capabilities: thought content increment events and signature increment events. The thought content increment events are used to carry the thought content text output by the model, and the signature increment events are used to carry the signature value used to verify the integrity of the thought content.
[0105] During operation S420, the first response information is accumulated, and it is recorded whether the first response information has undergone false value restoration.
[0106] In the SSE response stream, the first response information of the current thought content block, i.e., the incremental text, is accumulated in real time. At the same time, it is recorded whether the thought content block has undergone the restoration operation from the first character sequence (i.e., false value) to the second character sequence (i.e., real sensitive information).
[0107] In operation S430, it is determined whether the first response information has undergone sensitive replacement when the signature information matching the first response information is received.
[0108] When the agent node receives the signature increment event, i.e. the signature information, corresponding to the currently accumulated thought content block, it determines whether the first response information has undergone sensitive replacement based on the record in operation S420. If sensitive replacement has occurred, operation S450 is executed; otherwise, operation S440 is executed.
[0109] When operating S440, the signature increment event is transmitted as is.
[0110] If the initial response information has not undergone any sensitive replacements, the proxy node does not need to perform any special processing on the signature. It simply transmits the signature increment event to the client as is, without performing any caching or tag injection operations. In other words, the thought content has not been modified, the original signature remains valid, and the client's thought content matches the signature.
[0111] In operation S450, a replacement tag is generated and a mapping relationship is established between the replacement identifier and the first response information and signature information, and then written to the signature cache.
[0112] For example, if the first response information has not undergone sensitive replacement, a unique identifier can be generated as a replacement identifier. This identifier is used as the key, and the first response information and signature information are used as the values to write to the global signature cache. In addition, a cleanup flag can also be written to the global signature cache as a value. The cleanup flag is used to decide whether to retain or evict the key-value pair after the next round of request processing is completed. For example, for records that need to support the continuation of dialogue in historical sessions, they are not actively expired by default. That is, the cleanup flag indicates that the key-value pair is retained. The expiration time can be configured according to the life cycle of the historical session. After the expiration time is reached, the cleanup flag indicates that the key-value pair is cleaned up.
[0113] When operating S460, the replacement identifier is sent to the client along with the target response information, and the original signature increment event is discarded.
[0114] For example, the replacement identifier can be written to the end of the target response message and sent to the client, while discarding the original signature increment event and not sending the signature information to the client, so that the client cannot directly save the original signature.
[0115] According to embodiments of this disclosure, the method further includes: in response to receiving first session information from a client, if the first session information carries a replacement identifier, obtaining first response information and signature information according to the replacement identifier; replacing fragment response information carried in the first session information with the first response information, and replacing the second character sequence in the first session information with the first character sequence to obtain second session information, wherein the fragment response information is an information fragment in the target response information that matches the first response information; and sending signature information and second session information to a service node, wherein the signature information is used to perform consistency verification at the service node.
[0116] In this embodiment of the disclosure, the first session information may refer to a request initiated by the client to the service node, i.e., the upstream model or the upstream agent. The request carries the historical thinking content stored by the client. If the request carries a replacement identifier, it means that the thinking content in the request includes the content to be replaced, i.e., the thinking content has undergone the process of replacing the false value with the true value.
[0117] In this case, the fragment response information carried in the first session information can be replaced with the first response information. Optionally, the first response information can be obtained from the cache according to the replacement identifier. The fragment response information refers to the part of the target response information that corresponds to the first response information.
[0118] In addition, the first session information may also include other sensitive information. For example, in addition to the historical thinking content, the first session information may also include newly sent request information. This newly sent request information may include sensitive information, namely the second character sequence. Therefore, the second character sequence included in the first session information needs to be replaced with the first character sequence.
[0119] Therefore, after the above processing, the second session information is the request data prepared to be sent to the service node after the proxy node processes the sensitive real values in the first session information. This second session information can be used for consistency verification using signature information. For example, the signature information can be obtained from the cache based on the replacement identifier, and then the signature of the thought content in the second session information can be recalculated and compared with the obtained signature information to verify whether the thought content has been tampered with during transmission and storage.
[0120] In the next round of dialogue requests, this embodiment identifies the first session information with a replacement identifier sent by the client, determines the original signature and the desensitized first response information corresponding to the previous round, and can re-desensitize the first session information and use the original signature information for consistency verification, thereby accurately identifying whether the thought content has been tampered with during transmission and storage.
[0121] Figure 5 A flowchart illustrating an information processing method according to another embodiment of this disclosure is shown schematically, such as... Figure 5 As shown, the method includes operations S510 to S560.
[0122] When operating S510, the client returns the first session information, which includes the content of the previous thought process.
[0123] In the next round of dialogue, the client can send the request data containing historical thought content stored in the previous round's response to the proxy node. The thought content in this first session information may contain a replacement identifier injected by the proxy node in the previous response phase, and the sensitive information in the thought content is the real value, that is, the real value restored by the proxy node in the response direction.
[0124] In operation S520, determine whether the first session information includes a replacement identifier.
[0125] For example, it can be determined whether there is a replacement identifier at the end of the target response information in the first session information. If a replacement identifier is included, operation S530 is executed; otherwise, operation S560 is executed.
[0126] When operating the S530, the signature cache is queried based on the replacement identifier to determine the original signature information, the desensitized thought content, and the cleanup mark.
[0127] After detecting the replacement identifier, the proxy node uses the replacement identifier as the key to query the global signature cache to determine the original signature information, the de-identified thought content, and the cleanup mark.
[0128] In operation S540, the fragment response information in the first session information is replaced with the desensitized thought content, and the second character sequence is replaced with the first character sequence to obtain the second session information.
[0129] When operating the S550, a decision on whether to evict the cache is made based on the cleanup flag.
[0130] For example, if the cleanup tag representation is eliminated, the key-value pair to which the replacement tag belongs is deleted from the global signature cache to free up storage space. If the cleanup tag representation is retained, the record is retained in the cache so that when the same historical thought content appears again in subsequent rounds, the signature can still be queried and restored through the replacement tag.
[0131] When operating the S560, perform the standard de-identification process and send the de-identified thought content and original signature to the upstream service node.
[0132] The proxy node writes the original signature information into the signature field corresponding to the second session information, then performs a regular desensitization process on other unprocessed potentially sensitive information in the second session information, and sends the desensitized content and the original signature to the upstream service node.
[0133] According to embodiments of this disclosure, the method further includes: in response to receiving session request information from a client, performing sensitive sequence detection on the session request information, the session request information being used to initiate a target session; if a second character sequence is detected, determining a first character sequence matching the second character sequence according to a replacement rule; replacing the second character sequence with the first character sequence, and sending the processed session request information to the service node.
[0134] In this embodiment of the disclosure, the session request information may refer to the HTTP / HTTPS request sent by the client when initiating a target session with the service node, i.e., the upstream large model or intelligent agent service, including the request line, request header, and request body. This request may carry sensitive information such as access keys, tokens, credentials, and identity identifiers, and therefore may need to be de-identified before being forwarded to the upstream service.
[0135] For example, after receiving a session request from a client, it is necessary to perform sensitive sequence detection on the session request information. This involves scanning and analyzing the text content of the session request information to identify whether it contains sensitive information that needs protection. This detection can be performed by a pluggable sensitive information matching engine, supporting various strategies such as regular expression matching, blacklist / whitelist matching, and external model matching.
[0136] If the session request information contains a second character sequence, the first character sequence that matches the second character sequence can be determined according to the replacement rules. Then, the second character sequence is replaced with the first character sequence. For example, it can be obtained by looking up a table from an existing mapping, dynamically generating new false values according to the format rules and establishing a mapping, or generating fixed false values through deterministic hash mapping, etc. Then, the de-identified session request information is sent to the service node.
[0137] This embodiment of the disclosure ensures that sensitive information is not leaked to third-party service nodes by performing sensitive sequence detection on session request information and de-identifying it according to replacement rules.
[0138] According to embodiments of this disclosure, the replacement rules include at least one of the following: determining the second field format of the reference character sequence based on the first field format of the sensitive character sequence; determining the second sequence semantics of the reference character sequence based on the first sequence semantics of the sensitive character sequence; and determining at least one character constituting the reference character sequence based on the character set to which at least one character in the sensitive character sequence belongs.
[0139] In this embodiment of the disclosure, the replacement rules include at least one of field format preservation, sequence semantic preservation, and character set preservation.
[0140] The first field of the sensitive character sequence can refer to the structural characteristics of the actual sensitive information at the character level, including but not limited to: the overall length of the sequence, the prefix string, the suffix string, the type and position of the delimiter, the version number, and the segmentation structure. The second field format sequence can refer to the structural characteristics that the false value should possess according to the format determined by the first field. The format of the second field is consistent with or compatible with the format of the first field, such as having the same overall length, the same prefix / suffix, the same delimiter position, and the same segmentation structure.
[0141] The first sequence semantics of a sensitive character sequence can refer to the semantic category expressed by the actual sensitive information at the business level. For example, this sequence could represent an access key, a token, a URL address, an identity identifier, a business parameter (such as an order number or session ID), or other types of credential information. This semantic category can be used to guide the direction and format selection of the generated falsified value. The second sequence semantics can refer to the semantic category characteristics that the falsified value should retain based on the first sequence semantics. For example, if the original value is an access key, the generated falsified value should still be presented in the form of an access key; if the original value is a URL, the falsified value should also be presented in the form of a URL, rather than being uniformly replaced with a placeholder without a semantic category. This rule ensures that the falsified value maintains the same semantic category as the original value, avoiding comprehension biases caused by sudden changes in semantic category in the model.
[0142] The character set to which at least one character in the sensitive character sequence belongs can refer to the predefined character categories to which the characters constituting the real sensitive value belong, such as: numeric characters (0-9), lowercase letter characters (az), uppercase letter characters (AZ), mixed letter and number characters (Base62 or Base64 character sets), and special symbol characters (such as hyphens, underscores, colons, forward slashes, etc.). Optionally, the character type to be used when generating the false value can be determined according to the character set to which the real sensitive value belongs. For example, if the original value consists of a mixture of uppercase and lowercase letters and numbers (such as the Base62 character set), then the false value should also consist of characters from the same character set, rather than introducing special symbols that do not exist in the original value.
[0143] Furthermore, replacement rules can also include maintaining context structure and session consistency. For example, when replacing sensitive information, efforts should be made to avoid changing the field positions, JSON structure, parameter structure, natural language context, and referencing relationships of the original text, ensuring that the context received by the model is structurally consistent with the original request. Another example is ensuring that the same real sensitive information in the same logical session is always mapped to the same falsified value, enabling the model to stably identify the same object or credential across multiple rounds of tasks and reducing context drift caused by inconsistent mapping.
[0144] This disclosure, through the setting of replacement rules, ensures that the generated false values are consistent with the original sensitive information in terms of structural and semantic features, thereby reducing the negative impact of desensitization processing on the understanding and reasoning process of the upstream large model. For example, maintaining the field format allows the upstream protocol's format verification to pass normally, avoiding field parsing failures caused by format mutations; maintaining sequence semantics enables the model to stably identify the same category of objects or credentials in multiple rounds of context, preventing the model from misinterpreting false values as irrelevant information and causing comprehension bias; maintaining the character set can avoid introducing characters that the model has never seen before, which could lead to encoding anomalies or a decrease in generation quality.
[0145] According to embodiments of this disclosure, the method further includes: detecting session request information according to a mapping relationship set, the mapping relationship set including reference mapping relationships for at least one reference session, the reference mapping relationships indicating the substitution relationship between a reference character sequence and a sensitive character sequence; and, if a sensitive character sequence is detected in the mapping relationship set for the session request information, replacing the sensitive character sequence with the corresponding reference character sequence according to the reference mapping relationship that matches the sensitive character sequence.
[0146] In this embodiment of the disclosure, the mapping relationship set can refer to the set of all established bidirectional mappings between real and false values in the current target session. Each mapping relationship in this set consists of a reference character sequence (false value) and a sensitive character sequence (real value). It should be noted that the mapping relationship set maintains its own reference mapping relationship for at least one reference session. The reference mapping relationship is the substitution relationship between the reference character sequence (false value) and the sensitive character sequence (real value) for its respective reference session.
[0147] If the session request information sent by the client contains a sensitive character sequence from the mapping relationship set, the reference mapping relationship that matches the sensitive character sequence can be determined from the mapping relationship set. This allows us to determine the reference character sequence that has a replacement relationship with the sensitive character sequence. Then, the sensitive character sequence in the session request information is replaced with the corresponding reference character sequence. In other words, the session request information is desensitized before being sent to the upstream service node.
[0148] This disclosure maintains a mapping relationship set and performs de-identification processing based on the mapping relationship set, which can ensure the consistency of references to the multi-turn context for the target session, while improving the response speed of client-upstream service node interaction.
[0149] According to embodiments of this disclosure, detecting session request information based on a mapping relationship set includes: determining at least one candidate sensitive sequence included in the session request information; and determining the candidate sensitive sequence as a sensitive character sequence if the candidate sensitive sequence is inconsistent with a reference character sequence in the mapping relationship set.
[0150] In this embodiment, a candidate sensitive sequence can refer to a string or text fragment suspected of containing sensitive information identified by the proxy node from the session request information through initial matching and secondary verification. Optionally, the initial matching can use low-latency strategies such as regular expressions and blacklists to quickly identify candidate values, prioritizing recall while allowing for some false matches. The regular expression strategy can detect candidate values in the text that conform to a specific format through configurable regular expressions or rule templates, suitable for sensitive information types with well-defined format structures, such as access keys, universally unique identifiers, tokens, etc. The blacklist strategy uses a preset or runtime-updated blacklist set to accurately match candidate values, while the whitelist strategy uses a whitelist set to exclude candidate values, avoiding false matches of known secure values.
[0151] The precise mode in the secondary verification stage can apply more precise verification strategies to the sensitive sequences obtained from the initial matching, such as model inference, context analysis, or structural integrity verification, to filter out sensitive sequences with obvious mismatches, thereby determining candidate sensitive sequences. Optionally, external inference models or built-in lightweight classifiers can be invoked to perform semantic-level judgment on candidate texts, identifying sensitive information with irregular formats or ambiguous semantics, which is suitable for high-variability scenarios that are difficult to cover with regular expressions.
[0152] After determining that the session request information includes at least one candidate sensitive sequence, the candidate sensitive sequence can be matched with the reference character sequence in the mapping relationship set to determine whether the candidate sensitive sequence is a reference character sequence in the mapping relationship set, i.e., a false value. If the candidate sensitive sequence is inconsistent with the reference character sequence in the mapping relationship set, it means that the candidate sensitive sequence is a sensitive information that needs to be replaced with a false value, rather than a false value.
[0153] The embodiments disclosed herein can improve the overall matching accuracy and reduce the probability of false or missed desensitization through a secondary verification mechanism. At the same time, it can avoid re-identifying the replaced words as sensitive words and avoid nested desensitization.
[0154] Figure 6 A flowchart illustrating an information processing method according to another embodiment of this disclosure is shown schematically, such as... Figure 6 As shown, the method includes operations S601 to S617.
[0155] When operating S601, receive request information sent by the client.
[0156] The proxy node receives session request information from the client. This request may contain sensitive information such as access keys, tokens, credentials, and identity identifiers, and may also contain historical data.
[0157] When operating S602, determine whether the target traffic has been hit.
[0158] The proxy node determines whether the request belongs to the target traffic that needs to be de-identified based on the rules in the configuration, such as the target address, protocol type, and path prefix. If so, operation S603 is executed; otherwise, operation S604 is executed.
[0159] When operating S603, the request information is transmitted as is.
[0160] For requests that do not hit the target traffic, the proxy node forwards the original request information directly to the upstream service node without performing any protocol adaptation, sensitive information detection, or de-identification and replacement operations, ensuring zero-latency forwarding of non-target requests.
[0161] In S604 operation, protocol adaptation and request information preprocessing are performed.
[0162] The protocol adapter is invoked to perform necessary preprocessing operations on the request information, such as protocol field normalization, extraction of incremental text fields, and parsing of the request body structure, so that the de-identification process can adapt to the request formats of different large model / agent protocols.
[0163] In operation S605, extract the session identifier and determine whether a registered session mapping exists.
[0164] Extract session identifiers, such as session ID, task ID, and trace ID, from the request body, and query the session registry to determine whether the session identifier is already registered in the registry and associated with an existing mapped storage object. If yes, execute operation S606; otherwise, execute operation S607.
[0165] When operating S606, reuse session mapping.
[0166] The proxy node reuses the mapping storage object corresponding to the registered session for desensitization processing. This object contains a set of mapping relationships, including the reference mapping relationship of at least one reference session, which records the one-to-one correspondence between the sensitive character sequence (real value) and the reference character sequence (false value).
[0167] In S607 operation, create a new mapped store.
[0168] Create a new mapping storage object for the current new session, record the current session identifier, and write the mapping storage object to the session identifier and then write it to the session registry.
[0169] When operating S608, identify historical thought content.
[0170] In operation S609, the signature is restored based on the replacement mark and directly replaced based on the existing mapping.
[0171] If the request information contains historical thinking content and a replacement mark, the signature information corresponding to the replacement mark is determined from the global signature cache based on the replacement mark, and the replacement is performed directly according to the existing mapping.
[0172] In operation S610, initial matching and secondary verification are performed to determine candidate sensitive sequences.
[0173] The proxy node performs sensitive sequence detection on the remaining text content in the request information that has not yet been replaced. Optionally, the initial matching can use low-latency strategies such as regular expression rules and blacklist / whitelist matching to quickly identify the text. The secondary verification can call more precise verification strategies, such as model inference, context analysis or structural integrity verification, to filter out candidate values that are obviously mismatched and reduce the probability of false desensitization.
[0174] In operation S611, it is determined whether the candidate sensitive sequence is a false value in the mapping relation set.
[0175] If yes, then execute operation S612; otherwise, execute operation S613.
[0176] In operation S612, skip the candidate sensitive sequence to avoid nested desensitization.
[0177] When a candidate sequence is determined to match a reference character sequence in the mapping relationship set, the proxy node skips the candidate sequence and does not perform any de-sensitization or replacement operation. This is to prevent system-generated false values from being incorrectly de-sensitized again, and to avoid format corruption and mapping errors caused by nested de-sensitization.
[0178] In operation S613, a format-preserving false value is generated.
[0179] Optionally, format-preserving false values can be generated based on the field format, sequence semantics, and character set of the sensitive sequence.
[0180] When operating S614, determine if there is a conflict.
[0181] Optionally, it can be determined whether the generated false value is a duplicate of an existing reference character sequence in the mapping relationship set, i.e., it has been occupied by other sensitive character sequences. It can also be determined whether the generated false value has appeared in the original request text. If so, operation S616 is executed, and operation S614 is re-executed; otherwise, operation S615 is executed.
[0182] When operating S615, write the bidirectional mapping.
[0183] Write the bidirectional mapping relationship between the sensitive sequences detected in the request information and the false values generated in S613 and passed the conflict check in S614 into the mapping relationship set.
[0184] In operation S616, a false value is regenerated.
[0185] When a conflict is detected, a false value needs to be regenerated and the conflict check needs to be performed again.
[0186] When operating S617, the anonymized request information is sent to the upstream service node.
[0187] After replacing all identified and processed sensitive information in the session request information with corresponding falsified values, the de-identified request information is forwarded to the upstream service node so that the upstream service only comes into contact with falsified values that are compatible with the format.
[0188] Figure 7 A block diagram of an information processing apparatus according to an embodiment of the present disclosure is shown schematically.
[0189] like Figure 7 As shown, the information processing device 700 includes:
[0190] The splicing module 710 is used to splice the first response information and the second response information to obtain a third response information in response to the second response information from the service node that matches the target session, when the first response information from the service node that matches the target session includes at least one target character.
[0191] The restoration module 720 is used to restore the first character sequence in the third response information to a second character sequence according to the target mapping relationship. The first character sequence includes at least one target character. The target mapping relationship indicates the substitution relationship between the first character sequence and the second character sequence. The second character sequence indicates sensitive information carried by the target session.
[0192] The determination module 730 is used to determine the target response information that matches the target session based on the processed third response information.
[0193] According to embodiments of this disclosure, the information processing apparatus 700 further includes a verification module, a first cache module, and a target response information determination module. The verification module verifies the first response information based on a set of reference sequences; the first cache module caches the first response information if it meets the verification conditions; and the target response information determination module determines the first response information as target response information matching the target session if it does not meet the verification conditions. The set of reference sequences includes at least one reference character sequence, the at least one reference character sequence includes the first character sequence, and the at least one reference character sequence is used to replace its respective sensitive character sequence.
[0194] According to embodiments of this disclosure, the first response information and the second response information are adjacent response information in the response information stream returned by the service node; the information processing apparatus 700 further includes a reference response information sending module and a target response information sending module. The reference response information sending module is used to send reference response information to the client that initiated the target session, and the reference response information is used to maintain the session connection between the service node and the client; the target response information sending module is used to send target response information to the client when it is determined, based on the processed third response information, that the target response information matching the target session has been completed.
[0195] According to embodiments of this disclosure, the verification conditions include at least one of the following: the tail segment of the first response information includes at least one reference character, which is a prefix character of a reference character sequence; the head segment of the first response information includes at least one reference character, which is a suffix character of a reference character sequence; the first response information includes a reference character sequence.
[0196] According to an embodiment of this disclosure, the information processing apparatus 700 further includes a second caching module, a mapping relationship establishment module, and a first sending module. The second caching module is used to cache the first response information and the signature information when it receives signature information that matches the first response information. The mapping relationship establishment module is used to establish a mapping relationship between the replacement identifier and the first response information and the signature information. The first sending module is used to send the target response information and the replacement identifier to the client that initiated the target session.
[0197] According to embodiments of this disclosure, the information processing apparatus 700 further includes a first acquisition module, a first replacement module, and a second sending module. The first acquisition module is configured to, in response to receiving first session information from a client, acquire first response information and signature information based on the replacement identifier if the first session information carries a replacement identifier; the first replacement module replaces the fragment response information carried in the first session information with the first response information, and replaces the second character sequence in the first session information with the first character sequence to obtain second session information, wherein the fragment response information is an information fragment in the target response information that matches the first response information; the second sending module is configured to send signature information and the second session information to a service node, wherein the signature information is used to perform consistency verification at the service node.
[0198] According to embodiments of this disclosure, the information processing apparatus 700 further includes a first detection module, a first character sequence determination module, and a third sending module. The first detection module is used to perform sensitive sequence detection on the session request information received from a client, the session request information being used to initiate a target session; the first character sequence determination module is used to determine a first character sequence matching the second character sequence according to a replacement rule when a second character sequence is detected; the third sending module is used to replace the second character sequence with the first character sequence and send the processed session request information to the service node.
[0199] According to embodiments of this disclosure, the replacement rules include at least one of the following: determining the second field format of the reference character sequence based on the first field format of the sensitive character sequence; determining the second sequence semantics of the reference character sequence based on the first sequence semantics of the sensitive character sequence; and determining at least one character constituting the reference character sequence based on the character set to which at least one character in the sensitive character sequence belongs.
[0200] According to embodiments of this disclosure, the information processing apparatus 700 further includes a second detection module and a second replacement module. The second detection module is used to detect session request information according to a mapping relationship set, the mapping relationship set including reference mapping relationships for at least one reference session, the reference mapping relationships indicating replacement relationships between reference character sequences and sensitive character sequences. The second replacement module is used to, when a sensitive character sequence is detected in the mapping relationship set for the session request information, replace the sensitive character sequence with a corresponding reference character sequence according to the reference mapping relationship matching the sensitive character sequence.
[0201] According to embodiments of this disclosure, the second detection module includes a candidate sensitive sequence determination module and a sensitive character sequence determination module. The candidate sensitive sequence determination module is used to determine at least one candidate sensitive sequence included in the session request information; the sensitive character sequence determination module is used to determine the candidate sensitive sequence as a sensitive character sequence when the candidate sensitive sequence is inconsistent with a reference character sequence in the mapping relationship set.
[0202] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0203] According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.
[0204] According to embodiments of the present disclosure, a non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to cause a computer to perform the method described above.
[0205] According to an embodiment of this disclosure, a computer program product includes a computer program that, when executed by a processor, implements the method described above.
[0206] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, 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.
[0207] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0208] Multiple components in device 800 are connected to input / output (I / O) interface 805, including: input unit 806, such as a keyboard, mouse, etc.; output unit 807, such as various types of displays, speakers, etc.; storage unit 808, such as a disk, optical disk, etc.; and communication unit 809, such as a network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0209] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 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 801 performs the various methods and processes described above, such as information processing methods. For example, in some embodiments, the information processing method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the information processing method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform information processing methods by any other suitable means (e.g., by means of firmware).
[0210] 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.
[0211] 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 data processing apparatus, 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.
[0212] 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.
[0213] 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).
[0214] 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.
[0215] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, distributed system servers, or servers incorporating blockchain technology.
[0216] 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.
[0217] 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. An information processing method, comprising: If the first response information from the service node that matches the target session includes at least one target character, in response to the second response information from the service node that matches the target session, the first response information and the second response information are concatenated to obtain the third response information; According to the target mapping relationship, the first character sequence in the third response information is restored to the second character sequence. The first character sequence includes the at least one target character. The target mapping relationship indicates the substitution relationship between the first character sequence and the second character sequence. The second character sequence indicates the sensitive information carried by the target session. Based on the processed third response information, the target response information matching the target session is determined.
2. The method according to claim 1, further comprising: The first response information is verified based on a set of reference sequences; If the first response information meets the verification conditions, the first response information is cached. If the first response information does not meet the verification conditions, the first response information is determined to be the target response information matching the target session. The reference sequence set includes at least one reference character sequence, at least one of the reference character sequences includes the first character sequence, and at least one of the reference character sequences is used to replace their respective sensitive character sequences.
3. The method according to claim 2, wherein, The first response information and the second response information are adjacent response information in the response information stream returned by the service node; the method further includes caching the first response information: Send a reference response message to the client that initiated the target session. The reference response message is used to maintain the session connection between the service node and the client. Once the target response information matching the target session is determined based on the processed third response information, Send the target response information to the client.
4. The method according to claim 2, wherein, The verification conditions include at least one of the following: The tail segment of the first response information includes at least one reference character, wherein the reference character is a prefix character of the reference character sequence; The header segment of the first response information includes at least one reference character, wherein the reference character is a suffix character of the reference character sequence; The first response information includes the reference character sequence.
5. The method according to claim 1, further comprising, upon receiving signature information matching the first response information: The first response information and the signature information are cached; Establish a mapping relationship between the replacement identifier and the first response information and the signature information; Send the target response information and the replacement identifier to the client that initiated the target session.
6. The method according to claim 5, further comprising: In response to receiving first session information from the client, if the first session information carries the replacement identifier, the first response information and the signature information are obtained according to the replacement identifier; The fragment response information carried in the first session information is replaced with the first response information, and the second character sequence in the first session information is replaced with the first character sequence to obtain the second session information. The fragment response information is the information fragment in the target response information that matches the first response information. The signature information and the second session information are sent to the service node, and the signature information is used to perform a consistency check on the service node.
7. The method according to claim 1, further comprising: In response to receiving a session request message from a client, a sensitive sequence detection is performed on the session request message, which is used to initiate the target session; If the second character sequence is detected, the first character sequence that matches the second character sequence is determined according to the replacement rule; The second character sequence is replaced with the first character sequence, and the processed session request information is sent to the service node.
8. The method according to claim 7, wherein, The replacement rules include at least one of the following: Based on the format of the first field of the sensitive character sequence, determine the format of the second field of the reference character sequence; Based on the first sequence semantics of the sensitive character sequence, determine the second sequence semantics of the reference character sequence; Based on the character set to which at least one character in the sensitive character sequence belongs, determine at least one character that makes up the reference character sequence.
9. The method according to claim 7, further comprising: The session request information is detected based on a mapping relationship set, which includes reference mapping relationships for at least one reference session, and the reference mapping relationships indicate the substitution relationship between reference character sequences and sensitive character sequences. If a sensitive character sequence is detected in the mapping relationship set in response to the session request information, the sensitive character sequence is replaced with the corresponding reference character sequence according to the reference mapping relationship that matches the sensitive character sequence.
10. The method according to claim 9, wherein, The step of detecting the session request information based on the mapping relationship set includes: Determine at least one candidate sensitive sequence included in the session request information; If the candidate sensitive sequence is inconsistent with the reference character sequence in the mapping relationship set, the candidate sensitive sequence is determined as the sensitive character sequence.
11. An information processing apparatus, comprising: The concatenation module is used to concatenate the first response information and the second response information to obtain a third response information in response to the second response information from the service node that matches the target session, when the first response information from the service node that matches the target session includes at least one target character. The restoration module is used to restore the first character sequence in the third response information to a second character sequence according to the target mapping relationship. The first character sequence includes the at least one target character. The target mapping relationship indicates the substitution relationship between the first character sequence and the second character sequence. The second character sequence indicates the sensitive information carried by the target session. The determination module is used to determine the target response information that matches the target session based on the processed third response information.
12. 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 to 10.
13. 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 to 10.
14. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 10.