A Multidimensional Threat Traffic Detection and Security Protection System Based on a Large Language Model

The multi-dimensional threat traffic detection and security protection system based on a large language model solves the problem of inconsistent header compression history between the server and client after request blocking in the HTTP/2 protocol, and realizes true semantic transmission and content consistency in network communication.

CN123123013APending Publication Date: 2026-11-17CHAOHU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611572956.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-12
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In network services based on the HTTP/2 protocol, when some requests are blocked, the header compression history of the server and the client is inconsistent, resulting in inconsistent content transmission. Existing technologies cannot simultaneously ensure both faithful representation and consistent delivery of content.

Method used

A multi-dimensional threat traffic detection and security protection system based on a large language model is adopted. Through a security review unit, a receiving and processing unit, a multiplexing determination unit, a representation selection unit, and a request organization unit, blocked and allowed requests are processed respectively to ensure that the content of subsequent requests is consistent with the actual sent content and avoid unnecessary re-encoding and compression history inconsistencies.

Benefits of technology

While ensuring that threat requests are blocked, the true semantic transmission of permission requests is maintained, reducing unnecessary re-encoding and avoiding the problem of field content being changed when the compression history of both sides is inconsistent, thus achieving true semantic transmission of network communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123013A_ABST
    Figure CN123123013A_ABST
Patent Text Reader

Abstract

This invention relates to the field of network communication security technology and discloses a multi-dimensional threat traffic detection and security protection system based on a large language model. The system includes: performing security reviews on requests in network communications with shared header compression history and determining their appropriate handling; for blocked requests, retaining the compression processing effects that have occurred in the receiving direction, using the actual sent request content and its function as the interpretation benchmark; for requests that can be allowed, ensuring the original representation corresponds to the reviewed fields, and determining whether it can be faithfully reproduced based on the content referenced at the interpretation position after the actual used sending representation. If faithful, the original representation is directly adopted; otherwise, a substitute representation is formed based on the reviewed field content, and the allowed request is transmitted according to the corresponding order of the reviewed fields. This invention ensures that the field content obtained by the receiving end is consistent with the reviewed content, avoiding changes in field meaning caused by inconsistencies in compression history between the two sides.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network communication security technology, and more specifically, to a multi-dimensional threat traffic detection and security protection system based on a large language model. Background Technology

[0002] In HTTP / 2-based network services, multiple requests on the same connection share the same header compression state. Subsequent requests can reference header entries that appeared in previous requests, thus reducing the amount of bytes transmitted repeatedly. Security gateways deployed before the server typically perform threat detection on passing requests and block individual requests based on the detection results, while forwarding the rest. Request-level blocking alters the actual header compression history experienced by the server: entries already processed on the client side may never have been received by the server. Subsequent requests referencing these entries indicate that the compressed content parsed on the server side is different from the content parsed on the client side.

[0003] In actual operation and maintenance, if each allowed request is re-encoded, although the received content and the content that passes the inspection can remain consistent, each compressed representation needs to be regenerated, increasing the overhead of forwarding processing, and the previously usable representation cannot be reused. If the received compressed representation is used directly without distinction, when the compression history on both sides is inconsistent, the field content parsed by the server will deviate from the field content that passed the inspection, and the content based on security detection will not be consistent with the final delivered content. In scenarios where some requests are blocked, the existing request forwarding method cannot simultaneously ensure the use of a faithful representation and the consistency of the delivered content. A selective forwarding processing method adapted to the shared header compression state is needed. Summary of the Invention

[0004] This invention provides a multi-dimensional threat traffic detection and security protection system based on a large language model, which solves the technical problems mentioned in the background art.

[0005] To achieve the above-mentioned objectives, the present invention provides the following technical solution.

[0006] A multi-dimensional threat traffic detection and security protection system based on a large language model, used for network communication where requests share header compression history, includes: The security review unit is configured to review each request, obtain a security review conclusion, and determine the handling of each request. The receiving processing unit is configured to retain the compression processing effect of the blocked request in the receiving direction to determine the content of subsequent requests, and to use the actual sent request content and its effect as the basis for interpretation. The reuse determination unit is configured to ensure that the original representation in the release request corresponds to the reviewed field it expresses, wherein the reviewed field is the content of the field that has been security reviewed, and to determine whether the original representation can maintain the meaning of the corresponding reviewed field based on the content referenced at the interpretation position after the actual use of the transmission representation, wherein the interpretation position is the position of the original representation in the transmission content experienced by the receiving end. The selection unit is configured to use the original representation as the sending representation if it can retain the meaning of the corresponding reviewed field, and to form a substitute representation based on the corresponding reviewed field if the original representation cannot retain the meaning of the corresponding reviewed field. The request organization unit is configured to assemble the selected original and alternative representations into a release request and transmit it in the corresponding order of the reviewed fields, so that the field names, field values, field order, and duplicates received by the receiving end are consistent with the reviewed fields.

[0007] Compared with the prior art, the present invention has the following substantial features and significant progress: When selectively blocking certain requests on a network connection based on security review conclusions, this invention ensures that the compression processing already performed on the receiving side of the blocked request still influences the determination of subsequent request content. The content that was not actually sent is not considered as sent content already experienced by the receiving end, allowing the interpretation of the original representation in subsequent requests to be based on the actual communication history between the two sides. Original representations that retain the meaning of the reviewed fields are directly adopted; for original representations that do not retain meaning, the reviewed field content forms a substitute representation, ensuring that the field names, values, order, and duplicates obtained by the receiving end are consistent with the reviewed content. Compared to a forwarding method that involves complete re-encoding, the original representation, which maintains fidelity, continues to participate in forwarding, reducing unnecessary re-encoding processing. Compared to a forwarding method that directly uses the original representation, it avoids the problem of field content being altered when the compression history between the two sides is inconsistent, thus ensuring that while threatening requests are blocked, the true semantic transmission of allowable requests in the network is maintained. Attached Figure Description

