A multi-round dialogue-oriented anti-fraud fine-grained intent recognition method and system

CN122946891APending Publication Date: 2026-10-20BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611252846.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0007]1、零样本大模型接口难以满足细粒度与低误杀要求

Benefits of technology

[0049]本发明提出一种多轮反诈语料的自动化处理与质控流水线,采用约束提示下的剧本重构、敏感信息自动脱敏、基于SimHash的近重复去除、分层划分与敏感信息审计,形成“合法+多个诈骗细粒度子类”的N类训练语料,降低未脱敏全文直接入库的合规风险,并为上述训练方法提供数据基础。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a fine-grained intent recognition method and system for anti-fraud in multi-turn dialogues. It performs desensitization and constraint hint reconstruction on publicly available paradigm references to generate multi-turn dialogue samples. These samples are then stored in a database after format verification, near-duplication removal, hierarchical segmentation, and sensitive information auditing. Using a pre-trained language model as the backbone, a parameter-efficient fine-tuning module is injected for cross-entropy pre-training, followed by continued training using a joint loss of cross-entropy and class-prototype contrastive analysis. The multi-turn dialogues are concatenated into a single sequence in chronological order, sentence-level representations are extracted, and N-class logits are output via a linear header to obtain category predictions and confidence scores. This invention, based on multi-turn dialogue corpora and with a very small batch parameter-efficient fine-tuning setting, introduces step-accumulated class-prototype supervised contrastive constraints to tighten the representation boundaries of easily confused fraud subclasses. This ensures that the inference stage follows the same path as conventional cross-entropy fine-tuning without increasing deployment modules or latency, supporting privately deployable post-conversation attribution / quality inspection scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network security technology, and in particular to a fine-grained intent recognition method and system for anti-fraud in multi-turn dialogues. Background Technology

[0002] Telecommunications network fraud has evolved from single-round rhetoric to multi-round, cross-channel scripted confrontation: attackers gradually build trust through continuous interaction, and then induce transfers, leak verification codes / passwords, or install remote control software, etc. Risk control systems oriented towards conversational text usually need to answer two types of questions simultaneously: (1) whether the current conversation is fraudulent; (2) if it is fraudulent, which type of fine-grained scenario (such as online order-brushing part-time jobs, fake recruitment, credit repair, bank impersonation, investment and wealth management, etc.) so as to differentiate the handling, post-event quality inspection and regulatory reporting.

[0003] Under the constraints of bilingual (Chinese and English), multi-granular subclassing, and minimizing false positives against legitimate users, directly calling the cloud interface of a general-purpose language model for zero-shot classification has significant limitations: subclass boundaries are unstable, legitimate dialogues containing words like "transfer," "verification code," and "winning a prize" are easily falsely flagged, the cost and latency of the call are uncontrollable, and cross-border dialogue content poses compliance risks. On the other hand, relying solely on keyword rules or traditional short text classifiers makes it difficult to characterize the fine-grained differences between multi-turn inducement structures and semantically similar subclasses.

[0004] Parameter-efficient fine-tuning (PEFT) makes it feasible to train locally deployable discriminative classifiers on pre-trained language model backbones. However, under conditions of small batch size (often batchsize=1 due to memory limitations) and highly entangled class semantics, using only cross-entropy (CE) loss, while achieving high overall accuracy, is still insufficient to sufficiently separate the inter-class distances of easily confused subclasses in the representation space, leading to residual confusion.

[0005] While metric learning (such as supervised contrastive learning) can widen the gap between classes, traditional contrastive learning heavily relies on abundant positive and negative sample pairs within large batches. In scenarios where local memory is limited, allowing for efficient parameter fine-tuning with extremely small batches (e.g., BatchSize=1), traditional in-batch contrastive loss is prone to insufficient negative samples, unstable gradient estimation, and even collapse of effective contrastive signals. Introducing a large memory bank increases memory overhead and training complexity, and may conflict with the goals of decoupling inference and simplifying deployment. Furthermore, rewriting the inference-era model structure for contrastive learning increases the difficulty of private deployment and integration with the rule engine. Therefore, the key technical challenge currently facing us is how to effectively widen the representation boundaries of easily confused fraudulent subclasses while maintaining extremely small batches, without increasing inference overhead, and while remaining compatible with standard discriminative classification heads.

