Method and device for judging abnormity of short message signature template
By converting company names and SMS signature templates into semantic vectors and combining them with matching scores from multiple dimensions, and dynamically adjusting thresholds, the risk of SMS fraud caused by inconsistencies between company names and signature templates in the SMS service industry is resolved, achieving efficient and accurate anomaly detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD
- Filing Date
- 2026-01-06
- Publication Date
- 2026-04-17
AI Technical Summary
In the SMS service industry, the inconsistency between the company name and the information in the SMS signature template makes it difficult for regulatory authorities to effectively verify the true identity of the SMS sender, increasing the risk of SMS fraud. Traditional methods are inefficient and have a high rate of false positives.
By converting the company name and SMS signature template into semantic vectors, the matching degree of multiple dimensions such as character matching degree, word frequency statistical feature matching degree, named entity recognition feature matching degree and cosine similarity is fused, and the preset matching degree threshold is dynamically adjusted to determine whether the SMS signature template is abnormal.
It improves the accuracy and efficiency of SMS signature anomaly detection, reduces the false positive rate, and can handle the needs of diverse writing styles of enterprise names and real-time processing of large-scale data.
Smart Images

Figure CN121882012A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing, and more specifically, to a method and apparatus for determining anomalies in SMS signature templates. Background Technology
[0002] In the SMS service industry, service providers (SPs) are required to register their company name and corresponding SMS signature template to ensure the compliance of SMS sending. However, in practice, the company name and the information in the SMS signature template may be somewhat unrelated. For example, the company name may contain complete registration information (such as "Limited Company"), while the signature template may only contain the brand name or abbreviation. This inconsistency may make it difficult for regulatory authorities to effectively verify the true identity of the SMS sender, increasing the risk of SMS fraud.
[0003] Currently, traditional methods mainly rely on manual verification or comparison based on strict character-by-character matching, but these methods have certain limitations. Manual verification is inefficient and cannot meet the real-time comparison requirements of large-scale data; while strict character-by-character matching methods have difficulty handling different spellings, abbreviations, special symbols, etc. of company names, resulting in a high false positive rate. Summary of the Invention
[0004] This application provides a method and apparatus for determining the anomaly of SMS signature templates, which at least solves the problems of low efficiency and high misjudgment rate in related technologies when facing large-scale real-time data processing and diverse ways of writing enterprise names.
[0005] According to one aspect of the embodiments of this application, a method for determining the abnormality of SMS signature templates is provided, comprising: obtaining a company name reported by a service provider and an SMS signature template matching the company name; converting the company name into a first semantic vector corresponding to the company name, and converting the SMS signature template into a second semantic vector corresponding to the company name; determining the matching degree of the first semantic vector and the second semantic vector in each of multiple dimensions, and fusing the matching degree in each dimension to obtain a fused matching degree, wherein the matching degree in the multiple dimensions includes at least two of the following dimensions: character matching degree, word frequency statistical feature matching degree, named entity recognition feature matching degree, and cosine similarity; and determining that the SMS signature template is abnormal when the fused matching degree is less than a preset matching degree threshold.
[0006] According to another aspect of the embodiments of this application, an SMS signature template anomaly determination device is also provided, comprising: an acquisition unit, configured to acquire a company name reported by a service provider and an SMS signature template matching the company name; a conversion unit, configured to convert the company name into a first semantic vector corresponding to the company name, and convert the SMS signature template into a second semantic vector corresponding to the company name; a determination unit, configured to determine the matching degree of the first semantic vector and the second semantic vector in each of multiple dimensions, and to fuse the matching degree in each dimension to obtain a fused matching degree, wherein the matching degree in the multiple dimensions includes at least two of the following dimensions: character matching degree, word frequency statistical feature matching degree, named entity recognition feature matching degree, and cosine similarity; and a determination unit, configured to determine that the SMS signature template is abnormal when the fused matching degree is less than a preset matching degree threshold.
[0007] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed by a processor.
[0008] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in any of the method embodiments described above.
[0009] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to perform the steps of any of the above method embodiments through the computer program.
[0010] This application obtains the company name and SMS signature template reported by the service provider, and transforms the text-based company name and SMS signature template into a first semantic vector and a second semantic vector, respectively. The transformed first and second semantic vectors not only contain the information of the original text but also reflect the deeper meaning of the text. The matching degree of the first and second semantic vectors is calculated in multiple dimensions, including but not limited to character matching degree, word frequency statistical feature matching degree, named entity recognition feature matching degree, and cosine similarity. The matching degree in each dimension is fused to obtain a more comprehensive and integrated fused matching degree, ensuring that the final fused matching degree can accurately reflect the correlation between the company name and the SMS signature. Furthermore, the fused matching degree allows for flexible adjustment of the judgment criteria. If the fused matching degree is lower than the preset matching degree threshold, the SMS signature template is judged to be abnormal; otherwise, the two are considered to match normally. This can significantly improve the accuracy and efficiency of SMS signature anomaly detection. Therefore, it can solve the problems of low efficiency and high false judgment rate in related technologies when facing large-scale data real-time processing and diverse writing styles of company names. Attached Figure Description
[0011] Figure 1 This is a schematic diagram illustrating an application scenario of a method for determining anomalies in SMS signature templates according to an embodiment of this application.
[0012] Figure 2 This is a flowchart illustrating an optional method for determining anomalies in SMS signature templates according to an embodiment of this application.
[0013] Figure 3 This is a schematic diagram of an optional model training according to an embodiment of this application;
[0014] Figure 4 This is a schematic diagram of an optional semantic matching model according to an embodiment of this application;
[0015] Figure 5 This is a schematic diagram of an optional signature matching according to an embodiment of this application;
[0016] Figure 6 This is a schematic diagram of an optional enterprise signature and SMS signature template exception list according to an embodiment of this application;
[0017] Figure 7 This is a structural block diagram of an optional SMS signature template anomaly determination device according to an embodiment of this application;
[0018] Figure 8 This is a computer system architecture block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0019] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0021] According to one aspect of the embodiments of this application, a method for determining anomalies in SMS signature templates is provided. Optionally, in this embodiment, the above-mentioned method for determining anomalies in SMS signature templates may be applied, but is not limited to, to applications such as... Figure 1 The hardware environment shown includes terminal device 102 and server 104. Server 104 can be connected to terminal device 102 via a network and can be used to provide services (e.g., application services, etc.) to terminal device 102 or clients installed on terminal device 102. A database can be set up on server 104 or independently of server 104 to provide data storage services for server 104.
[0022] The aforementioned network may include, but is not limited to, at least one of the following: wired network and wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network (WAN), metropolitan area network (MAN), and local area network (LAN). The aforementioned wireless network may include, but is not limited to, at least one of the following: Wireless Fidelity (WIFI) and Bluetooth. Terminal device 102 may be, but is not limited to, a personal computer (PC), mobile phone, tablet computer, etc. Server 104 may be, but is not limited to, a cloud server, server cluster, or other server types.
[0023] The SMS signature template anomaly determination method of this application embodiment can be executed by server 104, terminal device 102, or jointly by server 104 and terminal device 102. Alternatively, the SMS signature template anomaly determination method of this application embodiment can be executed by a client installed on the terminal device 102.
[0024] Taking the SMS signature template anomaly determination method executed by server 104 in this embodiment as an example, Figure 2 This is a flowchart illustrating an optional SMS signature template anomaly determination method according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps S202 to S208.
[0025] Step S202: Obtain the company name reported by the service provider and the SMS signature template that matches the company name.
[0026] Step S204: Convert the company name into a first semantic vector corresponding to the company name, and convert the SMS signature template into a second semantic vector corresponding to the company name.
[0027] Step S206: Determine the matching degree of the first semantic vector and the second semantic vector in each of the multiple dimensions, and fuse the matching degree in each dimension to obtain the fused matching degree. The matching degree in the multiple dimensions includes at least two of the following dimensions: character matching degree, word frequency statistical feature matching degree, named entity recognition feature matching degree, and cosine similarity.
[0028] Step S208: If the fusion matching degree is less than the preset matching degree threshold, the SMS signature template is determined to be abnormal.
[0029] The SMS signature template anomaly detection method in this embodiment can be applied to the technical field of information processing and text comparison, specifically to scenarios involving anomaly detection of SMS signature templates. An SMS signature template refers to the identification information attached by a service provider (SP) when sending an SMS message. It typically includes the company name, brand name, abbreviations, etc., used to identify the sender of the SMS message. The company name refers to the official name used when registering the company, including the company type (e.g., "Limited Company") and other official information.
[0030] In the SMS service industry, service providers (SPs) are required to register their company name and corresponding SMS signature template to ensure the compliance of SMS sending. However, in practice, the company name and signature template information may be somewhat unrelated. For example, the company name may contain complete registration information (such as "Limited Company"), while the signature template may only contain the brand name or abbreviation. This inconsistency may make it difficult for regulatory authorities to effectively verify the true identity of the SMS sender, increasing the risk of SMS fraud.
[0031] Currently, traditional methods mainly rely on manual verification or comparison based on strict character-by-character matching, but these methods have certain limitations. Manual verification is inefficient and cannot meet the real-time comparison requirements of large-scale data; while strict character-by-character matching methods have difficulty handling different spellings, abbreviations, and special symbols in company names, resulting in a high false positive rate.
[0032] To at least partially solve the above-mentioned technical problems, this embodiment provides a rapidly fine-tunable SMS signature anomaly identification method based on multi-feature fusion. By using artificial intelligence (AI) natural language processing technologies (such as word segmentation and correlation calculation), the method automatically identifies keywords in the company name and compares them with the signature template using multi-feature correlation. This method can effectively identify the correlation between the company name and the signature template, avoid the misjudgment problem in traditional methods, and improve the matching accuracy and work efficiency of SMS signatures.
[0033] A service provider is a company or organization that provides SMS services. For example, a service provider can be an SMS sender or a mobile operator.
[0034] In this embodiment, the first semantic vector refers to the numerical vector obtained by converting the enterprise name reported by the service provider; the second semantic vector refers to the data vector obtained by converting the SMS signature template matching the enterprise name. Optionally, the enterprise name can be converted into the first semantic vector corresponding to the enterprise name through a deep learning model (such as embeddings from Language Models (ELMo)). Alternatively, the enterprise name can be decomposed into a set of words, and each word can be converted into a vector using Word2Vec or GloVe. Finally, these word vectors can be aggregated into the first semantic vector corresponding to the enterprise name through averaging, weighted summation, or max pooling. Similarly, the conversion of the SMS signature template into the second semantic vector corresponding to the enterprise name can also adopt a similar method to the conversion of the enterprise name into the first semantic vector, which will not be elaborated here.
[0035] Optionally, before converting the company name into a first semantic vector corresponding to the company name and the SMS signature template into a second semantic vector corresponding to the company name, preprocessing is required to better identify the features of the company name and SMS signature template. The preprocessing steps include removing stop words and standardizing the format. Removing stop words includes removing irrelevant words (such as common words like "Limited Company" and "Joint-Stock Company") to simplify the comparison process. Standardizing the format includes unifying the different formats of company names and SMS signature templates, removing special symbols and redundant spaces, etc.
[0036] Character matching degree refers to the degree of similarity between two strings; for example, character matching degree can be obtained by calculating the edit distance (Levenshtein distance) between two strings to identify the similarity between a company name and a signature template; this method can identify character-level correlations and handle common spelling differences.
[0037] Word frequency statistical feature matching degree refers to the degree of semantic similarity between two texts (such as a company name and an SMS signature template) by statistically comparing the frequency of words in them. Optionally, word frequency statistics can be obtained by analyzing the correlation between keywords in the company name and the signature template through word frequency statistics (TF-IDF word vector technology). This can help the model identify important business words, such as "XX Technology" and "Company".
[0038] Named entity recognition feature matching degree refers to the degree of relevance of entities in text that are identified and classified based on the Named Entity Recognition (NER) model. Optionally, entities in a company name, such as brand and industry category, can be identified through the NER model. This feature helps to identify key information in the company name and compare it with the signature template.
[0039] Cosine similarity refers to the degree of semantic similarity between a company name and an SMS signature template after converting them into first and second semantic vectors. The cosine angle between these two semantic vectors is then calculated to quantify the semantic similarity between the company name and the SMS signature template. Optionally, cosine correlation methods can be used to compare the company name and the signature template. These methods can quantify the correlation between texts and help determine whether two texts represent the same entity.
[0040] Optionally, the matching degree of the first semantic vector and the second semantic vector in each of multiple dimensions can be determined in the following ways: Method 1: Use Levenshtein distance to measure the similarity between the company name and the SMS signature template. Calculate the number of character changes (including insertion, deletion, and replacement) between the two texts to obtain the edit distance. The smaller the edit distance, the higher the character matching degree, and vice versa. Alternatively, methods such as Longest Common Subsequence (LCS) can be used to assist in calculating character-level similarity. Method 2: Calculate and compare the frequencies of keywords in the company name and the SMS signature template based on word frequency statistics. TF-IDF can reveal the importance of words in the text. By calculating the similarity of the TF-IDF values of the same words in the two texts, their similarity in word frequency statistics can be determined. Method 3: Using NER technology, identify entities in the company name and SMS signature template respectively, and compare the consistency or relevance of these entities. Named entity recognition can extract entity information such as person names, place names, and organization names from the text. By comparing the similarity of entity information in the two texts, the matching degree of named entity recognition features between the company name and the SMS signature template can be evaluated. Method 4: Calculate the cosine similarity between the first semantic vector and the second semantic vector to measure their directional similarity in the semantic space. The formula for calculating the cosine similarity is the dot product of the first semantic vector and the second semantic vector divided by their respective magnitudes. The closer the directions of the two vectors are, the closer the cosine similarity is to 1, indicating that the semantics are highly related. Conversely, when the directional differences are large, the cosine similarity is close to 0 or negative, indicating that the semantic differences are significant.
[0041] In this way, by combining multiple shallow features (such as character-level correlation, word frequency, edit distance, keyword overlap, punctuation normalization, etc.) for comprehensive judgment, a unified representation of words at different levels of features can be achieved through feature fusion networks (such as fully connected neural networks).
[0042] Alternatively, a weight can be assigned to the matching degree of each dimension (such as character matching degree, word frequency statistical feature matching degree, named entity recognition feature matching degree, cosine similarity). These weights can be dynamically adjusted according to business needs, data characteristics, or historical performance. Then, the matching degree of each dimension is multiplied by its weight and summed to obtain a comprehensive matching degree.
[0043] In an alternative embodiment, in addition to simply stacking the matching degrees of multiple dimensions, multiple features (the matching degrees of each of the multiple dimensions) can be fused using a multi-layer perceptron (MLP) in the following way: z = MLP([x1; x2; ...; xn]), where x1 and x2 are the respective feature vectors (i.e., the matching degrees of each of the multiple dimensions). Finally, by inputting the concatenated vector into the multi-layer perceptron, the MLP can automatically learn non-linear feature interactions and weighting, and output the fused matching degree.
[0044] Optionally, the obtained fusion matching degree is compared with a preset matching degree threshold. If the fusion matching degree is less than the preset matching degree threshold, the SMS signature template is determined to be abnormal.
[0045] For example, the preset matching threshold can be dynamically adjusted based on system feedback and changes in the business environment to adapt to the matching accuracy requirements in different scenarios. If the false positive rate of identifying abnormal SMS signature templates is high, the preset matching threshold can be lowered to relax the matching conditions; conversely, if it is desirable to reduce the false negative rate and improve the sensitivity of anomaly detection, the preset matching threshold can be increased.
[0046] Optionally, for SMS signature templates that are determined to be abnormal, the system will automatically mark them and generate an anomaly report. The report will include detailed information about the anomaly, such as the specific company name, SMS signature template, fusion matching value, and possible anomaly types (such as semantic inconsistency, missing keywords, etc.). The anomaly report can be used for manual review or machine inspection.
[0047] The embodiments provided in this application obtain the enterprise name and SMS signature template reported by the service provider, and convert the text-based enterprise name and SMS signature template into a first semantic vector and a second semantic vector, respectively. The converted first and second semantic vectors not only contain the information of the original text but also reflect the deeper meaning of the text. The matching degree of the first and second semantic vectors is calculated in multiple dimensions, including but not limited to character matching degree, word frequency statistical feature matching degree, named entity recognition feature matching degree, and cosine similarity. Multi-dimensional matching overcomes the misjudgment caused by a single standard in traditional methods, such as the inability of strict word-by-word matching to handle abbreviations and special symbols. The matching degree of each dimension is fused to obtain a more comprehensive and integrated result. The fusion matching degree strategy improves the accuracy of anomaly detection and reduces the false positive rate. In particular, it can make correct judgments for signatures that do not match well in one dimension but match well in other dimensions, ensuring that the final fusion matching degree can accurately reflect the correlation between the company name and the SMS signature. Based on this fusion matching degree, it is compared with a preset threshold to determine whether the SMS signature template is abnormal. This strategy utilizes the advantages of multi-source information and avoids the bias that may be caused by a single indicator, ensuring the reliability of anomaly judgment. It can significantly improve the accuracy and efficiency of SMS signature anomaly detection. Therefore, it can solve the problems of low efficiency and high false positive rate in related technologies when facing large-scale data real-time processing and diverse writing styles of company names.
[0048] In an exemplary embodiment, converting a company name into a first semantic vector corresponding to the company name includes: converting the company name into a first semantic vector corresponding to the company name using a pre-trained semantic matching model; the semantic matching model is used to perform forward propagation on the company name and obtain the first semantic vector corresponding to the company name after multiple encoding processes.
[0049] In this embodiment, forward propagation is a fundamental process for information processing in deep learning models. In forward propagation, the company name passes through each layer sequentially along the structure of the neural network. Each pass is called an encoding process. The neurons in each layer perform weighted calculations and apply activation functions to the output of the previous layer until the final output, i.e., the first semantic vector, is obtained.
[0050] Encoding refers to the internal processing of a neural network. Optionally, encoding includes, but is not limited to, embedding layers that convert text into word vectors, and Transformer models or other types of encoders that capture the complex structure and semantic meaning of text through multi-layer attention mechanisms and fully connected layers, ultimately generating high-order semantic vectors.
[0051] A pre-trained semantic matching model is a deep learning model trained on a large amount of text data. It can understand the semantic structure of text and convert it into vector form. For example, a pre-trained semantic matching model can be a Bidirectional Encoder Representations from Transformers (BERT) model. BERT is a powerful pre-trained model that can process contextual information to understand the semantic relationship between a company name and a signature template.
[0052] Optionally, during the BERT model training phase, a large amount of sample data of company names and SMS signature templates was used. AI technology was employed to learn multiple features, gradually training a model capable of accurately matching and identifying abnormal signatures. A large amount of real company names and corresponding SMS signature template data was collected to ensure data diversity and representativeness. Consistency and inconsistency labels were manually added to the dataset to ensure labeling accuracy. The data distribution is as follows: 65,000 positive samples (semantically consistent), 35,000 negative samples (semantically inconsistent), and 5,000 specially added boundary samples (such as abbreviations, pinyin, industry terms, etc.). During the training phase, a large amount of sample data of company names and SMS signature templates was used. AI technology was employed to learn multiple features, gradually training a model capable of accurately matching and identifying abnormal signatures.
[0053] In an optional embodiment, Figure 3 This is a schematic diagram of an optional model training according to an embodiment of this application, such as... Figure 3 As shown, the data preprocessing of the enterprise name and SMS signature template (i.e., enterprise reporting signature) is performed, such as removing stop words, standardizing the format, and segmenting words. The results are input into the BERT model to obtain two BERT vectors (i.e., the first semantic vector and the second semantic vector). BERT features and various traditional BERT features, including character matching features, word frequency statistics features, NER features, and cosine similarity features, are used to fuse the semantic feature vector with the structured feature vector. The fused vector is then concatenated into the overall input features of the data through MLP (Multi-Layer Perception). Finally, a Softmax classifier outputs the consistency prediction result, i.e., the correlation percentage, to obtain a consistent or inconsistent result, thereby determining whether the SMS signature template is abnormal.
[0054] This model employs end-to-end training, taking the company name and SMS signature as input and outputting consistency labels (e.g., "consistent" / "inconsistent") and correlation percentages. The entire training process is supervised learning, using manually labeled samples for trained training. The model compares the features of the actual SMS signature and SP (Service Provider) reporting information. For example, when the feature values of the two are far apart (i.e., the score is below a set threshold), it is automatically marked as abnormal, triggering an alert and generating an anomaly report for manual review and record keeping. Furthermore, the model can output keyword matching failure points, improving interpretability and facilitating quick problem identification by the business side (e.g., "signature lacks company abbreviation," "signature uses only English abbreviations," etc.).
[0055] It should be noted that standard evaluation metrics (accuracy, recall) are used to assess model performance during training. Based on the test results, model parameters are adjusted to optimize the training process.
[0056] In some embodiments, the complete training process of the BERT model is as follows: A large number of samples of company names and corresponding SMS signature templates are collected; stop words, special symbols, and extra spaces are removed from the company names and SMS signature templates to simplify the data structure; each pair of samples is manually labeled as consistent or inconsistent, forming training labels for supervised learning; the samples are divided into training, validation, and test sets, with the proportions adjustable as needed. The training set constitutes the majority and is used for model training; the validation set is used for model parameter tuning; and the test set is used for final performance evaluation; the samples of company names and SMS signature templates are used as input, and the BERT model extracts the first semantic vector of the company name and the second semantic vector of the SMS signature template. The process involves determining the matching degree of the first and second semantic vectors across dimensions such as character matching degree, word frequency statistical feature matching degree, named entity recognition feature matching degree, and cosine similarity. At least two of these matching degrees are then fused using a multilayer perceptron to obtain the fused matching degree of the first and second semantic vectors. A cross-entropy loss function is defined, and the model is trained using supervised learning to recognize the correlation between company names and SMS signature templates. The preprocessed training set text is input into the model, and the loss is calculated based on the input and labeled tags. Model performance is evaluated on the validation set, monitoring metrics such as accuracy and recall. Based on the results, model parameters and training strategies are adjusted, for example, by increasing the number of training epochs or adjusting the learning rate. The model is then tested on the test set to evaluate its performance in real-world scenarios, ensuring the model's ability to handle large-scale data and various anomalies. The test results are analyzed to check the model's false positive rate, anomaly detection accuracy, etc., and the model training is completed.
[0057] In this embodiment, the BERT model is used to convert the company name and SMS signature template into a first semantic vector and a second semantic vector, which can capture deep semantic features. This allows the underlying conceptual consistency to be identified even if the company name and SMS signature are different on the surface. The introduction of the BERT model solves the problem of semantic matching between the company name and the SMS signature template, and can handle complex situations such as different writing styles, abbreviations, and special symbols, avoiding the limitations of traditional methods.
[0058] In one exemplary embodiment, the semantic matching model includes an input layer, multiple stacked feature extraction modules, a dynamic parameter adjustment layer, and an output layer.
[0059] Optionally, in this embodiment, the BERT model has been modified to some extent. A dynamic parameter adjustment layer is added before the final feature output layer. This dynamic adjustment layer stores the training set vectors currently output by the BERT model and the existing BERT model parameters. Since many company names may change periodically in the real-world scenarios addressed in this embodiment (e.g., a change in the parent company of a well-known company), this can lead to anomalies in the SMS signature template and company name output by the current model. To address this issue, a dynamic parameter adjustment layer is designed to freeze most of the model's main parameters. However, for changed training data vectors, the model only needs to retrain on that specific data, allowing for rapid adaptation to changes in business dynamics. Furthermore, by adding a dynamic parameter adjustment layer to the original BERT model and combining it with the adaptive adjustment mechanism of variable dynamic parameters, the model achieves lightweight, fast, and reliable adaptation in dynamic text scenarios. This significantly reduces the time and computational resources required for traditional fine-tuning models, while increasing the model's adaptability and processing efficiency, meeting the needs of business development.
[0060] The input layer is the layer that uses the company name and SMS signature template as input to the semantic matching model. Multiple stacked feature extraction modules are used to process the input features and extract higher-level features. These stacked feature extraction modules can include feedforward neural networks and normalization layers; that is, feedforward neural networks and normalization layers are stacked. For example, multiple stacked feature extraction modules are used to extract feature vectors for the company name and the SMS signature template. The dynamic parameter adjustment layer dynamically adjusts the word vector representation output by the last feature extraction module based on the context features output by each feature extraction module (such as the feedforward neural network). The output layer is the layer that converts the features obtained by the model through the dynamic parameter adjustment layer into the final output result. For example, the model output (i.e., the output layer output) is the semantic vector of each word / phrase. These vectors can well represent the semantic information of the text, facilitating subsequent further correlation calculation and detection.
[0061] Figure 4 This is a schematic diagram of an optional semantic matching model according to an embodiment of this application, such as... Figure 4 As shown, from top to bottom, the layers are: input layer, 10 layers of stacked feedforward neural network and normalization layer, dynamic parameter adjustment layer connected to each feedforward neural network and each normalization layer, and output layer connected to the dynamic parameter adjustment layer.
[0062] In some embodiments, converting a company name into a first semantic vector corresponding to the company name using a pre-trained semantic matching model includes: segmenting and tokenizing the company name through an input layer to obtain multiple word vectors corresponding to the company name; performing multiple nonlinear transformations on the multiple word vectors through multiple stacked feature extraction modules to obtain nonlinear word vectors; performing weighted mapping and offset adjustment on the nonlinear word vectors according to the context features of the multiple stacked feature extraction modules through a dynamic parameter adjustment layer to obtain a target word vector; and performing format conversion on the target word vector through an output layer to obtain the first semantic vector corresponding to the company name.
[0063] In this embodiment, the company name is input into the input layer, where it undergoes word segmentation and tokenization. Word segmentation refers to dividing a continuous text into individual words, while tokenization refers to converting the words in the text into vector representations. Optionally, the company name is segmented and tokenized through the input layer. That is, the text is decomposed into individual words or characters, and each word or character is assigned a numerical identifier or vector representation as input to the model. For example, if the company name is "XX Co., Ltd.", the word segmentation results in "XX", "Limited", "Company", "Has", "Limited", "Public", and "Company", and the segmented words are then tokenized to obtain "101", "102", "103", "104", "105", "106", and "107".
[0064] Multiple word vectors undergo multiple nonlinear transformations through a series of stacked feature extraction modules to obtain nonlinear word vectors. In essence, multiple word vectors are processed through multiple nonlinear transformations by stacked feature extraction modules, with the final layer outputting a nonlinear word vector. For example, the output of the final normalization layer is a nonlinear word vector h.
[0065] After obtaining the nonlinear word vectors, they are input into a dynamic parameter adjustment layer. This layer performs weighted mapping and offset adjustments on the nonlinear word vectors based on the contextual features from multiple stacked feature extraction modules, thus obtaining the target word vectors. The contextual features from these multiple stacked feature extraction modules refer to composite information obtained through layer-by-layer processing of the model, reflecting the environment of words within a sentence or document and their interrelationships. For example, the contextual features from these multiple stacked feature extraction modules could be the output of the feedforward neural network in each feature extraction module.
[0066] Weighted mapping refers to the weighting of non-linear word vectors extracted by the model to highlight or suppress their importance, thus better aligning them with the current context. Shift adjustment involves adding a configuration parameter to the weighted non-linear word vectors to change their direction or position, thereby adjusting their bias and ensuring that their position in the semantic space correctly reflects the contextual influence. For example, a dynamic parameter adjustment layer receives contextual feature vectors and dynamically calculates weighted mapping parameters and shift adjustment parameters using a network such as an MLP (Multilayer Perceptron). The word vectors are then weighted according to the weighted mapping parameters to enhance or weaken certain features to better fit the current context. The shift adjustment parameters are then used to shift the weighted word vectors, ensuring that their position in the semantic space correctly reflects the contextual influence.
[0067] After obtaining the target word vector, the target word is then format-converted to obtain the first semantic vector. It can be understood that the output layer converts the target word vector to obtain the first semantic vector corresponding to the company name, which is used as the output of the model. For example, the output layer receives the target word vector from the dynamic parameter adjustment layer and merges the target word vector into a high-dimensional first semantic vector representation through operations such as aggregation, weighted averaging, and dimensional transformation.
[0068] Thus, in this embodiment, natural language processing technology is introduced on top of the conventional word-by-word comparison algorithm between enterprise signatures and SMS signature templates (i.e., reporting signatures). A correlation determination system between enterprise names and SMS signatures is constructed based on an improved BERT semantic feature extraction model and multi-feature fusion. This system can accurately identify the correlation between SP reporting information and signature templates. In particular, the dynamic parameter adjustment layer in the semantic feature extraction model can achieve fast and reliable dynamic optimization and adjustment capabilities for special cases where some enterprise names and reporting names are semantically unrelated.
[0069] This embodiment introduces a dynamic parameter adjustment layer into the semantic matching model. This layer dynamically generates weighted mappings and offset adjustments based on contextual features output from multiple feature extraction modules within the semantic matching model. This not only enhances the model's ability to understand and process contextual information, improving the accuracy and reliability of text matching, but also allows for adaptive adjustment of feature weights and offsets based on new contextual information. This enables rapid model adaptation and fine-tuning, saves computational resources, and improves the model's response speed and generalization ability in dynamically changing environments.
[0070] In one exemplary embodiment, a dynamic parameter adjustment layer performs weighted mapping and offset adjustment on nonlinear word vectors based on contextual features from multiple stacked feature extraction modules to obtain target word vectors, including:
[0071] Through a dynamic parameter adjustment layer, a first variable condition parameter and a second variable condition parameter are generated based on the context features of multiple stacked feature extraction modules. The first variable condition parameter is multiplied element-wise with the corresponding elements of the nonlinear word vector to obtain a product vector. The sum of the product vector and the second variable condition parameter is determined as the target word vector. The first variable condition parameter and the second variable condition parameter are used to perform weighted mapping and offset adjustment on the nonlinear word vector.
[0072] In this embodiment, the first variable condition parameter is a vector dynamically generated based on the context features of multiple stacked feature extraction modules, used for weighted mapping of nonlinear word vectors. The second variable condition parameter is also a vector dynamically generated based on the context features of multiple stacked feature extraction modules, used for offset adjustment of the nonlinear word vectors. In short, the first variable condition parameter is used to weight each dimension of the nonlinear word vectors extracted by the model, causing the nonlinear word vectors to be amplified or reduced; the second variable condition parameter is used to offset the nonlinear word vectors after weighted mapping, allowing the position or direction of the nonlinear word vectors after weighted mapping to be adjusted. For example, the dynamic parameter adjustment layer constructs a feature importance matrix based on the context features of multiple stacked feature extraction modules, and uses linear programming, quadratic programming, or other optimization algorithms to solve for the optimal solution of the feature importance matrix, obtaining a set of weights (i.e., the first variable condition parameter) that makes the weighted feature representation closest to the ideal state of the current context. The set of weights (i.e., the first variable condition parameter) obtained from solving the optimal solution is used as the weights (i.e., the first variable condition parameter) used by the dynamic parameter adjustment layer during the weighted mapping process, and these weights are used to perform weighted mapping of the nonlinear word vectors. Embedding a small neural network (such as an MLP) in the dynamic parameter adjustment layer, the output of the small neural network (such as an MLP) is an offset vector (the second variable conditional parameter), indicating which direction the word vector should move in the ideal state. Using gradient descent or other optimization algorithms, the offset vector is optimized and adjusted with the difference between the weighted word vector representation and the ideal context state as the loss function until the optimal offset vector that can minimize the difference is found. The optimal offset vector is used as the second variable conditional parameter.
[0073] For example, an attention mechanism network can be embedded in the dynamic parameter adjustment layer. This network contains a query vector (representing the requirements of the target task), a key vector (representing a part of the context features), and a value vector (the complete representation of the context features). By calculating the similarity between the query vector and the key vector (such as a dot product or weighted sum), the attention network generates an attention weight matrix. This matrix reflects the degree of contribution of different parts of the context features to the generated parameters. The attention weight of each row of the attention weight matrix represents the degree of importance attached to the corresponding part in the value vector. The attention weight matrix is multiplied by the value vector and a weighted sum is performed to obtain an aggregated representation vector of the context features. This representation vector is then input into a linear layer. The linear layer multiplies the representation vector by the weight matrix W and adds a bias vector b to learn how to convert the attention-focused features into weights and offset adjustments. The output of the linear layer is directly used as the weights (i.e., the first variable conditional parameter) and the offset adjustment (i.e., the second variable conditional parameter).
[0074] In an optional embodiment, a dynamic parameter adjustment layer is added to the last layer of the model, that is, a dynamic parameter adjustment layer is added before the output layer. The dynamic adjustment layer performs a mapping transformation on the previous output and obtains the target word vector through the following formula (1). :
[0075]
[0076] in, It is the output of the feedforward neural network layer. This is the output of this layer (that is, the output of the dynamically adjusted layer is the target word vector). These are contextual features (learning parameters from all previous layers). It is the first variable condition parameter. It is the second variable condition parameter. and It is dynamically generated based on the context feature z. α(z)·h is the product vector. The model can perform weighted mapping and offset adjustment on the output of the previous layer, thereby generating a more suitable feature representation in a specific context.
[0077] Overall, the weighted mapping in the dynamic parameter adjustment layer is not merely a simple operation of parameter sharing and weighting; it is generated based on contextual changes. Therefore, the feature representation of each input sample changes differently depending on the input when passed to the next layer, allowing for better capture of dynamic information and potential changes in the input. This characteristic enables the model to adaptively adjust its behavior in different contexts. Especially for frequently changing scenarios such as SMS signature templates and company names, these dynamically generated conditional parameters significantly improve the model's adaptability and quickly process new information. Compared to fine-tuning the entire BERT model, this greatly reduces time.
[0078] Optionally, to optimize the speed and accuracy of fine-tuning, this model uses a rapidly fine-tunable semantic feature extraction module (i.e., a dynamic parameter adjustment layer) in the last layer of the BERT model, introducing a dynamically generated first variable conditional parameter. Second variable condition parameter These two parameters are driven by the context feature z and have an adaptive adjustment mechanism. The core of the method is to fine-tune only the dynamic adjustment factor of the last layer, rather than updating the weights of the entire network. This can greatly reduce the consumption of computing resources and improve the efficiency of fine-tuning, especially when dealing with tasks such as enterprise name recognition that are subject to frequent changes and strong contextual dependencies.
[0079] In this embodiment, through the weighted mapping and offset adjustment operations of the dynamic parameter adjustment layer, target word vectors can be generated for nonlinear word vectors, significantly improving the contextual relevance of the target word vectors. The generation and application of the first and second variable conditional parameters enable the model to more accurately grasp key semantic information when processing enterprise names and SMS signature templates, reducing semantic bias and information loss caused by fixed representation methods, and preparing more accurate inputs for subsequent correlation calculations, thereby enhancing the reliability of anomaly detection.
[0080] In one exemplary embodiment, in related technologies, the first and second variable condition parameters may over-amplify certain specific features. To address this issue and ensure that the first and second variable condition parameters do not over-amplify certain specific features, an adaptive mechanism is introduced in the dynamic parameter generation design to limit the first variable condition parameter. Second variable condition parameter The range of generation.
[0081] In some embodiments, before multiplying the first variable condition parameter element-by-element with the corresponding elements of the nonlinear word vector to obtain the product vector, the method further includes: introducing a first trust factor to adjust the first variable condition parameter to obtain an updated first variable condition parameter; the first trust factor characterizes the semantic matching model's trust in the first variable condition parameter; introducing a second trust factor to adjust the second variable condition parameter to obtain an updated second variable condition parameter; the second trust factor characterizes the semantic matching model's trust in the second variable condition parameter; and based on the updated first variable condition parameter and the updated second variable condition parameter, continuing to perform the step of multiplying the first variable condition parameter element-by-element with the corresponding elements of the nonlinear word vector to obtain the product vector.
[0082] In this embodiment, the first trust factor refers to the trust level index of the first variable condition parameter, used to adjust the first variable condition parameter; the larger the first trust factor, the higher the trust level, and the smaller the adjustment amount of the first variable condition parameter. The second trust factor refers to the trust level index of the second variable condition parameter, used to adjust the second variable condition parameter; the larger the second trust factor, the higher the trust level, and the smaller the adjustment amount of the second variable condition parameter. For example, assuming that both the first and second trust factors are in the range [0,1], the closer the first and second trust factors are to 1, the smaller the adjustment amount of the first and second variable condition parameters; conversely, the closer the first and second trust factors are to 0, the larger the adjustment amount of the first and second variable condition parameters.
[0083] The first and second trust factors can be determined based on the stability of the first and second variable conditional parameters over multiple historical applications prior to the current application. For example, the variance of the first variable conditional parameter over multiple historical applications prior to the current application can be determined as the first trust factor, and the variance of the second variable conditional parameter over multiple historical applications prior to the current application can be determined as the second trust factor. Alternatively, statistical analysis (such as standard deviation or coefficient of variation) can be used to evaluate the stability of the first and second variable conditional parameters, with the stability of the first variable conditional parameter determined as the first trust factor and the stability of the second variable conditional parameter determined as the second trust factor.
[0084] Optionally, during model application, based on the stability of the first and second variable condition parameters in previous historical applications, a first trust factor and a second trust factor are determined. The first trust factor is multiplied by the first variable condition parameter to obtain the updated first variable condition parameter, and the second trust factor is multiplied by the second variable condition parameter to obtain the updated second variable condition parameter. In this process, the first and second trust factors are dynamically changing. When the first and second trust factors increase, the first and second variable condition parameters are dynamically increased; when the first and second trust factors decrease, the first and second variable condition parameters are dynamically decreased. Based on the updated first and second variable condition parameters, the aforementioned step of multiplying the first variable condition parameter element-by-element with the corresponding elements of the nonlinear word vector to obtain the product vector is continued.
[0085] In this embodiment, by introducing a first trust factor and a second trust factor, the dynamic parameter adjustment layer can more precisely control the influence of the first and second variable conditional parameters in the weighted mapping and offset adjustment processes. This mechanism ensures that the target word vectors output by the model not only include the dynamic features of the context, but also that the adjustment of these features is more prudent and reasonable, avoiding noise introduced by excessive parameter fluctuations, improving the stability and reliability of the target word vectors, reducing the model's false positive rate, and improving the accuracy of anomaly detection.
[0086] In an exemplary embodiment, introducing a first trust factor to adjust a first variable condition parameter to obtain an updated first variable condition parameter includes: obtaining a preset first self-inhibition strength parameter; the first self-inhibition strength parameter is used to limit the generation range of the first variable condition parameter; the product between the first self-inhibition strength parameter and the first variance of the first variable condition parameter is determined as a first fluctuation suppression coefficient of the first variable condition parameter; the first fluctuation suppression coefficient characterizes the quantified value of the fluctuation of the first self-inhibition strength parameter; the first fluctuation suppression coefficient is subjected to inverse suppression processing to obtain a first parameter stability of the first variable condition parameter; the first parameter stability characterizes the stability of the first variable condition parameter in the context features fused in the nonlinear word vector; the first parameter stability is mapped to a preset range to obtain a first trust factor; and the product between the first trust factor and the first variable condition parameter is used as the updated first variable condition parameter.
[0087] In this embodiment, the first self-inhibition strength parameter ( The first self-inhibition strength parameter refers to the parameter value that controls and limits the generation range and variation amplitude of the first variable parameter. The value of the first self-inhibition strength parameter can be statically set or dynamically set. For example, the first self-inhibition strength parameter can be statically set to 0.6.
[0088] The first variance of the first variable conditional parameter refers to the mean of the squared differences between the output value and the average output value of the first variable conditional parameter under a given context feature. As the context feature z changes, the output of the first variable conditional parameter a(z) also changes, and the first variance quantifies the degree of fluctuation of the first variable conditional parameter. In model application, the first variance of the first variable conditional parameter can be calculated based on the variance of the first variable conditional parameters corresponding to multiple enterprise names processed in the model's history. In this embodiment, the first variance of the first variable conditional parameter can be... The first fluctuation suppression coefficient is an index that quantifies the degree of fluctuation of the first variable condition parameter when processing context features. In this embodiment, the first fluctuation suppression coefficient can be expressed as: .
[0089] Reverse suppression of the first fluctuation suppression coefficient involves subtracting 1 from the first fluctuation suppression coefficient to obtain the stability of the first parameter. The stability of the first parameter refers to the stability of the first fluctuation suppression coefficient after reverse suppression, and it is used to measure the stability of the first variable conditional parameter in the context features fused from the nonlinear word vectors. For example, the stability of the first parameter can be expressed as... express.
[0090] Mapping the stability of the first parameter to a preset range means mapping the value of the stability of the first parameter to a preset range based on the value of the stability of the first parameter through mathematical methods (e.g., linear mapping, exponential mapping, etc.) or function transformation (e.g., the Sigmoid function). The preset range refers to the range within which the stability of the first parameter is allowed to vary. For example, the preset range can be [0.1] or [0,4], etc.
[0091] For example, the first parameter stability is mapped to [0,1] using the Sigmoid function, thus obtaining the first trust factor. The first trust factor can be used... express.
[0092] In an optional embodiment, the updated first variable condition parameter is obtained by the following formula (2). :
[0093] (2)
[0094] in, ) is the Sigmoid function. It is the first trust factor. It is the variance of the adjustment coefficient within the current batch (i.e., the first variance of the first variable condition parameter). It is the first self-inhibition strength parameter, for example, A fixed value of 0.6 can be used. Through an adaptive mechanism, the model maintains a certain level of generalization ability.
[0095] In this embodiment, by obtaining the first self-suppression strength parameter, the product of the first self-suppression strength parameter and the first variance of the first variable condition parameter is determined as the first wave suppression coefficient, and the first waveguide suppression coefficient is subjected to inverse suppression processing to obtain the first parameter stability. This more accurately controls the dynamic adjustment range and stability of each parameter, enabling the model to flexibly respond to changes in context while maintaining appropriate parameter fluctuations when processing semantic matching between enterprise names and SMS signature templates, thus avoiding unnecessary misjudgments and performance degradation in extreme cases.
[0096] In an exemplary embodiment, a second trust factor is introduced to adjust the second variable condition parameter to obtain an updated second variable condition parameter, including: obtaining a preset second self-inhibition strength parameter; the second self-inhibition strength parameter is used to limit the generation range of the second variable condition parameter; the product between the second self-inhibition strength parameter and the second variance of the second variable condition parameter is determined as the second fluctuation suppression coefficient of the second variable condition parameter; the second fluctuation suppression coefficient characterizes the quantified value of the fluctuation of the second self-inhibition strength parameter; the second fluctuation suppression coefficient is subjected to inverse suppression processing to obtain the second parameter stability of the second variable condition parameter; the second parameter stability characterizes the stability of the second variable condition parameter in the context features fused in the nonlinear word vector; the second parameter stability is mapped to a preset range to obtain a second trust factor; and the product between the second trust factor and the second variable condition parameter is used as the updated second variable condition parameter.
[0097] In this embodiment, the second self-inhibition strength parameter refers to the parameter value that controls and limits the generation range and variation amplitude of the second variable condition parameter. For example, the second self-inhibition strength parameter is used as... express.
[0098] The second variance of the second variable conditional parameter refers to the mean of the squared differences between the output value and the average output value of the second variable conditional parameter under a given context feature. As the context feature z changes, the second variable conditional parameter... The output also changes accordingly, and the second variance quantifies the degree of fluctuation of the second variable condition parameter. For example, the second variance of the second variable condition parameter can be expressed as... The second volatility suppression coefficient is an indicator that quantifies the degree of volatility of the second variable conditional parameter when dealing with contextual features. For example, the second volatility suppression coefficient can be expressed as... express.
[0099] Inverse suppression of the second fluctuation suppression coefficient involves subtracting 1 from the second fluctuation suppression coefficient to obtain the stability of the second parameter. The stability of the second parameter refers to the stability of the second fluctuation suppression coefficient after inverse suppression, and it is used to measure the stability of the second variable conditional parameter in the context features fused from nonlinear word vectors. For example, the stability of the second parameter can be expressed as... express.
[0100] Mapping the stability of the second parameter to a preset range means mapping the value of the stability of the second parameter to a preset range based on the value of the stability of the second parameter through mathematical methods (e.g., linear mapping, exponential mapping, etc.) or function transformation (e.g., the Sigmoid function). The preset range refers to the range within which the stability of the second parameter is allowed to vary. For example, the preset range can be [0.2] or [1,3], etc.
[0101] For example, the second stability parameter is mapped to [0,1] using the Sigmoid function, thus obtaining the second trust factor. The second trust factor can be used... express.
[0102] In an optional embodiment, the updated second variable condition parameter is obtained by the following formula (3). :
[0103]
[0104] in ) is the Sigmoid function. It is the variance of the adjustment coefficient within the current batch (i.e., the second variance of the second variable condition parameter). It is the second self-inhibition strength parameter, for example, A fixed value of 0.6 can be used. Through an adaptive mechanism, the model maintains a certain level of generalization ability.
[0105] In this embodiment, by obtaining the second self-suppression strength parameter, the product of the second self-suppression strength parameter and the second variance of the second variable condition parameter is determined as the second wave suppression coefficient, and the second waveguide suppression coefficient is subjected to inverse suppression processing to obtain the second parameter stability. This more accurately controls the dynamic adjustment range and stability of each parameter, enabling the model to flexibly respond to changes in context while maintaining appropriate parameter fluctuations when processing semantic matching between enterprise names and SMS signature templates, thus avoiding unnecessary misjudgments and performance degradation in extreme cases.
[0106] Through the above embodiments, the multi-feature matching AI algorithm can effectively identify the potential correlation between enterprise names and SMS signature templates, avoiding misjudgments caused by traditional strict character-by-character matching methods. It also enables rapid updating of the recognition model when samples are updated through a special information processing layer. This method supports automated processing of comparisons between enterprise names and signature templates and generates an anomaly list, greatly reducing the workload of manual verification. By designing a reasonable algorithm with low computational cost and low latency, it can process large-scale SMS signature and enterprise name data, meeting the needs of real-time supervision.
[0107] In this embodiment, the improved dynamic parameter adjustment layer can quickly adapt to special relationships and changes, solving the problem that classic feature matching algorithms cannot quickly handle such situations. For example, after obtaining a small number of new training samples, it can effectively identify the relationship between "AA" and "BB Co., Ltd." Figure 5 This is a schematic diagram of an optional signature matching according to an embodiment of this application, such as... Figure 5As shown, on the new page, enter "BB Technology Co., Ltd." and the matching SMS signature template "AA". You can then choose "OK" or "Cancel".
[0108] Given the limitations of traditional alignment algorithms in terms of computational efficiency and output in large-scale data processing, this embodiment proposes an improved solution. Figure 6 This is a schematic diagram of an optional enterprise signature and SMS signature template exception list according to an embodiment of this application, such as... Figure 6 As shown, this solution can process 20,000 data comparison calculations within 5 minutes and quickly generate an anomaly list report, that is, automatically generate an anomaly SMS signature list.
[0109] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0110] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0111] According to another aspect of the embodiments of this application, an SMS signature template anomaly determination device is also provided. This device can be used to implement the SMS signature template anomaly determination method provided in the above embodiments, and will not be repeated hereafter. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0112] Figure 7This is a structural block diagram of an optional SMS signature template anomaly determination device according to an embodiment of this application, such as... Figure 7 As shown, the SMS signature template anomaly determination device includes an acquisition unit, a conversion unit, a determination unit, and a determination unit.
[0113] The acquisition unit 702 is used to acquire the enterprise name reported by the service provider and the SMS signature pattern that matches the enterprise name.
[0114] The conversion unit 704 is used to convert the enterprise name into a first semantic vector corresponding to the enterprise name, and to convert the SMS signature template into a second semantic vector corresponding to the enterprise name.
[0115] The determining unit 706 is used to determine the matching degree of the first semantic vector and the second semantic vector in each of the multiple dimensions, and to fuse the matching degree in each dimension to obtain the fused matching degree. The matching degree in the multiple dimensions includes at least two of the following dimensions: character matching degree, word frequency statistical feature matching degree, named entity recognition feature matching degree, and cosine similarity.
[0116] The determination unit 708 is used to determine that the SMS signature template is abnormal when the fusion matching degree is less than a preset matching degree threshold.
[0117] It should be noted that the acquisition unit 702 in this embodiment can be used to execute the above step S202, the conversion unit 704 in this embodiment can be used to execute the above step S204, the determination unit 706 in this embodiment can be used to execute the above step S206, and the judgment unit 708 in this embodiment can be used to execute the above step S208.
[0118] The embodiments provided in this application obtain the enterprise name and SMS signature template reported by the service provider, and convert the text-based enterprise name and SMS signature name into a first semantic vector and a second semantic vector, respectively. The converted first and second semantic vectors not only contain the information of the original text, but also reflect the deeper meaning of the text. The matching degree of the first and second semantic vectors is calculated in multiple dimensions, including but not limited to character matching degree, word frequency statistical feature matching degree, named entity recognition feature matching degree, and cosine similarity. The matching degree in each dimension is fused to obtain a more comprehensive and integrated fused matching degree, ensuring that the final fused matching degree can accurately reflect the correlation between the enterprise name and the SMS signature. Furthermore, the fused matching degree allows for flexible adjustment of the judgment criteria. If the fused matching degree is lower than the preset matching degree threshold, the SMS signature template is judged to be abnormal; otherwise, the two are considered to match normally. In this way, the accuracy and efficiency of SMS signature anomaly detection can be significantly improved. Therefore, it can solve the problems of low efficiency and high misjudgment rate in related technologies when facing large-scale data real-time processing and diverse writing methods of enterprise names.
[0119] In an exemplary embodiment, the conversion unit is used to convert the enterprise name into a first semantic vector corresponding to the enterprise name using a pre-trained semantic matching model; the semantic matching model is used to perform forward propagation on the enterprise name and obtain the first semantic vector corresponding to the enterprise name after multiple encoding processes.
[0120] In an exemplary embodiment, the semantic matching model includes an input layer, multiple stacked feature extraction modules, a dynamic parameter adjustment layer, and an output layer; a transformation unit is used to perform word segmentation and tokenization processing on the enterprise name through the input layer to obtain multiple word vectors corresponding to the enterprise name; to perform multiple nonlinear transformations on the multiple word vectors through the multiple stacked feature extraction modules to obtain nonlinear word vectors; to perform weighted mapping and offset adjustment on the nonlinear word vectors through the dynamic parameter adjustment layer according to the context features of the multiple stacked feature extraction modules to obtain a target word vector; and to perform format conversion on the target word vector through the output layer to obtain a first semantic vector corresponding to the enterprise name.
[0121] In an exemplary embodiment, the conversion unit is configured to generate a first variable condition parameter and a second variable condition parameter based on the context features of the multiple stacked feature extraction modules through the dynamic parameter adjustment layer; multiply the first variable condition parameter element-wise with the corresponding elements of the nonlinear word vector to obtain a product vector; and determine the sum of the product vector and the second variable condition parameter as the target word vector; the first variable condition parameter and the second variable condition parameter are used to perform weighted mapping and offset adjustment on the nonlinear word vector.
[0122] In an exemplary embodiment, the conversion unit is configured to, before multiplying the first variable condition parameter element-by-element with the corresponding elements of the nonlinear word vector to obtain a product vector, introduce a first trust factor to adjust the first variable condition parameter, resulting in an updated first variable condition parameter; the first trust factor characterizes the semantic matching model's trust in the first variable condition parameter; introduce a second trust factor to adjust the second variable condition parameter, resulting in an updated second variable condition parameter; the second trust factor characterizes the semantic matching model's trust in the second variable condition parameter; and based on the updated first variable condition parameter and the updated second variable condition parameter, continue to execute the step of multiplying the first variable condition parameter element-by-element with the corresponding elements of the nonlinear word vector to obtain a product vector.
[0123] In an exemplary embodiment, the conversion unit is configured to obtain a preset first self-inhibition strength parameter; the first self-inhibition strength parameter is used to limit the generation range of the first variable condition parameter; the product between the first self-inhibition strength parameter and the first variance of the first variable condition parameter is determined as a first fluctuation suppression coefficient of the first variable condition parameter; the first fluctuation suppression coefficient characterizes the quantized value of the fluctuation of the first self-inhibition strength parameter; the first fluctuation suppression coefficient is subjected to inverse suppression processing to obtain a first parameter stability of the first variable condition parameter; the first parameter stability characterizes the stability of the first variable condition parameter in the context features fused in the nonlinear word vector; the first parameter stability is mapped to a preset range to obtain a first trust factor; and the product between the first trust factor and the first variable condition parameter is used as the updated first variable condition parameter.
[0124] In an exemplary embodiment, a conversion unit is configured to obtain a preset second self-inhibition strength parameter; the second self-inhibition strength parameter is used to limit the generation range of the second variable condition parameter; the product between the second self-inhibition strength parameter and the second variance of the second variable condition parameter is determined as the second fluctuation suppression coefficient of the second variable condition parameter; the second fluctuation suppression coefficient characterizes the quantized value of the fluctuation of the second self-inhibition strength parameter; the second fluctuation suppression coefficient is subjected to inverse suppression processing to obtain the second parameter stability of the second variable condition parameter; the second parameter stability characterizes the stability of the second variable condition parameter in the context features fused in the nonlinear word vector; the second parameter stability is mapped to a preset range to obtain the second trust factor; and the product between the second trust factor and the second variable condition parameter is used as the updated second variable condition parameter.
[0125] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0126] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the steps in any of the above method embodiments when it is run.
[0127] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0128] According to another aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured to perform the steps of any of the method embodiments described above via the computer program. In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0129] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0130] According to another aspect of the embodiments of this application, a computer program product is also provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication section 809, and / or installed from a removable medium 811. When the computer program is executed by a central processing unit 801, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0131] Figure 8 A schematic block diagram of a computer system architecture for implementing embodiments of the present application is shown. Figure 8 As shown, the computer system 800 includes a Central Processing Unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in ROM 802 or programs loaded into RAM 803 from storage section 808. Random access memory 803 also stores various programs and data required for system operation. The CPU 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0132] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card, such as a local area network card or modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. Removable media 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 810 as needed so that computer programs read from them can be installed into storage section 808 as needed.
[0133] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit 801, it performs various functions defined in the system of this application.
[0134] It should be noted that, Figure 8 The computer system 800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0135] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0136] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for determining anomalies in SMS signature templates, characterized in that, include: Obtain the company name reported by the service provider and the SMS signature template that matches the company name; The company name is converted into a first semantic vector corresponding to the company name, and the SMS signature template is converted into a second semantic vector corresponding to the company name; Determine the matching degree of the first semantic vector and the second semantic vector in each of multiple dimensions, and fuse the matching degree in each dimension to obtain the fused matching degree. The matching degree in the multiple dimensions includes at least two of the following dimensions: character matching degree, word frequency statistical feature matching degree, named entity recognition feature matching degree, and cosine similarity. If the fusion matching degree is less than a preset matching degree threshold, the SMS signature template is determined to be abnormal.
2. The method according to claim 1, characterized in that, The step of converting the enterprise name into a first semantic vector corresponding to the enterprise name includes: The enterprise name is converted into a first semantic vector corresponding to the enterprise name by a pre-trained semantic matching model; the semantic matching model is used to perform forward propagation on the enterprise name and obtain the first semantic vector corresponding to the enterprise name after multiple encoding processes.
3. The method according to claim 2, characterized in that, The semantic matching model includes an input layer, multiple stacked feature extraction modules, a dynamic parameter adjustment layer, and an output layer; the step of converting the company name into a first semantic vector corresponding to the company name using the pre-trained semantic matching model includes: The input layer performs word segmentation and tokenization on the company name to obtain multiple word vectors corresponding to the company name. The multiple word vectors are subjected to multiple nonlinear transformations by the multiple stacked feature extraction modules to obtain nonlinear word vectors. The target word vector is obtained by weighting and shifting the nonlinear word vector through the dynamic parameter adjustment layer based on the context features of the multiple stacked feature extraction modules. The output layer performs format conversion on the target word vector to obtain a first semantic vector corresponding to the company name.
4. The method according to claim 3, characterized in that, The step of obtaining the target word vector by weighting and shifting the nonlinear word vector through the dynamic parameter adjustment layer based on the context features of the multiple stacked feature extraction modules includes: Through the dynamic parameter adjustment layer, a first variable condition parameter and a second variable condition parameter are generated based on the context features of the multiple stacked feature extraction modules. The first variable condition parameter is multiplied element-wise with the corresponding elements of the nonlinear word vector to obtain a product vector. The sum of the product vector and the second variable condition parameter is determined as the target word vector. The first variable condition parameter and the second variable condition parameter are used to perform weighted mapping and offset adjustment on the nonlinear word vector.
5. The method according to claim 4, characterized in that, Before multiplying the first variable condition parameter element-by-element with the corresponding elements of the nonlinear word vector to obtain the product vector, the method further includes: A first trust factor is introduced to adjust the first variable condition parameter to obtain the updated first variable condition parameter; the first trust factor represents the degree of trust that the semantic matching model has in the first variable condition parameter. A second trust factor is introduced to adjust the second variable condition parameter, resulting in an updated second variable condition parameter; the second trust factor represents the degree of trust that the semantic matching model has in the second variable condition parameter; Based on the updated first variable condition parameter and the updated second variable condition parameter, the step of multiplying the first variable condition parameter element by element with the corresponding element of the nonlinear word vector to obtain the product vector continues.
6. The method according to claim 5, characterized in that, The step of introducing a first trust factor to adjust the first variable condition parameter to obtain the updated first variable condition parameter includes: Obtain a preset first self-inhibition strength parameter; the first self-inhibition strength parameter is used to limit the generation range of the first variable condition parameter; The product of the first self-inhibition strength parameter and the first variance of the first variable condition parameter is determined as the first fluctuation suppression coefficient of the first variable condition parameter; the first fluctuation suppression coefficient characterizes the quantified value of the fluctuation of the first self-inhibition strength parameter. The first fluctuation suppression coefficient is subjected to inverse suppression processing to obtain the first parameter stability of the first variable condition parameter; the first parameter stability characterizes the stability of the first variable condition parameter in the context features fused in the nonlinear word vector; The stability of the first parameter is mapped to a preset range to obtain the first trust factor; the product between the first trust factor and the first variable condition parameter is used as the updated first variable condition parameter.
7. The method according to claim 5, characterized in that, The step of introducing a second trust factor to adjust the second variable condition parameter to obtain the updated second variable condition parameter includes: Obtain a preset second self-inhibition strength parameter; the second self-inhibition strength parameter is used to limit the generation range of the second variable condition parameter; The product of the second self-suppression strength parameter and the second variance of the second variable condition parameter is determined as the second fluctuation suppression coefficient of the second variable condition parameter; the second fluctuation suppression coefficient characterizes the quantified value of the fluctuation of the second self-suppression strength parameter. The second fluctuation suppression coefficient is subjected to inverse suppression processing to obtain the second parameter stability of the second variable condition parameter; the second parameter stability characterizes the stability of the second variable condition parameter in the context features fused in the nonlinear word vector; The stability of the second parameter is mapped to a preset range to obtain the second trust factor; the product between the second trust factor and the second variable condition parameter is used as the updated second variable condition parameter.
8. A device for determining the anomaly of a text message signature template, characterized in that, include: The acquisition unit is used to acquire the enterprise name reported by the service provider and the SMS signature template that matches the enterprise name; The conversion unit is used to convert the enterprise name into a first semantic vector corresponding to the enterprise name, and to convert the SMS signature template into a second semantic vector corresponding to the enterprise name; The determining unit is used to determine the matching degree of the first semantic vector and the second semantic vector in each of the multiple dimensions, and to fuse the matching degree in each dimension to obtain the fused matching degree, wherein the matching degree in the multiple dimensions includes at least two of the following dimensions: character matching degree, word frequency statistical feature matching degree, named entity recognition feature matching degree, and cosine similarity. The determination unit is used to determine that the SMS signature template is abnormal when the fusion matching degree is less than a preset matching degree threshold.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.