[0008] Figure 1 This is a schematic diagram of the system modules of the present invention; Figure 2 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0009] The following description is provided in conjunction with the accompanying drawings. It should be understood that the following embodiments are for illustrative purposes only and are not intended to limit the invention; those skilled in the art can make equivalent substitutions or combinations for the specific implementations.

[0010] This implementation provides a multi-dimensional threat traffic detection and security protection system based on a large language model, used for network communication where requests share header compression history. See also... Figure 1 The system includes a client-side network interface 111, a server-side network interface 112, a security review unit 113, a receiving and processing unit 114, a shared compression state unit 115, a multiplexing determination unit 116, a representation selection unit 117, and a request organization unit 118. Specifically, the client-side network interface 111 receives network requests from clients, processes the received requests internally, and returns a reset frame to the client for blocked requests. The server-side network interface 112 sends allow requests to the server but does not send blocked requests. The security review unit 113 performs security reviews on each request to obtain a security review conclusion and determine the handling of each request. The receiving and processing unit 114 retains the compression processing effects of blocked requests in the receiving direction to determine the content of subsequent requests, using the actual sent request content and its effect as the interpretation basis. The shared compression state unit 115 maintains a receiving memory table and a sending memory table respectively, saving the actual compression history and its effects experienced by both sides. The multiplexing determination unit 116 enables the allow request to pass. The original representation in the document corresponds to the reviewed field it represents. The reviewed field is the content of the field that has undergone security review. Based on the content referenced at the interpretation position after the actual transmission representation is used, it is determined whether the original representation can maintain the meaning of the corresponding reviewed field. The interpretation position is the position of the original representation in the transmission content experienced by the receiving end. The representation selection unit 117 is used to use the original representation that can maintain the meaning of the corresponding reviewed field as the transmission representation, and to form a substitute representation based on the corresponding reviewed field for the original representation that cannot maintain the meaning of the corresponding reviewed field. The request organization unit 118 is used to form a release request by combining the selected original representation and substitute representation according to the corresponding order of the reviewed fields and transmit it, so that the field name, field value, field order and duplicate items obtained by the receiving end are consistent with the reviewed fields. All the above components can run together on a regular server. This invention does not limit the number or model of hardware.

[0011] In HTTP / 2-based network services, multiple requests on the same connection share the same header compression status. Subsequent requests can reference header entries from previous requests, reducing the amount of duplicate bytes transmitted. Security gateways deployed before the server typically perform threat detection on incoming requests and block individual requests based on the detection results, while forwarding the rest. Request-level blocking alters the actual header compression history experienced by the server: entries processed by the client may never have been received by the server. Subsequent requests referencing these entries will parse different content on the server side compared to the client side, and this difference is not a decompression error but a silent change in field names or values. If each allowed request is re-encoded, while the received content remains consistent with the detected content, each compressed representation needs to be regenerated, rendering previously usable representations unusable. If the received compressed representation is used indiscriminately, the content used for security detection will differ from the final delivered content when the compression histories of both sides are inconsistent. This system determines whether to reuse or replace each original representation in the request forwarding stage after the security review conclusion is obtained, based on its current position and meaning after its previous role in the actual transmission. This ensures that the original representation that can still express the reviewed fields can continue to be used for network forwarding, while the mismatched original representation does not change the content of the reviewed fields. In this way, while ensuring that the threat request is blocked, the true semantic transmission of the pass request in the network is maintained.

[0012] See Figure 2 The network traffic security protection method of the above system includes the following steps: Step S211, perform security review on each request, obtain security review conclusions and determine the handling of each request; Step S212, determine whether the handling of the current request is blocking. If it is blocking, proceed to steps S213 and S214; if it is allowing, proceed to step S215; Step S213, retain the compression processing effect of the blocked request in the receiving direction, and use the actual sent request content and its function as the interpretation basis; Step S214, send a reset frame to the stream that already exists on the client side corresponding to the blocked request, and end the processing of the request; Step S215, enable the allowing request... The original representation corresponds to the reviewed field it expresses, and the reviewed field is the content of the field that has been security reviewed; Step S216, based on the content referenced at the interpretation position after the actual use of the sending representation, it is determined whether the original representation can maintain the meaning of the corresponding reviewed field. If it can, proceed to step S217; if it cannot, proceed to step S218; Step S217, the original representation that can maintain the meaning of the corresponding reviewed field is used as the sending representation; Step S218, a substitute representation is formed according to the corresponding reviewed field; Step S219, the selected original representation and substitute representation are combined into a release request and transmitted according to the corresponding order of the reviewed fields.

[0013] See Figure 1 The client-side network interface 111 sends the received request to the security review unit 113. In this embodiment, the network communication is an HTTP / 2 connection, and the header compression history is in HPACK compression state. The system operates as an authorized HTTP / 2 reverse security proxy, establishing connections between the client and server sides respectively. After a legitimate TLS termination, it processes plaintext HTTP / 2 frames, without speculating on the header from the undecryptable ciphertext; raw field bytes are processed only within the authorized gateway. The minimum implementation scope is a normal request without a request body that can be reviewed based solely on the complete request header. The request header carries an end marker and does not contain CONNECT, extended CONNECT, or tail field blocks.