[0006] In summary, the existing technology has the following shortcomings:

[0007] 1. Zero-sample large model interfaces are difficult to meet the requirements of fine granularity and low false positives. When general large models are not fully adapted to this domain, fine-granular subclass discrimination is unstable, and the false positive rate for legitimate samples is high; moreover, they rely on cloud calls, which have issues of latency, cost, and data export.

[0008] 2. The keyword / rule approach is not sufficiently adaptable to multi-round scripts. Legitimate customer service and fraudulent inducements often share the same contextual keywords, making it easy to miss or falsely penalize cases using only keywords; it is also difficult to output stable multi-granularity sub-category attributions.

[0009] 3. Pure cross-entropy fine-tuning is insufficient for boundary constraints of easily confused subclasses. The model often "correctly identifies the label" at the logits layer, but semantically adjacent subclasses may still overlap in the hidden representation space. For example, confusion may repeatedly occur between e-commerce related rhetoric and shopping inducement, credit inquiry and credit repair inducement, and part-time order-brushing and fake recruitment.

[0010] 4. Traditional in-batch supervised comparison fails or is too costly with very small batch sizes. When BatchSize=1, it is difficult to construct sufficient outlier negative samples in a single step; the MemoryBank approach increases GPU memory and implementation complexity, and is not conducive to the deployment goal of "enhancing during training and zero additional modules during inference".

[0011] 5. Generative "output tag strings" are not conducive to risk control integration. The output space is open, the parsing is fragile, and the latency fluctuates greatly. It is not as convenient as bounded N-class discriminative classification headers for integration with rule engines and quality inspection pipelines. Summary of the Invention

[0012] This invention addresses the problems of existing technologies by proposing a fine-grained intent recognition method and system for anti-fraud in multi-turn dialogues. Based on multi-turn dialogue corpora that can be processed automatically, and with efficient parameter fine-tuning settings in extremely small batches, it introduces cross-step cumulative class prototype supervision and comparison constraints to tighten the representation boundaries of easily confused fraud subclasses. It also ensures that the inference stage is consistent with the conventional cross-entropy fine-tuning path without adding deployment modules or latency, thereby supporting privately deployable attribution / quality inspection scenarios after the session ends.

[0013] To achieve the above objectives, the present invention provides the following technical solution:

[0014] In a first aspect, the present invention provides a fine-grained intent recognition method for anti-fraud in multi-turn dialogues, comprising the following steps:

[0015] Step S1: Corpus Processing and Quality Control

[0016] The public paradigm reference is desensitized and constraint hints are reconstructed to generate multi-turn dialogue samples; after format validation, near-duplicate removal, hierarchical segmentation and sensitive information auditing, it is stored in the database.

[0017] Step S2, Model Training

[0018] Using a pre-trained language model as the backbone, a parameter fine-tuning module is injected. First, cross-entropy pre-training is performed, and then cross-entropy and class prototype comparison joint loss are enabled for further training.

[0019] Step S3, Reasoning

[0020] The multi-turn dialogues are concatenated into a single sequence in chronological order. Sentence-level representations are extracted and N-class logits are output through a linear head to obtain class predictions and confidence scores. During the inference stage, class prototype buffers and prototype contrast loss are not used. Only the pre-trained language model backbone, parameter efficient fine-tuning module, and linear classification head are retained for a single forward pass.

[0021] Furthermore, in step S1, the multi-turn dialogue samples include:

[0022] Binary classification labels ∈ {0, 1}: 0 = legitimate, 1 = fraud;

[0023] Fraud fine-grained subclass identifier: When label=1, one of M fine-grained scenarios is given; legitimate samples have no fraud subclass.

[0024] The classification task is unified into N categories, satisfying N=M+1: category 0 is legal, and categories 1...M correspond to M fine-grained subcategories of fraud.

[0025] Furthermore, in step S1, the desensitization of the public paradigm reference includes: combining regular expression matching and / or named entity recognition to mask or replace fields including amount, contact information, link, and ID number.

[0026] Further, in step S1, near-duplication removal includes: calculating the Hamming distance of the text based on the SimHash fingerprint method to suppress highly similar templated duplicate samples.

[0027] Furthermore, in step S1, the stratified segmentation includes: performing stratified sampling according to multiple dimensions including labels, languages, and scenarios to divide the training set and the evaluation set, ensuring that fine-grained category and language coverage are comparable.

