Instant communication message dynamic shielding method and device, computer equipment and storage medium
By automatically acquiring and classifying complaint instant messaging messages, combined with the identification properties of user historical complaint profiles, the problem of low manual processing efficiency is solved, and fast and accurate shielding of instant messaging messages is achieved.
Patent Information
- Application Number
- CN202510845847.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-09-05
AI Technical Summary
In existing instant messaging message blocking technologies, manual processing of complaint instant messaging messages is cumbersome, time-consuming, and difficult to achieve real-time or near real-time blocking, resulting in low complaint handling efficiency and prone to misjudgment or omissions.
By automatically obtaining the content of complaint instant messaging messages, extracting key information, and using natural language processing and machine learning for classification, the nature of the complaint is identified based on the user's historical complaint profile and corresponding blocking strategies are implemented to reduce manual intervention.
It achieves rapid processing of complaint instant messaging messages, improves processing efficiency, reduces misjudgments and omissions, and enhances the accuracy and real-time nature of shielding.
Smart Images

Figure CN120602448A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of instant messaging message shielding, and more specifically to a method, device, computer equipment and storage medium for dynamic shielding of instant messaging messages. Background Art
[0002] In fields like finance and healthcare, instant messaging has become an indispensable tool for daily communication. However, with the widespread use of instant messaging, issues like harassment, spam, and malicious complaints have become increasingly prominent, causing significant distress and inconvenience for users. To address this issue, instant messaging blocking technology has emerged, aiming to intercept and filter unnecessary instant messaging messages, thereby improving the user experience.
[0003] Currently, in the practical application of instant messaging message blocking technology, especially in handling user complaint instant messaging messages, most companies or organizations still rely on traditional manual processing methods. Specifically, upon receiving a complaint instant messaging message submitted by a user, processing personnel must manually search the system for the involved mobile phone number and select the appropriate blocking type based on the content of the complaint, such as high-frequency complaints, malicious complaints, etc. This process is not only cumbersome and time-consuming, but also seriously affects the efficiency of complaint handling.
[0004] The inefficiency of manual processing is mainly reflected in the following aspects: First, manually searching for mobile phone numbers increases processing time, especially when handling a large number of complaints, this step becomes an efficiency bottleneck; second, selecting the blocking type one by one requires processing personnel to conduct detailed analysis and judgment of each complaint instant messaging message, which not only increases the workload but also easily leads to misjudgment or omissions due to human factors; finally, manual processing methods make it difficult to achieve real-time or near real-time blocking operations, resulting in users continuing to be harassed or invaded by malicious instant messaging messages after filing a complaint.
[0005] Furthermore, with the increasing number of instant messaging messages and the increasing diversity of complaint types, traditional manual processing methods are no longer able to meet the demands of modern businesses for efficient and accurate complaint handling. Therefore, developing an automated, intelligent, and dynamic instant messaging message blocking method to replace traditional manual processing and improve the efficiency and accuracy of complaint handling has become a pressing technical challenge in the field of instant messaging message blocking technology. Summary of the Invention
[0006] The purpose of the present invention is to overcome the defects of the prior art and provide a method, device, computer equipment and storage medium for dynamic shielding of instant messaging messages.
[0007] To achieve the above object, the present invention adopts the following technical solutions:
[0008] The instant messaging message dynamic shielding method includes:
[0009] Obtain the content of complaint instant messaging messages submitted by users;
[0010] Extract the content of complaint instant messaging messages to obtain key information;
[0011] Classify the content of the complaint instant messaging messages according to key information to obtain classification results;
[0012] Based on the classification results, determine whether the current user has a profile related to historical complaints;
[0013] If the current user has a history of complaint-related profiles, query the history of complaint-related profiles and identify the nature of the complaint in the current instant messaging message;
[0014] Implement corresponding blocking strategies based on the nature of the complaint.
[0015] The present invention also provides an instant messaging message dynamic shielding device, comprising:
[0016] An acquisition unit, used to acquire the content of the complaint instant messaging message submitted by the user;
[0017] An extraction unit, used to extract the content of the complaint instant messaging message to obtain key information;
[0018] A classification unit, configured to classify the content of the complaint instant messaging message according to key information to obtain a classification result;
[0019] A judgment unit, used to judge whether the current user has a historical complaint-related profile based on the classification result;
[0020] A query identification unit is used to query the historical complaint-related portraits if the current user has any, and identify the nature of the complaint in the current complaint instant messaging message;
[0021] The implementation unit is used to implement corresponding blocking strategies based on the nature of the complaint.
[0022] The present invention further provides a computer device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.
[0023] The present invention also provides a storage medium, wherein the storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0024] The beneficial effects of the present invention compared with the existing technology are: through the steps of automatically acquiring, extracting key information, classifying and judging the user's historical complaint profile, the rapid processing of complaint instant communication messages is achieved, without the need for manual search of mobile phone numbers and selection of blocking types one by one, which greatly shortens the complaint processing time and improves the processing efficiency; in addition, by using key information to classify complaint instant communication messages and combining them with the user's historical complaint-related profiles for identification, the nature of the complaint instant communication messages can be more accurately judged, thereby implementing a more precise blocking strategy and reducing the possibility of misjudgment and omissions.
[0025] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 A schematic diagram of an application scenario of the method for dynamically shielding instant messaging messages provided by an embodiment of the present invention;
[0028] Figure 2 A schematic diagram of a flow chart of a method for dynamically shielding instant messaging messages provided by an embodiment of the present invention;
[0029] Figure 3 A schematic block diagram of an instant messaging message dynamic shielding device provided by an embodiment of the present invention;
[0030] Figure 4 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0032] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0033] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0034] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of an application scenario of the method for dynamically shielding instant messaging messages provided by an embodiment of the present invention. Figure 2 A schematic flow chart of a method for dynamically blocking instant messaging messages provided in an embodiment of the present invention. This method is applied to a server that interacts with a terminal to perform data exchange. By automatically acquiring and extracting key information, classifying, and determining a user's historical complaint profile, it enables rapid processing of complaint instant messaging messages, eliminating the need for manual searches for mobile phone numbers and individual selection of blocking types. This significantly shortens complaint processing time and improves processing efficiency. Furthermore, by using key information to classify complaint instant messaging messages and identifying them in combination with user historical complaint profiles, the nature of complaint instant messaging messages can be more accurately determined, enabling the implementation of more precise blocking strategies and reducing the likelihood of misjudgments and omissions.
[0035] Figure 2 FIG. 1 is a flow chart of a method for dynamically shielding instant messaging messages provided by an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S110 to S160.
[0036] S110, obtaining the content of the complaint instant messaging message submitted by the user;
[0037] Specifically, instant messaging messages include SMS or MMS, etc. In the instant messaging message service platform or related business system, a special complaint instant messaging message receiving interface is developed. This interface can be integrated with multiple channels such as the instant messaging message gateway, the built-in complaint function module of the APP, the web form, etc., to receive complaint instant messaging messages submitted by users in real time. For example, by connecting to the API of the instant messaging message gateway, when a user sends a complaint instant messaging message to a designated number, the instant messaging message gateway pushes the instant messaging message content to the interface. The received complaint instant messaging message content is stored in the database for subsequent processing and analysis. A relational database (such as MySQL) or a non-relational database (such as MongoDB) can be used, and the selection is made according to business needs and the amount of data.
[0038] In other words, by integrating multiple channels, we can ensure timely and comprehensive access to the content of user-submitted instant messaging complaint messages, preventing the omission of complaint information due to channel limitations. Furthermore, storing complaint instant messaging messages in a database facilitates centralized data management and maintenance, providing a data foundation for subsequent extraction, classification, and other operations.
[0039] In one embodiment, obtaining the content of the complaint instant messaging message submitted by the user includes:
[0040] Connect to the channel complaint portal of the official APP, instant messaging platform and customer service hotline to uniformly receive complaint information submitted by users to obtain the content of the complaint instant messaging message.
[0041] Specifically, connect to the official app's complaint portal: Within the official app's backend, develop a dedicated interface for receiving complaint information. This interface should define a clear data format, for example, specifying that complaint information include fields such as user ID, mobile phone number (optional, if the app has a mobile phone number associated with it), complaint content, and complaint time. Design a concise and clear complaint page on the app's frontend where users can fill in and submit their complaints. The frontend calls the complaint interface developed in the backend and sends the user-entered complaint information in the specified format to the backend server. Integrate the app's frontend with the backend interface and conduct comprehensive testing. This testing covers both normal complaint submission and handling of abnormal situations (such as network outages and data format errors) to ensure the stability and reliability of the interface. After receiving the complaint information sent by the app, the backend server stores it in a database. A relational database (such as MySQL) can be used to store complaint information, assigning a unique identifier to each complaint record to facilitate subsequent querying and management.
[0042] Integrate with the instant messaging platform's complaint portal: Set up a dedicated complaint reception number within the instant messaging platform to receive user complaint instant messaging messages. Integrate the instant messaging platform with the company's internal instant messaging processing system. Use the API or protocol provided by the instant messaging gateway to enable real-time reception and forwarding of instant messaging messages. For example, when a user sends a complaint instant messaging message to the complaint reception number, the instant messaging gateway forwards the message content to the company's internal instant messaging processing system. Upon receiving the message, the instant messaging processing system parses the message content. Since instant messaging messages are typically plain text, key information must be identified, such as the user's contact information (if not explicitly provided) and the core content of the complaint. Parsing can be performed using techniques such as regular expressions and string matching. The parsed complaint information is stored in a database and associated with user information (if available). If the instant messaging message does not explicitly include user identity information, further communication or data comparison with other company systems can be used to enhance the user information.
[0043] Connect to the complaint entry of the customer service hotline channel: Record the user's complaint calls in the customer service hotline system. Use speech recognition technology (such as the API provided by iFlytek, Baidu speech recognition, etc.) to convert the recorded voice into text content. Extract key information from the converted text content, similar to the processing of instant messaging message content, to identify key information such as the object of the complaint and the reason for the complaint. This can be achieved through methods such as keyword extraction and named entity recognition in natural language processing (NLP) technology. Integrate the extracted key information with the user's basic information (such as caller ID, user ID, etc., which can be obtained through the customer service system) to form complete complaint information. Store the integrated complaint information in the database and manage it in a unified manner with complaint information from other channels to facilitate subsequent queries and analysis.
[0044] Unified Reception and Integration: Using message queues (such as RabbitMQ and Kafka) or middleware technologies, complaint information from various channels, including apps, instant messaging platforms, and customer service hotlines, is centrally received and distributed. Complaint information from various channels is first sent to a message queue, which forwards the messages to subsequent processing modules based on specific rules. In these processing modules, complaint information from various channels is consolidated. Complaint information from the same user is linked based on user identifiers (such as mobile phone numbers and user IDs), creating a complete user complaint history.
[0045] In other words, by connecting complaint portals across multiple channels, including the official app, instant messaging platforms, and customer service hotlines, we can comprehensively cover all possible complaint methods used by users, ensuring that no complaint information is missed. Whether young users prefer using the app or older users accustomed to making complaints via instant messaging or phone, both can conveniently submit complaints, improving the accessibility of complaint information. Furthermore, multiple convenient complaint channels are provided, allowing users to choose the most appropriate method based on their preferences and circumstances. For example, if a user discovers an issue while browsing a product on the app, they can submit a complaint directly within the app. If a user discovers an issue while on a call, they can file a complaint through the customer service hotline without having to switch to another device or app, thus enhancing the user experience. Furthermore, after receiving and storing all complaint information submitted by users in a unified database, data management is achieved. This allows for easy querying, statistics, and analysis of complaint information, such as the number of complaints across different channels and the distribution of complaint types, providing data support for corporate decision-making.
[0046] S120, extracting the complaint instant messaging message content to obtain key information;
[0047] Specifically, NLP technology is used to analyze and process the content of complaint instant messaging messages. First, the instant messaging message text is segmented and the sentences are split into individual words. Then, part-of-speech tagging is performed to determine the grammatical category of each word. Then, named entity recognition technology is used to extract the key entities involved in the instant messaging message, such as the object of the complaint (company name, product name, etc.), the reason for the complaint (quality problems, poor service attitude, etc.), the time of the complaint, etc. The extracted key information is further processed and converted into a feature vector that can be used for classification. For example, the reason for the complaint can be encoded, and different reasons for complaint can be mapped to different numerical values; the complaint time is standardized to meet the requirements of the model input.
[0048] In other words, NLP technology can accurately extract key information from complaint instant messaging messages, providing strong support for subsequent classification and identification of the nature of the complaint. Furthermore, converting this extracted key information into feature vectors normalizes the data, facilitating subsequent processing by machine learning or deep learning models.
[0049] In one embodiment, extracting the complaint instant messaging message content to obtain key information includes:
[0050] Pre-processing the content of the complaint instant messaging message, including removing irrelevant characters, advertising links, and unifying the text format to obtain pre-processed content;
[0051] Specifically, remove irrelevant characters: Use regular expressions to identify and remove irrelevant characters in the content of instant messaging messages. For example, special symbols (such as #, $, %, etc.), extra spaces, tabs, newline characters, etc. Write a regular expression pattern, such as r'[^\w\s]' (matches non-alphanumeric and whitespace characters), and replace the matched characters with an empty string by traversing the instant messaging message text, thereby achieving the purpose of removing irrelevant characters. Based on business needs, define an allowed character set and only retain characters that belong to this character set in the instant messaging message content. For example, if you only need to retain Chinese, English, numbers, and common punctuation marks, you can build a set containing these characters, then traverse the instant messaging message text and filter out characters that are not in the set.
[0052] Removing advertising links: Advertising links often have specific formats, such as beginning with http: / / or https: / / , or containing common domain name suffixes (such as .com or .cn). Regular expressions are used to match these link patterns and remove matching links from instant messaging messages. A blacklist of advertising links containing known advertising website links is maintained. During pre-processing of instant messaging messages, the message is checked for links on the blacklist and removed if found.
[0053] Standardize text formatting: Convert all letters in instant messaging messages to uppercase or lowercase to avoid subsequent processing issues caused by inconsistent case. For example, use Python's lower() or upper() methods to process strings. Ensure that instant messaging messages are encoded in a consistent format, such as by converting them to UTF-8. If instant messaging messages contain different encoding formats, use an encoding conversion library (such as the Python chardet library to detect the encoding and then use the encode() and decode() methods to convert them) to a consistent format.
[0054] Extract keywords, semantic analysis and user sentiment from pre-processed content and integrate them to form key information.
[0055] Specifically, extract keywords: Segment the preprocessed instant messaging text and then count the frequency of each word. Select frequently occurring and representative words as keywords. You can use existing word segmentation tools (such as the Python jieba word segmentation library) to segment the words, and then use a dictionary or counter to count the word frequencies.
[0056] Semantic analysis: Each word in the preprocessed instant messaging message text is converted into a word vector. Common word vector models include Word2Vec and GloVe. By taking a weighted average of the word vectors or other aggregation methods, the entire instant messaging message text is represented as a text vector for semantic analysis. You can use a pretrained word vector model or train your own. The text vector of the instant messaging message text is compared with predefined semantic category vectors (such as cosine similarity). Based on the similarity, the semantic category to which the instant messaging message text belongs is determined. For example, semantic categories such as "product quality issues" and "service attitude issues" can be defined. By calculating the similarity between the instant messaging message text and these category vectors, the primary semantic meaning of the instant messaging message can be determined.
[0057] User sentiment analysis: Build a sentiment dictionary containing positive, negative, and neutral sentiment words, and assign each word a corresponding sentiment score. Match the preprocessed instant messaging message text against the sentiment dictionary, count the number of positive and negative sentiment words and the sum of the sentiment scores, and determine the user's emotional tendency (e.g., positive, negative, or neutral) based on specific rules. Using a dataset of labeled instant messaging messages, train a machine learning model (e.g., Naive Bayes, Support Vector Machine, or deep learning model) to perform sentiment classification. Input the preprocessed instant messaging message text into the trained model, which then outputs the user's emotion category.
[0058] Integrate to form key information: Integrate the extracted keywords, semantic analysis results, and user sentiment analysis results. For example, keywords can be presented in a list, semantic analysis results can be expressed as specific semantic categories, and user sentiment analysis results can be expressed as positive, negative, or neutral. This information can then be combined into a structured data structure (such as a dictionary or JSON object) to form key information.
[0059] In other words, removing noise such as irrelevant characters and advertising links and standardizing the text format can improve the data quality of complaint instant messaging messages and reduce interference and errors during subsequent processing. For example, removing advertising links can prevent advertising content from being mistaken for complaint content, thereby improving the accuracy of key information extraction. The uniform, clean format of pre-processed text facilitates subsequent operations such as keyword extraction, semantic analysis, and user sentiment analysis. For example, standardizing capitalization and encoding can avoid algorithm processing anomalies caused by format inconsistencies. Furthermore, extracted keywords can directly reflect the core content of complaint instant messaging messages, helping companies quickly identify the issues causing user complaints. Semantic analysis can deeply understand the meaning of complaint instant messaging messages and classify them into specific semantic categories. This helps companies understand the distribution of user complaint types at a high level and provides a basis for developing targeted solutions. User sentiment analysis allows companies to understand the user's emotional state at the time of the complaint, such as anger, dissatisfaction, or disappointment. Based on user sentiment, companies can adopt different response strategies to improve user satisfaction. By integrating keywords, semantic analysis, and user sentiment to form key information, companies can provide a comprehensive and accurate picture of user complaints. Based on this key information, companies can develop more scientific and reasonable complaint handling strategies and product improvement plans to improve their service quality and competitiveness.
[0060] S130. Classify the content of the complaint instant messaging message according to the key information to obtain a classification result;
[0061] Specifically, based on business needs and data characteristics, appropriate classification models are selected, such as decision trees, support vector machines (SVMs), random forests, and convolutional neural networks (CNNs). The model is trained using labeled historical complaint IM message data, and its parameters are adjusted to accurately identify different categories of complaint IM messages. The extracted key information feature vectors are input into the trained classification model. The model classifies the complaint IM messages based on the learned features and classification rules, and outputs the classification results. The classification results can include categories such as high-frequency complaints, malicious complaints, general complaints, and business inquiries.
[0062] In other words, machine learning or deep learning models enable automated classification of complaint instant messaging messages, significantly improving classification efficiency and accuracy while reducing the workload and subjectivity of manual classification. Models trained on extensive historical data can accurately identify different categories of complaint instant messaging messages, providing a reliable basis for the subsequent implementation of blocking strategies.
[0063] In one embodiment, the classification of the complaint instant messaging message content based on the key information to obtain the classification result includes:
[0064] Match the keywords in the key information with the predefined classification keyword library to obtain keyword matching results;
[0065] Specifically, conduct an in-depth analysis of the company's business scope, common complaint types, and past complaint data to determine the keywords corresponding to different complaint categories. For example, if the instant messaging message contains keywords such as "arrears", "repayment", and "overdue", it is initially classified as a "collection type" complaint; if it contains keywords such as "marketing", "discount", and "event", it is classified as a "marketing type" complaint. For certain specific scenarios or business needs, more precise keyword matching may be required. For example, for instant messaging messages involving legal proceedings, it may be necessary to match more specific keywords such as "litigation", "law", and "court". Collect keywords from multiple channels, such as internal corporate documents, industry reports, and analysis of competitors' complaints. Sort and deduplicate the collected keywords to ensure the accuracy and completeness of the keyword library. At the same time, assign a corresponding complaint category label to each keyword.
[0066] Use simple string matching algorithms, such as exact matching or fuzzy matching. Exact matching requires that the keyword is completely identical to the words in the classification keyword library; fuzzy matching allows for certain character differences. For example, an edit distance algorithm is used to measure the similarity between two strings. A match is considered successful when the similarity exceeds a certain threshold. All keywords in the key information are traversed and matched against the classification keyword library. The complaint category to which each keyword matches is recorded, and the number of keywords matching each complaint category is counted.
[0067] Conduct a holistic analysis of the semantics in key information to obtain semantic analysis results;
[0068] Specifically, select appropriate pre-trained semantic understanding models, such as BERT and GPT. These models are pre-trained on large-scale text data and have strong semantic understanding capabilities. Fine-tune the pre-trained models based on the company's complaint data and business needs. Use annotated complaint datasets to train the models and adjust their parameters to better understand the semantics of complaint instant messaging messages and classify them into the correct complaint categories.
[0069] The text content of the key information is input into the fine-tuned semantic understanding model. The model converts the text into a vector representation that contains the text's semantic information. Similarity (such as cosine similarity) is calculated between the text vector and predefined complaint category vectors. Based on the similarity, the complaint category to which the text belongs is predicted. For example, the similarity between the text vector and category vectors for product quality issues, logistics and delivery issues, etc. is calculated, and the category with the highest similarity is selected as the semantic analysis result.
[0070] Perform sentiment analysis on user emotions in key information to obtain sentiment analysis results;
[0071] Specifically, a large amount of sentiment-labeled complaint instant messaging data is collected, and each message is manually annotated with its sentiment tendency, such as positive, negative, or neutral. This annotated data is used to train a sentiment analysis model. A sentiment analysis model is constructed using machine learning algorithms (such as Naive Bayes and Support Vector Machines) or deep learning algorithms (such as Recurrent Neural Networks (RNNs) and their variants, LSTMs and GRUs). The annotated dataset is divided into a training set and a test set. The model is trained using the training set, and its performance is evaluated using the test set.
[0072] Extract features from the text in the key information, such as lexical features (such as sentiment dictionary matching) and syntactic features (such as sentence structure analysis). The extracted features are input into the trained sentiment analysis model, and the model outputs the sentiment tendency category of the text, that is, the sentiment analysis result.
[0073] Combine keyword matching results, semantic analysis results, and sentiment analysis results to obtain classification results.
[0074] Specifically, based on the company's business experience and data analysis results, different weights are assigned to keyword matching results, semantic analysis results, and sentiment analysis results. For example, if keyword matching has been highly accurate in previous classifications, it can be given a higher weight; whereas sentiment analysis results may not differentiate certain complaint categories well and thus be given a lower weight. Using a weighted summation method, the keyword matching results, semantic analysis results, and sentiment analysis results are weighted and summed according to their respective weights, and the final complaint category is determined based on the summed result. A voting mechanism can also be used. For example, if two or more results from keyword matching, semantic analysis, and sentiment analysis point to the same complaint category, that category is used as the final classification result.
[0075] In other words, by combining information from three dimensions—keyword matching, semantic analysis, and sentiment analysis—we can more comprehensively understand the content of complaint IM messages and user intent. Each dimension provides a different perspective, complementing each other and improving classification accuracy. For example, keyword matching can quickly pinpoint obvious points of complaint, while semantic analysis provides a deeper understanding of the overall meaning of the text, and sentiment analysis reflects the user's emotional state. Combined, these factors can more accurately determine the complaint category. A single classification method can have limitations and easily lead to misclassification. Combining multiple dimensions of information can effectively mitigate this misclassification. For example, relying solely on keyword matching can misclassify IM messages containing similar keywords but different semantic meanings. However, combining semantic analysis can more accurately determine the true meaning of IM messages and avoid misclassification. Furthermore, users' complaint IM messages can be expressed in a variety of ways, potentially containing incomplete keywords, ambiguous semantics, or complex emotional expressions. Combining multiple analysis methods can better adapt to these diverse expressions. For example, even if keyword matching is not ideal, semantic and sentiment analysis can still provide valuable information to help determine the complaint category, enhancing the robustness of the classification system for diverse complaint IM messages. As businesses evolve and user complaint habits change, the content and format of complaint instant messaging messages will also change. Classification methods that combine multi-dimensional information can better adapt to these changes, maintaining high classification performance by adjusting weights and optimizing models.
[0076] S140. Determine whether the current user has a historical complaint-related profile based on the classification result; if the current user does not have a historical complaint-related profile, construct a user profile and perform conventional blocking processing on the current complaint instant messaging message content;
[0077] Specifically, a unique user identifier, such as a mobile phone number or user ID, is extracted from the complaint instant messaging message. Based on this unique identifier, a query is performed on the user profile database. This database stores information such as the user's historical complaint records, complaint frequency, and complaint type preferences. If the query results contain a relevant historical complaint record for the user, then it is determined that the current user has a relevant historical complaint profile.
[0078] In other words, by querying the user ID and profile database, we can quickly determine whether the current user has a profile related to historical complaints, providing a foundation for subsequent complaint identification and implementation of blocking strategies. Furthermore, the establishment of a user profile database facilitates analysis of historical user complaints, understanding their complaint habits and characteristics, and supporting personalized processing.
[0079] In one embodiment, determining whether the current user has a historical complaint-related profile based on the classification result includes:
[0080] Extracting user unique identification information from the complaint instant messaging message content, and searching the database for the current user's historical complaint records based on the user unique identification information to obtain a query result;
[0081] Specifically, we conduct in-depth research on the content structure and common formats of complaint instant messaging messages to identify locations that may contain user unique identification information. For example, the beginning, end, or specific paragraphs of an instant messaging message may contain information such as the user's mobile phone number, order number, and membership account number. This information can often serve as the user's unique identifier. We write corresponding regular expressions for matching and extraction based on different types of user unique identification information. For example, we can use the regular expression r'1[3-9]\d{9}' to match mobile phone numbers. Order numbers may consist of numbers and letters and have specific length and formatting rules. We can write regular expressions based on these rules for extraction. For unique identification information that is not directly presented in an obvious format, such as user nicknames, we can combine natural language processing technology to extract it. For example, we can use named entity recognition (NER) algorithms to identify words in instant messaging messages that may represent user nicknames.
[0082] Set up a table in the database specifically for storing user complaint records. The table should contain relevant fields such as the user's unique identification information field (such as mobile phone number, order number, etc.), complaint time, complaint content, and processing results. Construct the corresponding database query statement based on the extracted user's unique identification information. For example, in SQL, you can use SELECT * FROM complaint_records WHERE phone_number = 'extracted mobile phone number' to query the user's historical complaint records. After executing the query statement, get the query results. The query result may be a data set containing multiple records, each record representing a historical complaint of the user. Format the query results, for example: convert them into lists, dictionaries, and other data structures that are easy to process later.
[0083] Based on the classification results, historical complaint records similar to the current complaint type are filtered from the query results to distinguish whether the current user has a historical complaint-related profile.
[0084] Specifically, based on the company's business characteristics and complaint handling experience, similarity rules are defined for different complaint types. For example, for e-commerce companies, complaints about product quality and after-sales service issues may share similarities in some cases, as after-sales service issues can stem from product quality issues. Similarity rules are quantified, for example, by assigning similarity scores to different complaint types. If two complaint types have a high degree of relevance in business logic, a higher similarity score can be assigned; otherwise, a lower score can be assigned.
[0085] The query traverses the user's historical complaint records and compares the complaint type of each record with the current complaint classification result. Based on pre-defined similarity rules, the similarity score between the current complaint type and each historical complaint type is calculated. A similarity threshold is set. When the similarity score of a historical complaint record exceeds the threshold, the record is considered similar to the current complaint type and is filtered out.
[0086] Count the number of similar historical complaint records filtered out. If the number is greater than zero, it indicates that the current user has a historical complaint record similar to the current complaint type, meaning there is a relevant historical complaint profile. If the number is zero, it indicates that the current user has no historical complaint record similar to the current complaint type, meaning there is no relevant historical complaint profile. If a relevant historical complaint profile exists, further features of the profile can be extracted, such as the average processing time of similar historical complaint records and user satisfaction scores, providing richer information for subsequent complaint handling.
[0087] In other words, by extracting a user's unique identifier and querying historical complaint records, it's possible to quickly determine whether the user has previously filed similar complaints. If relevant historical complaint records exist, complaint handlers can directly reference past experience and results, avoiding repeated analysis and investigation, thereby significantly improving complaint handling efficiency. Furthermore, by analyzing and screening historical complaint records, companies can identify potential issues and trends. For example, if a user repeatedly complains about the same product quality issue, this may indicate a design or production defect. The company can then take timely measures to improve the product and prevent similar issues from recurring.
[0088] In one embodiment, if the current user does not have a historical complaint-related profile, a user profile is constructed, and the content of the current complaint instant messaging message is routinely blocked;
[0089] Specifically, data related to user complaints is collected from multiple channels, including but not limited to the content of current complaint instant messaging messages, basic user information (such as age, gender, and region, if available), and user-company interaction records (such as customer service consultation records and feedback records). This data can be obtained in real time or periodically by integrating data with the company's various business systems. The collected data is cleaned and preprocessed to remove noise, duplicate data, and invalid data. For example, the content of complaint instant messaging messages can be segmented and stop words removed to facilitate subsequent feature extraction and analysis.
[0090] Perform natural language processing on the content of the current complaint instant messaging message to extract features such as keywords, topics, and sentiment. This can be achieved using techniques such as the bag-of-words model, the TF-IDF algorithm, and sentiment analysis algorithms. For example, sentiment analysis algorithms can determine whether the complaint instant messaging message contains positive, negative, or neutral sentiment, as well as the degree of negativity. Clustering algorithms (such as K-Means clustering) can be used to group users with similar characteristics. Cluster analysis can reveal complaint behavior patterns and characteristics among different user groups, providing a reference for constructing user profiles. The constructed user profiles are stored in a database for subsequent query and use.
[0091] Formulate general blocking rules that apply to all new users (users who do not have a historical complaint profile). For example, block complaint instant messaging messages that contain sensitive words (such as insults, threats, false information, etc.), or block complaint instant messaging messages sent during specific time periods (such as early morning). Store blocking rules in the rule management system to facilitate operations such as adding, modifying, and deleting. The rule management system can provide a graphical interface that allows administrators to manage blocking rules intuitively. When the system receives the current complaint instant messaging message, it uses the blocking rules to perform real-time detection and matching of the instant messaging message content. If the content of the complaint instant messaging message meets the conditions of the blocking rules, the instant messaging message will be blocked. The blocking method can be to mark the instant messaging message as blocked and not perform subsequent processing and forwarding; or to directly discard the instant messaging message and not record it in the system.
[0092] In other words, for users without a historical complaint profile, building a user profile can fill data gaps, enabling companies to gain a more comprehensive understanding of their characteristics and behaviors. This helps companies establish a more comprehensive user management system and provides foundational data support for subsequent user services, marketing, and complaint handling. Furthermore, routinely blocking the content of current complaint instant messaging messages can reduce the interference of invalid complaint instant messaging messages, allowing complaint handlers to focus more on handling valuable complaints, improving the efficiency and quality of complaint handling and reducing the company's operating costs.
[0093] S150: If the current user has a historical complaint-related profile, query the historical complaint-related profile and identify the nature of the complaint in the current instant messaging message;
[0094] Specifically, the user's historical complaint profile information, including historical complaint type, frequency, and resolution, is extracted from the user profile database. The nature of the complaint is identified by combining the classification results of the current complaint instant messaging message with historical complaint profile information. For example, if the current complaint is a high-frequency complaint and the user has a high historical complaint frequency, it may be identified as a malicious, repeated complaint. If the current complaint is similar in type to a historical complaint and the user is dissatisfied with the handling of the historical complaint, it may be identified as an escalation of the complaint due to dissatisfaction with the handling result.
[0095] In other words, by combining historical complaint profiles with current complaint classification results, we can more comprehensively and accurately identify the nature of complaints, avoiding misjudgments caused by single pieces of information. Furthermore, personalized handling can be adopted based on the nature of the complaint, improving user satisfaction and complaint handling efficiency.
[0096] In one embodiment, if the current user has a historical complaint-related profile, querying the historical complaint-related profile and identifying the nature of the complaint in the current complaint instant messaging message includes:
[0097] Based on the user's unique identification information, locate the database that stores the user's historical complaint profile;
[0098] Specifically, plan the database architecture based on the business scale and data volume of the enterprise. For small enterprises or situations with small amounts of data, a centralized database, such as MySQL, can be used to store all user historical complaint profile data on a single server for easy management and maintenance. For large enterprises or scenarios with huge amounts of data, a distributed database (such as Cassandra and MongoDB's distributed cluster) is more suitable. It can store data in a dispersed manner across multiple nodes, improving the performance and scalability of data storage and queries. Give the database that stores user historical complaint profiles a clear and easily recognizable name, such as user_complaint_profile_db. At the same time, assign a unique identifier to the database in the database management system so that the system can locate it quickly and accurately.
[0099] Create an index for the user's unique identification information in the database. Indexes can greatly improve query speed because the database engine can quickly locate records containing specific user identification information through indexes. For example, in MySQL, you can use the CREATE INDEX statement to create an index for the user identification information field. If an enterprise has multiple databases or data tables, and user identification information is scattered in different places, you can create an association mapping table. This table records the correspondence between the user's unique identification information and the database or data table that stores their historical complaint profile. When it is necessary to query the user's historical complaint profile, the system first queries the association mapping table to determine the target database or data table, and then performs subsequent operations.
[0100] Execute a query operation to retrieve the current user's historical complaint profile from the database, including profile dimension information such as complaint frequency, complaint type preference, and sensitivity score;
[0101] Specifically, if you use a relational database (such as MySQL, Oracle), write the corresponding SQL query statement. For non-relational databases (such as MongoDB), use its specific query syntax. After obtaining the query results, parse the returned data. According to the data format returned by the database (such as JSON, XML, etc.), convert it into a data structure that is easy to handle within the program, such as a dictionary or object in Python. Verify the parsed data to ensure the integrity and accuracy of the data. Check whether the information of each dimension is empty or exceeds the reasonable range. If abnormal data is found, you can take corresponding measures, such as recording a log, prompting an error, or using the default value.
[0102] The content of the current complaint instant communication message is matched with the dimensional information in the historical complaint portrait, and the portrait features related to the content of the current complaint instant communication message are identified to obtain the nature of the complaint.
[0103] Specifically, in order to more accurately evaluate the relationship between the current complaint and the frequency of historical complaints, a time window is set. For example, consider the historical complaint records of the past year or six months. Count the number of user complaints within the time window and perform correlation analysis with the current complaint. If the current complaint occurs in a time period with a high frequency of user complaints, it may mean that the user is more sensitive or dissatisfied with the current problem. Calculate the changing trend of the current complaint and historical complaint frequencies. If the user's complaint frequency suddenly increases, it may indicate that a new problem has emerged or that the user's satisfaction with the service has dropped significantly; if the complaint frequency is stable or decreases, it may indicate that the user's response to the current problem is relatively conventional.
[0104] Establish a mapping relationship between complaint keywords and complaint types. Perform word segmentation and keyword extraction on the current complaint instant messaging message. Then, based on the mapping relationship, determine the likely complaint type. Calculate the similarity between the current complaint type and historical complaint type preferences. Use algorithms such as cosine similarity to represent complaint types as vectors and then calculate the similarity between these vectors. A high similarity indicates that the current complaint is consistent with the user's historical complaint type preferences.
[0105] Perform sentiment analysis on the content of the current complaint instant messaging message to determine the user's emotional tendency (such as positive, negative, or neutral). Correlate the sentiment analysis results with the sensitivity score in the historical complaint profile. For example, if the sentiment analysis results show that the user's emotions are very negative, and the user's sensitivity score in the historical complaint profile is high, then the current complaint can be considered to be more serious. Dynamically adjust the sensitivity score threshold based on the company's business needs and user feedback. For example, during special periods (such as promotional events), users may have higher service requirements. In this case, the sensitivity threshold can be appropriately lowered to more promptly detect and address issues that may cause user dissatisfaction.
[0106] Assign different weights to dimensions such as complaint frequency, complaint type preference, and sensitivity score. These weights can be determined based on business experience, data analysis, or expert evaluation. For example, if a company believes the sensitivity score has a greater impact on the nature of a complaint, it can be given a higher weight. Using a weighted summation method, the matching results for each dimension are weighted and summed, and the nature of the current complaint is determined based on the sum. Alternatively, a decision tree algorithm can be used to gradually determine the nature of the complaint based on the matching results of each dimension. For example, the complaint frequency can be first determined to see if it exceeds a threshold. If so, the complaint type preference and sensitivity score can be further determined to ultimately determine the nature of the complaint.
[0107] In other words, by combining information from multiple dimensions, such as complaint frequency, complaint type preferences, and sensitivity scores, the nature of the current complaint can be more comprehensively and accurately identified. This avoids the bias that can arise from single-dimensional analysis and improves the accuracy of complaint nature judgment. Each user's historical complaint profile is unique, and complaint nature identification based on this profile allows for personalized judgment. For example, for users with a high complaint frequency and high sensitivity score, even seemingly minor complaints may be identified as significant and addressed more promptly.
[0108] S160. Implement corresponding blocking strategies based on the nature of the complaint.
[0109] Specifically, a blocking policy library is established, containing blocking policies tailored to different complaint types. For example, for malicious, repeated complaints, a policy can be implemented to temporarily block the user's complaint privileges for a period of time. For escalated complaints due to dissatisfaction with the handling results, dedicated personnel can be assigned to follow up and the blocking conditions can be appropriately relaxed. Furthermore, based on the identified complaint type, a corresponding blocking policy is selected and executed from the policy library. Blocking operations can be implemented by modifying system configurations, calling blocking interfaces, and other methods. Relevant information about the blocking operation, such as the blocking time and reason, is also recorded.
[0110] In other words, implementing blocking strategies tailored to the nature of complaints allows for precise blocking, avoiding the misjudgment of legitimate users while effectively minimizing the impact of malicious and repeated complaints. Furthermore, by establishing a policy library, blocking strategies can be flexibly adjusted and optimized to accommodate changing business scenarios and needs.
[0111] In one embodiment, the nature of the complaint includes: high-frequency complaints, malicious complaints, or special types.
[0112] Specifically, for users who make frequent complaints, all their complaint instant messaging messages can be blocked within a certain period of time; for users who make malicious complaints, their complaint instant messaging messages can be permanently blocked or their complaint permissions can be restricted; for special types of instant messaging messages (for example: collection instant messaging messages required to be sent by the central bank), compliance restrictions can be set (such as sending at least one per month).
[0113] In other words, by blocking IM messages from users with high frequency and malicious complaints, companies can focus limited complaint handling resources on more valuable and legitimate complaints, improving the efficiency and quality of complaint handling. This avoids wasting manpower, material resources, and time on handling a large number of ineffective complaints. Setting compliance restrictions for special types of IM messages ensures their delivery and processing in accordance with regulatory requirements, prioritizing the delivery and receipt of these important IM messages and improving the company's management of specialized services. Furthermore, blocking or restricting users with high frequency and malicious complaints can reduce disruption to legitimate users and prevent them from being impacted by malicious complaints. Furthermore, properly handling complaints and adhering to compliance restrictions demonstrates a company's respect for user rights and compliance with laws and regulations, helping to establish a positive corporate image and strengthen user trust and loyalty.
[0114] In one embodiment, after implementing a corresponding blocking strategy based on the nature of the complaint, the method further includes: monitoring changes in user complaint behavior, and dynamically adjusting the blocking strategy based on user profiles and behavior changes.
[0115] Specifically, set time windows of different lengths to monitor changes in complaint frequency, such as weekly, monthly, and quarterly. For example, count the number of complaints made by users in that week once a week and compare it with the number of complaints in the previous weeks. Write an algorithm to calculate the rate of change of complaint frequency. For example, calculate the ratio of the number of complaints in the current time window to the number of complaints in the previous time window. If the ratio is less than a set threshold (such as 0.8), it is considered that the complaint frequency has decreased. Using natural language processing technology, a sentiment analysis model is trained based on a large amount of complaint text data to perform sentiment classification on the complaint text (such as positive, negative, and neutral). When a new complaint instant messaging message arrives, use the trained sentiment analysis model to conduct real-time evaluation of the instant messaging message content to determine the user's complaint sentiment. Compare the evaluation results with the historical complaint sentiment. If the proportion of negative sentiment decreases, it is considered that the complaint sentiment has improved.
[0116] Set a regular update interval for user profiles, such as monthly. Update various dimensions of the user profile (such as complaint frequency, complaint type preference, and sensitivity score) based on the latest user complaint behavior data, consumption data, and historical interaction data. When a user's complaint behavior changes significantly (such as a sudden and significant decrease in complaint frequency), trigger a real-time update of the user profile. Promptly reflect the latest user behavior information in the user profile to more accurately adjust the blocking policy. Use a rule engine (such as Drools) to define rules for adjusting the blocking policy. Based on the user profile and behavioral change data, the rule engine can automatically determine whether and how to adjust the blocking policy. For example, set a rule such as "When the user's complaint frequency decreases by 50% and the complaint sensitivity score decreases by 20%, the blocking time will be shortened by half." When formulating policy adjustment rules, comprehensively consider multiple factors, such as complaint frequency, complaint sentiment, complaint sensitivity, and blocking time. By assigning different weights to different dimensions, a weighted calculation is performed to obtain a comprehensive evaluation result, and the blocking policy is then determined based on the evaluation results.
[0117] Specific conditions for lifting the block are configured in the system, such as a reduction in user complaints (the frequency of complaints is reduced by a certain percentage and the number of complaints is below a certain threshold), a reduction in complaint sensitivity (the sensitivity score is below a certain value), and the blocking time reaches a certain period (such as 2 years). The system monitors user behavior data in real time and automatically triggers the unblocking process when the lifting conditions are met. For example, the complaint behavior data of all blocked users is checked regularly every day to determine whether the lifting conditions are met. The user's blocking status is updated in the database, and the "blocked" mark is changed to "normal" so that the user can receive instant messaging messages normally. At the same time, the time and reason for unblocking are recorded for subsequent inquiries and audits.
[0118] In other words, the dynamic unblocking feature can adjust blocking policies based on actual user behavior changes, avoiding excessive blocking of users. When a user's complaints decrease and the conditions for unblocking are met, the blocking is promptly lifted, allowing the user to receive instant messaging messages normally, reducing user inconvenience and dissatisfaction. Furthermore, by dynamically adjusting blocking policies, companies can focus more resources on complaints that truly require action, improving the efficiency and quality of complaint handling, avoiding unnecessary action on users who have improved their behavior, and saving manpower, material resources, and time.
[0119] For example:
[0120] In the financial sector, customer complaints are common and require careful handling. Different types of complaints may reflect different customer needs and risk profiles. For example, frequent complaints may indicate widespread dissatisfaction with financial services or flaws in service processes; malicious complaints may pose reputational risks and operational disruptions to financial institutions; and special types of complaints (such as those related to debt collection instant messaging messages subject to central bank regulatory requirements) require strict compliance procedures. Dynamic instant messaging message blocking methods can help financial institutions handle complaints more efficiently, optimize resource allocation, and mitigate risk.
[0121] Suppose a bank receives a complaint instant messaging message submitted by a customer through the official APP, the content of which is: "Your bank's credit card installment interest calculation is too unreasonable. I am overcharged every month. I have complained several times. If you don't resolve it, I will complain again."
[0122] The bank received this complaint instant messaging message through the complaint portal on its official app. It preprocessed the message content, removing irrelevant characters (e.g., excessive punctuation that doesn't affect the core meaning can be simplified) and standardizing the text format (e.g., converting full-width characters to half-width characters). The preprocessed content read: "Your bank's credit card installment interest calculation is unreasonable. I'm being overcharged every month. I've complained several times. If the issue isn't resolved, I'll file another complaint."
[0123] Extract keywords from the pre-processed content, such as "credit card installment interest", "unreasonable", "excessive deductions", and "complaints received several times".
[0124] Semantic analysis: The overall semantics indicate that the customer is seriously dissatisfied with the way the bank calculates the interest on its credit card installments. He believes that he has been overcharged and has filed multiple complaints.
[0125] Sentiment analysis: From expressions such as "It's too unreasonable" and "I will complain if the problem is not resolved", we can see that the customer is quite emotional and has negative emotions.
[0126] Integrate key information: Integrate keywords, semantic analysis and user emotions to form key information, that is, the customer is dissatisfied with the calculation of credit card installment interest, has complained many times but has not been resolved, and is very emotional.
[0127] Match the keywords in the key information with the predefined classification keyword library. For example, the classification keyword library may contain keywords such as "credit card", "interest", and "complaint" related to credit card business and complaints. These keywords can all be matched.
[0128] Semantic analysis results: Combined with semantic analysis, it is determined that this complaint is related to the credit card installment business and falls into the category of customer dissatisfaction with business rules and fee calculations.
[0129] Sentiment analysis results: Sentiment analysis is negative.
[0130] Comprehensive classification results: Based on the above analysis, the complaint instant messaging message is classified as "Credit card installment interest complaint - customer dissatisfaction category".
[0131] Extract the user's unique identifier, such as their mobile phone number or bank account number, from the complaint instant messaging message or the system records of the complaint. Based on this unique identifier, query the database for the current user's historical complaint records. Suppose the query results show that the customer has filed five complaints regarding credit card installment interest payments over the past year. Based on the classification result, "Credit Card Installment Interest Complaints - Customer Dissatisfaction," filter the query results for historical complaint records similar to the current complaint type. Multiple related records are found, indicating that the current user has a relevant historical complaint profile.
[0132] Based on the user's unique identification information, locate the database that stores the user's historical complaint profile. Execute a query operation to retrieve the current user's historical complaint profile from the database. Assume that the profile dimension information includes: the complaint frequency is 1-2 times per month (average over the past year), the complaint type preference is mainly concentrated on credit card installment interest and handling fees, and the sensitivity score is 8 points (out of 10 points, the higher the score, the more sensitive it is). Match the current complaint instant messaging message content with the various dimensional information in the historical complaint profile. The current complaint content is related to credit card installment interest, and the customer is emotional. Combined with the historical complaint frequency and sensitivity score, it is identified that the nature of the complaint is a high-frequency complaint (because the average number of complaints per month in the past year was 1-2, which is relatively frequent) and the customer's sensitivity is high. It can be further determined as a high-frequency complaint with the risk of escalation.
[0133] Because this complaint is a high-frequency one, the bank can block all instant messaging messages for a certain period of time (e.g., three months). (However, the bank must ensure that dedicated channels or personnel are in place to follow up during this period to prevent the customer's issue from escalating and going unresolved.) At the same time, the bank can arrange for dedicated customer service personnel to proactively contact the customer to gain a deeper understanding of the issue and resolve the unreasonable credit card installment interest calculation issue as soon as possible, thereby improving customer satisfaction and preventing actual complaints.
[0134] By dynamically blocking instant messaging messages, banks can quickly categorize and address complaints, focusing more resources on resolving actual customer issues rather than being burdened by a large number of repetitive complaints. By promptly identifying customers with frequent complaints and those at risk of escalating complaints and taking appropriate action, banks can prevent further escalation of customer issues and mitigate reputational and regulatory risks. While frequent complainers are blocked, dedicated personnel are assigned to follow up on their complaints, ensuring customers feel the bank's attention to their issues and helping to improve customer satisfaction and loyalty.
[0135] Here’s another example:
[0136] In the healthcare sector, patient complaints provide a crucial source of feedback for medical institutions to understand service quality and improve workflows. However, some patients frequently and maliciously file complaints, which can waste resources and disrupt normal work processes. Furthermore, some special types of complaints (such as those related to patient privacy and emergency medical assistance) require special handling. Dynamic instant messaging message blocking methods can help medical institutions efficiently handle complaints, rationally allocate resources, and improve service quality.
[0137] A large hospital received a complaint instant messaging message from a patient through the hospital's official app. The message read: "Your hospital's registration system is terrible. I've tried to register multiple times and can't get an appointment with a specialist. Every time the system crashes. I've complained several times. If this continues, I'm going to expose it to the media!"
[0138] The hospital received this complaint instant messaging message through the complaint portal of its official app. The message was pre-processed to remove irrelevant characters (emotional expressions like "junk" that don't affect the core meaning retain the core meaning, primarily punctuation marks). The text format was standardized (for example, full-width characters were converted to half-width characters). The pre-processed content read: "Your hospital's registration system is terrible. I've tried several times and can't get an appointment with a specialist. The system crashes every time. I've complained several times. If this continues, I'm going to expose it to the media."
[0139] Keyword extraction: Extract keywords such as "hospital", "registration system", "unable to register", "expert number", "system crash", "complained several times", and "exposure to the media".
[0140] Semantic analysis: The overall semantics is that the patient is dissatisfied with the hospital registration system. He has failed to register many times and the system has crashed. He has filed many complaints but they have not been resolved. He wants to expose the issue to the media.
[0141] Emotional analysis: From expressions such as "this is rubbish" and "if it continues like this, I will expose it to the media", it can be seen that the patient is emotionally agitated and has negative emotions.
[0142] Integrate key information: Keywords, semantic analysis, and user emotions are integrated to form key information, namely, patients are dissatisfied with the hospital registration system, have failed to register many times and the system has crashed, have filed many complaints but have not been resolved, and are emotionally agitated.
[0143] Keyword matching: Match the keywords in the key information with the predefined classification keyword library. The classification keyword library may contain keywords related to hospital registration and complaints, such as "hospital", "registration system", "expert number", "complaint", etc. These keywords can be matched.
[0144] Semantic analysis results: Combined with semantic analysis, it was determined that the complaint was related to a malfunction of the hospital registration system and fell into the category of patient dissatisfaction with the system service.
[0145] Sentiment analysis results: Sentiment analysis is negative.
[0146] Comprehensive classification results: Based on the above analysis, the complaint instant messaging message is classified as "hospital registration system failure complaint - patient dissatisfaction category".
[0147] The user's unique identification information is extracted from the content of the complaint instant communication message or the system record of receiving the complaint, such as the patient's mobile phone number or the patient number in the hospital system.
[0148] Query historical complaint records: Based on the user's unique identification information, query the database for the current user's historical complaint records. Suppose the query results show that the patient has complained about registration system problems four times in the past six months.
[0149] Filter similar historical complaint records: Based on the classification result "Hospital registration system failure complaint - patient dissatisfaction", filter out historical complaint records similar to the current complaint type from the query results. It is found that there are multiple related records, indicating that the current user has a historical complaint-related profile.
[0150] Based on the user's unique identification information, locate the database that stores the user's historical complaint portrait. Retrieve historical complaint portraits: perform a query operation to retrieve the current user's historical complaint portraits from the database. Assume that the portrait dimension information includes: the complaint frequency is 1-2 times per month (average over the past six months), the complaint type preference is mainly concentrated on registration system failures, and the sensitivity score is 7 points (out of 10 points, the higher the score, the more sensitive it is). Match the current complaint instant messaging message content with the various dimensional information in the historical complaint portraits. The current complaint content is related to the registration system failure, and the patient is emotionally agitated. Combined with the historical complaint frequency and sensitivity score, it is identified that the nature of the complaint is a high-frequency complaint (an average of 1-2 complaints per month in the past six months, which is relatively frequent) and the patient's sensitivity is high. It can be further determined as a high-frequency complaint with the risk of escalation.
[0151] Because this complaint is a high-frequency one, the hospital can block all instant messaging for a certain period of time (e.g., two months). (However, the hospital must ensure that dedicated channels or personnel are in place to follow up during this period, such as customer service staff proactively contacting the patient to learn about the issue.) At the same time, the hospital should arrange for the information technology department to conduct a comprehensive inspection and optimization of the registration system to resolve system issues as quickly as possible, improve patient registration success rates, and prevent further escalation of patient issues.
[0152] By dynamically blocking instant messaging messages, hospitals can quickly categorize and address complaints, focusing more on resolving patients' real issues rather than being overwhelmed by a large number of repetitive complaints, thereby improving overall complaint handling efficiency. By promptly identifying patients with frequent complaints and those at risk of escalating complaints and taking appropriate measures, they can prevent further escalation of patient issues and reduce the hospital's reputational risk and potential medical disputes. While blocking high-frequency complainants, dedicated personnel are assigned to follow up on their complaints, ensuring patients feel the hospital's seriousness about their issues. This helps improve patient satisfaction and loyalty, and enhances the doctor-patient relationship.
[0153] The above-mentioned dynamic instant messaging message blocking method achieves rapid processing of complaint instant messaging messages through automated steps such as acquiring and extracting key information, classifying, and determining user historical complaint profiles. This eliminates the need for manual searching for mobile phone numbers and selecting blocking types one by one, significantly shortening complaint processing time and improving processing efficiency. Furthermore, by utilizing key information to classify complaint instant messaging messages and combining them with user historical complaint profiles for identification, the nature of complaint instant messaging messages can be more accurately determined, enabling the implementation of more precise blocking strategies and reducing the likelihood of misjudgments and omissions. Furthermore, high-frequency or malicious complaint instant messaging messages can be promptly blocked, effectively reducing harassment and intrusion on users and enhancing the user experience. Furthermore, special types of instant messaging messages are blocked after eliminating compliance-required instant messaging messages according to preset frequency rules, thus protecting user rights and balancing business compliance. Furthermore, the automated processing process reduces the need for manual intervention and reduces the company's human resources investment in complaint handling. Furthermore, due to the improved processing efficiency, companies can handle more complaints in a shorter period of time, further improving operational efficiency.
[0154] Figure 3 FIG is a schematic block diagram of an instant messaging message dynamic shielding device 300 provided by an embodiment of the present invention. Figure 3 As shown, corresponding to the above instant messaging message dynamic shielding method, the present invention also provides an instant messaging message dynamic shielding device 300. The instant messaging message dynamic shielding device 300 includes a unit for executing the above instant messaging message dynamic shielding method, and the device can be configured in a server.
[0155] Specifically, see Figure 3 The instant messaging message dynamic shielding device 300 includes:
[0156] The acquisition unit 301 is used to acquire the content of the complaint instant messaging message submitted by the user;
[0157] Extraction unit 302, used to extract the complaint instant messaging message content to obtain key information;
[0158] The classification unit 303 is used to classify the content of the complaint instant messaging message according to the key information to obtain a classification result;
[0159] The judgment unit 304 is used to judge whether the current user has a historical complaint-related profile based on the classification result;
[0160] The query identification unit 305 is used to query the historical complaint-related portraits if the current user has any, and identify the nature of the complaint in the current complaint instant messaging message;
[0161] The implementation unit 306 is used to implement a corresponding shielding strategy according to the nature of the complaint.
[0162] In one embodiment, the acquisition unit 301 is used to connect to the channel complaint entrance of the official APP, instant messaging platform and customer service hotline, and uniformly receive complaint information submitted by users to obtain the content of the complaint instant messaging message.
[0163] In one embodiment, the extraction unit 302 includes:
[0164] A preprocessing module is used to preprocess the content of the complaint instant messaging message, including removing irrelevant characters, advertising links and unifying the text format to obtain preprocessed content;
[0165] The extraction and integration module is used to extract keywords, semantic analysis and user emotions from the pre-processed content and integrate them to form key information.
[0166] In one embodiment, the classification unit 303 includes:
[0167] A matching module is used to match the keywords in the key information with the predefined classification keyword library to obtain keyword matching results;
[0168] The overall analysis module is used to perform an overall analysis of the semantics in the key information to obtain semantic analysis results;
[0169] The analysis module is used to perform sentiment analysis on user emotions in key information to obtain sentiment analysis results;
[0170] The combination module is used to combine the keyword matching results, semantic analysis results and sentiment analysis results to obtain the classification results.
[0171] In one embodiment, the determining unit 304 includes:
[0172] The extraction and query module is used to extract the user's unique identification information from the complaint instant messaging message content, and query the current user's historical complaint records in the database based on the user's unique identification information to obtain the query results;
[0173] The screening and differentiation module is used to filter historical complaint records similar to the current complaint type from the query results based on the classification results, so as to distinguish whether the current user has a historical complaint-related profile.
[0174] In one embodiment, the query identification unit 305 includes:
[0175] A positioning module is used to locate the database storing the user's historical complaint profile based on the user's unique identification information;
[0176] The execution retrieval module is used to perform query operations and retrieve the current user's historical complaint profile from the database, including profile dimension information such as complaint frequency, complaint type preference, and sensitivity score;
[0177] The matching and identification module is used to match the content of the current complaint instant communication message with the various dimensional information in the historical complaint portrait, and to identify the portrait features related to the content of the current complaint instant communication message to obtain the nature of the complaint.
[0178] In one embodiment, the nature of the complaint includes: high-frequency complaints, malicious complaints, or special types.
[0179] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the instant messaging message dynamic shielding device 300 and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0180] The instant messaging message dynamic shielding device 300 can be implemented as a computer program. Figure 4 Runs on the computer device shown.
[0181] See also Figure 4 , Figure 4 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers.
[0182] See Figure 4 The computer device 500 includes a processor 502 , a memory, and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0183] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, which, when executed, can enable the processor 502 to execute a method for dynamically shielding instant messaging messages.
[0184] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
[0185] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for dynamically shielding instant messaging messages.
[0186] The network interface 505 is used to communicate with other devices through the network. Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0187] The processor 502 is configured to execute a computer program 5032 stored in the memory to implement the following steps:
[0188] Obtain the content of the complaint instant communication message submitted by the user; extract the content of the complaint instant communication message to obtain key information; classify the content of the complaint instant communication message based on the key information to obtain a classification result; based on the classification result, determine whether the current user has a historical complaint-related portrait; if the current user has a historical complaint-related portrait, query the historical complaint-related portrait and identify the nature of the complaint in the current complaint instant communication message content; implement a corresponding blocking strategy based on the nature of the complaint.
[0189] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0190] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing the relevant hardware through a computer program. The computer program includes program instructions, which can be stored in a storage medium that is computer-readable. The program instructions are executed by at least one processor in the computer system to implement the steps in the method of the above-described embodiment.
[0191] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor performs the following steps:
[0192] Obtain the content of the complaint instant communication message submitted by the user; extract the content of the complaint instant communication message to obtain key information; classify the content of the complaint instant communication message based on the key information to obtain a classification result; based on the classification result, determine whether the current user has a historical complaint-related portrait; if the current user has a historical complaint-related portrait, query the historical complaint-related portrait and identify the nature of the complaint in the current complaint instant communication message content; implement a corresponding blocking strategy based on the nature of the complaint.
[0193] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0194] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0195] In the several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the various units is merely a logical functional division, and actual implementation may employ other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0196] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted as needed. The units in the devices of the embodiments of the present invention may be combined, divided, or deleted as needed. Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0197] If this integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present invention.
[0198] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention 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 the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A method for dynamically shielding instant messaging messages, characterized in that: include: Obtain the content of complaint instant messaging messages submitted by users; Extract the content of complaint instant messaging messages to obtain key information; Classify the content of the complaint instant messaging messages according to key information to obtain classification results; Based on the classification results, determine whether the current user has a profile related to historical complaints; If the current user has a history of complaint-related profiles, query the history of complaint-related profiles and identify the nature of the complaint in the current instant messaging message; Implement corresponding blocking strategies based on the nature of the complaint.
2. The method for dynamic shielding of instant messaging messages according to claim 1, characterized in that: The obtaining of the content of the complaint instant messaging message submitted by the user includes: Connect to the channel complaint portal of the official APP, instant messaging platform and customer service hotline to uniformly receive complaint information submitted by users to obtain the content of the complaint instant messaging message.
3. The method for dynamic shielding of instant messaging messages according to claim 1, characterized in that: Extracting the complaint instant messaging message content to obtain key information includes: Pre-processing the content of the complaint instant messaging message, including removing irrelevant characters, advertising links, and unifying the text format to obtain pre-processed content; Extract keywords, semantic analysis and user sentiment from pre-processed content and integrate them to form key information.
4. The method for dynamic shielding of instant messaging messages according to claim 3, characterized in that: The content of the complaint instant messaging message is classified according to the key information to obtain a classification result, including: Match the keywords in the key information with the predefined classification keyword library to obtain keyword matching results; Conduct a holistic analysis of the semantics in key information to obtain semantic analysis results; Perform sentiment analysis on user emotions in key information to obtain sentiment analysis results; Combine keyword matching results, semantic analysis results, and sentiment analysis results to obtain classification results.
5. The method for dynamic shielding of instant messaging messages according to claim 1, characterized in that: The process of judging whether the current user has a historical complaint profile based on the classification results includes: Extracting user unique identification information from the complaint instant messaging message content, and searching the database for the current user's historical complaint records based on the user unique identification information to obtain a query result; Based on the classification results, historical complaint records similar to the current complaint type are filtered from the query results to distinguish whether the current user has a historical complaint-related profile.
6. The method for dynamic shielding of instant messaging messages according to claim 5, characterized in that: If the current user has a historical complaint profile, query the historical complaint profile and identify the nature of the complaint in the current instant messaging message, including: Based on the user's unique identification information, locate the database that stores the user's historical complaint profile; Execute a query operation to retrieve the current user's historical complaint profile from the database, including profile dimension information such as complaint frequency, complaint type preference, and sensitivity score; The content of the current complaint instant communication message is matched with the dimensional information in the historical complaint portrait, and the portrait features related to the content of the current complaint instant communication message are identified to obtain the nature of the complaint.
7. The method for dynamic shielding of instant messaging messages according to claim 1, characterized in that: The nature of the complaint includes: high-frequency complaints, malicious complaints or special types.
8. The device for dynamic shielding of instant messaging messages is characterized in that: include: An acquisition unit, used to acquire the content of the complaint instant messaging message submitted by the user; An extraction unit, used to extract the content of the complaint instant messaging message to obtain key information; A classification unit, configured to classify the content of the complaint instant messaging message according to key information to obtain a classification result; A judgment unit, used to judge whether the current user has a historical complaint-related profile based on the classification result; A query identification unit is used to query the historical complaint-related portraits if the current user has any, and identify the nature of the complaint in the current complaint instant messaging message; The implementation unit is used to implement corresponding blocking strategies based on the nature of the complaint.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.