[0014] The security review unit 113 performs frame-level parsing on the received request to obtain the correct request boundaries and original field blocks. Specifically, it reads the frame type. Frame flag Number of bytes of frame payload and flow number , where the flow number The StreamIdentifier in the HTTP / 2 frame header is used to distinguish different requests on the same connection; the protocol prefix and padding in the request header frame payload are removed, and the field block fragment is concatenated with subsequent consecutive frame fragments in the same stream in protocol order until the frame identifier is reached. This indicates the end of the field block, and the received header block byte string is obtained. Received header byte string The original byte fragments are retained intact until the processing of this request is completed, so as to preserve retrievable original byte fragments for subsequent reuse of the original representation. The system sets a maximum compressed byte limit. Preferred Bytes are used to limit the cache size of a single request header block.

[0015] Subsequently, security review unit 113 followed the order of requests. and instruction sequence Read the received header byte string one by one Instruction byte string And determine the representation method based on the first byte prefix of the instruction. , representation This includes full index representation, literal representation with name index, literal representation of the complete literal, and capacity updates. For strings in the literal representation, the compression bits are used to determine the appropriate values. Processing: String compression bits for Huffman decoding is performed according to HPACK specifications, and the string is compressed. for The original bytes are read directly according to the given length. For representations of complete fields, the field name is obtained from the receive memory table or static table at that moment. and field values For references that only specify the name, only the field name is retrieved. Then read the value of the field that represents itself. Incremental means performing an insert, and according to the upper limit of the receiving table. The oldest entry is discarded; capacity updates at the beginning of the block first change the upper limit of the receive table. Then perform the eviction process before processing subsequent fields. The upper byte limit is expanded during decoding. Preferred Bytes are recorded and entries are made item by item, field by field. Each entry retains a reference to its original byte fragment and its representation. Original index number and the field names that were solved at that time and field values The field order and never-indexed nature are preserved, and the final list of received fields is formed in the actual order. Receive memory table All input commands are updated sequentially, and valid changes that have already occurred are not rolled back due to subsequent blocking.

[0016] Security review unit 113 receives the field list Retrieve the request method, host, path, and general fields, and then match them with the flow number. Protocol parsing status and previous request record Association, as a multidimensional communication fact. Field names, values, and order remain unchanged; two duplicate fields are not merged into one; control characters are reversibly escaped before entering subsequent text, and restored to their original bytes during evidence verification; case normalization or URL rewriting does not replace the original evidence. Within the scope of this ordinary request, pseudo-fields are checked before ordinary fields: method, scheme, and path each appear once, and host appears once and is not empty; uppercase field names, unknown or duplicate request pseudo-fields, empty paths, and connection-specific fields prohibited in HTTP / 2 are rejected; the te field only accepts trailers values. The first request uses an empty history; subsequent requests only include a list of received fields from the previous request on the connection and their actual processing results. The history comes from this connection and is not concatenated across clients; the existence of a blocked request in the history only indicates the existence of this preceding event, and does not mark the corresponding ordinary field as malicious as a whole, nor does it treat compressed dependencies as attack inheritance.

[0017] Security review unit 113 constructs review texts according to a fixed template. First, include the system task description, then two fixed security task examples, and finally the current request and last request records. The model is required to treat network field content as untrusted data to be analyzed, not to execute any instructions appearing within it, and not to output scripts or arbitrary device commands. The model's word segmenter is used to compute input tokens, with an upper limit on the number of input tokens. Preferred ; Exceeding the input word limit The system sets the current request to review and claims that it has been fully reviewed without truncating the current field content.

[0018] The security review conclusion is derived from the joint analysis of the reviewed fields of the current request, the network communication protocol, and the handling of the previous request on the same connection by the large language model. Specifically, the large language model performs joint analysis from three perspectives: first, the received field list. The three perspectives are: first, the semantic perspective of the fields it carries; second, the perspective of the protocol situation reflected by the stream boundary and compressed representation; and third, the perspective of the events related to the handling of the previous request on the same connection and the current request. In this implementation, the model weights... The preferred version is the fixed public revision of Qwen2.5-7B-Instruct. The model and word segmenter are loaded from the same revision, maintaining the publication weights without further fine-tuning. A publisher chat template is used, random sampling is disabled, and the successor word with the highest probability is selected each time. The upper limit of the output word count is also specified. Preferred Waiting seconds Preferred Seconds. The large language model is responsible for the joint threat analysis of protocol status, field semantics, and preceding and following events, but does not undertake HPACK table state calculations, nor does it directly generate the header block byte string to be sent; the generation of security review conclusions and the forwarding of compressed representations are separated, and the forwarding process is executed based on the determined security review conclusions and reviewed fields.