[0028] Furthermore, in step S1, the sensitive information audit includes: performing a precise matching check on the imported samples and the reference database using multiple patterns, including email, phone number, and URL, to filter or alert on potential leaks.

[0029] Furthermore, in step S2, the cross-entropy pre-training includes:

[0030] The multi-turn dialogues are concatenated into a single text sequence S in chronological order, which is then segmented and truncated before being input into the model. The high-dimensional vector of the last valid token in the last hidden state of the model is extracted as the sentence-level comprehensive representation vector. Feed h into the linear classification head, map to obtain an N-dimensional logits vector, and calculate the cross-entropy classification loss. .

[0031] Furthermore, in step S2, the prototype-based contrastive loss training includes:

[0032] For each category Maintain a normalized class prototype vector in memory that can be updated across steps. , satisfy || ||2=1; N is the total number of intent categories;

[0033] At each step of training, when the true label of the input sample is y, the prototype vector of the corresponding category is updated using the sentence-level representation vector h of the current sample through an exponential moving average mechanism. : (1)

[0034] in The vector is obtained by L2 normalization of h; when there are multiple samples of the same type in the same step, the vector in equation (1) is... Replace with the mean of the normalized representation of similar samples;

[0035] Then, the temperature scaling similarity between the current sample representation and the entire class prototype is calculated:

[0036] (2)

[0037] And construct the class prototype Softmax contrast loss:

[0038] (3)

[0039] The overall optimization objective of the model is denoted as: The joint loss is expressed as:

[0040] (4)

[0041] λ represents the weights of the contrastive loss, while cross-entropy represents the classification loss. Let N be the N-dimensional logits of the linear head output and the standard Softmax cross-entropy of the true class y.

[0042] Furthermore, in step S3, the prefix of the dialogue in the first t rounds is repeatedly inferred to form an early detection monitoring curve.

[0043] Secondly, the present invention proposes a fine-grained intent recognition system for anti-fraud in multi-turn dialogues, characterized by comprising the following levels to implement the method described in any of the above:

[0044] The corpus processing and quality control layer is used to perform desensitization and constraint prompt reconstruction on the public paradigm reference, generate multi-turn dialogue samples, and store them in the database after format verification, near-duplicate removal, hierarchical segmentation and sensitive information auditing;

[0045] The model training layer is used to inject parameters into the pre-trained language model as the backbone, and perform cross-entropy pre-training first, and then enable the joint loss of cross-entropy and class prototype comparison for further training.

[0046] The inference service layer is used to concatenate multi-turn dialogues into a single sequence in chronological order, extract sentence-level representations, and output N-class logits through a linear head to obtain class predictions and confidence scores. During the inference stage, class prototype buffers and prototype contrast loss are not used; only the pre-trained language model backbone, parameter fine-tuning module, and linear classification head are retained for a single forward pass.

[0047] The results application layer is used to connect binary classification results, fine-grained subclasses, and confidence scores to quality inspection work orders, differentiated handling, or manual review routes. Optional repeated reasoning on dialogue prefixes can be used to assist in early judgment.

[0048] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0049] This invention proposes an automated processing and quality control pipeline for multi-round anti-fraud corpora. It employs script reconstruction under constraint prompts, automatic desensitization of sensitive information, near-duplication removal based on SimHash, hierarchical segmentation, and sensitive information auditing to form N types of training corpora consisting of "legitimate + multiple fine-grained fraud subcategories". This reduces the compliance risks of directly storing un-desensitized full texts into the database and provides a data foundation for the aforementioned training methods.

[0050] This invention proposes a class prototype-supervised contrastive training method with extremely small batch sizes. Within a discriminative classification framework with efficient parameter fine-tuning, a class prototype that can be updated step-by-step is maintained for each intent category, and class centers are stably accumulated using exponential moving averages under a batch size of 1. Simultaneously, a temperature-scaled prototype Softmax contrastive loss is applied to the sentence-level representation, jointly optimized with cross-entropy. This enhances the separability of semantically adjacent fraudulent subclasses in the representation space without introducing additional modules during inference. Compared to contrastive methods that rely solely on cross-entropy or large batches / queues, this method is particularly advantageous due to its adaptability to local memory constraints and deployment simplification requirements.

