Short message processing method and device, equipment, storage medium and program product
By combining SMS classification models and large language models, the problem of low accuracy in identifying abnormal SMS messages in existing technologies has been solved, achieving efficient identification of fraudulent SMS messages and reducing the misclassification rate.
Patent Information
- Application Number
- CN202511387487.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2026-01-06
AI Technical Summary
In existing technologies, relying on keyword matching or blacklist/whitelist filtering mechanisms to identify abnormal text messages has low accuracy and is difficult to effectively identify malicious information such as fraudulent text messages.
A text message classification model is used to perform preliminary analysis of text message content, followed by secondary verification using a large language model. The large language model's ability to understand the text context of text messages is utilized, and the text message type is determined by a preset judgment probability. Through the collaborative mechanism of the dual model of rapid initial screening by the text message classification model and precise verification by the large language model, the recognition accuracy is improved.
It significantly improves the accuracy of identifying abnormal text messages, reduces the misclassification rate, and achieves efficient identification of fraudulent text messages.
Smart Images

Figure CN121284569A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of communication technology, and in particular relates to a method, apparatus, device, storage medium and program product for processing text messages. Background Technology
[0002] SMS, as a basic and widely used method of information transmission, plays an important role in daily communication, service recommendations, and security verification. However, some criminals may impersonate official notices or forge requests for help from relatives and friends, embedding malicious links or misleading instructions in SMS messages. Once triggered, users not only face the risk of sensitive information leakage, but may even face threats to their financial security. Currently, the identification of abnormal SMS messages (such as fraudulent SMS messages) mainly relies on keyword matching or blacklist / whitelist filtering mechanisms, but the accuracy of identifying abnormal SMS messages is low. Summary of the Invention
[0003] This application provides a method, apparatus, device, storage medium, and program product for processing text messages, which can solve the problem of low accuracy in identifying abnormal text messages that rely on keyword matching or blacklist / whitelist filtering mechanisms.
[0004] In a first aspect, embodiments of this application provide a text message processing method, which includes: receiving a text message distribution request sent by a sender, the text message distribution request carrying a text message; inputting the text message content into a text message classification model to obtain a classification result output by the text message classification model, the classification result including a reference text message type; inputting the text message content, the reference text message type, and a prompt message into a large language model to obtain the probability that the text message belongs to the reference text message type, the prompt message being used to guide the large language model to determine the probability that the text message belongs to the reference text message type; and determining whether the text message type is a reference text message type based on the probability and a preset judgment probability.
[0005] In some possible implementations of the embodiments of this application, the classification result also includes the reference probability that the SMS type is a reference SMS type; inputting the SMS content, reference SMS type and prompt information into the large language model to obtain the probability that the SMS output by the large language model belongs to the reference SMS type includes: when the reference probability is greater than or equal to the preset probability, inputting the SMS content, reference SMS type and prompt information into the large language model to obtain the probability that the SMS output by the large language model belongs to the reference SMS type.
[0006] In some possible implementations of the embodiments of this application, the SMS processing method may further include: determining whether the SMS meets the manual review triggering conditions based on the matching information of keywords in the SMS content and preset keywords; if the SMS meets the manual review triggering conditions, prompting the reviewer to review the SMS according to a preset prompting method; if the SMS does not meet the manual review triggering conditions, inputting the SMS content into the SMS classification model to obtain the classification result output by the SMS classification model.
[0007] In some possible implementations of the embodiments of this application, the SMS processing method may further include: obtaining the review result of the reviewer reviewing the SMS, the review result including the first SMS type of the SMS; constructing a first training sample by using the SMS content as a first SMS content sample and the review result as a first label based on the review result; and using the first training sample as a training sample for training the SMS classification model and / or the large language model.
[0008] In some possible implementations of the embodiments of this application, before determining whether the SMS type of the SMS is a reference SMS type based on probability and preset judgment probability, the SMS processing method may further include: prompting the reviewer to review the SMS content according to the probability and a preset prompting method; obtaining the review result of the reviewer's review of the SMS content, the review result including the second SMS type of the SMS; constructing a second training sample by using the SMS content as a second SMS content sample and the review result as a second annotation label based on the review result; and using the second training sample as a training sample for training the SMS classification model and / or the large language model.
[0009] In some possible implementations of the embodiments of this application, the above-mentioned SMS processing method may further include: upon receiving an SMS distribution request sent by a sender, wherein the SMS distribution request carries the receiver's receiving information, sending an SMS to the receiver based on the receiving information; after determining whether the SMS type of the SMS is a reference SMS type based on a probability and a preset judgment probability, the SMS processing method further includes: if it is determined that the SMS type of the SMS is a reference SMS type and the reference SMS type is a preset abnormal SMS type, obtaining first handling strategy information corresponding to the preset abnormal SMS type; processing the SMS through the first handling strategy information; wherein the first handling strategy information includes at least one of the following: information instructing the SMS processing system to send a risk warning to the receiver; information instructing the SMS processing system to perform restriction management to the sender.
[0010] In some possible implementations of this application, after determining whether the SMS type is a reference SMS type based on probability and preset judgment probability, the SMS processing method further includes: if the SMS type is determined to be a reference SMS type and the reference SMS type is a preset abnormal SMS type, obtaining second handling strategy information corresponding to the preset abnormal SMS type; processing the SMS through the second handling strategy information; wherein the second handling strategy information includes at least one of the following: information instructing the SMS processing system to send a risk warning to the recipient; information instructing the SMS processing system to intercept the SMS to prevent the recipient from receiving the SMS content.
[0011] In some possible implementations of the embodiments of this application, the above-mentioned determination of whether the SMS type of the SMS is a reference SMS type based on the probability and the preset determination probability includes: determining that the SMS type of the SMS is a reference SMS type when the probability is greater than or equal to the preset determination probability; and determining that the SMS type of the SMS is not a reference SMS type when the probability is less than the preset determination probability.
[0012] In some possible implementations of this application, the above-mentioned inputting SMS content, reference SMS type, and prompt information into a large language model to obtain the probability that the SMS output by the large language model belongs to the reference SMS type includes: inputting SMS content, reference SMS type, and prompt information into a large language model, and performing the following steps through the large language model: obtaining a set of feature factors corresponding to the reference SMS type from a preset feature factor library according to the reference SMS type; matching the SMS text features in the SMS content with the set of feature factors to obtain a matching result, the matching result including the degree of matching between each feature factor in the set of feature factors and the SMS text features; scoring each feature factor according to the matching result and the scoring rules corresponding to the reference SMS type to obtain the feature factor evaluation score corresponding to each feature factor; performing a weighted summation calculation on the feature factor evaluation scores corresponding to each feature factor according to the weight coefficients corresponding to each feature factor to obtain a comprehensive feature score; and performing probability mapping processing on the comprehensive feature score according to the prompt information, the comprehensive feature score, and a preset probability conversion rule to obtain the probability that the SMS content output by the large language model belongs to the reference SMS type.
[0013] Secondly, embodiments of this application provide a text message processing device, which includes:
[0014] The receiving module is used to receive SMS distribution requests sent by the sender, and the SMS distribution requests carry SMS messages.
[0015] The first processing module is used to input the SMS content into the SMS classification model and obtain the classification result output by the SMS classification model. The classification result includes the reference SMS type of the SMS.
[0016] The first processing module is also used to input the SMS content, reference SMS type and prompt information into the big language model to obtain the probability that the SMS output by the big language model belongs to the reference SMS type. The prompt information is used to guide the big language model to determine the probability that the SMS belongs to the reference SMS type.
[0017] The first determining module is used to determine whether the SMS type is a reference SMS type based on the probability and the preset determination probability.
[0018] Thirdly, embodiments of this application provide a computer device, which includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the SMS processing method as described in any of the first aspects.
[0019] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the SMS processing method as described in any of the first aspects.
[0020] Fifthly, embodiments of this application provide a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the SMS processing method as described in any of the first aspects.
[0021] The SMS processing method, apparatus, device, storage medium, and program product of this application can utilize an SMS classification model to perform preliminary analysis of the SMS content and output a reference SMS type, thus achieving preliminary identification of the SMS type. Next, a large language model is used to perform a secondary verification of the reference SMS type. Leveraging the large language model's ability to understand the textual context of the SMS, the probability that the SMS belongs to the reference SMS type can be accurately determined. Subsequently, a final judgment is made based on the probability obtained from the secondary verification, combining a preset judgment probability to determine the SMS type, further reducing the misclassification rate. Thus, through the collaborative mechanism of the rapid initial screening by the SMS classification model and the precise verification by the large language model, the accuracy of SMS classification can be significantly improved, effectively enhancing the accuracy of identifying abnormal SMS (such as fraudulent SMS). Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 A flowchart illustrating some embodiments of the SMS processing method provided in this application is shown.
[0024] Figure 2 The diagram illustrates a specific implementation of step 130 provided in some embodiments of this application;
[0025] Figure 3 The diagram illustrates a flowchart of a method for constructing a first training sample in a text message processing method provided in some embodiments of this application.
[0026] Figure 4 The diagram illustrates a flowchart of a method for constructing a second training sample in a text message processing method provided in some embodiments of this application.
[0027] Figure 5 The diagram shows a flowchart illustrating a method for processing SMS messages using a first processing strategy, as provided in some embodiments of this application.
[0028] Figure 6 The diagram shows a flowchart illustrating a method for processing SMS messages using a second processing strategy, as provided in some embodiments of this application.
[0029] Figure 7 The present application provides schematic diagrams of the structure of a text message processing apparatus according to some embodiments;
[0030] Figure 8 A schematic diagram of the structure of a computer device provided in some embodiments of this application is shown. Detailed Implementation
[0031] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0032] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0033] It should be noted that the acquisition, storage, use, and processing of data in this application embodiment all comply with the relevant provisions of national laws and regulations.
[0034] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0035] Before describing the technical solutions provided in the embodiments of this application, in order to facilitate understanding of the embodiments of this application, this application first provides a detailed description of the relevant technologies involved:
[0036] SMS (Short Message Service) refers to text or digital information sent or received directly by users via mobile phones or other telecommunications terminals through mobile communication networks. It is one of the most widely used basic communication methods in the field of instant messaging. In related technologies, the identification of abnormal SMS messages mainly relies on keyword matching or blacklist / whitelist filtering mechanisms. Keyword matching analyzes the SMS content, matching it against a pre-set database of abnormal keywords to determine whether the SMS is abnormal. Blacklist / whitelist filtering mechanisms use the sender's phone number as the basis for judgment, directly deciding whether to allow or block an SMS message based on a pre-set list of numbers.
[0037] To address the problems in the aforementioned related technologies, embodiments of this application provide a text message processing method, apparatus, device, storage medium, and program product. The following description, in conjunction with the appendix... Figure 1 To be continued Figure 6 The SMS processing method provided in this application will be described in detail through specific embodiments and application scenarios.
[0038] Figure 1 The diagram illustrates a flowchart of a text message processing method provided in some embodiments of this application. For example... Figure 1 As shown, the SMS processing method may include steps 110 to 140.
[0039] Step 110: Receive the SMS distribution request sent by the sender, the SMS distribution request carrying the SMS message; Step 120: Input the SMS content into the SMS classification model to obtain the classification result output by the SMS classification model, the classification result including the reference SMS type; Step 130: Input the SMS content, reference SMS type, and prompt information into the large language model to obtain the probability that the SMS belongs to the reference SMS type, the prompt information is used to guide the large language model to determine the probability that the SMS belongs to the reference SMS type; Step 140: Determine whether the SMS type is the reference SMS type based on the probability and the preset judgment probability.
[0040] Therefore, the SMS classification model can be used to perform preliminary analysis of SMS content and output a reference SMS type, achieving initial identification of SMS type. Next, a large language model is used for secondary verification of the reference SMS type. Leveraging the large language model's ability to understand the textual context of the SMS, the probability of the SMS belonging to the reference SMS type can be accurately determined. Subsequently, the probability obtained from the secondary verification is combined with a preset judgment probability to make a final judgment, determining the SMS type and further reducing the misclassification rate. Thus, through the collaborative mechanism of the rapid initial screening by the SMS classification model and the precise verification by the large language model, the accuracy of SMS classification can be significantly improved, effectively enhancing the accuracy of identifying abnormal SMS (such as fraudulent SMS).
[0041] The steps described above are explained in detail below.
[0042] First, regarding step 110, the SMS distribution request in this embodiment refers to a request initiated by the sender (such as an enterprise, individual, or SMS platform) to the SMS processing system to distribute a certain SMS message. The SMS message can include, but is not limited to, at least one of the following: traditional SMS (Short Message Service), 5G messages, third-party in-application messages, and enterprise service messages. Specifically, traditional SMS refers to text information transmitted through an operator's network; 5G messages refer to rich media messages based on a 5G network, which can include, but are not limited to, text, images, videos, links, and cards; third-party in-application messages refer to instant messages sent via social or utility applications; and enterprise service messages refer to service information sent by an enterprise to a user.
[0043] The SMS distribution request in this embodiment may include, but is not limited to: SMS content, sender's sending information, receiver's receiving information, and sending time. The SMS content, depending on its format, can be plain text in traditional SMS, text and images / videos / interactive cards in 5G messages, or rich media content containing links and attachments within third-party applications. The sender's sending information identifies the source of the information, such as the sender's mobile phone number in traditional SMS, the enterprise service number / personal account in 5G messages, or the user ID in messages within third-party applications. The receiver's receiving information is used to accurately locate the distribution recipient, such as the receiver's mobile phone number in traditional SMS, the receiver's account in 5G messages, or the chat partner ID in messages within third-party applications.
[0044] In some embodiments of this application, a keyword matching and verification step is added after step 110 to quickly identify abnormal SMS messages using preset keywords, prioritize triggering manual review, and reduce the processing load on the SMS classification model. Based on this, the above SMS processing method may further include: determining whether the SMS message meets the manual review triggering conditions based on the matching information between keywords in the SMS content and preset keywords; if the SMS message meets the manual review triggering conditions, prompting the reviewer to review the SMS message according to a preset prompt method. Based on this, step 120 may specifically include: if the SMS message does not meet the manual review triggering conditions, inputting the SMS content into the SMS classification model to obtain the classification result output by the SMS classification model.
[0045] Among them, preset keywords refer to a set of words pre-configured by the SMS processing system that are strongly related to high-risk content. These are categorized, such as keywords for illegal fraud corresponding to "transfer," "winning a prize," and "bank card number," and sensitive keywords such as "sensitive individuals" and "illegal organizations." These can be updated and maintained periodically by business personnel. Manual review trigger conditions refer to the rules for determining whether SMS content requires manual review. For example, the SMS content contains at least one preset keyword, or the number of preset keywords reaches a threshold, such as two or more. Preset notification methods refer to the ways the SMS processing system notifies reviewers to process SMS messages awaiting review, such as pop-up reminders on the review platform, SMS notifications, application push notifications, and work order system dispatch.
[0046] For example, firstly, the SMS content is segmented to extract keywords. Secondly, the SMS processing system loads a preset keyword database and compares the SMS keywords with the preset keywords using either exact matching or fuzzy matching to obtain the matching results. For example, exact matching means that a match is determined only when a word in the SMS contains a word that is exactly the same as a preset keyword; fuzzy matching means that synonyms or variations are matched using a thesaurus. The matching results include, but are not limited to: whether a match is made, the number of matched keywords, and the category to which the matched keywords belong. Next, the SMS processing system reads preset manual review trigger conditions. For example, for the category of illegal fraud, a manual review process is triggered as long as two keywords related to illegal fraud are matched; for the category of commercial advertising, a manual review process is triggered as long as three or more keywords related to commercial advertising are matched; and for the category of disrupting public order, a manual review process is triggered as long as one keyword related to public order is matched. Then, the matching results are compared with the triggering rules. If the conditions are met, it is determined that manual review is triggered, and the reviewer is prompted to review the SMS according to the preset prompt method. If the conditions are not met, it is determined that no manual review is required, and step 120 is executed to process it through the SMS classification model.
[0047] The preset prompting methods in this application embodiment may include popping up a list of pending SMS messages on the reviewer's workbench interface and highlighting matching keywords; it may also include sending review reminders to the reviewer's electronic device via office tools; and it may include generating review tasks in the work order system and assigning them to the corresponding category of reviewers. After the reviewer processes the task, the review result is fed back to the SMS processing system as a basis for subsequent processing.
[0048] Therefore, by adding keyword matching and manual review triggering processes, a filtering mechanism was set up before the SMS classification model processed the messages. This implemented a hierarchical mechanism where high-risk SMS messages were prioritized for manual intervention, while regular SMS messages were automatically processed by the SMS classification model. In this way, the speed and certainty of SMS classification processing were improved by utilizing keyword matching and manual review triggers, while the filtering reduced the waste of computational resources in the SMS classification model, thus improving the overall efficiency of SMS processing.
[0049] Secondly, regarding step 120, the SMS classification model refers to a model trained based on machine learning. The input of the SMS classification model is the SMS content, and the output is the reference SMS type to which the SMS belongs. For example, the SMS classification model can be a Bidirectional Encoder Representations from Transformers (BERT) model.
[0050] The training and usage process of the above SMS classification model will be explained next.
[0051] Step 1: Construct the original dataset for training the SMS classification model. Specifically, collect real SMS samples sent through the SMS processing system, which may include sending time, sender's number, recipient's number, and SMS content. Synchronize the SMS samples to the review system for manual classification and labeling. The classification results may include, but are not limited to: normal, commercial advertising, illegal / fraudulent, spam (such as SMS messages users report they do not want to subscribe to), violating morality and public order, sensitive, and disrupting public order. Based on this, construct a structured database, storing fields that may include, but are not limited to: sending time, sender's number, recipient's number, SMS content, and manually labeled classification results, to form the original dataset for training the SMS classification model.
[0052] Step Two: Data Preprocessing; Specifically, data is read from the structured database in Step One, using SMS content as the model input features and manually labeled classification results as labels. Then, categories with small sample sizes are repeatedly sampled (e.g., if there are few samples in the sensitive category, multiple SMS messages can be copied); and categories with large sample sizes are randomly downsampled (e.g., if there are too many samples in the normal category, a portion is randomly selected) to ensure a consistent sample size across all categories. Alternatively, sample extraction can be performed using a proportional ratio to each category to guarantee a consistent sample size across all categories.
[0053] Step 3: Encode the preprocessed data. Specifically, convert the labels into numerical codes that the model can recognize, such as 0-6, which correspond to the 7 categories in Step 1.
[0054] Step 4: Dataset splitting. Specifically, stratified sampling is performed by class, and the samples of each class are randomly divided into a training dataset (80%) and a test dataset (20%) to ensure that the class distribution of the training dataset and the test dataset is consistent.
[0055] Step 5: Text segmentation and format conversion; Load the BERT segmenter corresponding to the model. Perform word segmentation and vectorization on the SMS content; specifically, break down the Chinese sentences into sub-words that the BERT model can recognize. Convert the segmented text into the model's input format.
[0056] Step Six: Data Loading; Use the DataLoader function to encapsulate the training and test sets into iterable data batches, creating the training and test datasets.
[0057] Step 7: Model Training. Train the BERT model using the training and test datasets from Step 6. Specifically, first, load the BERT model. Second, set the optimizer to AdamW with a learning rate of 0.005 to update the BERT model parameters. Select a learning rate scheduler (e.g., LinearLR) to dynamically adjust the learning rate during training, preventing the model from getting stuck in local optima. Next, use cross-entropy loss to calculate the difference between the predicted class probability distribution and the true label, using this as the model optimization objective. Then, switch the BERT model to training mode, iterate through the training dataset, input each SMS message into the BERT model, obtain the prediction result, calculate the cross-entropy loss between the prediction result and the true label, and update the model parameters through backpropagation. After a certain number of training epochs (e.g., 10 epochs), calculate the accuracy on the test dataset to monitor model performance. Specifically, iterate through each SMS message in the test dataset, classify it to obtain the classification result, and calculate the overall accuracy and the precision and recall of each category. Finally, based on the accuracy of the test dataset, the weights of the best-performing model are saved to obtain the trained BERT model.
[0058] Step 8: Deploy the trained BERT model in the SMS processing system to classify the SMS content and obtain the classification results.
[0059] In some embodiments of this application, the classification result also includes a reference probability that the SMS message type belongs to the reference SMS message type. Further, a reference probability can be set to perform a secondary verification of the high-confidence preliminary classification result using a large language model, thereby improving the accuracy of the classification result and the efficiency of SMS processing. Based on this, step 120 above can specifically include: when the reference probability is greater than or equal to a preset probability, inputting the SMS message content, the reference SMS message type, and the prompt information into the large language model to obtain the probability that the SMS message output by the large language model belongs to the reference SMS message type.
[0060] The reference probability refers to the probability that a given SMS message belongs to a reference SMS type, provided by the SMS classification model when outputting the reference SMS type. It reflects the model's confidence in its classification results. For example, if the SMS classification model classifies an SMS message as "normal" with a reference probability of 0.6, it means the model is 60% confident that the classification is correct. The preset probability is a threshold, such as 0.5, set by the SMS processing system to determine whether a secondary validation using a large language model is necessary. It's worth noting that the preset probability can be set according to business needs; for example, lowering the preset probability if high accuracy is required, and increasing it if high efficiency is required.
[0061] For example, in scenarios where the classification result includes a reference probability, the reference SMS type and its corresponding reference probability are obtained simultaneously output by the SMS classification model after processing the SMS content. Then, a preset probability is read, and the reference probability is compared with the preset probability: if the reference probability ≥ the preset probability, it indicates that the SMS classification model has a high degree of confidence in the classification result, and in this case, step 130 is initiated to call the large language model for secondary verification to further confirm the classification accuracy; if the reference probability < the preset probability, it indicates that the SMS classification model has a low degree of confidence in the classification result, and in this case, the large language model verification is skipped, and the manual review process begins.
[0062] Therefore, performing large language model verification on all SMS messages would lead to resource overload. However, by judging whether the reference probability is greater than or equal to the trigger condition of the preset probability, the computational resources and response time of the large language model can be saved. The computing power of the large language model can be concentrated on the secondary verification of SMS messages with higher probability, which can improve the classification accuracy of SMS messages and make the resource allocation of the SMS processing system more reasonable.
[0063] Then, regarding step 130, the large language model in this embodiment is a large AI model, such as DeepSeek, capable of understanding natural language and generating logical text. It is used to calculate the probability that a text message belongs to a specific text message type based on the text message content and the reference text message type. The prompt message refers to an instruction that explicitly asks the large language model to calculate the probability, such as "Please determine the probability that the following text message belongs to the specified text message type (expressed as a percentage, returning only a number):".
[0064] In some embodiments of this application, step 130 may specifically include inputting the SMS content, reference SMS type, and prompt information into the large language model, such as... Figure 2 As shown, steps 1301 to 1305 are performed through the large language model.
[0065] Step 1301: Based on the reference SMS type, obtain the set of feature factors corresponding to the reference SMS type from the preset feature factor library.
[0066] The preset feature factor library refers to a database that stores feature sets categorized by SMS type. Each reference SMS type corresponds to a set of feature factors, serving as a reference feature library for the large language model's judgment. The feature factor set refers to a set of feature factors extracted from the preset feature factor library that are directly related to the current reference SMS type. For example, the feature factor set corresponding to illegal and fraudulent SMS types may include, but is not limited to: containing links, mentioning bank card numbers, requesting money transfers, mentioning winning prizes, and containing unknown numbers.
[0067] Step 1302: Match the SMS text features in the SMS content with the feature factor set to obtain the matching result. The matching result includes the degree of matching between each feature factor in the feature factor set and the SMS text features.
[0068] Among them, SMS text features refer to the text features extracted from the SMS content. For example, the SMS text features of "Click the link to claim your prize, contact 178XXXX" include the link, the prize, and the phone number. Matching degree refers to the degree of matching between the SMS text features and the feature factors, which can include complete match, partial match, and no match. For example, a link and the feature factor containing "link" are complete matches; claiming a prize and winning a prize are partial matches.
[0069] Step 1303: Based on the matching results and the scoring rules corresponding to the reference SMS type, score each feature factor to obtain the feature factor evaluation score corresponding to each feature factor.
[0070] The scoring rules refer to the corresponding rules of the preset feature factors and scores for each reference SMS type. For example, in the SMS type of illegal fraud, a complete match gets 10 points, a partial match gets 5 points, and a no match gets 0 points.
[0071] Step 1304: Based on the weight coefficients corresponding to each feature factor, perform a weighted summation of the feature factor evaluation scores corresponding to each feature factor to obtain the comprehensive feature score.
[0072] The weighting coefficients are numerical values reflecting the importance of each feature factor, ranging from 0 to 1, with a total sum of 1. The comprehensive feature score is the weighted sum of the evaluation scores of each feature factor, serving as a quantitative indicator of the matching degree between the SMS message and the reference SMS message type.
[0073] Step 1305: Based on the prompt information, comprehensive feature score and preset probability conversion rules, perform probability mapping processing on the comprehensive feature score to obtain the probability that the SMS content output by the large language model belongs to the reference SMS type.
[0074] The preset probability conversion rule refers to the rule that maps the comprehensive feature score to a probability. It can be a linear mapping or a piecewise mapping. For example, 80 points can be mapped to a probability of 0.8, and 60 points can be mapped to a probability of 0.6.
[0075] Next, taking the determination of whether a text message with the content "Hello! Our company has received your resume for a full-time cashier position. Please send it to my email address via text message and click d.we.cn / lM2" is an "illegal or fraudulent" text message as an example, we will explain the execution process of steps 1301 to 1305 above.
[0076] First, based on the category of illegal fraud, the corresponding set of feature factors is retrieved from the feature factor database. These factors include: whether it contains unknown links, whether it contains referral scripts, whether it induces the filling in of personal information, whether it originates from an unknown company or organization, and whether it involves a large sum of money. Second, the text features of the SMS content are compared one by one with the five feature factors to generate a matching degree, with a score of 0-1, where 1 is a perfect match and 0 is a complete mismatch. Specifically, for Feature 1: Does it contain unknown links? → The SMS content contains the link d.we.cn / lM2, and the source of the link is unknown → High matching degree → Score 0.9; Feature 2: Does it contain referral scripts? → The SMS guides "click the link to send to email," which is a referral behavior → Perfect match → Score 1; Feature 3: Does it induce the filling in of personal information? → The SMS mentions "send to email," which is an inducement to fill in personal information → Perfect match → Score 1; Feature 4: Does it originate from an unknown company or organization? → The SMS does not explicitly state whether the company name is compliant → Medium matching degree → Score 0.8; Feature 5: Does it involve a large sum of money? → The SMS does not contain any content related to the amount of money → Complete mismatch → Score 0. In other words, based on the matching results, each feature factor is scored, resulting in a feature factor evaluation score of 0.9, 1, 1, 0.8, and 0. Then, combining the weight coefficients corresponding to each feature factor, the feature factor evaluation scores are weighted and summed to obtain a comprehensive feature score. Specifically, Feature 1: 0.9 × 50% = 0.45; Feature 2: 1 × 60% = 0.6; Feature 3: 1 × 70% = 0.7; Feature 4: 0.8 × 50% = 0.4; Feature 5: 0 × 30% = 0; Comprehensive feature score = 0.45 + 0.6 + 0.7 + 0.4 + 0 = 2.15. Finally, using a preset probability conversion rule, the comprehensive feature score is converted into the probability of belonging to the illegal fraud category. For example, a score ≥1 is judged as illegal fraud, and the comprehensive score of 2.15 is much greater than 1; if we want to map it to a probability (0-1), we can use a linear mapping: "a score of 1 corresponds to a probability of 0.5, and the higher the score, the higher the probability", then 2.15 can be mapped to a probability of about 0.9.
[0077] Therefore, by combining a pre-defined feature factor library and weight coefficients, the large language model becomes more sensitive to SMS text features, which can effectively improve classification accuracy compared to unweighted models.
[0078] In some embodiments of this application, the SMS content, reference SMS type, and prompt message can be concatenated into a complete text according to a preset format before being input into the large language model, and used as input to the large language model. For example, the preset format can be: prompt message + reference SMS type + SMS content. For instance, the probability (expressed as a percentage) of determining if this SMS is of the "reference SMS type" is "SMS content". A specific example is as follows: The probability (expressed as a percentage) of determining if this SMS is "illegal fraud": "Annual membership has been successfully purchased, effective 24 hours later and charged 9800 yuan. To cancel, call 178XXXXXXXX or 198XXXXXXXX."
[0079] In some other embodiments of this application, instead of directly concatenating fixed-format text, the large language model can autonomously generate more relevant and targeted prompts based on the SMS content, reference SMS type, and prompt information. Specifically, the prompt information + reference SMS type + SMS content can be input into the large language model, instructing it to generate targeted prompts. For example: Given an SMS message with the content "SMS content", initially classified as "reference SMS type". Please generate a prompt to guide the large language model to accurately determine the probability that the SMS message belongs to this reference SMS type. Example input: "Given an SMS message with the content 'Successfully purchased annual membership, effective in 24 hours and charged 9800 yuan. To cancel, call 178XXXXXXXX or 198XXXXXXXX', initially classified as 'illegal and fraudulent'. Please generate a prompt to guide the large language model to accurately determine the probability that the SMS message belongs to the illegal and fraudulent category." The large language model can generate the following prompt: "Please analyze the features of the SMS content, such as 'forced deduction' and 'unknown contact number,' and determine the probability that the SMS is a fraudulent activity." The dynamically generated prompt, reference SMS type, and SMS content are then combined into the final input, and the large language model is called again to calculate the probability. Example final input: "Please analyze the features of the SMS content, such as 'forced deduction' and 'unknown contact number,' and determine the probability that the SMS is a fraudulent activity (expressed as a percentage, only numbers are returned). SMS content: 'Annual membership has been successfully purchased, effective in 24 hours and charged 9800 yuan. To cancel, call 178XXXXXXXX or 198XXXXXXXX.'"
[0080] By using the two methods described above, SMS content, reference types, and prompts can be organically combined, providing clear analytical objectives and basis for large language models.
[0081] The following section will explain the process of training and optimizing DeepSeek by combining knowledge base training and dialogue training.
[0082] Step 1: Construct a DeepSeek knowledge base. Specifically, a dual-mode storage approach can be adopted. Mode 1 involves collecting labeled SMS data and extracted features based on the data structure used by DeepSeek, and storing them in a structured manner in the knowledge base. For example, SMS data may include SMS content and category tags; SMS features may include, but are not limited to, links, loan keywords, and unknown numbers. Mode 2 can utilize knowledge graph storage, such as constructing a "SMS feature-SMS type" association graph using a graph database. Nodes represent SMS features and SMS types, and edges represent relationships, clearly presenting the logical connections between SMS features and SMS types. This facilitates rapid querying and retrieval of relevant knowledge by large language models. Using a knowledge graph can clearly represent the relationships between different SMS features and SMS types, helping large language models understand the associations between SMS features and SMS types.
[0083] Step Two: Model Initialization; Specifically, firstly, using the pre-trained DeepSeek model as a foundation, and based on the characteristics of the SMS classification task, high-frequency SMS feature words are extracted from the DeepSeek knowledge base. The word vector space of the DeepSeek model is then adjusted to obtain more accurate semantic representations for these keywords. Subsequently, the default general output layer of the DeepSeek model is adjusted to an output structure based on SMS category probabilities.
[0084] Step 3: Generate dialogue examples to construct training data. Specifically, first, randomly select SMS samples covering different SMS types from the DeepSeek knowledge base, and combine them with annotation information and SMS features to construct dialogue examples for the model. For example, a dialogue example could be:
[0085] User: Is this text message, "You have an interest-free loan available. Click the link to apply," spam?
[0086] Model: The probability of it being a spam text message is 90%.
[0087] User: Why is it identified as spam?
[0088] Model: Because the text message contains the keyword "loan" and a link, both of these features match the characteristics of spam text messages.
[0089] Furthermore, for the same text message, different question formats can be generated, such as "What category does this text message belong to?" or "Does it have the characteristics of a spam text message?", to enrich the amount of training data.
[0090] In this way, static knowledge in the DeepSeek knowledge base can be transformed into dynamic dialogue data that large language models can understand, enabling large language models to learn to output classification results in a natural language interactive manner.
[0091] Step Four: Dialogue Training; Specifically, the generated dialogue examples are input into the DeepSeek model as training data for training. During training, the DeepSeek model learns two objectives simultaneously: it learns to accurately output the "probability of a certain type of SMS message" based on the SMS content and features; and it learns to generate logically coherent explanations by combining SMS features and SMS type relationships from the DeepSeek knowledge base. Through extensive dialogue training, the DeepSeek model gradually understands how to classify SMS messages based on knowledge and features in the knowledge base, and simultaneously learns how to interact with users and explain the basis for classification in natural language.
[0092] Step 5: Reinforcement learning and feedback to improve the performance of the DeepSeek model. Specifically, during training, a reinforcement learning mechanism is introduced to reward or penalize the DeepSeek model based on its classification results and the accuracy of its answers. For example, if the probability of the SMS type predicted by the DeepSeek model is close to the actual labeled type, and the reason contains key features from the knowledge base, a positive reward is given, such as adding 10 points. If the probability of the SMS type predicted by the DeepSeek model is far from the actual labeled type, or the reason is irrelevant to the features, a negative reward is given, such as subtracting 15 points. The DeepSeek model automatically adjusts its internal parameters based on the reward scores from each training round, such as strengthening the association weight between individual keywords and a specific SMS category, prioritizing the retention of judgment logic that can obtain high rewards, thereby improving the accuracy of the DeepSeek model's classification and the quality of its answers. Simultaneously, human evaluation and feedback are provided to the DeepSeek model's answers, pointing out problems and shortcomings in the model's responses, guiding improvements. Specifically, the model's classification results are periodically sampled, and human review is conducted to check the accuracy of the probabilities and the rationality of the reasons, marking problematic cases. The manually labeled problem cases are transformed into new dialogue examples, which are then re-input into the model for training to correct model biases.
[0093] Step Six: Model Optimization and Iteration; Regularly evaluate the trained DeepSeek model, using a test dataset to calculate evaluation metrics such as accuracy, recall, and F1 score. Based on the evaluation results, optimize the DeepSeek model, such as adjusting hyperparameters, adding more training data, and improving the way dialogue examples are generated. Through continuous optimization and iteration, the performance and effectiveness of the DeepSeek model in SMS type classification will be gradually improved.
[0094] Step Seven: Model Application and Continuous Improvement; Deploy a large language model in the SMS processing system. The large language model processes the SMS content, reference SMS type, and prompt information to obtain the probability that the SMS content output by the large language model belongs to the reference SMS type. Subsequently, the DeepSeek knowledge base can be updated in a timely manner based on user feedback and newly emerging abnormal SMS situations, adding new features and labeled data. Then, the dialogue is retrained and the large language DeepSeek model is optimized using the updated DeepSeek knowledge base, enabling the DeepSeek model to adapt to the constantly changing abnormal SMS environment and maintain good classification performance. Through this continuous improvement approach, the accuracy and robustness of the DeepSeek model in SMS classification are continuously enhanced.
[0095] In some embodiments of this application, after prompting the reviewer to review the SMS message according to a preset prompting method, such as... Figure 3 As shown, the above SMS processing method may further include steps 210 to 230.
[0096] Step 210: Obtain the review results of the reviewers on the SMS messages. The review results include the first SMS message type.
[0097] The first SMS type refers to the final type determined manually by the reviewers, which is a manually labeled tag relative to the preliminary classification result of the SMS classification model.
[0098] Step 220: Based on the review results, use the SMS content as the first SMS content sample and the review results as the first annotation label to construct the first training sample.
[0099] Here, the first SMS content sample refers to the SMS content that has been manually reviewed, serving as the input feature for model training. The first labeled tag refers to the first SMS type in the review results, which is a standard label bound to the first SMS content sample and used for supervised learning during model training.
[0100] Step 230: Use the first training sample as the training sample for training the SMS classification model and / or the large language model.
[0101] For example, the SMS classification model and / or large language model can be trained through real-time incremental training or periodic full training. Real-time incremental training refers to automatically triggering incremental training of the SMS classification model and / or large language model when the first training sample accumulates to a preset number, such as 100. Full training refers to combining the first training sample with the aforementioned original dataset and performing full training at fixed intervals to update the model.
[0102] Therefore, compared to manual annotation specifically for model training, reusing the review results already completed in normal business operations expands the training data without increasing the annotation workload. Training the SMS classification model and / or the large language model based on the expanded training data can increase the classification accuracy of the SMS classification model and / or the large language model.
[0103] In some embodiments of this application, before performing step 140 above, such as Figure 4 As shown, the above SMS processing method may further include steps 310 to 340.
[0104] Step 310: Based on the probability and following the preset prompts, prompt the reviewers to review the SMS content.
[0105] The review refers to a second manual verification of the probability that the large language model determines that the SMS belongs to the reference SMS type, with a focus on verifying whether the probability output by the large language model is reasonable.
[0106] For example, a probability trigger threshold can be set, and a pre-defined review trigger range can be established based on the accuracy requirements of the business. For instance, if the probability is <0.5, the large language model determines that the SMS type is likely not the reference SMS type, and no review is needed; if the probability is ≥0.8, the large language model determines that the SMS type is likely the reference SMS type, and no review is needed; if 0.5 ≤ probability <0.8, the large language model's classification is questionable, triggering manual review. The probability trigger threshold can be adjusted according to the SMS type. For example, for illegal and fraudulent SMS messages requiring higher accuracy, the review trigger range can be set to 0.6-0.9.
[0107] The preset prompt method can refer to the above prompt method for the reviewer to review the SMS, and will not be repeated here.
[0108] Step 320: Obtain the review results of the reviewers on the SMS content. The review results include the second SMS type of the SMS.
[0109] The second SMS type refers to the SMS type finally determined by the reviewers after verification. For example, correcting the initial judgment of the large language model as normal to illegal fraud is a more credible label than the model result of the large language model.
[0110] Step 330: Based on the review results, use the SMS content as the second SMS content sample and the review results as the second annotation label to construct the second training sample.
[0111] The second training sample refers to structured data consisting of the second SMS content sample and the second labeled data, specifically used to optimize the classification ability of the large language model.
[0112] Step 340: Use the second training sample as the training sample for training the SMS classification model and / or the large language model.
[0113] For example, if the second training sample is used to optimize the SMS classification model, it is added to the training dataset of the SMS classification model; if the second training sample is used to optimize the large language model, it is transformed into dialogue training examples and added to the training dataset of the large language model; if both the SMS classification model and the large language model are optimized simultaneously, the second training sample is added to the training dataset of the SMS classification model and transformed into dialogue training examples and added to the training dataset of the large language model, until the accuracy and recall of both the SMS classification model and the large language model reach over 95%. After one round of training, new sample data is used for testing and manual re-review. A re-review training sample set is generated from SMS content deemed incorrect by manual re-review and correct classification results. This re-review training sample set is then used for targeted training of the SMS classification model and the large language model until the accuracy of the test dataset in the re-review training sample set reaches a certain level of over 95%, at which point training of the SMS classification model and the large language model is stopped.
[0114] Therefore, by transforming the verification results into training samples and further calibrating the SMS classification model and / or the large language model, human experience can be transformed into new knowledge for the model, ultimately improving the accuracy of the SMS classification model and / or the large language model in classifying SMS types.
[0115] Then, in step 140, the preset judgment probability can be dynamically adjusted according to the SMS type. For example, the threshold for illegal and fraudulent SMS can be set to 0.8, the threshold for spam SMS can be set to 0.6, and the threshold for normal SMS can be set to 0.7.
[0116] In some embodiments of this application, step 140 may specifically include determining the SMS type of the SMS as a reference SMS type when the probability is greater than or equal to a preset determination probability; and determining the SMS type of the SMS as not a reference SMS type when the probability is less than the preset determination probability.
[0117] For example, the SMS processing system can compare the probability with the preset judgment probability. If the probability is greater than or equal to the preset judgment probability, the reference SMS type is directly determined as the SMS type. If the probability is less than the preset judgment probability, the judgment of the reference SMS type is inaccurate. In this case, the system can directly transfer to the manual review process and wait for the reviewer to confirm. Alternatively, the SMS classification model can be called again, and steps 120 to 140 can be repeated until the final SMS type is generated or manual review is triggered.
[0118] Therefore, by pre-setting the judgment probability, the probability output of the large language model can be transformed into a clear SMS type result, which can effectively improve the decision accuracy of SMS type.
[0119] In some embodiments of this application, to ensure the timeliness of SMS messages, a bypass deployment mode can be used to deploy the aforementioned SMS classification model and large language model. Based on this, the SMS processing method may further include: upon receiving an SMS distribution request from a sender, wherein the SMS distribution request carries the recipient's reception information, sending an SMS message to the recipient according to the reception information; based on this, after step 140 above, as... Figure 5 As shown, the above SMS processing method may further include steps 410 and 420.
[0120] Step 410: If the SMS type is determined to be a reference SMS type and the reference SMS type is a preset abnormal SMS type, obtain the first handling strategy information corresponding to the preset abnormal SMS type.
[0121] The recipient's information is used to accurately locate the distribution target, such as the recipient's mobile phone number for traditional SMS, the recipient's account for 5G messages, and the chat object ID for messages within third-party applications. Preset abnormal SMS types refer to high-risk / violation SMS types that the SMS processing system pre-defines and requires intervention. These can be set according to business compliance requirements and may include illegal / fraudulent SMS, spam SMS, SMS violating ethics and public order, sensitive SMS, and SMS disrupting public order. The first handling strategy information refers to the pre-configured set of specific handling rules for each preset abnormal SMS type, used to reduce the risk impact of abnormal SMS. This may include two-way handling logic for both the recipient and the sender.
[0122] Step 420: Process the SMS message using the first handling strategy information; wherein the first handling strategy information includes at least one of the following: information instructing the SMS processing system to send a risk warning to the recipient; information instructing the SMS processing system to implement restriction management to the sender.
[0123] Sending risk warnings to the recipient can instruct the SMS processing system to push a warning message indicating that the SMS message poses a risk. The purpose is to alert the recipient to unusual information and prevent them from being scammed or negatively impacted. Imposing restrictions on the sender refers to the SMS processing system taking control measures against the sender of abnormal SMS messages. This involves limiting their sending capabilities to reduce the spread of illegal content at the source. Common measures may include limiting sending frequency, suspending sending privileges, and permanently banning accounts.
[0124] For example, after receiving the SMS distribution request from the sender, the SMS processing system first extracts the recipient's reception information. If the SMS is not subsequently determined to be a preset abnormal SMS type, the SMS is sent to the recipient through the SMS gateway according to the normal process. If the SMS is determined to be a preset abnormal SMS type, the processing process of steps 410 to 420 is triggered to determine whether to trigger processing.
[0125] Therefore, by sending risk alerts, recipients can be helped to identify harmful information such as fraud, reducing the probability of them being scammed; by restricting and managing senders, the behavior of senders repeatedly sending abnormal text messages can be effectively reduced, thus improving communication security.
[0126] In other embodiments of this application, to ensure communication security and reduce the risk of users being scammed, the above-mentioned SMS classification model and large language model can be deployed in a serial deployment mode. Based on this, after performing step 140 above, as follows: Figure 6 As shown, the above SMS processing method may further include steps 510 and 520.
[0127] Step 510: If the SMS type is determined to be a reference SMS type and the reference SMS type is a preset abnormal SMS type, obtain the second handling strategy information corresponding to the preset abnormal SMS type.
[0128] The second handling strategy information refers to a set of handling rules for preset abnormal SMS types. The core difference between the second and first handling strategies is that the second strategy information focuses more on the direct protection of the recipient. It can be used in scenarios where the timeliness of information dissemination is critical but strict filtering of harmful content is necessary, such as social media platforms and instant messaging tools. Preset abnormal SMS types refer to high-risk / violation SMS types that the SMS processing system predefines and requires intervention. These can be set according to business compliance requirements and may specifically include illegal / fraudulent SMS, spam SMS, SMS violating ethics and public order, sensitive SMS, and SMS disrupting public order.
[0129] Step 520: Process the SMS message using the second handling strategy information; wherein the second handling strategy information includes at least one of the following: information instructing the SMS processing system to send a risk warning to the recipient; information instructing the SMS processing system to intercept the SMS message to prevent the recipient from receiving the SMS message content.
[0130] Among them, SMS interception refers to the SMS processing system actively interrupting the transmission during the SMS distribution process, so that the recipient cannot receive the complete content of the abnormal SMS, or cannot receive it at all.
[0131] For example, the second handling strategy information, when instructing the SMS processing system to intercept SMS messages, may also include an interception level and an interception method to perform different interception operations. For instance, the interception level may include, but is not limited to: complete interception for high-risk abnormal SMS types, partial interception for medium-risk abnormal SMS types, and delayed interception for low-risk abnormal SMS types; the interception method may include, but is not limited to: for complete interception, the SMS processing system interrupts the distribution process at the SMS gateway layer, not transmitting any SMS content to the recipient; for partial interception, the SMS processing system de-identifies the SMS content, hiding the illegal parts; for delayed interception, the SMS processing system triggers manual review, and if the review confirms an abnormality, complete interception is performed; otherwise, normal distribution occurs; if no review is performed within the timeout period, complete interception is performed by default to avoid risk spread due to delay.
[0132] The second handling strategy information, when instructing the SMS processing system to send risk alerts to the recipient, may also include interception levels to perform different interception operations. For example, interception levels may include, but are not limited to: complete interception for high-risk abnormal SMS types, and partial interception for low-risk abnormal SMS types. In a complete interception scenario, the alert message might be, "You have received a suspected fraudulent SMS message that has been blocked. Please do not click on unknown links or provide personal information through other channels." In a partial interception scenario, the alert message might be, "The SMS message you received contains inappropriate content and has been partially hidden. Please be careful."
[0133] Therefore, compared to strategies that only restrict the sender, the second strategy directly reduces interference from invalid information at the receiver. By intercepting anomalies, it can interrupt content delivery from the transmission link, physically reducing access to illegal content and preventing the receiver from directly encountering fraudulent or illegal information. Furthermore, risk warnings, through clear alerts, help the receiver build awareness and enhance user vigilance from a cognitive perspective. This significantly reduces the risk of users being scammed or having their information leaked.
[0134] Based on the SMS processing method provided in the above embodiments, this application also provides a specific implementation of the SMS processing device 600. Please refer to the following embodiments.
[0135] See Figure 7 The SMS processing device 600 provided in this application embodiment includes:
[0136] The receiving module 610 is used to receive the SMS distribution request sent by the sender, and the SMS distribution request carries the SMS message.
[0137] The first processing module 620 is used to input the SMS content of the SMS into the SMS classification model and obtain the classification result output by the SMS classification model. The classification result includes the reference SMS type of the SMS.
[0138] The first processing module 620 is also used to input the SMS content, the reference SMS type and the prompt information into the big language model to obtain the probability that the SMS output by the big language model belongs to the reference SMS type. The prompt information is used to guide the big language model to determine the probability that the SMS belongs to the reference SMS type.
[0139] The first determining module 630 is used to determine whether the SMS type is a reference SMS type based on the probability and the preset determination probability.
[0140] Therefore, the first processing module 620 uses an SMS classification model to perform preliminary analysis on the SMS content received by the receiving module 610 and outputs a reference SMS type, achieving preliminary identification of the SMS type. Next, the first processing module 620 uses a large language model to perform a secondary verification of the reference SMS type. Leveraging the large language model's ability to understand the textual context of the SMS, the probability of the SMS belonging to the reference SMS type can be accurately determined. Subsequently, the first determination module 630 combines a preset judgment probability with the probability obtained from the secondary verification to make a final judgment, determining the SMS type and further reducing the misclassification rate. Thus, through the collaborative mechanism of the rapid initial screening by the SMS classification model and the precise verification by the large language model, the accuracy of SMS classification can be significantly improved, effectively enhancing the accuracy of identifying abnormal SMS messages (such as fraudulent SMS messages).
[0141] The various modules of the SMS processing device 600 provided in this application embodiment can realize Figures 1 to 6 It provides functions for each step of SMS processing and achieves the corresponding technical effects. For the sake of brevity, it will not be described in detail here.
[0142] In some embodiments of this application, the classification result also includes a reference probability that the SMS type is a reference SMS type; the first processing module 620 in this embodiment is further used to input the SMS content, reference SMS type and prompt information into the large language model when the reference probability is greater than or equal to a preset probability, and obtain the probability that the SMS output by the large language model belongs to the reference SMS type.
[0143] In some embodiments of this application, the SMS processing device 600 may further include:
[0144] The first determination module is used to determine whether a text message meets the conditions for manual review based on the matching information between the keywords in the text message content and preset keywords.
[0145] The first prompt module is used to prompt the reviewer to review the SMS message according to the preset prompt method when it is determined that the SMS message meets the conditions for manual review.
[0146] The second processing module is used to input the SMS content into the SMS classification model and obtain the classification result output by the SMS classification model when it is determined that the SMS does not meet the conditions for manual review.
[0147] In some embodiments of this application, the SMS processing device 600 may further include:
[0148] The first acquisition module is used to acquire the review results of the reviewers on the SMS messages. The review results include the first SMS message type.
[0149] The first construction module is used to construct the first training sample by taking the SMS content as the first SMS content sample and the review result as the first annotation label based on the review result.
[0150] The second determining module is used to use the first training sample as the training sample for training the SMS classification model and / or the large language model.
[0151] In some embodiments of this application, before determining whether the SMS type is a reference SMS type based on probability and a preset determination probability, the SMS processing apparatus may further include:
[0152] The second prompt module is used to prompt the reviewers to review the content of the SMS message according to the probability and the preset prompt method.
[0153] The second acquisition module is used to acquire the review results of the reviewers on the content of the SMS messages. The review results include the second SMS type of the SMS message.
[0154] The second construction module is used to construct the second training sample by taking the SMS content as the second SMS content sample and the review result as the second annotation label based on the review result.
[0155] The third determining module is used to use the second training sample as the training sample for training the SMS classification model and / or the large language model.
[0156] In some embodiments of this application, the above-mentioned SMS processing device may further include:
[0157] The sending module is used to send an SMS message to the recipient based on the SMS message distribution request sent by the sender, which carries the recipient's receiving information.
[0158] After determining whether the SMS type is a reference SMS type based on probability and a preset judgment probability, the above-mentioned SMS processing device may further include:
[0159] The third acquisition module is used to acquire the first handling strategy information corresponding to the preset abnormal SMS type when it is determined that the SMS type of the SMS is a reference SMS type and the reference SMS type is a preset abnormal SMS type.
[0160] The third processing module is used to process the SMS message based on the first handling strategy information;
[0161] The first handling strategy information includes at least one of the following: information instructing the SMS processing system to send a risk warning to the recipient; information instructing the SMS processing system to implement restriction management to the sender.
[0162] In some embodiments of this application, after determining whether the SMS type is a reference SMS type based on probability and a preset determination probability, the SMS processing device may further include:
[0163] The fourth acquisition module is used to acquire the second handling strategy information corresponding to the preset abnormal SMS type when it is determined that the SMS type of the SMS is a reference SMS type and the reference SMS type is a preset abnormal SMS type.
[0164] The fourth processing module is used to process the SMS message through the second handling strategy information; wherein the second handling strategy information includes at least one of the following: information instructing the SMS processing system to send a risk warning to the recipient; information instructing the SMS processing system to intercept the SMS message to prevent the recipient from receiving the SMS message content.
[0165] In some embodiments of this application, the first determining module 630 described above can also be used to: determine the SMS type of the SMS as a reference SMS type when the probability is greater than or equal to a preset determination probability; and determine the SMS type of the SMS is not a reference SMS type when the probability is less than the preset determination probability.
[0166] In some embodiments of this application, the first processing module 630 described above can also be used to: input the SMS content, reference SMS type, and prompt information into a large language model, and perform the following steps through the large language model: according to the reference SMS type, obtain a set of feature factors corresponding to the reference SMS type from a preset feature factor library; match the SMS text features in the SMS content with the set of feature factors to obtain a matching result, the matching result including the degree of matching between each feature factor in the set of feature factors and the SMS text features; score each feature factor according to the matching result and the scoring rules corresponding to the reference SMS type to obtain the feature factor evaluation score corresponding to each feature factor; perform a weighted summation calculation on the feature factor evaluation scores corresponding to each feature factor according to the weight coefficients corresponding to each feature factor to obtain a comprehensive feature score; and perform probability mapping processing on the comprehensive feature score according to the prompt information, the comprehensive feature score, and a preset probability conversion rule to obtain the probability that the SMS content output by the large language model belongs to the reference SMS type.
[0167] Figure 8 The illustration shows a schematic diagram of the hardware structure of a computer device provided in some embodiments of this application.
[0168] The computer device may include a processor 701 and a memory 702 storing computer program instructions.
[0169] Specifically, the processor 701 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0170] Memory 702 may include mass storage for data or instructions. For example, and not limitingly, memory 702 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 702 may include removable or non-removable (or fixed) media. Where appropriate, memory 702 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 702 is non-volatile solid-state memory.
[0171] In a particular embodiment, memory 702 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory 702 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the SMS processing method in the above embodiments according to this application.
[0172] The processor 701 reads and executes computer program instructions stored in the memory 702 to implement any of the SMS processing methods in the above embodiments.
[0173] In one example, the computer device may also include a communication interface 703 and a bus 710. Wherein, as... Figure 8 As shown, the processor 701, memory 702, and communication interface 703 are connected through bus 710 and complete communication with each other.
[0174] The communication interface 703 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0175] Bus 710 includes hardware, software, or both, that couples components of a computer device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 710 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0176] The computer device can execute the SMS processing method in the embodiments of this application, thereby achieving the combination Figures 1 to 7 The described SMS processing method and apparatus.
[0177] Furthermore, in conjunction with the SMS processing methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the SMS processing methods in the above embodiments. Examples of computer-readable storage media include non-transitory computer-readable storage media, such as portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, etc.
[0178] Furthermore, in conjunction with the SMS processing methods in the above embodiments, this application embodiment can provide a computer program product for implementation. This program product is stored in a storage medium and may specifically include a computer program or instructions. When executed by a processor, the computer program or instructions implement any of the SMS processing methods in the above embodiments. This program product is executed by at least one processor to implement the various processes of the SMS processing method embodiments described above, and can achieve the same technical effects. To avoid repetition, further details are omitted here.
[0179] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0180] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0181] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0182] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0183] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A method for processing short messages, characterized by The method comprises: receiving a short message distribution request sent by a sender, the short message distribution request carrying a short message; inputting short message content of the short message into a short message classification model to obtain a classification result output by the short message classification model, the classification result comprising a reference short message type of the short message; inputting the short message content, the reference short message type and prompt information into a large language model to obtain a probability output by the large language model that the short message belongs to the reference short message type, the prompt information being used to guide the large language model to determine the probability that the short message belongs to the reference short message type; determining whether a short message type of the short message is the reference short message type according to the probability and a preset determination probability.
2. The method of claim 1, wherein, The classification result further comprises a reference probability that the short message type of the short message is the reference short message type. The step of inputting the short message content, the reference short message type and the prompt information into the large language model to obtain the probability that the short message belongs to the reference short message type output by the large language model comprises: in a case where the reference probability is greater than or equal to a preset probability, inputting the short message content, the reference short message type and the prompt information into the large language model to obtain the probability that the short message belongs to the reference short message type output by the large language model.
3. The method of claim 1, wherein, The method further comprises: determining whether the short message satisfies an artificial review triggering condition according to matching information between a keyword in the short message content and a preset keyword; in a case where it is determined that the short message satisfies the artificial review triggering condition, prompting a reviewer to review the short message according to a preset prompting mode; in a case where it is determined that the short message does not satisfy the artificial review triggering condition, inputting short message content of the short message into a short message classification model to obtain a classification result output by the short message classification model.
4. The method of claim 3, wherein, The method further comprises: obtaining a review result of the reviewer reviewing the short message, the review result comprising a first short message type of the short message; constructing a first training sample by taking the short message content as a first short message content sample and taking the review result as a first annotation label according to the review result; taking the first training sample as a training sample for training the short message classification model and / or the large language model.
5. The method according to any one of claims 1 to 4, characterized in that, Before the step of determining whether the short message type of the short message is the reference short message type according to the probability and a preset determination probability, the method further comprises: prompting the reviewer to review the short message content according to a preset prompting mode according to the probability; obtaining a review result of the reviewer reviewing the short message content, the review result comprising a second short message type of the short message; constructing a second training sample by taking the short message content as a second short message content sample and taking the review result as a second annotation label according to the review result; taking the second training sample as a training sample for training the short message classification model and / or the large language model.
6. The method according to any one of claims 1 to 4, characterized in that, The method further comprises: in a case where the short message distribution request sent by the sender is received, the short message distribution request carrying receiving information of a receiver, sending the short message to the receiver according to the receiving information. After determining whether the short message type of the short message is the reference short message type according to the probability and a preset determination probability, the method further includes: In a case where it is determined that the short message type of the short message is the reference short message type and the reference short message type is a preset abnormal short message type, obtaining first disposition strategy information corresponding to the preset abnormal short message type; processing the short message through the first disposition strategy information; The first disposition strategy information includes at least one of the following information: information indicating that the short message processing system sends a risk prompt to the receiver; information indicating that the short message processing system performs restriction management on the sender.
7. The method according to any one of claims 1 to 4, characterized in that, After determining whether the short message type of the short message is the reference short message type according to the probability and a preset determination probability, the method further includes: In a case where it is determined that the short message type of the short message is the reference short message type and the reference short message type is a preset abnormal short message type, obtaining second disposition strategy information corresponding to the preset abnormal short message type; processing the short message through the second disposition strategy information; The second disposition strategy information includes at least one of the following information: information indicating that the short message processing system sends a risk prompt to the receiver; information indicating that the short message processing system intercepts the short message to prevent the receiver from receiving the short message content.
8. The method of claim 1, wherein, The determination of whether the short message type of the short message is the reference short message type according to the probability and a preset determination probability includes: In a case where the probability is greater than or equal to the preset determination probability, it is determined that the short message type of the short message is the reference short message type; In a case where the probability is less than the preset determination probability, it is determined that the short message type of the short message is not the reference short message type.
9. The method of claim 1, wherein, The input of the short message content, the reference short message type and the prompt information into the large language model to obtain the probability that the short message belongs to the reference short message type output by the large language model includes: The input of the short message content, the reference short message type and the prompt information into the large language model includes the following steps performed by the large language model: According to the reference short message type, a set of characteristic factors corresponding to the reference short message type is obtained from a preset characteristic factor library; The short message text features in the short message content are matched with the set of characteristic factors to obtain a matching result, and the matching result includes the matching degree of each characteristic factor in the set of characteristic factors with the short message text features; According to the matching result and a scoring rule corresponding to the reference short message type, each characteristic factor is scored to obtain a characteristic factor evaluation score corresponding to each characteristic factor; According to the weight coefficient corresponding to each characteristic factor, the characteristic factor evaluation scores corresponding to each characteristic factor are weighted and summed to obtain a comprehensive feature score; According to the prompt information, the comprehensive feature score and a preset probability conversion rule, the comprehensive feature score is subjected to probability mapping processing to obtain the probability that the short message content belongs to the reference short message type output by the large language model.
10. A short message processing apparatus, characterized by comprising: The device includes: The receiving module is configured to receive a short message distribution request sent by a sender, the short message distribution request carrying a short message; The first processing module is configured to input short message content of the short message into a short message classification model, and obtain a classification result output by the short message classification model, the classification result including a reference short message type of the short message; The first processing module is further configured to input the short message content, the reference short message type, and prompt information into a large language model, and obtain a probability that the short message belongs to the reference short message type output by the large language model, the prompt information being used to guide the large language model to determine the probability that the short message belongs to the reference short message type; The first determining module is configured to determine whether a short message type of the short message is the reference short message type according to the probability and a preset determination probability.
11. A computer device, characterized by The computer device comprises a processor and a memory storing computer program instructions; The processor executes the computer program instructions to implement the short message processing method in any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the short message processing method in any one of claims 1-9.
13. A computer program product, characterised in that, The instructions in the computer program product are executed by the processor of the electronic device, so that the electronic device can execute the short message processing method in any one of claims 1-9.