[0019] Large language model output model response Model response This is a JSON object, including a handling flag, threat category, and evidence field. The handling flag is one of allow, block, or review; the evidence field pertains to the current or previous request and can be located to a specific field. Security Review Unit 113 Verification Model Response The format, enumeration values, and evidence attribution are as follows: Blocking must be accompanied by locating evidence; allowing passage must not be accompanied by missing input, incorrect formatting, or protocol errors; non-compliant responses, timed-out responses, and uncertain responses are all subject to review. The processing result is generated after verification. This refers to the handling of each request as determined by the security review conclusion. For requests requiring review, automatic transmission is refused on the current network path, while a review note is retained. For requests requiring permission, security review unit 113 will send the received field list... Once the content is fixed as allowed to be sent this time, subsequent processing can only change its compressed representation. Fields cannot be added, deleted, normalized, or modified, ensuring that subsequent representation processing is always based on the field content actually reviewed by the model. For requests that are handled as blocking or review, this request will not be written into the server's sending sequence, and the compression processing effects that have already occurred in the receiving direction will continue to be retained.

[0020] The receiving processing unit 114 is used to retain the compression processing effect of the blocked request in the receiving direction to determine the content of subsequent requests, and uses the actual sent request content and its effect as the interpretation basis. The receiving memory table is denoted as... Send the memory table as Before an insertion request is blocked, the histories on both sides are consistent, i.e. After the request is blocked, it affects the receiving memory table. The insertion still holds true, but no corresponding changes occur on the server side. Afterwards... This difference is a real consequence of selective transmission, not a statistical phenomenon of abnormally high scores. The receiving processing unit 114 does not delete data from the receiving memory table. The content just written in the file is still referenced in the next request from the client. The protocol's requirement to maintain the necessary compression state of the discarded frame also excludes the processing method of not rolling back the decoding after blocking. At the same time, the receiving processing unit 114 does not regard the unsent content of the blocked request as the preceding content that the receiving end has already experienced, thereby avoiding interpreting the original representation of subsequent requests with a fictitious sending history.

[0021] The shared compression state unit 115 maintains a receive memory table and a transmit memory table respectively. The receive memory table is updated as all received representations are processed, while the transmit memory table is updated only as the actual transmit representation is used. (Receive Memory Table) This is a table that updates all input commands sequentially according to the HPACK dynamic table rules in the input direction. It includes both allowed and blocked requests; the transmit memory table. The output direction is updated only with the actual data to be sent, forming the decoded equivalent table. The two tables cannot be replaced by a single unified table: removing the impact of blocked requests from the receiving direction will cause subsequent received original indexes to be misinterpreted; copying the impact of blocked requests to the sending direction will assume the server received data that was not actually received. Both sides start with empty tables, with the receiving table having an upper limit. With upper limit of the sending table The initial values ​​of the protocol are all Allowed table byte count After being set and confirmed by the server, the client declares the same upper limit. In this embodiment, we take... The first actual header block reduces the currently used capacity to the allowed table size through a valid capacity update. Empty table shrinking does not result in entry eviction. Number of bytes occupied by the new table. Determined by HPACK standard length rules: ;in, For field names, For field values, length is measured in bytes without Huffman encoding, constant. This is the HPACK accounting constant. When capacity is insufficient, the oldest entry is discarded; for oversized entries, the table is cleared without insertion according to the protocol.

[0022] For requests that are blocked, the system does not generate HEADERS for that request on the server side. The receiving and processing unit 114 sends a reset frame on the existing stream on the client side corresponding to the blocked request. The reset error code of the reset frame is a cancellation code. In this embodiment, the reset error code... Pick That is, CANCEL; the reset frame payload is bytes, total of the whole frame Bytes. The corresponding stream on the server-side connection remains in an inactive state; no reset is sent to this side if the server has not yet opened the stream, to avoid idle stream state errors. Stream rejection does not allow updating the dynamic table contained in the header block from the receive memory table. This is ignored. After sending the reset frame, the processing of this request ends, but it affects the received memory table. The legitimate insertions remain and continue to participate in the determination of subsequent request content.

[0023] The multiplexing determination unit 116 ensures that the original representation in the release request corresponds to the reviewed fields it expresses, where the reviewed fields are the content of fields that have undergone security review. It also determines whether the original representation can retain the meaning of the corresponding reviewed fields based on the content referenced at the interpretation position after the actual transmission representation is used. The interpretation position is the position of the original representation within the transmission content experienced by the receiving end. The original representation is the received header byte string. In order of instructions The arrangement of each HPACK line represents, including the instruction byte string. Representation And the original index number when cited. .

[0024] Due to receiving memory table The received representations are continuously updated. If the model has made a decision, the changed received memory table is then used. Reinterpret the old index, using the same original index number. It's possible that the original representation could be bound to a changed meaning of the received data, causing the forwarding phase to lose the basis for determining which reviewed content the original representation corresponds to. Therefore, during the decoding phase, the system records the field names actually decoded for each original representation at that time. and field values This mapping ensures that each original representation corresponds to the field content it expressed in the actual reception history and has undergone this security review. Subsequent processing uses this mapping, avoiding the reassignment of the reviewed content of the original representation based on its changed received meaning. The security review conclusion alone cannot replace the field content itself; the mapping between the original representation and the reviewed fields is a prerequisite for subsequent fidelity determination.

[0025] Multiplexing determination unit 116 to send memory table The current content serves as the basis for interpretation that the receiving end will use, rather than using the receiving memory table. Copy in the sending direction. For the original representation in the release request, in instruction order. The judgment is performed line by line: When judging the current original representation, the effects of the actual transmission representations used before its interpretation position have already been reflected in the current transmission memory table. In the middle; according to the original representation, the position here is interpreted as being in the sending memory table. The content referenced in the original representation is used to determine whether it still corresponds to the reviewed field expressed in the original representation. After each judgment is completed, the candidate transmission status is advanced according to the effect of the actual transmission representation used in that judgment, and then the next original representation is judged. Therefore, when the preceding representation changes the basis for subsequent interpretation, the reusability of subsequent original representations is determined based on the changed interpretation conditions, and the old meaning that does not conform to the actual transmission preceding representation is not used. Even if the receiving side is valid, the header start points on both sides are the same, or the occupancy on both sides is the same, it cannot rule out that the original representation points to other content at the execution location.