[0051] This invention proposes a two-stage fine-tuning strategy: first, cross-entropy convergence, then prototype alignment. The first stage optimizes only the cross-entropy, establishing basic discriminative capabilities between the representation and the classification head, and providing a warm-up condition for the prototype. The second stage enables joint optimization of prototype-contrast loss on the same backbone and PEFT module, avoiding training oscillations caused by initial prototype noise and smoothly tightening the boundaries of easily confused subclasses. This strategy also supports incremental upgrades based on existing cross-entropy weights. The prototype is not used during the inference stage, ensuring consistent inference performance before and after the upgrade. Figure 1 To.

[0052] This invention organizes a multi-turn anti-fraud fine-grained intent recognition method into an end-to-end system. It takes multi-turn dialogue text as input and outputs whether it is fraudulent, the fine-grained subclass, and the confidence level. It supports integration with rule engines and manually reviewed routes. Because it uses bounded classification headers and a PEFT adaptation module, it facilitates version management, rollback, and private deployment, preventing the transmission of session content through third-party cloud large-scale model interfaces.

[0053] Validation results on the standard evaluation dataset show that the method of this invention can efficiently fine-tune the baseline compared to the same architecture with only cross-entropy parameters, further improve the fine-grained classification accuracy, keep the legitimate false positive rate at a low level, and significantly reduce the confusion of e-commerce / shopping, credit scoring / credit scoring repair, etc.; the inference path is consistent with the cross-entropy baseline, and the local inference latency is at a deployable level. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0055] Figure 1 This is a comparative schematic diagram of the overall scheme of the method / system provided in the embodiments of the present invention.

[0056] Figure 2 This is a flowchart of automated corpus processing provided in an embodiment of the present invention.

[0057] Figure 3 This is a schematic diagram of prototype EMA update, joint loss, and inference path provided for embodiments of the present invention. Detailed Implementation

[0058] To better understand this technical solution, the method of the present invention will be described in detail below with reference to the accompanying drawings.

[0059] The symbols in this invention have the following meanings:

[0060] S: A sequence of multi-turn dialogue texts concatenated in chronological order;

[0061] : The sentence-level representation vector obtained by sentence-level aggregation (such as Last-token Pooling) of the hidden states of the last layer of the backbone network; d is the hidden dimension;

[0062] h is the unit vector after L2 normalization. ;

[0063] N: Total number of intent categories (legitimate categories + M fine-grained fraud subcategories, N = M + 1);

[0064] c, k: Category index, values ;

[0065] y: The true class index of the current training sample;

[0066] The class prototype vector of category c, satisfying || || 2 =1; As a real-world prototype, This is the prototype of the k-th class;

[0067] μ: EMA momentum decay factor, μ∈[0.90, 0.999] (0.99 can be used in the example);

[0068] normalize(·): L2 normalization operator for vectors, normalize(v) = v / ||v|| 2 ;

[0069] sim(·,·): Similarity function; takes the inner product when both the representation and the prototype are normalized, equivalent to cosine similarity;

[0070] Temperature coefficient ∈[0.01, 0.5] (0.07 can be used in the example) to control the sharpness of the Softmax distribution;

[0071] : Prototype-supervised contrastive loss (Equation (3));

[0072] Cross-entropy classification loss;

[0073] Compare the loss weights. ∈[0.01, 1.0] (0.15 can be used in the example);

[0074] : Total loss of joint training (Equation (4)).

[0075] This invention provides a fine-grained intent recognition system for multi-turn dialogue anti-fraud, which is generally divided into four layers: a corpus processing and quality control layer, a model training layer, an inference service layer, and a result application layer (the functions of each layer are described below). The overall solution of this invention is compared to... Figure 1 As shown (zero-sample cloud-based generative path vs. local discriminative + class prototype comparison path). Each layer is specifically as follows:

[0076] Corpus processing and quality control layer: Desensitize and reconstruct the public paradigm references with constraint prompts to generate multi-turn dialogue samples; after format verification, near-duplicate removal (specifically, fingerprinting methods such as SimHash can be used), hierarchical division and sensitive information auditing, the samples are stored in the database.

[0077] Model training layer: Based on a pre-trained language model, a parameter fine-tuning module is injected; cross-entropy pre-training is performed first, and then prototype-based contrastive loss is enabled for further training.

