Abnormal text recognition method, device and equipment and storage medium
Patent Information
- Application Number
- CN202610880221.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-08-18
AI Technical Summary
这导致系统在拦截黑灰产的同时,可能将金融消费者或医疗患者的正常行为误判为恶意行为
[0011]Compared with existing technologies, this invention obtains sensitive word feature vectors, text feature vectors and semantic feature vectors from the text to be identified. By fusing the sensitive word feature vectors, text feature vectors and semantic feature vectors, a multi-dimensional feature representation system is constructed, which helps to overcome the limitations of a single feature dimension when processing complex text.
Smart Images

Figure CN122595040A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent decision-making technology, and particularly to an abnormal text recognition method, device, equipment and storage medium. Background Art
[0002] In key fields such as financial risk control, healthcare, e-commerce, and Internet content review, efficiently identifying and preventing malicious behaviors (such as malicious claims in the financial field, group complaints, and illegal aesthetic medical drainage in the healthcare field) is the core defense line to ensure business compliance.
[0003] In the field of fintech, black and gray production personnel often use abnormal means, such as using homophone substitution (e.g., writing "policy surrender" as "leg surrender"), character decomposition confusion (e.g., writing "rights protection" as "wei - quan"), or inserting meaningless special symbols in the text to avoid keyword detection in the financial system; in the healthcare field, illegal diversion gangs often use metaphors or homophones (e.g., using "hyaluronic acid" to refer to specific illegal fillers) to conceal their true intentions. Existing abnormal text recognition methods can only perform simple pattern matching and cannot understand the semantic associations behind the text, resulting in huge recognition blind spots for the system when facing such carefully designed adversarial samples.
[0004] To cope with the above-mentioned endless text deformations, operation and maintenance personnel have to conduct a large amount of manual exhaustion and continuously expand the rule library. With the explosive growth of the number of rules, overlaps or conflicts are extremely likely to occur between rules. This causes the system to misjudge the normal behaviors of financial consumers or medical patients as malicious behaviors while intercepting black and gray production.
[0005] Therefore, there is an urgent need to develop an abnormal text recognition method that can adapt to text deformations and effectively identify adversarial words to solve the aforementioned problems in the prior art. Summary of the Invention
[0006] In view of the above, it is necessary to provide an abnormal text recognition method, the purpose of which is to provide a technical solution for abnormal text recognition that can adapt to text deformations and effectively identify adversarial words.
[0007] In a first aspect, an abnormal text recognition method is provided, including: Identifying keywords in the text to be recognized, combining at least two of the keywords to obtain combined word groups, matching the combined word groups with a preset sensitive word group library to obtain target sensitive word groups, and performing vectorization processing on the target sensitive word groups to generate sensitive word feature vectors; Performing word segmentation processing on the text to be recognized to obtain a word segmentation sequence, and performing vectorization processing on the word segmentation sequence to generate word-level feature vectors; The text to be identified is converted into a character sequence, the character sequence is vectorized to generate a character-level feature vector, and the word-level feature vector and the character-level feature vector are concatenated to obtain a text feature vector; Obtain the context information between each word in the word segmentation sequence, generate a global semantic vector based on the context information, input the global semantic vector into a preset intent classification model, and output a semantic feature vector representing the intent corresponding to the text to be identified; The sensitive word feature vector, text feature vector, and semantic feature vector are fused to generate a fused feature vector. The fused feature vector is then input into a preset abnormal text classifier to determine the probability value that the text to be identified belongs to abnormal text.
[0008] Secondly, an abnormal text recognition device is provided, comprising: The combination module is used to identify keywords in the text to be identified, combine at least two keywords to obtain a combined word group, match the combined word group with a preset sensitive word group library to obtain a target sensitive word group, and perform vectorization processing on the target sensitive word group to generate a sensitive word feature vector. The word segmentation module is used to segment the text to be identified into word segments to obtain a word segmentation sequence, and to vectorize the word segmentation sequence to generate word-level feature vectors. The concatenation module is used to convert the text to be recognized into a character sequence, perform vectorization processing on the character sequence to generate a character-level feature vector, and concatenate the word-level feature vector and the character-level feature vector to obtain a text feature vector; The mapping module is used to obtain the context information between each word in the word segmentation sequence, generate a global semantic vector based on the context information, input the global semantic vector into a preset intent classification model, and output a semantic feature vector representing the intent corresponding to the text to be identified. The calculation module is used to fuse the sensitive word feature vector, text feature vector and semantic feature vector to generate a fused feature vector, and input the fused feature vector into a preset abnormal text classifier to determine the probability value of the text to be identified belonging to abnormal text.
[0009] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described abnormal text recognition method.
[0010] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described abnormal text recognition method.
[0011] Compared with existing technologies, this invention obtains sensitive word feature vectors, text feature vectors and semantic feature vectors from the text to be identified. By fusing the sensitive word feature vectors, text feature vectors and semantic feature vectors, a multi-dimensional feature representation system is constructed, which helps to overcome the limitations of a single feature dimension when processing complex text.
[0012] By leveraging the synergistic effect of multi-source features, the model can gain a more comprehensive understanding of the text to be identified, thereby improving classification accuracy and robustness to a certain extent. It can adapt to text glyph deformation and synonym substitution, accurately identify abnormal text with adversarial rhetoric, and thus solve the problems of single feature extraction and limited generalization ability in existing technologies.
[0013] In high-risk businesses such as insurance claims, health insurance complaints, and bank loan complaints, this invention can effectively identify and block abnormal texts such as malicious policy cancellations, false claims, and group harassment, thereby reducing operational losses and compliance risks. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of an application environment for an abnormal text recognition method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating an abnormal text recognition method provided in an embodiment of the present invention; Figure 3 for Figure 2 A detailed flowchart illustrating the process of obtaining the target sensitive word group in step S1; Figure 4 for Figure 2 A detailed flowchart illustrating the process of obtaining the preset sensitive word library in step S1; Figure 5 for Figure 2 A detailed flowchart illustrating the generation of word-level feature vectors in step S2; Figure 6 for Figure 2 A further detailed flowchart illustrating the generation of word-level feature vectors in step S2; Figure 7 for Figure 2 A schematic diagram of the process for refining character-level feature vectors in step S3; Figure 8 for Figure 2 A detailed flowchart illustrating the process of obtaining the preset set of easily confused character combinations in step S3; Figure 9 This is a schematic diagram of an abnormal text recognition device provided in an embodiment of the present invention; Figure 10 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 11This is another structural schematic diagram of a computer device according to one embodiment of the present invention.
[0015] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.
[0017] It should be noted that the descriptions involving "first," "second," etc., in this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0018] The abnormal text recognition method provided in this invention can be applied to, for example... Figure 1 In this application environment, the client communicates with the server via a network. The server identifies keywords in the text to be identified, combines at least two keywords to obtain a combined word group, matches the combined word group with a preset sensitive word group library to obtain a target sensitive word group, and vectorizes the target sensitive word group to generate a sensitive word feature vector; the server performs word segmentation on the text to be identified to obtain a word segmentation sequence, and vectorizes the word segmentation sequence to generate a word-level feature vector; the server converts the text to be identified into a character sequence, vectorizes the character sequence to generate a character-level feature vector, and concatenates the word-level feature vector and the character-level feature vector to obtain a text feature vector; The context information between each word in the word segmentation sequence is obtained, a global semantic vector is generated based on the context information, the global semantic vector is input into a preset intent classification model, and a semantic feature vector representing the intent of the text to be identified is output; the sensitive word feature vector, text feature vector and semantic feature vector are fused to generate a fused feature vector, the fused feature vector is input into a preset abnormal text classifier, and the probability value of the text to be identified belonging to abnormal text is determined.
[0019] This invention extracts sensitive word feature vectors, text feature vectors, and semantic feature vectors from the text to be identified. By fusing these vectors, a multi-dimensional feature representation system is constructed, which helps overcome the limitations of single feature dimensions when processing complex text. Through the synergistic effect of multi-source features, the model can more comprehensively understand the text to be identified, thereby improving classification accuracy and robustness to a certain extent. It can adapt to text character deformation and synonym substitution, accurately identify abnormal text with adversarial rhetoric, and thus solve the problems of single feature extraction and limited generalization ability in existing technologies. In high-risk businesses such as insurance claims, health insurance complaints, and bank loan complaints, this invention can effectively identify and intercept abnormal text such as malicious policy cancellations, false claims, and organized harassment, reducing operational losses and compliance risks.
[0020] Reference Figure 2 The diagram shown is a flowchart illustrating an abnormal text recognition method according to an embodiment of the present invention. This method is executed by a device.
[0021] In this embodiment, an abnormal text recognition method includes: S1. Identify keywords in the text to be identified, combine at least two keywords to obtain a combined word group, match the combined word group with a preset sensitive word group library to obtain a target sensitive word group, and vectorize the target sensitive word group to generate a sensitive word feature vector.
[0022] In this embodiment, the text to be identified refers to raw text data that needs to be checked for compliance or identified for risk assessment. This includes user conversation records in instant messaging applications, customer service inquiry logs in financial apps, and complaint texts from platforms.
[0023] The system receives text to be identified (such as customer complaint text), performs word segmentation on the text to obtain a word segmentation sequence, and extracts keywords from the word segmentation sequence. Based on the directed graph structure defined in the sensitive word group library, subgraph matching is performed on the word segmentation sequence. Specifically, when at least two keywords appear in the word segmentation sequence, and their order of appearance is consistent with the edge direction in the directed graph, the system combines them to obtain a combined word group. For example, when "exposure" and "compensation" appear sequentially in the text and conform to the path definition in the graph structure, a combined word group is formed. This combined word group is compared with standard sensitive word groups in the sensitive word group library. If a match is successful, it is marked as the target sensitive word group, serving as the basis for subsequent feature vector generation.
[0024] The target sensitive word group is vectorized to generate a sensitive word feature vector. This sensitive rule word group is then converted into a fixed-dimensional rule feature vector. The rule feature vector can accurately represent the semantic features and risk weights of the word group, providing data support for subsequent risk classification and decision-making.
[0025] In the fintech scenario, if the words "policy surrender" or "compensation" appear sporadically in the text to be recognized, it may just be a normal business consultation. However, if both of them co-occur closely in the context and are accompanied by "pressuring" words, it is very likely to constitute a fraudulent text. For example, the text to be recognized is: "Hello, I'm having trouble with my capital turnover recently and want to cancel that 'full-amount' insurance policy. I have evidence to prove that the salesperson 'intentionally' induced me to buy it. If it's not handled, I'll expose you to the State Financial Supervision and Administration Bureau." For such texts, the present invention can effectively identify their disguised features: Traditional technologies can only detect "full-amount" (word splitting interference), "bao" (pinyin substitution), and "State Financial Separation Supervision and Administration Bureau" (similar-shaped character error), and often miss judgments because they cannot match the standard vocabulary. However, through vector space mapping, the present invention can identify the high similarity in the semantic space between "full-amount" and "全额", "bao" and "保", and "State Financial Separation Supervision and Administration Bureau" and "State Financial Supervision and Administration Bureau"; at the same time, combined with the intention classification model, the system can penetrate the superficial reason of "capital turnover" and identify the threats and fraudulent intentions behind "intentional inducement" and "exposure". After capturing this specific "pressuring words link", the system will generate high-risk rules and semantic feature vectors, thereby accurately determining that the text is an abnormal text.
[0026] In the field of medical and health, simply mentioning "treatment" or "regulations" may not be违规 (the original Chinese character here seems incorrect, assuming it should be "违规" which means "violate regulations" in English). However, if it forms a specific words link in combination with keywords such as "national supervision" (such as implying special channels or illegal curative effects), it may imply illegal publicity and become an abnormal text.
[0027] In one embodiment, referring to Figure 3 as shown, the matching of the combined phrase with a preset sensitive phrase library to obtain the target sensitive phrase includes: S11. Mapping the combined phrase to a preset vector space to obtain a first feature vector; S12. Mapping the standard sensitive phrases in the preset sensitive phrase library to the vector space to obtain second feature vectors; S13. Calculating the similarity between the first feature vector and each second feature vector; S14. Taking the standard sensitive phrases corresponding to the second feature vectors with similarity greater than a preset similarity threshold as the target sensitive phrases.
[0028] The first feature vector is obtained by mapping combined word groups to a preset vector space, and the second feature vector is obtained by mapping standard sensitive word groups from a preset sensitive word group library to the vector space. Mapping word groups to the preset vector space aims to transform discrete text symbols into continuous numerical vectors, enabling computers to perform mathematical calculations and semantic understanding. This operation abstracts combined word groups and standard sensitive word groups from linguistic forms into points in a multi-dimensional space, facilitating the quantification of their semantic relationships. The resulting first and second feature vectors respectively represent the distribution characteristics of the word group to be detected and the standard sensitive word group in the semantic space. The direction and position of the vectors contain the semantic information of the word group, making words with similar meanings but potentially different literal meanings (such as synonyms and variant words) closer in space. By calculating the similarity between vectors, target sensitive word groups that are not completely matched literally but are highly semantically related can be effectively identified, thereby improving the comprehensiveness and accuracy of sensitive word detection and overcoming the limitation of traditional string matching in easily missing variant expressions.
[0029] The extracted first feature vector and second feature vector are compared in multiple dimensions to calculate their similarity. In a preferred embodiment, a cosine similarity algorithm or an edit distance algorithm is used to quantify the similarity. If the calculated similarity value exceeds a preset similarity threshold (e.g., a threshold of 0.85), the combined word group is determined to match a standard sensitive word group in the sensitive word group library, thereby confirming that the standard sensitive word group is a target sensitive word group in the text to be identified with a clear intent to violate regulations.
[0030] This invention achieves complementarity between rules and implicit semantics by introducing a sensitive phrase library to match combined phrases. On the one hand, the sensitive phrase library matching utilizes the prior knowledge of domain experts, enabling it to accurately capture the unique discourse patterns of abnormal text (such as specific pressure logic); on the other hand, the matching results endow the model output with clear business meaning and interpretability, solving the technical pain point of traditional deep learning models in financial risk control scenarios of "knowing what but not why".
[0031] In one embodiment, refer to Figure 4 As shown, the preset sensitive word library is constructed in the following manner: S15. Obtain a set of historical abnormal text samples and perform co-occurrence frequency analysis on the sensitive words in the set of historical abnormal text samples. S16. Mark at least two sensitive words with a co-occurrence frequency higher than a preset threshold as standard sensitive word groups; S17. Store the standard sensitive word groups into a preset database to generate the preset sensitive word group library.
[0032] We acquire a massive collection of historical abnormal text samples. These samples are derived from labeled malicious complaints, illegal marketing, fraudulent rhetoric, and other abnormal interactive texts from black and gray market activities, ensuring that the samples are representative and targeted.
[0033] The historical abnormal text sample set is preprocessed, and the preprocessed historical abnormal text is segmented into text sequences using a word segmentation tool. A pre-defined sensitive word matching algorithm is then used to extract sensitive words from the text sequences based on their co-occurrence frequency. Specifically, a semantic sliding window (e.g., a sentence or five consecutive words) is used to scan the text sequence, and the frequency and probability of different sensitive words appearing simultaneously within the window are statistically analyzed. The co-occurrence frequency analysis considers not only whether words appear simultaneously but also the degree of their joint occurrence. The formula for the sensitive word matching algorithm can be expressed as P(…). , (i.e., sensitive words) and The probability of them appearing together in the same window.
[0034] When the co-occurrence frequency of at least two sensitive words exceeds a preset frequency threshold (e.g., a threshold of 0.8, or a statistical significance above the 90% confidence interval), it indicates a strong correlation between these two sensitive words in black and gray market rhetoric, and they are marked as standard sensitive word phrases. For example, "full amount" and "insurance refund," or "malicious intent" and "complaint" may be bound as word phrases due to their high frequency of co-occurrence. These word phrases represent common fixed collocations, attack logic, or chains of illegal intent in black and gray market rhetoric.
[0035] The statistically validated standard sensitive word phrases are stored in a pre-defined database (such as MySQL, Redis, or Elasticsearch), and an index is created to optimize query efficiency, thereby generating a structured pre-defined sensitive word phrase library. This sensitive word phrase library can effectively support real-time matching and risk identification of subsequent dialogue texts, improving the detection accuracy of black and gray market gang operation patterns.
[0036] Traditional technologies are typically based on a "blacklist" mechanism, which can only identify individual sensitive words (such as "country" or "regulation"). If a user combines multiple words that are themselves compliant (such as "low interest," "no collateral," or "fast loan"), each word individually may not be illegal, but the combination may constitute a loan shark promotion or fraudulent information, which existing technologies often cannot identify.
[0037] Instead of focusing on the attributes of individual words, the present invention focuses on the logical associations and arrangement patterns between combined phrases, and can accurately identify those invisible violations formed by "normal words" through specific logical combinations, greatly reducing the missed detection rate. The target sensitive phrases are vectorized to obtain sensitive word feature vectors, which can accurately represent the semantic features and risk weights of the phrases, providing data support for subsequent risk classification and decision-making.
[0038] S2. Perform word segmentation on the to-be-identified text to obtain a word segmentation sequence, and perform vectorization on the word segmentation sequence to generate word-level feature vectors.
[0039] In this embodiment, for example, the to-be-identified text is: "Hello, I'm having trouble with my capital turnover recently. I want to cancel that 'full-amount' insurance policy. I have evidence that the salesperson 'badly' induced me to buy it. If it's not handled, I'll expose you to the State Administration of Financial Supervision and Administration." Use a Chinese word segmentation tool (such as Jieba or HanLP) to perform word segmentation on the to-be-identified text. After segmentation: [Hello] [capital] [turnover] [full-amount] [insurance] [policy] [cancel]... [badly]... [State Administration of Financial Supervision and Administration].
[0040] Throw away all the stop words (such as: I, take, of, is, have) that have no practical meaning, and only retain the core words to obtain the word segmentation sequence. The retained words: [capital] [turnover] [full-amount] [insurance] [policy] [cancel] [badly] [State Administration of Financial Supervision and Administration] [expose].
[0041] To capture the importance distribution of words, use the TF-IDF (Term Frequency - Inverse Document Frequency) algorithm to convert the word segmentation sequence into word-level feature vectors. This word-level feature vector not only reflects the occurrence frequency of keywords in the current complaint text, but also filters out the general words that appear frequently in all texts through the inverse document frequency weight, thus highlighting the distinguishable black and gray production-related words (such as "cancel", "State Administration of Financial Supervision and Administration", etc.).
[0042] In one embodiment, refer to Figure 5 As shown, the step of performing vectorization on the word segmentation sequence to generate word-level feature vectors includes: S21. Use a sliding window with a preset step size to intercept a preset number of consecutive word segments in the word segmentation sequence to form local combined phrases; S22. Count the occurrence frequency of the local combined phrases in the word segmentation sequence; S23. Map the local combined phrases and the occurrence frequency to a preset vector space to generate word-level feature vectors representing the local co-occurrence relationship of words.
[0043] To effectively capture specific lexical collocation patterns in the jargon of black and grey production (such as "full refund of insurance premiums", "malicious complaint", etc.), a feature vectorization method based on a local context window is proposed. The specific implementation steps are as follows: First, set the parameters of the sliding window, including the window size (i.e., a preset number of word segments, usually 2 - 4 words) and the sliding step size (usually 1). Traverse the text sequence after cleaning and word segmentation with this preset step size. During the traversal, whenever the window stops, intercept the consecutive word segments within the window and splice or combine them into a local combined phrase. For example, in the sentence sequence ["I", "want", "full", "refund of insurance premiums"], if the window size is 2, then the binary phrases ["I want"], ["want full"], ["full refund of insurance premiums"], etc. are intercepted in sequence.
[0044] Count the occurrence frequencies of these local combined phrases in the entire word segmentation sequence. This step converts the text information into numerical statistical features, and the high or low frequencies reflect the importance or significance of specific phrases in the text. Map the local combined phrases and their occurrence frequencies into a preset vector space to generate a word-level feature vector representing the local co-occurrence relationship of words. This mapping process usually uses techniques such as word embedding or one-hot encoding to convert the discrete phrase and frequency information into continuous numerical vectors.
[0045] The main purpose of mapping the local combined phrases and occurrence frequencies into a preset vector space is to convert the structured information of the text into a numerical form that can be processed by a machine learning model while retaining the local co-occurrence relationship between words. This co-occurrence relationship is the key to understanding the text semantics and structure. It not only reflects the actual usage patterns of words in the text but also captures the collocation habits and semantic associations between words.
[0046] The finally obtained word-level feature vector means that it not only contains the information of individual words but, more importantly, encodes the combination patterns and occurrence frequencies of words in a specific context. This vector representation can more finely reflect the local structural features of the text, provide richer and more accurate inputs for subsequent text classification, sentiment analysis, and other tasks, and help improve the model's ability to understand and process text content.
[0047] In one embodiment, as shown in Figure 6 vectorizing the word segmentation sequence to generate a word-level feature vector includes: S24. Obtain the pinyin sequence corresponding to each word segment in the word segmentation sequence, and extract the first letter combination of the pinyin sequence; S25. Map the first letter combination into a preset vector space to generate a pinyin feature vector, and use the pinyin feature vector as the word-level feature vector.
[0048] To cope with the "similar characters" or "pinyin spelling" means commonly used by black and gray industry personnel (for example, writing "claim settlement" as "claim compensation"), the present invention generates word-level feature vectors with anti-confusion ability by extracting the pinyin phonetic features of vocabulary. The specific implementation process is as follows: Obtain the complete pinyin sequence corresponding to each word segment in the word segmentation sequence. For polyphonic characters, a context-based language model is used for disambiguation to determine the most likely pronunciation. Then, for the pinyin sequence of each word segment, extract the initial letters of each syllable and combine them to generate the initial letter abbreviation feature of the word segment. For example, the initial letter combinations of the word segments "claim compensation" and the standard word "claim settlement" are both "LP", thus achieving normalization at the feature level.
[0049] Regard the generated initial letter combination as a special "pseudo-vocabulary", and map it to a preset vector space. This vector space can be constructed using pre-trained models such as Word2Vec and FastText, or obtained by training with system historical data.
[0050] In the mapping process, use the preset vector space to calculate the similarity relationship between different initial letter combinations and output the corresponding pinyin feature vector. Since this pinyin feature vector is generated based on pronunciation features, even if variant spellings such as "claim compensation" and "claim indemnity" are used in the original text, as long as their pronunciations are similar to the standard sensitive word, the positions of the generated pinyin feature vectors in the vector space will highly overlap. Use this pinyin feature vector as the word-level feature vector, or splice and fuse it with the traditional literal feature vector, thereby significantly improving the robustness and recall rate of the recognition model for homophonic and near-homophonic variant expressions.
[0051] S3. Convert the text to be recognized into a character sequence, perform vectorization processing on the character sequence to generate character-level feature vectors, and splice the word-level feature vector and the character-level feature vector to obtain a text feature vector.
[0052] In this embodiment, the text to be recognized is converted into a character sequence. Different from word segmentation that focuses on semantic units, the character sequence retains the most original literal information of the text, including specific glyphs, punctuation, and possible garbled characters or special symbols. For example, for the text "want to return that 'full-amount' insurance policy... go to the State Financial Supervision and Administration Bureau to expose", the character sequence can completely retain the connection symbol "-", the pinyin "bao", and the misspelled character "ge".
[0053] Next, use a pre-trained character-level embedding model (such as Char-CNN or Char-LSTM) to vectorize the character sequence. This model extracts n-gram features at the character level through a sliding window and performs a non-linear transformation through a neural network layer, thereby generating a character-level feature vector that can capture the glyph structure and local spelling patterns. This character-level feature vector has significant advantages in identifying misspelled words, character splitting interference, and non-standard spellings. For example, the model can identify that "bao" is actually a homophonic variation of "保" through glyph and pinyin features, and identify that "全-额" is a character-splitting deformation of "全额".
[0054] The generated word-level feature vector (focusing on semantic combination and context logic) is concatenated with the currently generated character-level feature vector (focusing on literal details and spelling features). This concatenation operation is not a simple data stacking, but constructs a high-dimensional joint feature space. In this space, the model can understand the semantic intention of "退保" through word-level features, and can also identify the interference symbols in "全-额" and the misspelled words in "国家金隔监督管理总局" through character-level features.
[0055] Finally, the concatenated joint vector is the text feature vector that represents the complete features of the text to be recognized. This text feature vector synthesizes the macro-semantic and micro-structural information of the text, effectively compensates for the limitations of single-granularity features, provides a richer and more interference-resistant data basis for the subsequent classifier decision-making, and significantly improves the recognition accuracy of the system when facing such complex variant expressions containing homophonic words, split words, etc.
[0056] In one embodiment, referring to Figure 7 as shown, the vectorizing the character sequence to generate a character-level feature vector includes: S31. Combine adjacent characters in the character sequence to obtain character combinations; S32. Match the character combinations with a preset set of easily confused character combinations, and the set of easily confused character combinations includes phonetically similar character combinations and / or visually similar character combinations; S33. If the character combination exists in the preset set of easily confused character combinations, generate a position marker vector representing the position of the matching item in the character sequence; S34. Fuse the position marker vector with the character vectors of the character sequence to generate the character-level feature vector.
[0057] Using the sliding window technique, adjacent characters in the character sequence are combined to generate multiple character combinations (such as pairs or triples). The character combinations are then matched one by one with a preset set of easily confused character combinations. This set of easily confused character combinations is a pre-constructed knowledge base that contains common homophonic character combinations (such as "理赔" and "理陪"), shape-similar character combinations (such as "投拆" and "投诉"), and their corresponding variant mapping relationships.
[0058] Homophonic character combinations refer to phrases composed of Chinese characters with the same or very similar pronunciations. For example, "理赔" and "理陪", both of these words have the pinyin "li pei" and the pronunciation is exactly the same.
[0059] Shape-similar character combinations refer to phrases composed of Chinese characters with similar glyph structures and are easily confused in appearance. For example, "投拆" and "投诉", "拆" and "诉" have a certain similarity in glyphs, especially when handwritten sloppily or typing quickly, users are very likely to misread or misinput.
[0060] During the matching process, if it is found that there is a character combination in the preset set of easily confused character combinations, it is determined that there is a variant intention at the position of this character combination. At this time, a position marking vector representing the specific position of this character combination in the original character sequence is generated. This position marking vector can adopt the one-hot encoding or continuous embedding method, which is used to indicate the start and end positions of the variant character in the text, as well as the type of variant (homophonic or shape-similar).
[0061] The generated position marking vector and the basic character vector generated by the original character sequence through the embedding layer are deeply fused. The fusion method can be vector splicing, weighted summation, or weighted through the attention mechanism. By introducing the position marking information, the character vector is given the ability to perceive "variant context", thereby generating the final character-level feature vector. This character-level feature vector not only contains the literal information of the character itself, but also explicitly marks the potential variant positions, providing a key discriminant basis for subsequent classification decisions.
[0062] In one embodiment, as shown in Figure 8 the preset set of easily confused character combinations is obtained according to the following method: S35. Perform word segmentation on the historical abnormal text sample set, and screen out candidate high-frequency co-occurring word pairs with frequencies higher than the preset frequency threshold; S36. Perform word segmentation on the historical abnormal text sample set, and screen out candidate high-frequency co-occurring word pairs with frequencies higher than the preset frequency threshold; S37. Check whether the candidate high-frequency co-occurrence words are stored in the pre-purchased standard speech dictionary, and mark the candidate high-frequency co-occurrence word pairs that are not stored in the standard speech dictionary as target variant word pairs; The preset set of easily confused character combinations is constructed based on the target variant word pairs.
[0063] In one embodiment, constructing the preset set of easily confused character combinations based on the target variant word pair includes: Calculate the similarity features between characters in the suspected variant word pairs, the similarity features including pinyin similarity and / or character structure similarity; Based on the verification results of the similarity features, suspected variant word pairs that meet the preset conditions are stored in the preset set of easily confused character combinations.
[0064] A historical abnormal text sample set is acquired and segmented into word sequences. Candidate high-frequency co-occurring word pairs are then selected from these sequences. The selection logic for "candidate high-frequency co-occurring word pairs" is as follows: The system sets a semantic sliding window (e.g., based on sentences, or with a window size of four consecutive words) and traverses the entire historical abnormal text sample set. The frequency of any two sensitive words or target words appearing simultaneously within this sliding window is counted. Subsequently, their co-occurrence frequency is calculated (i.e., the number of times word pair A and word pair B co-occur / the total number of rows or windows in the sample set). Only when this co-occurrence frequency is significantly higher than a preset frequency threshold (e.g., among the top 5% of word pairs, or with an absolute frequency greater than 0.7) is the word pair selected as a "candidate high-frequency co-occurring word pair." This selection mechanism ensures that the captured word combinations are not random pairings, but rather combinations with strong logical connections or fixed attack patterns found in black and gray market rhetoric, such as "full amount" and "insurance refund," "malicious intent" and "complaint," etc., which often appear in pairs to express specific illegal intentions.
[0065] Load a pre-defined standard terminology dictionary, which contains standard and standardized vocabulary for compliant business scenarios. Compare the selected candidate high-frequency co-occurring word pairs with the standard terminology dictionary, and mark those word pairs that do not exist in the standard terminology dictionary but appear frequently in abnormal samples as target variant word pairs. This step can effectively exclude normal business terms and focus on non-standard or misspelled combinations created by black and gray market actors to evade detection.
[0066] For each target variant word pair, the similarity features between its internal characters are calculated. These similarity features include at least phonetic similarity (such as edit distance and syllable overlap) and / or glyphic structure similarity (such as Hamming distance based on glyphic encoding and stroke similarity). The system sets preset conditions (e.g., phonetic similarity > 80% or glyphic structure similarity > 75%). Based on these verification results, target variant word pairs that meet the conditions are formally stored in a preset set of easily confused character combinations. This dual verification mechanism ensures the accuracy of the easily confused character combination set, effectively including character combinations that are highly easily confused in pronunciation or glyphic form, providing accurate feature matching basis for subsequent text recognition.
[0067] S4. Obtain the context information between each word in the word segmentation sequence, generate a global semantic vector based on the context information, input the global semantic vector into a preset intent classification model, and output a semantic feature vector representing the intent corresponding to the text to be identified.
[0068] In this embodiment, for example, the text to be identified is: "Hello, I am currently experiencing cash flow problems and would like to cancel that 'full-amount' package. I have evidence that the salesperson 'maliciously' induced me to buy it. If you do not process this, I will expose you to the State Administration of Financial Supervision and Management." The segmented sequence is processed using a pre-trained language model (such as BERT). Although the language model sees a seemingly normal reason like "cash flow problems," it captures the deep dependencies between words such as "full refund," "refund," "malicious," "inducement," "exposure," and "National Financial Supervision and Administration Bureau" through a self-attention mechanism. This generates a global semantic vector that no longer focuses on whether "bao" is a typo, but encodes the logic of the entire sentence: the user is using some kind of "evidence" to threaten and demand a "full refund."
[0069] The global semantic vector is input into a predefined intent classification model. The intent classification model maps this vector from a general semantic space to an intent-feature space. It identifies that the core intent of this word segmentation sequence is not a simple "business inquiry" or "complaint," but rather outputs a semantic feature vector representing "fraud threat" or "malicious complaint."
[0070] This invention not only focuses on literal features but also understands the semantic feature vector (deep semantic intent) of the text to be identified. In fintech scenarios, this helps to accurately distinguish users' true needs. For example, it can identify seemingly normal consultation texts (such as excuses like "cash flow") that actually conceal fraudulent intentions (using the threat of "exposure" to achieve "full refund"), thereby providing key high-level semantic evidence for risk decisions and improving the system's intelligence and risk control accuracy.
[0071] In one embodiment, obtaining the context information between each word in the word segmentation sequence and generating a global semantic vector based on the context information includes: The word segmentation sequence is input into a pre-trained language model, and the multi-layer Transformer encoder in the pre-trained language model is used to extract features from each word segmentation sequence to obtain an initial feature vector. Each word in the word segmentation sequence is taken as a target word, and the self-attention mechanism in the Transformer encoder is used to calculate the association weight between the target word and all words in the word segmentation sequence. The initial feature vector is weighted and fused based on the association weights to obtain a hidden layer state sequence containing contextual information; The feature vectors at preset positions in the hidden layer state sequence are extracted to generate the global semantic vector.
[0072] Before inputting the segmented word sequence into the pre-trained language model, a classification label [CLS] is added to the beginning of the segmented word sequence. The labeled segmented word sequence is then input into the pre-trained language model (such as BERT, RoBERTa, etc.). This pre-trained language model contains a multi-layer Transformer encoder structure. When the segmented word sequence enters the model, the bottom embedding layer converts each word in the segmented word sequence into a high-dimensional initial feature vector. These initial feature vectors mainly represent the unique attributes of the segmented word itself and do not yet include contextual information.
[0073] Each word in the segmented sequence is treated as a target word. Utilizing the self-attention mechanism in the Transformer encoder, the model calculates the association weights between the current target word and all words in the segmented sequence (including those before and after it). These association weights reflect the importance of other words in the sequence to the semantics of the target word when understanding it. For example, in the financial text "Apply for Credit e-Loan," when the target word is "e," the model assigns higher weights to "credit" and "loan," thus understanding it as the name of a product.
[0074] Based on the calculated association weights, the model performs a weighted summation and fusion of the initial feature vectors of all words to obtain a hidden layer state sequence containing rich contextual information, where the vector at each position incorporates the semantic information of the entire sequence. Feature vectors at pre-labeled positions are extracted from the hidden layer state sequence. A classification label [CLS] is added to the starting position of the word segmentation sequence through the pre-labeled position. This label, after interaction through multiple layers of self-attention mechanisms, has aggregated the global semantic information of the entire word segmentation sequence. The vector extracted at this position serves as the final global semantic vector, used to represent the overall meaning of the input text.
[0075] This invention, through a pre-trained language model and a self-attention mechanism, can deeply mine long-distance dependencies and complex semantic associations in word segmentation sequences. The generated global semantic vector has a strong contextual representation capability, significantly improving the accuracy and depth of text understanding.
[0076] In one embodiment, inputting the global semantic vector into a preset intent classification model and outputting a semantic feature vector representing the intent corresponding to the text to be identified includes: The global semantic vector is input into a pre-trained intent classification model, which includes a nonlinear transformation layer and a classification layer. The nonlinear transformation layer is used to map the global semantic vector from the original semantic space to a preset intent-feature space, where the dimension of the intent-feature space corresponds to the number of predefined fraudulent intent categories. The classification layer calculates the activation value of the mapped vector in each fraudulent intent category, and the feature vector corresponding to the category with the highest activation value is used as the semantic feature vector.
[0077] The global semantic vector is input into a pre-trained intent classification model, which contains a non-linear transformation layer (usually a fully connected layer with an activation function such as ReLU) and a classification layer (Softmax layer).
[0078] A nonlinear transformation layer is used to perform spatial transformation on the global semantic vector. This process projects the high-dimensional global semantic vector from a general semantic space to a specific, lower-dimensional "intent-feature space" with clear business meaning. The dimensional structure of this intent-feature space corresponds to the number of fraud intent categories predefined by the system. For example, if the system predefines N fraud categories such as "fake financial management," "impersonating customer service," and "fake complaints," then the dimension of the intent-feature space is N.
[0079] The spatially mapped vector is fed into the classification layer. The classification layer calculates the activation value (i.e., confidence score) of this vector across each fraudulent intent category dimension to determine the likelihood of the text belonging to each category. It then selects the feature direction corresponding to the fraudulent intent category with the highest activation value and outputs this vector as the final semantic feature vector. This semantic feature vector not only preserves the core semantics of the text but also explicitly points to a specific business risk category, thus achieving a precise leap from "understanding semantics" to "identifying the purpose," providing direct evidence for subsequent risk interception or business processing.
[0080] S5. The sensitive word feature vector, text feature vector and semantic feature vector are fused to generate a fused feature vector. The fused feature vector is then input into a preset abnormal text classifier to determine the probability value of the text to be identified as abnormal text.
[0081] In this embodiment, for example, given the text to be identified: "Hello, I'm having cash flow problems lately and want to cancel that 'full-amount' insurance policy... I'll expose you to the State Administration of Financial Supervision and Management," the system will fuse the three types of feature vectors extracted separately. First, from the perspective of the comprehensiveness of the detection dimensions, although the sensitive word feature vector faces variations of "full-amount" and "bao," it still identifies the strong association between "full-amount" and "canceling the policy," and "malicious" and "exposing" through vector matching, confirming that this is a standard malicious policy cancellation rhetoric. The text feature vector captures the overlap of the pinyin features of "bao" and "bao," as well as the similarity between "State Administration of Financial Supervision and Management" and the standard term "State Administration of Financial Supervision and Management," revealing the user's deliberate use of homophones and misspellings to evade inspection. The semantic feature vector, through the disguise of "cash flow problems," analyzes the contextual logic between "if you don't get it processed" and "expose," identifying this as a fraudulent intent of threatening pressure. The combination of these three achieves comprehensive coverage from vocabulary, structure to semantics.
[0082] Secondly, from the perspective of feature complementarity, these three features mutually corroborate each other when calculating the anomaly probability. Relying solely on sensitive word features might lead to matching failures due to symbol spacing and pinyin distortion; relying solely on semantic features could easily misjudge expressions like "cash flow" as legitimate reasons. However, by fusing these three features, the text features prove the user is using slang, the sensitive word features prove the user is engaging in illegal activities, and the semantic features prove the user has malicious intent. Their mutual complement eliminates the limitations of a single feature. Ultimately, this fused feature vector, which includes distortion techniques, malicious phrases, and threatening intent, is input into a pre-defined anomaly text classifier, resulting in an extremely high anomaly probability value, thus accurately classifying the text as an anomaly.
[0083] The fused feature vector is input into a preset abnormal text classifier to determine the probability value of the text to be identified as abnormal text. This includes: if the abnormal text classifier is a gradient boosting tree model (such as XGBoost or LightGBM), then the gradient boosting tree model is used to split the discrete regular features in the fused feature vector into nodes, and the leaf node weights are calculated by combining continuous text and semantic features, and the probability value is output; or, if the abnormal text classifier is a multilayer perceptron, then the fused feature vector is input into the input layer of the multilayer perceptron, and after nonlinear transformation of at least two hidden layers and mapping by the Sigmoid activation function, the probability value is output.
[0084] The fused feature vector is input into a pre-defined abnormal text classifier. Based on the discrimination boundary learned from massive historical data, the classifier performs non-linear transformation and probability calculation on the fused feature vector, ultimately outputting a probability value between 0 and 1. This value directly reflects the likelihood that the text to be identified is fraudulent.
[0085] This invention effectively addresses the limitations and shortcomings of single feature dimensions in processing complex text by weighted fusion of sensitive word feature vectors, text feature vectors, and semantic feature vectors. Rule-based features ensure the logical constraints of expert experience and interpretability, text features capture local glyph and lexical structure information, and semantic features represent global intent and sentiment. The synergistic effect of these three features significantly improves the model's comprehensive understanding of text and classification accuracy, while also enhancing the system's robustness and interpretability, enabling it to adapt to more complex and varied business scenarios. This effectively overcomes the technical bottlenecks of existing technologies, such as single feature extraction and weak generalization ability.
[0086] Meanwhile, it effectively identifies fraudulent rhetoric disguised as normal conversation (such as "investment and financial management" disguised as "casual chat"). Rule features ensure that high-risk keywords are not missed, while semantic features capture the misleading intent behind the discourse, significantly improving the accuracy and recall rate of abnormal text recognition, reducing the false judgment rate, and providing reliable technical protection for financial transaction security and medical information compliance.
[0087] like Figure 9 The diagram shown is a schematic diagram of an abnormal text recognition device provided in an embodiment of the present invention.
[0088] The abnormal text recognition device 100 of this invention can be installed in a device. Depending on the functions implemented, the abnormal text recognition device 100 may include a combination module 110, a word segmentation module 120, a splicing module 130, a mapping module 140, and a calculation module 150. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the device processor and perform a fixed function, and which are stored in the device's memory.
[0089] In this embodiment, the functions of each module / unit are as follows: The combination module 110 is used to identify keywords in the text to be identified, combine at least two of the keywords to obtain a combined word group, match the combined word group with a preset sensitive word group library to obtain a target sensitive word group, and perform vectorization processing on the target sensitive word group to generate a sensitive word feature vector. The word segmentation module 120 is used to segment the text to be identified into a word segmentation sequence, and to vectorize the word segmentation sequence to generate word-level feature vectors. The splicing module 130 is used to convert the text to be recognized into a character sequence, perform vectorization processing on the character sequence to generate a character-level feature vector, and splice the word-level feature vector and the character-level feature vector to obtain a text feature vector; The mapping module 140 is used to obtain the context information between each word in the word segmentation sequence, generate a global semantic vector based on the context information, input the global semantic vector into a preset intent classification model, and output a semantic feature vector representing the intent corresponding to the text to be identified. The calculation module 150 is used to fuse the sensitive word feature vector, text feature vector and semantic feature vector to generate a fused feature vector, and input the fused feature vector into a preset abnormal text classifier to determine the probability value of the text to be identified belonging to abnormal text.
[0090] In one embodiment, the combination module 110 is specifically used for: The combined word groups are mapped to a preset vector space to obtain the first feature vector; The standard sensitive word groups in the preset sensitive word group library are mapped to the vector space to obtain the second feature vector; Calculate the similarity between the first feature vector and each of the second feature vectors; The standard sensitive word groups corresponding to the second feature vector with a similarity greater than a preset similarity threshold are used as the target sensitive word groups.
[0091] In one embodiment, the combination module 110 is specifically used for: Obtain a set of historical abnormal text samples, and perform co-occurrence frequency analysis on the sensitive words in the set of historical abnormal text samples; Mark at least two sensitive words with a co-occurrence frequency higher than a preset threshold as standard sensitive word pairs; The standard sensitive word groups are stored in a preset database to generate the preset sensitive word group library.
[0092] In one embodiment, the word segmentation module 120 is specifically used for: Using a sliding window with a preset step size, a preset number of consecutive word segments are extracted from the word segmentation sequence to form local combined word groups; Count the frequency of occurrence of the local combined word groups in the word segmentation sequence; The local combined words and their frequency of occurrence are mapped to a preset vector space to generate word-level feature vectors that represent the local co-occurrence relationship of words.
[0093] In one embodiment, the word segmentation module 120 is specifically used for: Obtain the pinyin sequence corresponding to each word in the word segmentation sequence, and extract the first letter combination of the pinyin sequence; The initial letter combination is mapped to a preset vector space to generate a pinyin feature vector, and the pinyin feature vector is used as a word-level feature vector.
[0094] In one embodiment, the splicing module 130 is specifically used for: The adjacent characters in the character sequence are combined to obtain a character combination; The character combination is matched with a preset set of easily confused character combinations, which includes phonetically similar character combinations and / or visually similar character combinations. If the character combination exists in the preset set of easily confused character combinations, a position marker vector representing the position of the matching item in the character sequence is generated; The position marker vector is fused with the character vector of the character sequence to generate the character-level feature vector.
[0095] In one embodiment, the splicing module 130 is specifically used for: The historical abnormal text sample set is segmented into words, and candidate high-frequency co-occurrence word pairs with a frequency higher than a preset frequency threshold are selected. Check whether the candidate high-frequency co-occurrence words are stored in the pre-purchased standard discourse dictionary, and mark the candidate high-frequency co-occurrence word pairs that are not stored in the standard discourse dictionary as target variant word pairs; The preset set of easily confused character combinations is constructed based on the target variant word pairs.
[0096] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When executed by the processor, the computer program implements the functions or steps of an abnormal text recognition method on the server side.
[0097] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements the functions or steps of an abnormal text recognition method on the client side.
[0098] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Identify keywords in the text to be identified, combine at least two of the keywords to obtain a combined word group, match the combined word group with a preset sensitive word group library to obtain a target sensitive word group, and vectorize the target sensitive word group to generate a sensitive word feature vector; The text to be identified is segmented into words to obtain a segmented sequence, and the segmented sequence is vectorized to generate word-level feature vectors. The text to be identified is converted into a character sequence, the character sequence is vectorized to generate a character-level feature vector, and the word-level feature vector and the character-level feature vector are concatenated to obtain a text feature vector; Obtain the context information between each word in the word segmentation sequence, generate a global semantic vector based on the context information, input the global semantic vector into a preset intent classification model, and output a semantic feature vector representing the intent corresponding to the text to be identified; The sensitive word feature vector, text feature vector, and semantic feature vector are fused to generate a fused feature vector. The fused feature vector is then input into a preset abnormal text classifier to determine the probability value that the text to be identified belongs to abnormal text.
[0099] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0100] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0101] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0102] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
[0103] 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; and 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, and should all be included within the protection scope of the present invention.
Claims
1. An abnormal text recognition method, characterized in that, The method includes: Identify keywords in the text to be identified, combine at least two of the keywords to obtain a combined word group, match the combined word group with a preset sensitive word group library to obtain a target sensitive word group, and vectorize the target sensitive word group to generate a sensitive word feature vector; The text to be identified is segmented into words to obtain a segmented sequence, and the segmented sequence is vectorized to generate word-level feature vectors. The text to be identified is converted into a character sequence, the character sequence is vectorized to generate a character-level feature vector, and the word-level feature vector and the character-level feature vector are concatenated to obtain a text feature vector; Obtain the context information between each word in the word segmentation sequence, generate a global semantic vector based on the context information, input the global semantic vector into a preset intent classification model, and output a semantic feature vector representing the intent corresponding to the text to be identified; The sensitive word feature vector, text feature vector, and semantic feature vector are fused to generate a fused feature vector. The fused feature vector is then input into a preset abnormal text classifier to determine the probability value that the text to be identified belongs to abnormal text.
2. The abnormal text recognition method as described in claim 1, characterized in that, The step of matching the combined word groups with a preset sensitive word group library to obtain target sensitive word groups includes: The combined word groups are mapped to a preset vector space to obtain the first feature vector; The standard sensitive word groups in the preset sensitive word group library are mapped to the vector space to obtain the second feature vector; Calculate the similarity between the first feature vector and each of the second feature vectors; The standard sensitive word groups corresponding to the second feature vector with a similarity greater than a preset similarity threshold are used as the target sensitive word groups.
3. The abnormal text recognition method as described in claim 1, characterized in that, The preset sensitive word group library is constructed in the following manner: Obtain a set of historical abnormal text samples, and perform co-occurrence frequency analysis on the sensitive words in the set of historical abnormal text samples; Mark at least two sensitive words with a co-occurrence frequency higher than a preset threshold as standard sensitive word pairs; The standard sensitive word groups are stored in a preset database to generate the preset sensitive word group library.
4. The abnormal text recognition method as described in claim 1, characterized in that, The step of vectorizing the segmented sequence to generate word-level feature vectors includes: Using a sliding window with a preset step size, a preset number of consecutive word segments are extracted from the word segmentation sequence to form local combined word groups; Count the frequency of occurrence of the local combined word groups in the word segmentation sequence; The local combined words and their frequency of occurrence are mapped to a preset vector space to generate word-level feature vectors that represent the local co-occurrence relationship of words.
5. The abnormal text recognition method as described in claim 1, characterized in that, The step of vectorizing the segmented sequence to generate word-level feature vectors includes: Obtain the pinyin sequence corresponding to each word in the word segmentation sequence, and extract the first letter combination of the pinyin sequence; The initial letter combination is mapped to a preset vector space to generate a pinyin feature vector, and the pinyin feature vector is used as a word-level feature vector.
6. The abnormal text recognition method as described in claim 1, characterized in that, The step of vectorizing the character sequence to generate character-level feature vectors includes: The adjacent characters in the character sequence are combined to obtain a character combination; The character combination is matched with a preset set of easily confused character combinations, which includes phonetically similar character combinations and / or visually similar character combinations. If the character combination exists in the preset set of easily confused character combinations, a position marker vector representing the position of the matching item in the character sequence is generated; The position marker vector is fused with the character vector of the character sequence to generate the character-level feature vector.
7. The abnormal text recognition method as described in claim 1, characterized in that, The preset set of easily confused character combinations is obtained in the following way: The historical abnormal text sample set is segmented into words, and candidate high-frequency co-occurrence word pairs with a frequency higher than a preset frequency threshold are selected. Check whether the candidate high-frequency co-occurrence words are stored in the pre-purchased standard discourse dictionary, and mark the candidate high-frequency co-occurrence word pairs that are not stored in the standard discourse dictionary as target variant word pairs; The preset set of easily confused character combinations is constructed based on the target variant word pairs.
8. An abnormal text recognition device, characterized in that, The device includes: The combination module is used to identify keywords in the text to be identified, combine at least two keywords to obtain a combined word group, match the combined word group with a preset sensitive word group library to obtain a target sensitive word group, and perform vectorization processing on the target sensitive word group to generate a sensitive word feature vector. The word segmentation module is used to segment the text to be identified into word segments to obtain a word segmentation sequence, and to vectorize the word segmentation sequence to generate word-level feature vectors. The concatenation module is used to convert the text to be recognized into a character sequence, perform vectorization processing on the character sequence to generate a character-level feature vector, and concatenate the word-level feature vector and the character-level feature vector to obtain a text feature vector; The mapping module is used to obtain the context information between each word in the word segmentation sequence, generate a global semantic vector based on the context information, input the global semantic vector into a preset intent classification model, and output a semantic feature vector representing the intent corresponding to the text to be identified. The calculation module is used to fuse the sensitive word feature vector, text feature vector and semantic feature vector to generate a fused feature vector, and input the fused feature vector into a preset abnormal text classifier to determine the probability value of the text to be identified belonging to abnormal text.
9. A device, characterized in that, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores an abnormal text recognition program that can be executed by the at least one processor, the abnormal text recognition program being executed by the at least one processor to enable the at least one processor to perform the abnormal text recognition method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an abnormal text recognition program, which can be executed by one or more processors to implement the abnormal text recognition method as described in any one of claims 1 to 7.