[0026] Using only a snapshot of the identical content in the tables on both sides of the header block's starting point as the sole basis for judgment is insufficient. For example, consider a connection where three entries are successively allowed and inserted. Two requests are blocked in between, but each receiving request still has an entry inserted, causing the receiving and sending memory tables to have the same entry at a certain position and occupy the same number of bytes. Then, when a new entry is inserted at the beginning of the header block for the next allowed request, the two tables discard their different oldest entries. When the execution reaches the later reference to the original position, the content pointed to by the receiving and sending directions is different. If the original bytes are directly transmitted based on the snapshot at the header block's starting point, the receiving end will recover the incorrect fields. Therefore, the judgment must fall on the execution position of each original representation; this is the meaning of the interpretation position.

[0027] A full index indicates that it also references the field names. and field values Record the original index number. Send memory table at present And the entries in the static table are The condition for reusing the original representation is: That is, send the memory table In the original index number An entry exists, and the field name and value of that entry are consistent with the reviewed field corresponding to the original representation. If the entry does not exist, or if either the field name or value of the entry is different, then the original representation cannot retain the meaning of the corresponding reviewed field.

[0028] For incremental, non-table, or never-indexed literals with name indexes, they are accessed only through the original index number. Reference field name field value Already included in the instruction byte string In the literal sense. The condition for reusing the original representation at this point is: That is, only verify whether the name referenced by the index in the sending direction is equal to the field name of the examined field. This does not force the old field value at that position to be the same. For a completely literal representation, its field name... and field values Neither depends on any table location; once parsed correctly, it can be reused. Since the content on both sides of a static table is identical, a valid static reference naturally satisfies the above conditions. Capacity updates are not requested fields; they are based on the allowed table byte count. The header block's starting position is not included in the field comparison.

[0029] If all cases are standardized to reuse only if the name is identical, the full index representation will retrieve the wrong value from the wrong table position; if only reuse is allowed if the entire item is completely identical, it will cause unnecessary rewriting of the representation that only references the name. Both comparison requirements follow the representation method. To distinguish between different representations, a single comparison caliber cannot be uniformly applied after the representation method is deleted. The multiplexing determination unit 116 sends the fidelity determination result to the representation selection unit 117, which then completes the formation of the original representation or the replacement representation.

[0030] In the fidelity determination, the allowed number of table bytes Determine which old entries still exist, original index number The access location is determined, insertion and eviction determine location migration, and flow-level processing determines which historical data enters the transmission direction. The multiplexing determination unit 116 connects the request boundary, instruction sequence, the examined fields corresponding to the original representation, and the transmission memory table that progresses according to the actual representation to be sent into an ordered dependency relationship. It determines whether the meaning of the corresponding examined fields can be maintained only if the names or complete fields referenced on both sides of the execution position of the original representation are the same. This verification relationship is valid during the instruction-sequence processing and does not need to be saved as an independent persistent data structure.

[0031] The selection unit 117 uses the original representation that preserves the meaning of the corresponding reviewed field as the transmission representation, that is, it directly uses the received instruction byte string. The components of the release request do not all re-generate compressed representations for all usable original representations; for original representations that cannot retain the meaning of the corresponding reviewed fields, alternative representations are formed based on the corresponding reviewed fields. The alternative representation only changes the compressed representation, not its field names. With field value All are taken from the reviewed fields corresponding to the original representation.

[0032] The alternative representation is a literal representation containing the full name and full value of the corresponding reviewed field. The table entry nature of the alternative representation is the same as that of the original representation, which is an attribute of the compressed representation entering the header compression history. The specific formation method of the alternative representation is as follows, based on the representation category of the original representation: For the original representation with a complete index mismatch, a non-table literal representation containing the full name and full field value is directly generated as the alternative representation; since the original complete index representation itself does not send the memory table... Insert an entry, and its alternative representation will also not insert an entry. For the original representation of an incremental literal mismatch with a name index, replace it with the full name and retain the original field values, using the incremental literal representation as the alternative representation, still according to the upper limit of the sent table. Perform insertion and removal; for original representations with name indexes that do not fit into the table due to literal mismatch, replace them with full names while retaining the original field values, using the literal representation as a replacement; for original representations with never-indexed mismatches, maintain the never-indexed nature and do not change sensitive fields to table-compatible representations. After a mismatch, do not search other full-field indexes, do not search other name indexes, and do not create cross-table index mappings; directly use the literal representation containing the full name and full field value to carry the reviewed fields.

[0033] For valid representations of complete literals and valid static references, select unit 117 to reuse the original fragment; for valid header block beginning capacity updates, update the upper limit of the transmission table according to the values ​​therein. It also discards old entries, with the value not exceeding the allowed table size. The upper limit of the receive table was changed due to the rejected request. If the current capacities of the two tables are different, the two tables will not be forcibly merged; each subsequent reference will still be determined according to its actual state. In the case where the first header block has not yet been sent and the current header block does not have a beginning update sufficient for the necessary initial shrinking, it indicates that unit 117 will first generate a value not exceeding the allowed table bytes. The capacity is updated, and then the field is processed; in this embodiment, the first release header block has a valid capacity update, so no additional capacity update is needed.