[0078] Inference service layer: Concatenates multi-turn dialogues into a single sequence in chronological order, extracts sentence-level representations and outputs N types of logits via a linear head; obtains category predictions and confidence scores.

[0079] Results Application Layer: Connects binary classification results, fine-grained subclasses, and confidence scores to quality inspection work orders, differentiated handling, or manual review routing; optional repeated reasoning on dialogue prefixes can be used to assist in early judgment.

[0080] This invention provides a fine-grained intent recognition method for anti-fraud in multi-turn dialogues. The automated corpus processing flow is as follows: Figure 2 As shown, the process includes: paradigm reference → desensitization and constraint reconstruction → multi-turn dialogue sample generation → deduplication and hierarchical segmentation → formation of the final corpus. The two-stage training and inference path is as follows: Figure 3 As shown, the process includes: first-stage cross-entropy training → second-stage prototype alignment → exporting the PEFT module and classification head for local inference; the class prototype module is not used in the inference stage. The specific process is as follows:

[0081] 1. Task and Tag Space Definition

[0082] Each sample is a multi-turn dialogue text. System output:

[0083] Binary classification labels ∈ {0, 1}: 0 = legitimate, 1 = fraud;

[0084] Fraud fine-grained subclass identifier: When label=1, one of M fine-grained scenarios is given; legitimate samples have no fraud subclass.

[0085] The task is unified into N categories, satisfying N=M+1: category 0 is legal, and categories 1…M correspond to M fine-grained subcategories of fraud. The main setting is fine-grained classification on the complete dialogue input (attribution / quality inspection after the session ends).

[0086] In a specific embodiment, a label mapping of M=32 and N=33 can be used (legal + 32 types of public complaint / reporting system fraud scenarios).

[0087] 2. Automated processing and quality control of multi-round anti-fraud corpus

[0088] This step constitutes an independently implementable data processing pipeline, including:

[0089] (1) Script reconstruction under constraints: The generation model is driven to output multi-turn dialogue text by using the desensitized scene paradigm / dialogue constraints as conditions; the original reference text is not directly used as training samples to reduce the risk of copying the undesensitized full text.

[0090] (2) Automatic desensitization of sensitive information: Combine regular expression matching and / or named entity recognition to mask or replace fields such as amount, contact information, link, and ID number.

[0091] (3) Near repetition removal: Hamming distance of text is calculated based on fingerprinting methods such as SimHash to suppress highly similar templated repetitive samples.

[0092] (4) Stratified segmentation: Stratified sampling is carried out according to the dimensions of labels, languages, scenarios, etc., to divide the training set and the evaluation set, so as to ensure that the fine-grained categories and language coverage are comparable.

[0093] (5) Sensitive information audit: Perform precise matching checks on the input samples and the reference database using patterns such as email, telephone, and URL, and filter or alert on potential leaks.

[0094] In a specific embodiment, a bilingual Chinese-English corpus can be constructed, with a total size of approximately nine thousand entries, and the corpus can be divided and audited according to the aforementioned pipeline.

[0095] 3. Discriminative backbone and representation extraction

[0096] Freeze the backbone of the pre-trained language model (including but not limited to causal language models based on Decoder, or other pre-trained language models suitable for sequence classification), and inject parameter efficient fine-tuning (PEFT) modules (including but not limited to LoRA, Prefix-Tuning, P-Tuning, etc.; in a specific embodiment, LoRA is used, with rank r=16 and scaling factor α=32, which is applied to the q / k / v / o projection matrix of the attention mechanism).

[0097] 4. Classification Cross Entropy Loss

[0098] The multi-turn dialogues are concatenated into a single text sequence S in chronological order, which is then segmented and truncated before being input into the model. The high-dimensional vector of the last valid token in the last hidden state of the model is extracted as the sentence-level comprehensive representation vector. (Last-token Pooling); h is fed into the linear classification head and mapped to an N-dimensional logits vector (N=33 in one specific embodiment). During the training phase, h is used to calculate both the classification cross-entropy loss and the class prototype contrast loss.

[0099] 5. Prototype-based supervised contrast loss

[0100] For each category Maintain a normalized class prototype vector in memory that can be updated across steps. , satisfy || || 2 =1.

[0101] In each step of training, when the true label of the input sample is y, the prototype vector of the corresponding class is updated using the sentence-level representation vector h of the current sample (which can be L2 normalized first) through the exponential moving average (EMA) mechanism. :

