Rich media message anti-harassment method, device, equipment, medium and product
By combining optimized Bert and Ernie models, the method identifies enterprise signature compliance and user rejection intent, solving the real-time monitoring deficiencies of existing 5G message anti-harassment solutions. It achieves end-to-end intelligent anti-harassment for rich media messages, improving the real-time performance and accuracy of anti-harassment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-03-27
AI Technical Summary
Existing 5G messaging anti-harassment solutions cannot monitor user needs in real time, nor can they identify whether information is suspected of being fraudulent, allowing criminals to exploit loopholes and failing to effectively prevent illegal and irregular activities. They are particularly unsuitable for monitoring and managing 5G messages.
An optimized BERT model is used for signature compliance detection, and an optimized Ernie model is used to identify user intention to refuse messages. Based on the signature compliance detection results and the user intention to refuse messages identification results, rich media message anti-harassment control is implemented, and information such as port sending volume, signature compliance and user intention are comprehensively analyzed.
It achieves end-to-end intelligent anti-harassment for rich media messages, accurately identifies enterprise signature compliance and user intent, effectively prevents harassing information, and improves the real-time performance and accuracy of anti-harassment.
Smart Images

Figure CN121751173A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of personal network information security technology, and in particular to a method, apparatus, device, medium and product for preventing harassment of rich media messages. Background Technology
[0002] With the widespread application of 5G technology, communication efficiency has been greatly improved, but it has also provided new means for harassing messages and fraud. Fraudulent methods not only include traditional telephone harassment, but also utilize "5G messaging" enabled by 5G, and even use large models and digital human technology to create virtual visual images for fraud.
[0003] Currently, most 5G messaging anti-harassment solutions rely solely on manual labeling and blocking, which has very limited practical applicability. Because they cannot monitor users' real-time needs or detect potential fraudulent content before message delivery, they are easily exploited by criminals, leading to violations and illegal activities. This makes them particularly unsuitable for 5G messaging monitoring and management, unable to be applied in real-world scenarios, and unable to achieve real-time and source-based anti-harassment measures. Summary of the Invention
[0004] To address the aforementioned technical issues, this disclosure provides a method, apparatus, device, medium, and product for preventing harassment of rich media messages, achieving intelligent harassment prevention of rich media information from source to terminal.
[0005] A first aspect of this disclosure provides a method for preventing harassment of rich media messages, the method comprising: The signature compliance test is performed on the rich media message port based on the optimized Bert model to identify whether the enterprise corresponding to the port is using the signature correctly and to obtain the signature compliance test result. The upstream and downstream content of rich media messages are obtained, and the user's intention to refuse the message is identified based on the user's intention to refuse the message vertical category model, so as to obtain the user's intention to refuse the message vertical category model, which is an optimized Ernie model; Based on the signature compliance test results and the user's intention to reject the message, implement anti-harassment control for rich media messages.
[0006] A second aspect of this disclosure is a rich media messaging anti-harassment device, the device comprising: The compliance detection module is configured to perform signature compliance detection on the rich media message port based on the optimized BERT model, identify whether the enterprise corresponding to the port is using the signature correctly, and obtain the signature compliance detection result; The rejection intent module is configured to acquire the uplink and downlink content of rich media messages, identify the user rejection intent based on the user rejection intent recognition and detection vertical category model, and obtain the user rejection intent recognition result. The user rejection intent recognition and detection vertical category model is an optimized Ernie model. The harassment control module is configured to implement anti-harassment control for rich media messages based on signature compliance detection results and user rejection intent recognition results.
[0007] A third aspect of this disclosure provides an electronic device, comprising: At least one processor; Memory for storing the at least one processor-executable instruction; The at least one processor is used to execute the instructions to implement the above-described method.
[0008] A fourth aspect of this disclosure provides a computer-readable storage medium that, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the methods described above.
[0009] A fifth aspect of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the rich media message anti-harassment method described above.
[0010] The above-mentioned at least one technical solution adopted in this disclosure embodiment can achieve the following beneficial effects: This disclosure embodiment performs signature compliance detection on the rich media message port signature based on the optimized Bert model, which can accurately identify whether the enterprise is using the signature correctly; based on the optimized Ernie model, the upstream content, downstream content, enterprise name and signature compliance detection result of the rich media message are input, and the probability of rejection intent is output, which can accurately identify the user intent; further, by comprehensively integrating information such as the rich media message port sending volume, signature compliance and user intent, rich media message anti-harassment control is performed, which can effectively realize the anti-harassment of rich media messages. Attached Figure Description
[0011] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0012] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a schematic flowchart of a method for preventing harassment via rich media messages, provided in an embodiment of this disclosure. Figure 2 This is a schematic flowchart illustrating another method for preventing harassment via rich media messages, provided in an embodiment of this disclosure. Figure 3 This disclosure provides a schematic diagram of the structure of a rich media message anti-harassment device. Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure; Figure 5 This is a schematic diagram of the structure of an exemplary computer system provided in an embodiment of the present disclosure. Detailed Implementation
[0014] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0015] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0016] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0017] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0018] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0019] Before explaining this disclosure, the terms used in this disclosure will be explained for ease of understanding.
[0020] I. BERT Model BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained language model proposed by Google in 2018. Its core is based on the bidirectional encoder structure of Transformers. By pre-training on large-scale unlabeled text corpora, it learns the deep semantic features of text and can be fine-tuned to adapt to various natural language processing (NLP) tasks (such as classification, similarity calculation, named entity recognition, etc.).
[0021] Unlike traditional one-way language models (which only model from left to right or right to left), the BERT model can combine the contextual information of a word in the text (the text on the left and right sides) to capture the semantic relationships of the text more accurately, making it especially suitable for scenarios that require a deep understanding of the text logic.
[0022] II. Ernie Model Ernie (Enhanced Representation through kNowledge IntEgration) is a knowledge-enhanced pre-trained language model proposed by Baidu. Its core is based on the Transformer architecture. By fusing unstructured text data with structured knowledge graphs for training, it has stronger semantic understanding, knowledge association and ambiguity resolution capabilities. Compared with traditional pre-trained models (such as BERT), it is better at handling natural language processing (NLP) tasks that require the combination of domain knowledge (such as intent recognition, text classification, semantic matching, etc.).
[0023] The Ernie model can capture deep semantics at the word, phrase, and sentence levels of text, and can also connect external information through knowledge graphs to accurately understand the true intent behind the text, making it particularly suitable for user intent recognition in complex scenarios.
[0024] The following is combined with Figures 1-5 This document describes the methods, apparatus, devices, media, and products for preventing harassment of rich media messages provided in the embodiments of this disclosure.
[0025] Figure 1 This is a schematic flowchart of a method for preventing harassment via rich media messages, provided in an embodiment of this disclosure. Figure 1 As shown, the method includes: S101. Based on the optimized BERT model, perform signature compliance detection on the rich media message port to identify whether the enterprise corresponding to the port is using the signature correctly and obtain the signature compliance detection result. Rich media messages refer to messages that include various media formats such as text, images, audio, video, links, and interactive buttons. They differ from traditional plain text messages and have multimedia carrying and interactive capabilities.
[0026] In some embodiments, rich media messages include, but are not limited to: 5G messages, RCS messages (converged communication messages), and various multimedia interactive messages under 4G / 5G networks.
[0027] The loss function of the optimized Bert model includes a loss term representing the similarity between the company name and the signature.
[0028] In this embodiment, the introduction of enterprise business relevance into the BERT model loss function and its application to rich media message port signature compliance detection improves the accuracy of compliance detection, solves the misjudgment problem of traditional models relying solely on text similarity, and accurately matches signatures with enterprise business associations. Furthermore, it strengthens correlation verification, reduces the false negative rate of illegal signatures, and provides a reliable source basis for anti-harassment control. Moreover, it can adapt to complex scenarios involving multiple businesses and multiple signatures, improving the universality and scalability of detection. Additionally, it can strengthen end-to-end collaboration, output high-quality compliance features to support the next step of reject intent identification, and improve the overall accuracy of anti-harassment.
[0029] S102. Obtain the uplink and downlink content of the rich media message, identify the user's intention to refuse the message based on the user's intention to refuse the message vertical category model, and obtain the user's intention to refuse the message identification result. The user's intention to refuse the message vertical category model is an optimized Ernie model. Includes the following steps: S1021. Classification and detection of downstream content in rich media messages and construction of port profiles; This embodiment of the disclosure uses a decision tree model to classify the content sent from each port into categories such as notification, debt collection, financial marketing, retail marketing, other marketing, and others, which facilitates further refinement of port types and the construction of a port profiling system.
[0030] S1022. Identification of user's intention to refuse; The user's intention to refuse delivery is identified based on a vertical model that identifies the user's intention to refuse delivery, and the result of the user's intention to refuse delivery is obtained.
[0031] The user rejection intent identification and detection vertical model is an optimized Ernie model. The loss function of the optimized Ernie model includes: the similarity between downlink content categories, and the probability of consistency between the enterprise name and the signature compliance. Considering the correlation between downlink content categories in rich media messaging ports, the mixed distribution of content across ports, and port compliance issues, in order to reduce the impact of these factors, the similarity between downlink content categories and the consistency probability of enterprise name and signature compliance are added to the loss function of the original model as part of the training or fine-tuning process. This aims to minimize the mutual influence in these aspects and improve the overall accuracy.
[0032] S103. Based on the signature compliance test results and the user's intention to refuse the message, implement anti-harassment control for rich media messages.
[0033] This step combines information such as port transmission volume, signature compliance probability, downlink content category, and user intention to reject messages to implement rich media message anti-harassment control, achieving real-time, automatic, and seamless protection of users' communication security.
[0034] This disclosed embodiment analyzes the upstream and downstream content of messages and the compliance of signatures based on the signatures of rich media message ports and industry upstream and downstream message content. It uses a newly improved Ernie model to extract text features, identify user intent, and integrate information such as the volume of rich media message port transmissions, signature compliance, and user intent to effectively prevent harassment of rich media messages.
[0035] Figure 2 This is a schematic flowchart illustrating another method for preventing harassment via rich media messages provided in this disclosure embodiment, such as... Figure 2 As shown, the method includes: S201. Obtain the company name and signature information of the rich media message port; This step is the data source input for the compliance testing of rich media message port signatures. It involves accurately and completely extracting the enterprise entity information and port signature information corresponding to the port to be tested from the transmission link and filing database of rich media messages, ensuring the authenticity, relevance and completeness of the data in subsequent preprocessing and model testing.
[0036] Specifically, the steps include the following: S2011. Determine the range of rich media message ports to be detected; Obtain the list of ports to be detected from the operator's rich media messaging gateway system, including three types of ports: enterprise-owned ports, operator-allocated ports, and third-party service ports; For each type of port, mark the port's basic attributes: port number, the type of business the port belongs to (e.g., finance, retail, government affairs), the port's opening time, and the port's current status (enabled / disabled).
[0037] S2012. Extract enterprise name information from the enterprise registration system; Based on the port number, the system retrieves the enterprise entity information corresponding to the port from the operator's rich media message port filing database.
[0038] Key information: Full name of the company, abbreviation of the company, unified social credit code of the company, and industry to which the company belongs; Supporting information: Purpose of the port used for enterprise registration, and scope of signature use authorized by the enterprise; Data verification: Verify the relationship between the port number and the enterprise entity's filing, and remove port data with missing filing information or invalid relationships.
[0039] S2013, Extract port signature information from rich media message transmission messages; Monitor the downlink transmission link of rich media messages and capture the raw message data sent by the port to be monitored; Extract the actual signature content used by the port from the message's signature field, including: Explicit signature: A signature directly embedded in the message header or body (e.g., "XX Finance"); Implicit signature: The default signature that is not explicitly marked but is bound to the port; Deduplication: For different signatures used on the same port at different time periods, deduplication is performed and the signatures are aggregated to form a signature set for that port.
[0040] S2014. Establish a mapping table that associates port, company name, and signature; A structured association table is constructed using the port number as the unique identifier. The fields include: port number, full name of the enterprise, abbreviation of the enterprise, industry, filing signature, actual signature used, and signature usage timestamp. Data labeling: Perform validity labeling on the data in the associated table to distinguish between states such as the signature on file being consistent with the actual signature, the actual signature not being filed, and multiple signatures being used interchangeably.
[0041] S2015, Data Quality Verification and Anomaly Filtering.
[0042] Filtering rule 1: Remove invalid data with empty company names or empty signatures; Filtering rule 2: Remove abnormal data where the port status is "disabled" but there are still message sending records; Filtering rule 3: Verify the legality of the company name (e.g., whether it contains illegal characters) to ensure that the input data meets the format requirements of subsequent preprocessing.
[0043] In this embodiment, the enterprise name and signature information of the rich media message port are obtained. The enterprise name and actual signature are associated through the port number, which solves the problem of unclear signature ownership and provides a basis for subsequent matching and detection of enterprise name and signature information, ensuring the relevance of the data. Furthermore, data is obtained from both the filing system and the transmission message, avoiding information distortion from a single data source and ensuring data authenticity. Moreover, through structured association tables and anomaly filtering, invalid calculations in the preprocessing stage are reduced, ensuring the accuracy of model detection and thus improving the efficiency of subsequent processing.
[0044] S202. Preprocess the enterprise name and signature information; The preprocessing includes at least one of the following: conversion of traditional Chinese characters, replacement of numbers and special symbols, correction of typos, and conversion of text to pinyin. The replacement of numbers and special characters involves replacing numbers and special characters in the company name and signature information with corresponding Chinese expressions or deleting them. Understandably, unprocessed company names and signature data are often messy and noisy, and directly inputting them into the model would increase the model's computational burden and may lead to instability during model training. The preprocessing in this embodiment of the disclosure converts all text into "clean data" in a uniform format through standardized operations. This reduces the model's unnecessary computation, improves inference speed, and allows the model to learn more stable semantic features during training, ensuring the consistency of detection results across different batches of data.
[0045] S203. Based on the optimized Bert model, perform signature compliance detection on the rich media message port to identify whether the enterprise corresponding to the port is using the signature correctly and obtain the signature compliance detection result. The loss function of the optimized Bert model includes a loss term representing the similarity between the company name and the signature.
[0046] Calculate the text similarity between the company name and the signature: Use a text similarity algorithm to calculate the similarity between the feature vectors of the two. The algorithm can be at least one of cosine similarity, edit distance, and Jaccard similarity. For example, when using cosine similarity, the similarity is obtained by calculating the cosine of the angle between the two feature vectors (the value is 0 to 1, and the closer it is to 1, the higher the similarity). In this embodiment of the disclosure, the degree of matching between the company name and the signature is quantified by calculating the text similarity between the two, thereby optimizing the accuracy of the model in judging the compliance of the signature.
[0047] The loss function of the optimized BERT model is: ;in, For word-level classification loss function; Sentence-level classification loss function; This is the similarity loss term between the company name and the signature.
[0048] The above This is the sum of the log-likelihoods of all word-level samples; maximizing this value is equivalent to minimizing the prediction bias of word-level classification. Wherein, The basic parameters for optimizing the BERT model; Parameters specific to word-level classification tasks; The total number of samples for word-level classification; Predicted labels for word-level classification; The sample index for the word-level classification task is traversed 1. M word-level samples; For the first The true labels of each word-level sample.
[0049] The above This involves maximizing the log-likelihood of all sentence-level samples and minimizing the bias in sentence-level classification, allowing the model to learn to determine the semantic category of a sentence. The basic parameters for optimizing the BERT model; Parameters specific to sentence-level classification tasks; The total number of samples for sentence-level classification; Predicted labels for sentence-level classification; For the sample index of the sentence-level classification task, iterate through 1 A sample of sentences; For the first The true labels of each sentence-level sample.
[0050] The above This quantifies the matching deviation between the company name representation and the signature representation. Among them, The weight hyperparameters for similarity loss; The total number of samples with matching company name and signature; Index of company name - signature sample pair, traversing 1 One sample pair; For the first The similarity loss value of each matching pair.
[0051] The signature compliance test result is represented by a compliance probability, which ranges from 0 to 1. The closer the compliance probability is to 1, the higher the signature compliance. The preprocessed information is input into the optimized BERT model, which outputs the signature compliance detection probability. Compared with the traditional "black and white" judgment method, the compliance probability output by the optimized BERT model can quantify the degree of compliance.
[0052] When the compliance probability is greater than the preset threshold P2, the signature of the port is determined to be compliant; when the compliance probability is less than the preset threshold P0, the signature of the port is determined to be non-compliant.
[0053] For example, the preset threshold P0 has a value range of 0.4 to 0.6, and the preset threshold P2 has a value range of 0.6 to 0.8.
[0054] By presetting thresholds P2 and P0, the determination strictness can be flexibly adjusted according to the actual application scenario to adapt to different regulatory requirements.
[0055] Table 1 shows examples of signature compliance and non - compliance, as shown in Table 1: Table 1
[0056] In some embodiments, the signature compliance detection further includes: identifying whether there are violations such as forging the enterprise name or misusing the signature at the port.
[0057] In some embodiments, when performing signature compliance detection based on the optimized Bert model, the violation types are also output, and the violation types include at least one of signature not matching the enterprise name, signature containing violation characters, and signature misappropriation.
[0058] In the embodiments of the present disclosure, introducing enterprise business relevance into the loss function of the Bert model and using it for rich - media message port signature compliance detection can improve the accuracy of compliance detection, solve the misjudgment problem of traditional models relying only on text similarity, and accurately match the signature with the enterprise business association; moreover, strengthen the relevance verification, reduce the missed detection rate of violation signatures, and provide a reliable source basis for anti - harassment control; and can adapt to the complex scenarios of multiple enterprise services and multiple signatures, improve the universality and scalability of detection, and can strengthen the whole - process collaboration, output high - quality compliance features to support the next - step rejection intention recognition, and improve the overall accuracy of anti - harassment.
[0059] S204. Classification detection of rich - media message downlink content and port portrait construction; S2041. Downlink content data collection and pre - processing; Data collection: Real - time capture all - volume message texts sent from the待检测端口 (to - be - detected port) at the gateway node of the rich - media message downlink transmission link, synchronously associate auxiliary information such as port number, message sending timestamp, and number of message receiving users, and form an associated data set; among them, the collection time window for a single port is set to 24 hours to ensure coverage of the main downlink content types of the port.
[0060] Data pre - processing: Perform standardization processing on the collected message texts to eliminate text noise, specifically including: filtering URL links, verification codes, and dynamic parameters (such as "123456" in "XX verification code: 123456") in the messages; performing word segmentation and stop - word removal (such as words without classification meaning like "的", "了", "为您", etc.) on the text; converting half - angle symbols to full - angle symbols to unify the text format, and obtaining standardized text data.
[0061] S2042. Execution of downlink content classification; The rich media message content obtained includes at least one of the following categories: notifications, debt collection, financial marketing, retail marketing, other marketing, and others.
[0062] Table 2 shows examples of the categories for the downstream content of rich media messages: Table 2
[0063] In this embodiment, a decision tree model is used to classify the downstream content of the rich media message to obtain the category of the downstream content. The downlink content (standardized text data) of the rich media message is input into the trained decision tree model. The model outputs the classification label and classification confidence score (range 0~1) for each message. For example, a classification confidence score ≥0.8 is considered a valid classification result. For messages with a classification confidence score <0.8, they are transferred to the manual review stage, where the labeling personnel confirm the classification label.
[0064] Table 3 shows examples of the classification results for downlink content on different ports. Table 3
[0065] S2043, Port profiling system construction; Specifically, it includes: S20431, Port core attribute annotation; Using the port number as a unique identifier, based on the classification results of step S2042, the sending percentage of each type of message on a single port within a preset time window (e.g., 7 days) is calculated; if the sending percentage of a certain type of message is ≥60%, then the type is marked as the "core content attribute" of the port; if there are two or more types of messages with a sending percentage of ≥30%, then it is marked as a "mixed port with multiple content attributes".
[0066] S20432, Port Profile Field Definition; Construct a structured port profile, with core fields including: port number, core content attributes, multiple content attribute tags, percentage of message sending for each category, average daily message sending volume, coverage of message receiving users, and industry. Among these, the core content attributes are the core dimensions of the profile and are used for subsequent anti-harassment and related control.
[0067] S20433, Constructing a profile; Based on the above classification results, a typical port profile is constructed as follows: Port 10086 profile: Core content attribute = notification type, message sending percentage (notification type = 98%, other types = 2%), average daily sending volume = 500,000 messages, industry = communication services; Port 10085 profile: Core content attribute = notification type, message sending percentage (notification type = 95%, other types = 5%), average daily sending volume = 300,000 messages, industry = communication services; 955XX Bank Portal Profile: Core Content Attributes = Mixed Attributes (Notifications = 65%, Financial Marketing = 35%), Daily Sending Volume = 200,000 Messages, Industry = Financial Services; 400XXXXXXX Retail Port Profile: Core Content Attribute = Retail Marketing, Message Sending Percentage (Retail Marketing = 92%, Others = 8%), Average Daily Sending Volume = 150,000 Messages, Industry = Retail Services.
[0068] S2044: Application integration of classification results and port profiling.
[0069] The completed port profiles are stored in the rich media message anti-harassment database to provide core association basis for subsequent anti-harassment control: For ports with the same core content attributes, a set of ports with the same attributes is established (for example, ports 10086 and 10085 are both classified into the notification port set); when a user triggers the blocking operation of a certain port, the system can recommend to the user whether to block other ports with the same attributes at the same time based on the association set, so as to achieve precise control of "blocking multiple screens with one block" and improve the efficiency of anti-harassment.
[0070] This disclosure uses a decision tree model to categorize the content sent from each port into notification, debt collection, financial marketing, retail marketing, other marketing, and other categories. This facilitates further refinement of port types and the construction of a port profile system. Ports 10086 and 10085 are both notification types. If a user rejects messages from port 10086, port 10085 will also be blocked, laying the groundwork for the subsequent construction of a rich media message anti-harassment system.
[0071] S205. Identification of user's intention to refuse; This step identifies the user's intention to refuse delivery based on a vertical model for user refusal intent detection, and obtains the user refusal intent identification result.
[0072] The user rejection intent identification and detection vertical model is an optimized Ernie model. The loss function of the optimized Ernie model includes: the similarity between downlink content categories, and the probability of consistency between the enterprise name and the signature compliance. Considering the correlation between downlink content categories in rich media messaging ports, the mixed distribution of content across ports, and port compliance, in order to reduce the impact of these factors, the similarity between downlink content categories and the consistency probability of enterprise name and signature compliance are added to the loss function of the original model as part of training or fine-tuning. This can minimize the mutual influence in these aspects and improve the overall accuracy.
[0073] The loss function of the optimized Ernie model is: ; in, For word-level classification loss function; Sentence-level classification loss function; Similarity between downlink content categories; The probability of consistency between the company name and the signature compliance.
[0074] The above It measures the prediction bias of the model on word-level classification tasks and constrains the model to learn word-level semantic features. Among these, The basic parameters for optimizing the Ernie model; Parameters specific to word-level classification tasks; The total number of samples for word-level classification; Predicted labels for word-level classification; The sample index for the word-level classification task is traversed 1. M word-level samples; For the first The true labels of each word-level sample.
[0075] The above It measures the prediction bias of the model on sentence-level classification tasks, constraining the model to learn sentence-level semantic features. Among these, The basic parameters for optimizing the Ernie model; Parameters specific to sentence-level classification tasks; The total number of samples for sentence-level classification; Predicted labels for sentence-level classification; For the sample index of the sentence-level classification task, iterate through 1 A sample of sentences; For the first The true labels of each sentence-level sample.
[0076] The above The constraint model makes related content categories in downstream business more similar in semantic space, strengthening the logical connections between categories. Among these, These are weighting coefficients used to balance the importance of this loss with the first two classification losses: The larger the value, the more the model focuses on learning the association features of content categories; The total number of pairings for downlink content categories; For the index of the downlink content category sample pairs, iterate through 1 Matching by category; For the first The similarity metric for each matching pair.
[0077] The above The constraint model makes related content categories in downstream business more similar in semantic space, strengthening the logical connections between categories. Among these, These are weighting coefficients used to balance the importance of this loss with other losses: The larger the value, the more the model focuses on learning the compliance consistency between the company name and the signature; The total number of company name-signature sample pairs; For the index of the company name-signature sample pair, iterate through 1 One pair; For the first The compliance consistency probability value of each sample pair The closer it is to 1, the higher the consistency. The closer to 0, the lower the consistency.
[0078] Among them, the user's intention to refuse is identified as the probability of refusal. The probability of refusal ranges from 0 to 1. The closer the probability of refusal is to 1, the stronger the user's intention to refuse. Standardized preprocessing and data alignment are performed on the multi-dimensional input information to obtain the model input data. The multi-dimensional input information includes: the upstream content of the rich media message, the downstream content classification results and the similarity between categories, and the compliance detection results of the company name and signature. The input data is fed into the optimized Ernie model, which outputs the probability of rejection intent. When the probability of rejection intent is greater than the preset threshold P1, it is determined that the user has a clear intention to reject the data. When the probability of rejection intent is less than the preset threshold P3, it is determined that the user has no intention to reject the data.
[0079] For example, the preset threshold P1 has a value range of 0.7 to 0.9, and the preset threshold P3 has a value range of 0.4 to 0.6.
[0080] It is understandable that the user rejection intent recognition and detection vertical model is obtained by fine-tuning the Ernie model using the upstream content of rich media message users as training data.
[0081] Among them, the content sent by users of rich media messages, such as text and voice-to-text messages (e.g., "Stop sending ads" or "What is this message?"), is the core basis for judging the user's subjective intent.
[0082] The training data includes at least one of the following: user-sent rejection instructions, question feedback, and complaint content. To address the issue that traditional models cannot distinguish between different types of content a user might reject, this embodiment links port compliance with user intent, avoiding misjudgments of intent caused by ignoring port compliance. Simultaneously, the improved loss function, through collaborative optimization of multiple loss terms, enables the model to simultaneously possess accurate text semantic understanding, content category association awareness, and compliance attribute association capabilities. The output rejection intent probability more closely reflects the user's true intention, providing a reliable basis for subsequent precise control.
[0083] S206. Based on the signature compliance test results and the user's intention to refuse the message, implement anti-harassment control for rich media messages.
[0084] This step combines information such as port transmission volume, signature compliance probability, downlink content type, and user rejection probability to achieve real-time, automatic, and seamless protection of user communication security.
[0085] The anti-harassment control includes a three-level control system that combines port transmission volume, signature compliance test results, downlink content category, and user intention to refuse to receive messages.
[0086] The three-tiered control system includes three levels: rejection, pending confirmation, and non-rejection. 1) Rejection Level: When the port sending volume exceeds the preset threshold V0, the signature compliance probability is less than P0, and the user's intention to reject is greater than P1, it is judged as a rejection level, and the same type of port blocking operation is performed.
[0087] The "same type port" refers to a rich media message port whose downlink content category is consistent with the current port.
[0088] For example, when the number of packets sent to a port is greater than 100,000, the probability of signature compliance is less than 0.5, and the probability of user intention to reject is greater than 0.8, then the user's intention for that port is "to reject", and all ports with the same downlink content category as that port will be blocked.
[0089] 2) Non-rejection level: When the port sending volume is less than the preset threshold V1, the signature compliance probability is greater than P2, and the user's intention to reject is less than P3, it is judged as non-rejection level, and the message is allowed to be sent normally; For example, if the number of packets sent to a port is less than 1000, the probability of signature compliance is greater than 0.6, and the probability of user rejection is less than 0.5, then the user's intention for that port is "not to reject".
[0090] 3) Pending Confirmation Level: All other cases are judged as pending confirmation level, and a confirmation pop-up window will be displayed to the user.
[0091] If the port does not belong to either 1) or 2), the user's intent for the port is "pending confirmation," and a pop-up will appear in the port list asking whether to add it to the rejection list for the user to confirm.
[0092] For example, the preset threshold V0 ranges from 100,000 to 500,000 records, and the preset threshold V1 ranges from 500 to 2,000 records.
[0093] In this embodiment, by analyzing basic information such as the signature of the rich media message port and the content of upstream and downstream messages in the industry, we can deeply analyze the characteristics of the upstream and downstream content of the message and whether the signature is compliant. We use the newly improved Ernie model to extract text features, identify user intent, and combine information such as the sending volume of the rich media message port, whether the signature is compliant and the user intent to effectively prevent harassment of rich media messages.
[0094] The rich media messaging anti-harassment solution provided in this disclosure creates a green, secure, reliable, and non-disruptive rich media messaging port ecosystem, facilitating the monitoring and management of rich media messaging ports and solving various issues faced by the industry, such as security compliance, user experience, and precision marketing.
[0095] The above description is only a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, several improvements, optimizations and modifications can be made without departing from the principle of the present invention, and these should also be considered within the scope of protection of the present invention.
[0096] Figure 3 This is a schematic diagram of the structure of a rich media message anti-harassment device provided in an embodiment of this disclosure, as shown below. Figure 3 As shown, the device 300 includes: The compliance detection module 301 is configured to perform signature compliance detection on the rich media message port based on the optimized BERT model, identify whether the enterprise corresponding to the port is using the signature correctly, and obtain the signature compliance detection result. The rejection intent module 302 is configured to acquire the uplink and downlink content of rich media messages, identify the user rejection intent based on the user rejection intent recognition and detection vertical category model, and obtain the user rejection intent recognition result. The user rejection intent recognition and detection vertical category model is an optimized Ernie model. Harassment control module 303 is configured to perform anti-harassment control of rich media messages based on signature compliance detection results and user rejection intent recognition results.
[0097] This disclosed embodiment analyzes the upstream and downstream content of messages and the compliance of signatures based on the signatures of rich media message ports and industry upstream and downstream message content. It uses a newly improved Ernie model to extract text features, identify user intent, and integrate information such as the volume of rich media message port transmissions, signature compliance, and user intent to effectively prevent harassment of rich media messages.
[0098] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as... Figure 4 As shown, this disclosure also provides an electronic device 400, which includes at least one processor 401 and a memory 402 coupled to the processor 401. The memory 402 is used to store at least one processor 401 executable instructions, wherein the at least one processor 401 is used to execute the instructions to implement the steps of the method described above in this disclosure.
[0099] The processor 401 described above can also be referred to as a Central Processing Unit (CPU), which can be an integrated circuit chip with signal processing capabilities. Each step in the method described in this embodiment can be implemented by the integrated logic circuitry in the hardware of the processor 401 or by instructions in software form. The processor 401 described above can be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method in conjunction with this embodiment can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in the memory 402, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor 401 reads information from the memory 402 and, in conjunction with its hardware, completes the steps of the method described above.
[0100] Figure 5 This is a schematic diagram of an exemplary computer system provided by an embodiment of the present disclosure. Various operations / processes according to embodiments of the present disclosure, implemented via software and / or firmware, can be transmitted from a storage medium or network to a computer system with a dedicated hardware architecture, for example... Figure 5The computer system 500 shown is equipped with the programs that constitute the software. When various programs are installed, the computer system is able to perform various functions, including those described above.
[0101] Computer system 500 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of this disclosure described and / or claimed herein.
[0102] like Figure 5 As shown, the computer system 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 may also store various programs and data required for the operation of the computer system 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0103] Multiple components in the computer system 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 can be any type of device capable of inputting information into the computer system 500. The input unit 506 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 507 can be any type of device capable of presenting information and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. The storage unit 508 may include, but is not limited to, a hard disk and an optical disk. The communication unit 509 allows the computer system 500 to exchange information / data with other devices via a network such as the Internet, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, Wi-Fi devices, WiMax devices, cellular communication devices, and / or the like.
[0104] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the methods described in the embodiments of this disclosure can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on an electronic device via ROM 502 and / or communication unit 509. In some embodiments, the computing unit 501 can be configured to perform the methods described in the embodiments of this disclosure by any other suitable means (e.g., by means of firmware).
[0105] This disclosure provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the methods described in this disclosure.
[0106] Computer-readable storage media can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0107] It should be noted that the computer-readable storage medium described in this disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), or any suitable combination thereof.
[0108] Embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for preventing harassment of rich media messages.
[0109] In embodiments of this disclosure, computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof. These programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on a computer, partially on a computer, as a standalone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0110] The modules, components, or units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules, components, or units do not necessarily constitute a limitation on the module, component, or unit itself.
[0111] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that can be used include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), etc.
[0112] It should be noted that, in this document, terms such as "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 limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0113] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for preventing harassment via rich media messaging, characterized in that, include: The signature compliance test is performed on the rich media message port based on the optimized Bert model to identify whether the enterprise corresponding to the port is using the signature correctly and to obtain the signature compliance test result. The upstream and downstream content of rich media messages are obtained, and the user's intention to refuse the message is identified based on the user's intention to refuse the message vertical category model, so as to obtain the user's intention to refuse the message vertical category model, which is an optimized Ernie model; Based on the signature compliance test results and the user's intention to reject the message, implement anti-harassment control for rich media messages.
2. The method according to claim 1, characterized in that, The loss function of the optimized Bert model includes a loss term representing the similarity between the company name and the signature.
3. The method according to claim 2, characterized in that, The loss function of the optimized BERT model is: ; in, For word-level classification loss function; Sentence-level classification loss function; This is the similarity loss term between the company name and the signature.
4. The method according to claim 3, characterized in that, Before performing signature compliance checks on the rich media message port based on the optimized BERT model, identifying whether the enterprise corresponding to the port is using the signature correctly, and obtaining the signature compliance check result, the following steps are also included: Obtain the company name and signature information for the rich media messaging port.
5. The method according to claim 4, characterized in that, After obtaining the enterprise name and signature information of the rich media message port, the following is also included: The company name and signature information are preprocessed, and the preprocessing includes at least one of the following: conversion to traditional Chinese characters, replacement of numbers and special symbols, correction of typos, and conversion of text to pinyin.
6. The method according to claim 5, characterized in that, The optimized BERT model performs signature compliance checks on the rich media message port's signature, identifying whether the enterprise corresponding to the port is using the signature correctly, and obtaining the signature compliance check results, including: The preprocessed information is input into the optimized BERT model, which outputs the signature compliance detection probability. When the compliance probability is greater than the preset threshold P2, the signature of the port is determined to be compliant; when the compliance probability is less than the preset threshold P0, the signature of the port is determined to be non-compliant.
7. The method according to claim 6, characterized in that, The preset threshold P0 has a value range of 0.4 to 0.6, and the preset threshold P2 has a value range of 0.6 to 0.
8.
8. The method according to claim 4, characterized in that, The replacement of numbers and special characters involves replacing numbers and special characters in the company name and signature information with corresponding Chinese expressions or deleting them.
9. The method according to claim 1, characterized in that, The downlink content of the acquired rich media messages includes at least one of the following categories: notifications, debt collection, financial marketing, retail marketing, other marketing, and others.
10. The method according to claim 9, characterized in that, A decision tree model is used to classify the downstream content of rich media messages to obtain the categories of the downstream content.
11. The method according to claim 1, characterized in that, The loss function of the optimized Ernie model includes: the similarity between downlink content categories, and the probability of consistency between the enterprise name and the signature compliance.
12. The method according to claim 11, characterized in that, The loss function of the optimized Ernie model is: ; in, For word-level classification loss function; Sentence-level classification loss function; Similarity between downlink content categories; The probability of consistency between the company name and the signature compliance.
13. The method according to claim 12, characterized in that, Standardized preprocessing and data alignment are performed on the multi-dimensional input information to obtain the model input data. The multi-dimensional input information includes: the upstream content of the rich media message, the downstream content classification results and the similarity between categories, and the compliance detection results of the company name and signature. The input data is fed into the optimized Ernie model, which outputs the probability of rejection intent. When the probability of rejection intent is greater than a preset threshold P1, it is determined that the user has a clear intention to reject the message. When the probability of rejection intent is less than a preset threshold P3, it is determined that the user has no intention to reject the message.
14. The method according to claim 13, characterized in that, The preset threshold P1 has a value range of 0.7 to 0.9, and the preset threshold P3 has a value range of 0.4 to 0.
6.
15. The method according to claim 1, characterized in that, The user rejection intent recognition and detection vertical model is obtained by fine-tuning the Ernie model using the upstream content of rich media message users as training data.
16. The method according to claim 15, characterized in that, The training data includes at least one of the following: user-sent rejection instructions, question feedback, and complaint content.
17. The method according to claim 1, characterized in that, The anti-harassment control includes a three-level control system that combines port transmission volume, signature compliance detection results, downlink content category, and user rejection intent identification results.
18. The method according to claim 17, characterized in that, The three-tiered control system includes three levels: rejection, non-rejection, and pending confirmation. When the port transmission volume exceeds the preset threshold V0, the signature compliance probability is less than P0, and the user's intention to reject the message is greater than P1, it is determined to be a rejection level, and the same type of port blocking operation is performed. When the port sending volume is less than the preset threshold V1, the signature compliance probability is greater than P2, and the user's intention to reject the message is less than P3, it is determined to be a non-rejection level and the message is allowed to be sent normally. In other cases, the status is determined to be pending confirmation, and a confirmation pop-up will be displayed to the user.
19. The method according to claim 18, characterized in that, The preset threshold V0 ranges from 100,000 to 500,000 records, and the preset threshold V1 ranges from 500 to 2,000 records.
20. The method according to claim 19, characterized in that, The "same type port" refers to a rich media message port whose downlink content category is consistent with the current port.
21. The method according to claim 1, characterized in that, When performing signature compliance detection based on the optimized BERT model, the violation type is also output. The violation type includes at least one of the following: signature does not match the company name, signature contains illegal characters, and signature is misused.
22. The method according to claim 1, characterized in that, The rich media messaging port includes at least one of the following: enterprise-owned port, carrier-allocated port, and third-party service port.
23. The method according to claim 1, characterized in that, The upstream content of the rich media message includes at least one of the following: text messages actively sent by the user, voice-to-text messages, and text representations corresponding to emoticons.
24. A device for preventing harassment via rich media messaging, characterized in that, The device includes: The compliance detection module is configured to perform signature compliance detection on the rich media message port based on the optimized BERT model, identify whether the enterprise corresponding to the port is using the signature correctly, and obtain the signature compliance detection result; The rejection intent module is configured to acquire the uplink and downlink content of rich media messages, identify the user rejection intent based on the user rejection intent recognition and detection vertical category model, and obtain the user rejection intent recognition result. The user rejection intent recognition and detection vertical category model is an optimized Ernie model. The harassment control module is configured to implement anti-harassment control for rich media messages based on signature compliance detection results and user rejection intent recognition results.
25. An electronic device, characterized in that, include: At least one processor; Memory for storing the at least one processor-executable instruction; The at least one processor is configured to execute the instructions to implement the method as described in any one of claims 1-23.
26. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1-23.
27. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for preventing harassment of rich media messages as described in any one of claims 1-23.