[0034] The request organization unit 118 constructs a release request by combining the selected original representation and the alternative representation according to the corresponding order of the reviewed fields, and transmits it so that the field names, field values, field order, and duplicates received by the receiving end are consistent with the reviewed fields. Each representation can generate a certain reviewed field, and it does not preclude the omission, duplication, or substitution of items when organizing the pending request. Therefore, the final release request must correspond to the field list of the reviewed request in terms of content and order: field items cannot be omitted, added, or substituted due to representation substitution.

[0035] Before transmitting a release request, each pending representation generates corresponding field items. Each corresponding field item is then checked against the corresponding items in the already reviewed fields. Only after successful verification is the release request transmitted. Specifically, for each selected reused or substituted transmission representation, a list of transmission fields is generated from that representation. A corresponding field item, and a list of fields received. Byte-by-byte comparison of items at the same position, comparison requires field names Field values The fields must be in the same order and have the same number of fields; if the verification fails, the release request will not be sent. After all items have passed verification, the verified fragments will be assembled into a header block byte string to be sent. The relationships satisfied by each item are as follows: The actual implementation does not require a third persistent verification table, nor does it store a complete copy of the sent field list: once the current representation is selected, the comparison at that position is completed, and the verified items are released, avoiding long-term memory occupation for verification purposes. The above item-by-item verification can also be understood from an inductive perspective: before processing the first pending representation of a pass request, the send memory table corresponds to the decoding history of previously submitted bytes; the reuse branch has verified that the content referenced by this representation is equal to the content decoded at the time of reception, and the replacement branch re-represents from the decoded content, both producing the same field items as the reviewed fields; subsequently, the send memory table is advanced according to the actual representation used in this instance, ensuring that the state faced by the next representation is still the expected state of the receiver. This process is repeated item by item, resulting in the sent field list and the received field list being completely consistent in field name, field value, field order, and duplicates. For blocked requests, their header blocks do not enter the server's sending sequence, therefore, the request field for that request will not be formed at the receiver, and the receiving direction continues to advance according to the client's history, ensuring that the next request can still be correctly decoded.

[0036] On the same server connection, a unique ordered transmission entry point is set up. Header blocks of allowed requests are submitted in a predetermined order, with earlier submitted header blocks preceding those of requests that have completed security checks. Header blocks, along with their expected transmission status, are included in the unique ordered transmission entry point. Requests that complete checks later are blocked, skipping previously confirmed header blocks. After a header block is successfully submitted, a memo table is sent. The progress of the request becomes the starting point for interpreting the next request. Uncommitted failure candidates do not pollute this starting point, and the interpretation basis for subsequent requests is consistent with the actual sending sequence. Candidate sending status can be implemented using copy-on-write, record reversal, or single-threaded transactions. These are temporary operations on the same logical sending memory table and do not require the addition of additional persistent tables.

[0037] Request organization unit 118 to send the header block byte string to be sent Encapsulate the payload into HEADERS and necessary CONTINUATION frames, and rewrite the frame payload bytes according to the actual length. The end-of-field marker is placed in the last header segment, maintaining the semantics of the end-of-field marker within this implementation scope, and removing frame-level padding or priority appending information that cannot be copied in this hop. Originally, it was indicated that multiplexing only applies to HPACK segments that have been checked item by item, and does not equate to unconditional copying of the entire transport layer record or the entire frame. The encapsulated release request is sent to the server via the server-side network interface 112. For requests that are handled as blocked, the system outputs a blocked alarm with the request's attribution, threat type, and evidence; after handling, the system displays the received field list of the current request. Flow number The actual handling is written into the last request record. This is used for security analysis of the next request, and the completed original header block buffer and instruction-by-instruction short record are released.

[0038] Example 1: This embodiment allows for a certain number of table bytes. The connection is connected and the streams are processed sequentially with the following numbers: , , , , , , , , Nine ordinary requests without a request body are processed sequentially, with all header blocks arriving in the order they are received. Maximum compressed bytes. Expand byte limit Input word limit Output upper limit of word units Waiting seconds All input strings and newly generated strings have the same number of characters compressed. Reset error code Receive memory table With sending memory table Both tables are initially empty, with the upper limit of the receive table and the upper limit of the send table initially set to 0. Each normal request uses 82 to represent the method field, 87 to represent the scheme field, 010b6170692e6578616d706c65 to represent the host field api.example (not included in the table), and 84 to represent the path field / ; 3f61 indicates setting the table capacity to [value missing]. be, bf, and c0 are indexes respectively. , , The complete index representation, 7f00 is the name index in the incremental literal representation. The prefix 0f30 indicates that the name index is not included in the table literal representation. The prefix. The security review conclusion is given in this embodiment using a fixed injection method: flow number. The action for the first one is blocking, while the action for the other eight is allowing. The following hexadecimal strings do not contain spaces, and each pair of characters represents one byte; the first three bytes of a complete frame represent the payload length, followed by the frame type, frame flag, and four-byte stream number. The frame header occupies a fixed amount of space. byte.