[0102] Equation (1)

[0103] in The vector is obtained by L2 normalization of h; when there are multiple samples of the same type in the same step, the vector in equation (1) can be... The mean of the normalized representation of the same type of samples is replaced. This mechanism enables smooth and stable accumulation of class centers across steps, even with a very small batch size of 1.

[0104] Subsequently, the temperature scaling similarity between the current sample representation and all class prototypes is calculated (Equation (2)), and the class prototype Softmax contrast loss is constructed (Equation (3)):

[0105] Equation (2)

[0106] (because , All values ​​have been L2 normalized; the above formula represents the cosine similarity.

[0107] Equation (3)

[0108] Cross-entropy classification loss Let be the standard Softmax cross-entropy between the N-dimensional logits of the linear head output and the true class y. The overall optimization objective of the model is the joint loss:

[0109] Equation (4)

[0110] 6. Two-stage training

[0111] Phase 1 (Cross-entropy pre-training only): Optimization only The goal is to enable the backbone representation and the linear classifier to quickly establish a basic classification representation capability, avoiding excessive randomness in the initial hidden state h, while providing relatively stable class space initialization conditions for subsequent prototype vectors. In a specific implementation, BatchSize=1, gradient accumulation 8, and a constant learning rate can be used. Mixed precision training is performed for one epoch to obtain the cross-entropy baseline weights.

[0112] Phase 2 (Cross-entropy + Prototype Comparison Joint Optimization): Load the weights from Phase 1 and enable the joint loss. Continue training. The goal is to initialize / warm up the prototype vectors on the established preliminary class space, preventing oscillations in contrast loss due to excessive prototype noise in the early stages of training, thereby achieving smooth tightening of the representation space at the boundaries of easily confused subclasses; and to support incremental upgrades on existing cross-entropy models (replacing only the PEFT module and classification head), without requiring full retraining from scratch. In a specific embodiment, one more epoch can be trained, synchronously updating the PEFT parameters, classification head, and prototype buffer. Figure 3 As shown.

[0113] 7. Reasoning and Deployment

[0114] During the inference phase, the prototype buffer and contrastive loss computation graph are discarded, and only the "pre-trained backbone + PEFT module + linear classification head" are retained for a single forward pass, outputting the category and confidence score, thus ensuring zero additional modules and the same order of magnitude latency relative to the cross-entropy baseline. Optional: Repeat the prefix inference for the first t rounds of dialogue to form an early detection curve, which is used to assist in the design of streaming early warning strategies (not required to be deployed together with the main model).

[0115] 8. Results Summary

[0116] Validation results on the standard evaluation dataset show that the implementation configuration of the two-stage class prototype supervised comparative training of the present invention can efficiently fine-tune the baseline relative to the cross-entropy parameter of the same architecture, further improve the accuracy of fine-grained intent recognition, keep the legitimate false alarm rate at a low level, and significantly reduce the confusion between semantically adjacent fraud subclasses; the inference path is consistent with the cross-entropy baseline, which can support private attribution and quality inspection after the session ends.

[0117] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. However, these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A fine-grained intent recognition method for anti-fraud in multi-turn dialogues, characterized in that, Includes the following steps: Step S1: Corpus Processing and Quality Control The public paradigm reference is anonymized and constraint hints are reconstructed to generate multi-turn dialogue samples; After format validation, near-duplicate removal, hierarchical segmentation, and sensitive information auditing, the data is stored in the database. Step S2, Model Training Using a pre-trained language model as the backbone, a parameter fine-tuning module is injected. First, cross-entropy pre-training is performed, and then cross-entropy and class prototype comparison joint loss are enabled for further training. Step S3, Reasoning The multi-turn dialogues are concatenated into a single sequence in chronological order. Sentence-level representations are extracted and N-class logits are output through a linear head to obtain class predictions and confidence scores. During the inference stage, class prototype buffers and prototype contrast loss are not used. Only the pre-trained language model backbone, parameter efficient fine-tuning module, and linear classification head are retained for a single forward pass.

2. The fine-grained intent recognition method for anti-fraud in multi-turn dialogues according to claim 1, characterized in that, In step S1, the multi-turn dialogue samples include: Binary classification labels ∈ {0, 1}: 0 = legitimate, 1 = fraud; Fraud fine-grained subclass identifier: When label=1, one of M fine-grained scenarios is given; legitimate samples have no fraud subclass. The task is unified into N categories, satisfying N=M+1: category 0 is legal, and categories 1...M correspond to M fine-grained subcategories of fraud.

3. The fine-grained intent recognition method for anti-fraud in multi-turn dialogues according to claim 1, characterized in that, In step S1, the desensitization of the public paradigm reference includes: combining regular expression matching and / or named entity recognition to mask or replace fields including amount, contact information, link, and ID number.

4. The fine-grained intent recognition method for anti-fraud in multi-turn dialogues according to claim 1, characterized in that, In step S1, near-duplication removal includes: calculating the Hamming distance of the text based on the SimHash fingerprint method to suppress highly similar templated duplicate samples.

5. The fine-grained intent recognition method for anti-fraud in multi-turn dialogues according to claim 1, characterized in that, In step S1, the stratified segmentation includes: performing stratified sampling according to multiple dimensions including labels, languages, and scenarios to divide the training set and the evaluation set, ensuring that fine-grained category and language coverage are comparable.

6. The fine-grained intent recognition method for anti-fraud in multi-turn dialogues according to claim 1, characterized in that, In step S1, the sensitive information audit includes: performing a precise matching check on the imported samples and the reference database using multiple patterns, including email, phone number, and URL, to filter or alert on potential leaks.

7. The fine-grained intent recognition method for anti-fraud in multi-turn dialogues according to claim 1, characterized in that, In step S2, cross-entropy pre-training includes: The multi-turn dialogues are concatenated into a single text sequence S in chronological order, which is then segmented and truncated before being input into the model. The high-dimensional vector of the last valid token in the last hidden state of the model is extracted as the sentence-level comprehensive representation vector. Feed h into the linear classification head, map to obtain an N-dimensional logits vector, and calculate the cross-entropy classification loss. .

8. The fine-grained intent recognition method for anti-fraud in multi-turn dialogues according to claim 1, characterized in that, In step S2, the prototype-based contrastive loss training includes: For each category Maintain a normalized class prototype vector in memory that can be updated across steps. , satisfy || ||2=1; N is the total number of intent categories; At each step of training, when the true label of the input sample is y, the prototype vector of the corresponding category is updated using the sentence-level representation vector h of the current sample through an exponential moving average mechanism. : (1) in The vector is obtained by L2 normalization of h; when there are multiple samples of the same type in the same step, the vector in equation (1) is... Replace with the mean of the normalized representation of similar samples; Then, the temperature scaling similarity between the current sample representation and the entire class prototype is calculated: (2) And construct the class prototype Softmax contrast loss: (3) The overall optimization objective of the model is denoted as: The joint loss is expressed as: (4) λ represents the weights of the contrastive loss, while cross-entropy represents the classification loss. Let N be the standard Softmax cross-entropy of the N-dimensional logits of the linear head output and the true class y.

9. The fine-grained intent recognition method for anti-fraud in multi-turn dialogues according to claim 1, characterized in that, In step S3, the prefix of the dialogue in the first t rounds is repeatedly inferred to form an early detection monitoring curve.

10. A fine-grained intent recognition system for anti-fraud in multi-turn dialogues, characterized in that, The following levels are included to implement the method described in any one of claims 1-9: The corpus processing and quality control layer is used to perform desensitization and constraint prompt reconstruction on the public paradigm reference, generate multi-turn dialogue samples, and store them in the database after format verification, near-duplicate removal, hierarchical segmentation and sensitive information auditing; The model training layer is used to inject parameters into the pre-trained language model as the backbone, and perform cross-entropy pre-training first, and then enable the joint loss of cross-entropy and class prototype comparison for further training. The inference service layer is used to concatenate multi-turn dialogues into a single sequence in chronological order, extract sentence-level representations, and output N-class logits through a linear head to obtain class predictions and confidence scores. During the inference stage, class prototype buffers and prototype contrast loss are not used; only the pre-trained language model backbone, parameter fine-tuning module, and linear classification head are retained for a single forward pass. The results application layer is used to connect binary classification results, fine-grained subclasses, and confidence scores to quality inspection work orders, differentiated handling, or manual review routes. Optional repeated reasoning on dialogue prefixes can be used to assist in early judgment.