[0039] In the order of requests Before processing, both the receive memory table and the send memory table are empty. The received header byte string contains a total of The total number of bytes is 3f618287010b6170692e6578616d706c65844005782d74616704626c75654006782d626173650473746179. The complete input frame contains a total of The first byte is 00002b0105000000013f618287010b6170692e6578616d706c65844005782d74616704626c75654006782d626173650473746179. The header block begins with 3f61, reducing the upper limit of the receive table to... Subsequently, the four pseudo-fields were completed, and the two incremental inserts were x-tag:blue and x-base:stay, each accounting for [percentage missing]. byte and Bytes, the latest entry is located in the index The request was processed as approved; all six original statements retained the meaning of the corresponding reviewed fields and were reused. The pending header block byte string totaled [number missing]. The bytes are the same as the received header block. After this request is submitted, the receive memory table is consistent with the send memory table: index For x-base:stay, accounting for Byte; Index For x-tag:blue, accounting for byte.

[0040] In the order of requests , Stream number The request received a header byte string totaling The total number of bytes is 8287010b6170692e6578616d706c6504202f66696c65733f6e616d653d2e2e2f2e2e2f707269766174652f636f6e6669677f0005677265656e. The complete input frame contains a total of... The bytes are 0000390105000000038287010b6170692e6578616d706c6504202f66696c65733f6e616d653d2e2e2f2e2e2f707269766174652f636f6e6669677f0005677265656e. The path field carries the attack payload, and the name index at the end indicates the index in the received memory table. The x-tag, with a literal value of green, is obtained from the new entry. The byte is inserted into the receive memory table. The request is handled as a block: the request is not sent to the server, and the receive processing unit 114 numbers the stream on the client side. A reset frame is sent to the existing stream. The reset frame is 00000403000000000300000008, and the reset error code is a cancellation code. The corresponding stream on the server side remains in an inactive state. After processing, the receive memory table is indexed. x-tag:green, index x-base:stay, index x-tag:blue, total Bytes; the send memory table is still an index. x-base:stay, index x-tag:blue, total byte.

[0041] In the order of requests , Stream number The request ends with "be", indicating a complete index. According to the received memory table The explanation is that it corresponds to x-tag:green; and according to the sent memory table Explanation: The original representation of `x-base:stay` at the same location cannot retain the meaning of the corresponding examined field. This indicates that cell 117 will not search other indexes; instead, it will directly generate a non-table literal representation `0005782d74616705677265656e` using the full name and full field value as a replacement. The other four original representations are reused. This request reuses... The original text indicates that it is regenerated. The alternative representation indicates that the header block byte string to be sent contains a total of Byte; substitution indicates not to be entered into the table, sent to the memory table for preservation. The number of bytes remains unchanged.

[0042] In the order of requests , Stream number The request first carries the fully literal incremental representation of x-note:amber, which occupies [amount]. Byte: Original occupancy in the receiving direction bytes, after insertion, the oldest x-tag:blue is replaced, occupying Bytes; Original sending direction bytes, occupying space after insertion Bytes, not discarded. The full index bf will then be explained: receive direction index. The x-tag is green, and the transmission direction is the same as the x-base: stay. The difference occurs after the insertion at the beginning of the same header block. The multiplexing determination unit 116 determines a mismatch based on the meaning of this execution position and replaces it with 0005782d74616705677265656e. This request is for multiplexing. The original text indicates that it is regenerated. The alternative representation indicates that the header block byte string to be sent contains a total of byte.

[0043] In the order of requests , Stream number In the request, the first ordinary field c0 is a full index. The receiving direction is x-base:stay, and the transmitting direction is x-tag:blue. A mismatch is determined, and it is replaced with 0006782d626173650473746179. The next 'be' corresponds to x-note:amber on both sides and is directly reused. The processing of one replacement and one reuse within the same header block shows that the determination of each original representation is independent, and each determination is based on the meaning of the position after the actual transmitting representation is used at that time. This request is reused. The original text indicates that it is regenerated. The alternative representation indicates that the header block byte string to be sent contains a total of byte.

[0044] In the order of requests , Stream number In the request, the name index that is not included in the table literal representation is... The receiving direction name is x-tag, and the sending direction name is x-base. A mismatch is determined by name verification, and 0005782d7461670676696f6c6574 is generated as a substitute representation. The field value violet remains unchanged. The subsequent never-indexed representation references a static name index. The example token is written literally, and this representation is retained as is and not entered into the table, maintaining the never-indexed property. This request is reused. The original text indicates that it is regenerated. The alternative representation indicates that the header block byte string to be sent contains a total of byte.

[0045] In the order of requests , Stream number In the request, 7f00046379616e is the name index. The incremental literal representation, with the receiving direction name as x-tag and the sending direction name at the same position as x-base, generates 4005782d746167046379616e as a replacement representation after mismatch is determined, preserving the incremental insertion property: replacement entry x-tag: cyan occupies Bytes, send direction eliminates x-tag:blue, receive direction eliminates x-base:stay, remaining on both sides The total number of bytes occupied on both sides is the same, but the content of the oldest entry is still different. This example shows that even if the total number of bytes occupied on both sides is the same, the content at each position may be different. The determination must be made position by position, and the same number of bytes occupied cannot be used to replace the content being consistent.

[0046] In the order of requests , Stream number The request first inserts the fully literal incremental representation x-tail:red, which occupies... Bytes, originally on both sides Bytes are all discarded after insertion, with the oldest being replaced. The byte entry, in the receive direction, removes x-tag:green, and in the send direction, removes x-base:stay, restoring consistency on both sides. Subsequent bf entries will then point to x-tag:cyan on both sides after the update, allowing for direct reuse. This request reuses... The original text indicates that it is regenerated. The alternative representation indicates that the header block byte string to be sent contains a total of Bytes. The history on both sides is naturally restored to consistency through legitimate insertions and deletions, without the need for additional table clearing or connection rebuilding.

[0047] In the order of requests , Stream number In the request, the three ordinary fields be, bf, and c0 are the complete indexes. , , This corresponds to `x-tail:red`, `x-tag:cyan`, and `x-note:amber`, with both sides being identical, and all elements are reused. This request reuses... The original text indicates that it is regenerated. The alternative representation indicates that the header block byte string to be sent contains a total of byte.

[0048] This system is compared with a forwarding method that completely re-encodes each field of the pass request. For the same set of inputs, the HPACK payloads of the complete re-encoding method for eight pass requests are as follows: , , , , , , , bytes, total Bytes; the corresponding payload of this system is , , , , , , , bytes, total Bytes. Eight clearance requests totaling [number missing] This system reuses [number] fields. The original text states that it only applies to... A mismatch indicates that bytes will be regenerated, and the regenerated field represents the reduction in the number of bytes. The reduction ratio of the total length of the HPACK load is: A single request is not always shorter in this system. A complete re-encoding approach might create a cache more favorable for subsequent fields. However, when a mismatch occurs, this system directly writes a literal representation containing the full name and field value, actively abandoning alternative index searches. The aforementioned ratios only represent the number of representation regenerations and output lengths for this set of inputs and do not constitute an assertion about general changes in processing latency or resource overhead. Compared to the erroneous implementation that directly uses the original representation without double-sided validation, this erroneous implementation resulted in at least one silent change to a field name or value in seven out of eight approved requests in this set, and no invalid index errors occurred throughout the process. This indicates that monitoring only the number of decompression errors is insufficient to detect content changes. This system ensures that the field content received by the receiving end is consistent with the content being security-audited through line-by-line judgment and item-by-item verification at the interpretation location.

[0049] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.

Claims

1. A multi-dimensional threat traffic detection and security protection system based on a large language model, used for network communication where requests share header compression history, characterized in that... include: The security review unit is configured to review each request, obtain a security review conclusion, and determine the handling of each request. The receiving processing unit is configured to retain the compression processing effect of the blocked request in the receiving direction to determine the content of subsequent requests, and to use the actual sent request content and its effect as the basis for interpretation. The reuse determination unit is configured to ensure that the original representation in the release request corresponds to the reviewed field it expresses, wherein the reviewed field is the content of the field that has been security reviewed, and to determine whether the original representation can maintain the meaning of the corresponding reviewed field based on the content referenced at the interpretation position after the actual use of the transmission representation, wherein the interpretation position is the position of the original representation in the transmission content experienced by the receiving end. The selection unit is configured to use the original representation as the sending representation if it can retain the meaning of the corresponding reviewed field, and to form a substitute representation based on the corresponding reviewed field if the original representation cannot retain the meaning of the corresponding reviewed field. The request organization unit is configured to assemble the selected original and alternative representations into a release request and transmit it in the corresponding order of the reviewed fields, so that the field names, field values, field order, and duplicates received by the receiving end are consistent with the reviewed fields.

2. The multi-dimensional threat traffic detection and security protection system based on a large language model according to claim 1, characterized in that, The network communication is an HTTP / 2 connection, and the header compression history is in HPACK compression state.

3. The multi-dimensional threat traffic detection and security protection system based on a large language model according to claim 1, characterized in that, Maintain separate receive memory and send memory tables. The receive memory table is updated as all received representations are processed, while the send memory table is updated only as the actual send representation is used.

4. The multi-dimensional threat traffic detection and security protection system based on a large language model according to claim 1, characterized in that, The security review conclusion is obtained by jointly analyzing the reviewed fields of the current request, the protocol of the network communication, and the handling of the previous request on the same connection using a large language model.

5. The multi-dimensional threat traffic detection and security protection system based on a large language model according to claim 4, characterized in that, The large language model outputs a disposal marker and an evidence field. The disposal marker is one of release, blocking, or review, and the evidence field belongs to the current request or the previous request.

6. The multi-dimensional threat traffic detection and security protection system based on a large language model according to claim 1, characterized in that, The alternative representation is a literal representation that includes the full name and full value of the corresponding reviewed field. The table entry property of the alternative representation is the same as that of the original representation, and the table entry property is the attribute of the compressed representation entering the header compression history.

7. The multi-dimensional threat traffic detection and security protection system based on a large language model according to claim 1, characterized in that, For a blocked request, a reset frame is sent on the existing stream on the client side corresponding to the blocked request. The reset error code of the reset frame is a cancellation code, and the corresponding stream on the server side connection remains in an unopened state.

8. The multi-dimensional threat traffic detection and security protection system based on a large language model according to claim 1, characterized in that, On the same server connection, a unique and orderly sending entry point is set up, and the header blocks of the allowed requests are submitted in a determined order, with the header blocks submitted first being transmitted before the header blocks of the requests that have completed security checks.

9. A multi-dimensional threat traffic detection and security protection system based on a large language model according to claim 1, characterized in that, Before transmitting the release request, each pending representation generates a corresponding field item, and each corresponding field item is checked against the corresponding item in the same position of the reviewed field. Only after the check is passed can the release request be transmitted.