Anonymous online chat management interaction method and system
By processing virtual profiles and improving the semantic matching of the BERT model, combined with end-to-end encryption and dynamic permission management, the contradiction between anonymity and matching accuracy in traditional anonymous chat systems is resolved. This achieves an efficient, secure, and flexible anonymity and matching accuracy for anonymous chat systems, adapting to high-concurrency scenarios.
Patent Information
- Application Number
- CN202511156471.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-11-14
AI Technical Summary
Traditional anonymous chat systems suffer from inefficiencies and privacy risks in matching mechanisms, permission management, data retrieval, and communication architecture. They cannot balance anonymity and matching accuracy, and are unsuitable for emergency risk control scenarios.
By employing virtual portrait processing, semantic matching based on an improved BERT model, end-to-end encryption, and dynamic permission management, combined with a lightweight multi-task model and efficient communication architecture, it achieves user attribute encryption, virtual face generation, dual-blind session channels, and real-time detection of sensitive content.
It improves the anonymity and matching accuracy of anonymous chat systems, reduces the risk of deanonymization attacks, enhances user experience and communication efficiency, supports minute-level permission adjustments and second-level high-risk responses, and adapts to high-concurrency scenarios.
Smart Images

Figure CN120956704A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer network communication and information security technology, and in particular to an anonymous online chat management and interaction method and system. Background Technology
[0002] Traditional anonymous chat systems suffer from significant flaws: In terms of matching mechanisms, most rely on random algorithms, resulting in low user satisfaction rates. Public data shows a matching accuracy rate of less than 40%, and they are incompatible with age, gender, and other criteria for filtering, severely degrading the user experience. Regarding access control, they depend on predefined static role groups, requiring administrators to modify code or restart the service to adjust permissions, with response times exceeding 30 minutes, making them unsuitable for emergency risk control scenarios. In data retrieval, they only support single-keyword or time queries. For complex queries like "conversations between 14:00 and 15:00 on May 1, 2023, including transfers," efficiency drops by more than eight times, making it difficult to trace inappropriate content. The communication architecture generally uses HTTP polling, with an average message latency of 350ms, and a service crash rate exceeding 50% under tens of thousands of concurrent users. Existing improvement solutions attempt to introduce conditional matching, but fail to resolve the contradiction between anonymity and matching accuracy—opening attribute filtering leaks user privacy, while complete anonymity leads to inaccurate matching. Although some systems attempt to encrypt attributes, the risk of plaintext leakage remains after server-side decryption. In addition, sensitive information detection is mostly deployed on the server side, which violates the end-to-end encryption principle, while the client-side detection model is too large to run in real time on mobile devices.
[0003] Therefore, it is essential to design an anonymous online chat management and interaction method and system. Summary of the Invention
[0004] In order to overcome the shortcomings of the prior art, the purpose of this invention is to provide an anonymous online chat management and interaction method and system.
[0005] To achieve the above objectives, the present invention provides the following solution:
[0006] This invention provides an anonymous online chat management and interaction method, comprising:
[0007] Step 1: Users upload user attributes via the client;
[0008] Step 2: The server performs virtual profile processing on the user attributes;
[0009] Step 3: Matching based on virtual user profiles;
[0010] Step 4: Establish a double-blind session channel based on the matching results;
[0011] Step 5: Identify and determine the messages sent by the user.
[0012] Preferably, in step 1, the user uploads user attributes through the client, specifically as follows:
[0013] Users input user attributes, including age, gender, and interest tags, through the client to construct an attribute set. The attribute set is then encrypted using an asymmetric encryption algorithm to obtain the encrypted attribute set, which is then uploaded to the server.
[0014] Preferably, in step 2, the server performs virtual profile processing on the user attributes, specifically as follows:
[0015] The server obtains the encrypted attribute set uploaded by the client, decrypts it, and calls the pre-trained StyleGAN2 model based on the decrypted attribute set to generate the main image. The user attributes in the attribute set are input into the condition control module of GAN to generate a virtual face image that meets the attribute constraints and a matching virtual interest label.
[0016] Label the virtual face images and their corresponding virtual interest tags;
[0017] Create a fictional virtual face image and its associated virtual interest tags. Combine the fictional virtual face image and its associated virtual interest tags with annotated real virtual face images and their associated virtual interest tags to generate the final virtual face image and its associated virtual interest tags, and then inject it into the matching pool.
[0018] Preferably, in step 3, matching is performed based on the virtual user profile, specifically as follows:
[0019] The final virtual face image and its associated virtual interest tags are obtained from the matching pool. Based on the annotation, the fictional virtual face image and its associated virtual interest tags are separated from the real virtual face image and its associated virtual interest tags.
[0020] The improved BERT model is used to analyze virtual face images and their corresponding virtual interest tags to determine whether a match is successful.
[0021] Preferably, in step 4, a double-blind session channel is established based on the matching results, specifically as follows:
[0022] Let the two users who were successfully matched be user A and user B;
[0023] Generate a virtual ID BVirtualID for user A that points to user B, and generate a virtual ID AVirtualID for user B that points to user A;
[0024] The server sends BVirtualID to user A and AVirtualID to user B;
[0025] User A and User B establish a P2P channel using the WebRTC protocol. Message transmission uses AES-256 end-to-end encryption, with the key generated locally by the client. After the session is established, the server disconnects the relay, and communication does not go through the server.
[0026] Preferably, in step 5, the message sent by the user is identified and determined, specifically as follows:
[0027] The TinyBERT-based compressed multi-task model is deployed on the client side, which integrates sensitive word detection, sentiment polarity analysis and violation pattern recognition functions.
[0028] Before a user sends a message, the multi-task model makes a specific determination on the content the user wants to send.
[0029] If the requirements are met, the message will be sent directly; otherwise, a pop-up notification or forced blocking will be implemented depending on the specific needs.
[0030] The present invention also provides an anonymous online chat management and interaction system, comprising: a client and a server, wherein the client is used by the user to upload user attributes and conduct anonymous conversations; and the server is used to perform conversation matching for the user.
[0031] Preferably, the client is equipped with a user attribute upload module, a session channel establishment module, and a client content security module. The user attribute upload module is used for users to upload user attribute information, encrypt it, and upload it to the server. The session channel establishment module is used to establish a double-blind session channel based on the user virtual ID generated by the server. The client content security module is used to review the content sent by the user.
[0032] Preferably, the server is equipped with a virtual profile generation module, a user profile matching module, and a virtual ID generation module. The virtual profile generation module is used to decrypt the encrypted user attribute information and generate virtual profile information based on it. The user profile matching module performs user matching based on the generated virtual profile information. The virtual ID generation module generates virtual IDs for the two matched users.
[0033] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0034] This invention provides an anonymous online chat management and interaction method and system. The method includes: users uploading user attributes through a client; the server performing virtual profile processing on the user attributes; matching based on the virtual user profile; establishing a double-blind session channel based on the matching results; and identifying and judging messages sent by users. This invention overcomes technical bottlenecks through four innovations: First, it creates a unique encryption-decryption-profile-noise closed loop. After user attributes are uploaded with asymmetric encryption, the server decrypts them in the Hardware Security Module (HSM) and drives StyleGAN2 to generate virtual face profiles with interest tags. After mixing 50% of the virtual profiles, they are injected into the matching pool. This retains the filtering capability of "age / gender / interest" while cutting off the identity tracing path through noise injection and bidirectional virtual IDs. Actual tests show that the success rate of deanonymization attacks is reduced. Second, it achieves semantic-level matching by parsing profile tags based on an improved BERT model. Combined with the establishment of a double-blind WebRTC channel, it improves matching accuracy while maintaining low latency, significantly improving efficiency compared to traditional random matching. Third, the TinyBERT multi-task model deployed on the client side supports real-time detection of sensitive words, sentiment tendencies, and violation patterns before message sending. Through adversarial training, it covers 98% of homophone variants, achieving a 95% interception rate with no privacy leaks. On the management side, an innovative dynamic permission matrix allows administrators to temporarily grant specialists "viewing rights to specific user chat logs" after two-factor authentication, with permission validity accurate to the minute, reducing high-risk event response time from 30 minutes to 90 seconds. Fourth, the WeChat Mini Program and Spring Boot backend adopt a Netty long-connection architecture, compressing traffic by 60% through Protobuf binary encoding, supporting a message delivery latency of 120ms under 100,000 concurrent connections, saving 67% bandwidth compared to HTTP polling solutions. The overall system, while ensuring end-to-end anonymity, achieves a synergistic leap in matching accuracy, management flexibility, and communication efficiency, providing a secure and controllable interactive infrastructure for scenarios such as social entertainment and financial risk control. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0037] Figure 2 This is a schematic diagram of the BERT-CNN-BiLSTM-Attention model structure;
[0038] Figure 3This is a schematic diagram of the BERT embedding layer. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0040] The purpose of this invention is to provide an anonymous online chat management and interaction method and system, which significantly improves the performance of anonymous chat systems through four innovations: a pioneering virtual profile noise injection mechanism that reduces the risk of deanonymization while retaining age / gender screening capabilities; improved accuracy and efficiency through semantic matching based on an improved BERT; a lightweight multi-task model deployed on the client side to intercept sensitive content without privacy leakage; and a dynamic permission matrix that supports minute-level permission adjustments, compressing high-risk response time to the second level. This invention achieves synergistic optimization of matching accuracy, management flexibility, and communication efficiency while ensuring privacy.
[0041] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0042] like Figure 1 As shown, the present invention provides an anonymous online chat management and interaction method, including:
[0043] Step 1: Users upload user attributes via the client;
[0044] Step 2: The server performs virtual profile processing on the user attributes;
[0045] Step 3: Matching based on virtual user profiles;
[0046] Step 4: Establish a double-blind session channel based on the matching results;
[0047] Step 5: Identify and determine the messages sent by the user.
[0048] In step 1, the user uploads user attributes through the client, specifically as follows:
[0049] Users input user attributes, including age, gender, and interest tags, through the client to construct an attribute set. The attribute set is then encrypted using an asymmetric encryption algorithm to obtain the encrypted attribute set, which is then uploaded to the server.
[0050] This invention introduces the asymmetric encryption algorithm used. Asymmetric encryption algorithms use two asymmetric keys, meaning they require different public and private keys for encryption and decryption. This invention uses the RSA algorithm, and the method for generating RSA key pairs is as follows: First, select two prime numbers of the same length but different from each other, denoted as m and n respectively. Then, process these two prime numbers as follows:
[0051] ;
[0052] To ensure the security of the algorithm, the two prime numbers are kept secret, but the processed result needs to be made public; then, the encryption public key d is selected using the following formula:
[0053] ;
[0054] The decryption private key f is determined based on the public key d obtained from the solution and the Euclid algorithm, i.e.:
[0055] ;
[0056] This determines the key pair for the RSA algorithm, and prime numbers used in the solution process can be directly destroyed;
[0057] The encryption process for data fragments in the encryption module is as follows: First, the server sends the encryption public key (d, p) from the key pair to the client; then, the client divides the data fragment M1 into blocks, with block length l and block result M1 as follows:
[0058] ;
[0059] The third step is to use an encryption algorithm to calculate the ciphertext for each group of data, namely:
[0060] ;
[0061] Finally, by combining the ciphertext of each set of data, the ciphertext of the data can be obtained, namely:
[0062] ;
[0063] The client sends the ciphertext to the server, which decrypts it. The decryption process is similar to the encryption process, and the resulting ciphertext blocks are:
[0064] ;
[0065] The decrypted data result is:
[0066] ;
[0067] It should also be noted that the server performs key generation and decryption operations in an isolated Hardware Security Module (HSM) to ensure a secure operating environment.
[0068] In step 2, the server performs virtual profile processing on user attributes, specifically as follows:
[0069] The server obtains the encrypted attribute set uploaded by the client, decrypts it, and calls the pre-trained StyleGAN2 model based on the decrypted attribute set to generate the main image. The user attributes in the attribute set are input into the condition control module of GAN to generate a virtual face image that meets the attribute constraints and a matching virtual interest label.
[0070] Label the virtual face images and their corresponding virtual interest tags;
[0071] Create a fictional virtual face image and its associated virtual interest tags. Combine the fictional virtual face image and its associated virtual interest tags with annotated real virtual face images and their associated virtual interest tags to generate the final virtual face image and its associated virtual interest tags, and then inject it into the matching pool.
[0072] In step 3, matching is performed based on the virtual user profile, specifically as follows:
[0073] The final virtual face image and its associated virtual interest tags are obtained from the matching pool. Based on the annotation, the fictional virtual face image and its associated virtual interest tags are separated from the real virtual face image and its associated virtual interest tags.
[0074] The improved BERT model is used to analyze virtual face images and their corresponding virtual interest tags to determine whether a match is successful.
[0075] The improved BERT model described here is the BERT-CNN-BiLSTM-Attention model. This invention deeply integrates the contextual semantic information extracted by the BERT model with the local and sequence features extracted by CNN and BiLSTM, and introduces an attention mechanism to enhance the interpretability of feature weight allocation. In summary, the model structure includes four different modules, functionally comprising four aspects: a BERT embedding layer, a semantic extraction layer, an attention layer, and a fully connected layer. The BERT embedding layer uses the word embedding mode of the BERT model to generate context-dependent dynamic word vectors, effectively modeling the bidirectional semantics of the text. The semantic extraction layer uses CNN and BiLSTM to extract local structural features and global sequence dependencies, respectively. The attention mechanism increases the model's emphasis on key semantic regions. The fully connected layer fuses multiple features, and finally uses the Softmax function to evaluate the output and determine whether a match is successful. The model's structural diagram is shown below. Figure 2 As shown;
[0076] First, let's introduce the BERT embedding layer. The preprocessing steps before BERT encodes the input text consist of five processes: word segmentation, adding special markers, padding, digitization, and embedding. In this process, the WordPiece model is used to segment the text. Then, the symbols [CLS] and [SEP] are added at the beginning and end of sentences, and [SEP] is added between two sentences. The symbol [PAD] is used to pad shorter sequences to match the length of the longest sequence. Next, the segmented words are mapped to their respective vocabulary IDs and combined into a vector sequence. Finally, the corresponding sequence is fed into the embedding layer and vectorized to obtain dense word vector representations. The BERT embedding layer is as follows: Figure 3 As shown;
[0077] (1) Tokenization:
[0078] BERT's word segmentation strategy differs from traditional space segmentation; it uses the WordPiece word segmentation method.
[0079] (2) Add special markers
[0080] BERT introduces two special markers for the input sequence: [CLS] is used to indicate the beginning of the sequence, and the output at this position (i.e., the last hidden state of the Transformer) is usually used as the aggregate representation of the entire sequence; [SEP] is used to indicate the end of the sequence or to separate different sequences.
[0081] (3) Padding:
[0082] Since the BERT model requires a uniform text length in the input, the text sequence needs to be padded before input. For sequences that are not long enough, the marker [PAD] is used to padded them to ensure a uniform input length. The [PAD] itself does not affect the model output during the calculation.
[0083] (4) Digitization:
[0084] Tokenization transforms the tokens after word segmentation into integer IDs that the model can process. Each subword is mapped to an integer ID in the BERT vocabulary, and the generated ID sequence is the input to the model. The BERT vocabulary is constructed using the vocabulary in the pre-training data, and it usually covers commonly used words and subword sequences, and has strong versatility.
[0085] (5) Embedding:
[0086] BERT's input consists of three types of embedding vectors: Token Embeddings, Segment Embeddings, and Position Embeddings. Token Embeddings represent the word itself, Segment Embeddings distinguish sentences A from B, and Position Embeddings represent the position of the current word in the sequence. The sum of these three forms the final representation of each input token, which serves as the input to the Transformer encoder.
[0087] The output of the BERT model consists of two main parts:
[0088] Last_hidden_state: is the output of the last hidden layer of BERT, containing the context representation of each position. The output shape is [batch_size, sequence_length, hidden_size]. Each token corresponds to a vector, usually represented as outputs[0].
[0089] Pooler_output: The hidden state vector marked at the CLS position is obtained after processing by the linear layer and the activation layer. Its shape is [batch_size, hidden_size], and it is generally represented as outputs[1].
[0090] The semantic extraction layer is described below: In the semantic extraction layer, the output of the BERT model is input into two types of feature extraction models: the Last_hidden_state is input into the BiLSTM module, and the Pooler_output is input into the CNN module. The BiLSTM network can effectively process long text sequences and capture the bidirectional dependencies of the text. When processing sequence data, BiLSTM can combine historical information from the previous time step with the input information from the current time step to determine the output information at the current time step, thereby extracting contextual features from the text sequence. For v t At time t, the results obtained by forward LSTM and backward LSTM are respectively: and The two hidden states are:
[0091] ;
[0092] Combining the forward representation of each word and backward representation To obtain more complete contextual information, the hidden state h at the current time t is... t The specific formula can be expressed as:
[0093] ;
[0094] By using BiLSTM to extract features from the text information, the final feature vector L will be obtained. x .
[0095] In CNNs, the output matrix of the BERT model is M = {M1, M2, ..., M}. n Perform a convolution operation, assuming the convolution kernel length is s, meaning the convolution operation is performed on s word segmentation vectors each time. The stride of the convolution kernel is generally set to 1. Slide the text matrix up and down, then M can be divided into {M... 1:s M 2:s+1 M n-s+1:n}, where M i:j Representation vector M i To M j The concatenation of all vectors, after performing a convolution operation on each component, yields a vector c = {c1, c2, ..., c}. n-s+1}, and c i For component M n-s+1:n The value obtained after performing a convolution operation is called a local feature map, and its calculation formula is shown below:
[0096] ;
[0097] Where W is the parameter of the convolution kernel, b is the bias variable, and then the text feature mapping vector c = {c1, c2, ..., c...} captured by the convolution is... n-s+1 Max pooling is performed, and the formula is expressed as:
[0098] ;
[0099] To extract better features, the final feature vector L is obtained after multiple convolutional kernels and pooling operations. y .
[0100] An introduction to the attention layer: The attention mechanism uses the asymmetry of human attention to information for weighting. This invention designs the application of the attention mechanism in the semantic extraction layer to enhance its features. After applying the attention mechanism to the semantic extraction layer, the feature representation capability is enhanced, and the feature vector X={X1, X2, ..., X...} obtained from the semantic extraction layer is... n First, attention scores e are calculated at each time step of the attention layer. t The calculation, for each time step t, of the characteristic X t The calculation formula is as follows:
[0101] ;
[0102] Where W is the weight matrix and b is the bias term.
[0103] Next, the attention score is normalized using the softmax function to obtain the attention weight α. t The calculation formula is as follows:
[0104] ;
[0105] Finally, using attention weight α t For input vector X t The weighted summation yields the output vector U, calculated using the following formula:
[0106] ;
[0107] The vector L from the semantic extraction layer after the attention layer x and L y Generate new feature vectors and These output feature vectors are then combined to form the final feature vector L. z Ultimately, it can be expressed as:
[0108] .
[0109] Introduction to fully connected layers: Combination feature Lz The input is used as the input to the fully connected layer, where dropout is applied. For binary classification datasets, the sigmoid function is chosen as the activation function of the output layer, and binary cross-entropy (BCE) is used as the loss function. For multi-class classification datasets, the softmax function is chosen as the activation function of the output layer, and categorical cross-entropy (CCE) is used as the loss function. The softmax classifier is shown in the following formula:
[0110] ;
[0111] Where x is the input vector, x i It is the i-th element of the vector, and n is the length of the vector.
[0112] In step 4, a double-blind session channel is established based on the matching results, specifically as follows:
[0113] Let the two users who were successfully matched be user A and user B;
[0114] Generate a virtual ID BVirtualID for user A pointing to user B, and generate a virtual ID AVirtualID for user B pointing to user A. The ID format is a time-sensitive hash value: H(user IP + timestamp + salt), which expires after 24 hours.
[0115] The server sends BVirtualID to user A and AVirtualID to user B;
[0116] User A and User B establish a P2P channel using the WebRTC protocol. Message transmission uses AES-256 end-to-end encryption, with the key generated locally by the client. After the session is established, the server disconnects the relay, and communication does not go through the server.
[0117] In step 5, the message sent by the user is identified and judged, specifically as follows:
[0118] The TinyBERT-based compressed multi-task model is deployed on the client side. It integrates functions such as sensitive word detection (supporting variants and homophones), sentiment polarity analysis (negative / neutral / positive), and violation pattern recognition (leading words, hidden contact information). It should also be noted that the sensitive word library and model parameters are synchronized weekly through incremental update packages.
[0119] Before a user sends a message, the multi-task model performs a specific assessment of the content to be sent, including scoring based on keywords, which includes:
[0120] 1. Low risk (score < 60): If it contains common words like "price", it is sent directly.
[0121] 2. Medium risk (60 ≤ score < 85): If it contains "transfer" and has a neutral sentiment, a pop-up window will prompt "The content may be sensitive. Confirm to send?"
[0122] 3. High risk (score ≥ 85): If it contains "Add WeChat to receive a bonus", it will be forcibly intercepted and a prompt will indicate that the content is违规.
[0123] Among them, there may also be cases where the sender's client is tampered with to bypass detection. The receiver's client re-runs the detection model on the decrypted message. If it is identified as high-risk content, the message will be displayed as the content has been blocked and an appeal viewing button (requiring face verification) will be provided.
[0124] The server uses the TextAttack tool to generate new variant samples every week (e.g., "WeiXin" → "WeChat").
[0125] It also adopts federated learning updates, including:
[0126] The client anonymously uploads the hash values of misjudged samples (not the content).
[0127] The server aggregates high-frequency misjudged samples and trains a new version of the model.
[0128] It is pushed to the client through an incremental update package (average volume < 500KB).
[0129] There are two scenarios for querying chat records, and they are introduced separately:
[0130] Scenario 1: The user queries their own chat records:
[0131] Operation process:
[0132] The user triggers the query.
[0133] Click the history record button in the chat interface.
[0134] The system requires fingerprint verification (or face recognition).
[0135] The client performs local retrieval.
[0136] After verification passes, the client automatically executes: the time range set by the user (e.g., the last 7 days) + keywords (e.g., "project quotation"); Search engine: Based on the SQLite FTS5 full-text search module (built-in on mobile); Index optimization: Chat records are stored in slices by date (daily B+ tree index).
[0137] High-risk content in the search results (such as bank card numbers) is automatically desensitized and displayed as ***.
[0138] Scenario 2: Staff remotely view the chat history of the user being complained about.
[0139] The operation procedure is as follows:
[0140] 1. User B complained that User A (ID: user_A123) posted fraudulent information in the chat;
[0141] 2. The review administrator logs into the backend: verifies the authenticity of the complaint materials; dynamically grants the executive specialist kefu_009 two permissions: REMOTE_DECRYPT (remote decryption right, valid for 2 hours); USER_A_VIEW (only allowed to view user_A123's records);
[0142] 3. Key negotiation and acquisition:
[0143] The executive officer kefu_009 clicks to view the complaint record on the client; the system initiates a three-party key negotiation protocol; user A device receives the request and generates random key fragment 1; KMS generates random key fragment 2; fragments 1 and 2 are combined in KMS to form the complete key KEY_full, which is sent to the executive officer via an HTLS encrypted channel;
[0144] 4. Remote decryption and viewing: After the execution specialist client obtains KEY_full; pull encrypted records: download encrypted records for the target time period from the local database of user A's device; local decryption and analysis: use KEY_full to decrypt the chat content; perform detection based on the method in step 5, highlight risky content, and take screenshots of risky content (automatically mosaicking to hide irrelevant text);
[0145] 5. Automatic permission reclamation: After the operation is completed, KEY_full is automatically destroyed in the client's memory; the REMOTE_DECRYPT and USER_A_VIEW permissions for specialists expire in the server's time table; downloaded encrypted records are automatically deleted after 24 hours.
[0146] It should also be noted that this invention includes a dynamic permission allocation mechanism, which will be described below. The permission type definitions include:
[0147] 1. Basic permissions: View user list, approve general content;
[0148] 2. Advanced Permissions: SENSITIVE_VIEW: View chat logs containing sensitive words; USER_BAN: Ban accounts that violate the rules; LOG_EXPORT: Export all logs;
[0149] 3. Permission validity period: Supports setting validity period (e.g., 1 hour / 1 day / permanent).
[0150] This invention provides several scenario examples:
[0151] 1. Handling user complaints
[0152] Background: User A complained that User B posted fraudulent messages in a chat, and customer service needs to check sensitive records;
[0153] Permission allocation process:
[0154] Step 1: Admin initiates authorization. The administrator logs into the backend, selects the customer service account kefu_003; checks the SENSITIVE_VIEW permission and sets the validity period to 2 hours; enters a dynamic password (such as an SMS verification code) to complete identity verification.
[0155] Step 2: The system updates permissions in real time. The server adds a record to the permission expiration table, and the update result is synchronized to all service nodes in real time (via Redis Pub / Sub broadcast).
[0156] Step 3: Customer service executes the operation. Within the validity period, customer service representative kefu_003 remotely controls user B's client and searches user B's chat history (including sensitive word transfers). After confirming the violation, the representative requests temporary USER_BAN permissions to ban user B's account.
[0157] Step 4: Permissions are automatically revoked. The system's scheduled task scans the permission expiration table every 5 minutes, and expired records are automatically deleted; permission icons on the customer service interface are grayed out for easy viewing.
[0158] The present invention also provides an anonymous online chat management and interaction system, comprising: a client and a server, wherein the client is used by the user to upload user attributes and conduct anonymous conversations; and the server is used to perform conversation matching for the user.
[0159] The client is equipped with a user attribute upload module, a session channel establishment module, and a client content security module. The user attribute upload module is used for users to upload user attribute information, encrypt it, and upload it to the server. The session channel establishment module is used to establish a double-blind session channel based on the user virtual ID generated by the server. The client content security module is used to review the content sent by the user.
[0160] The server is equipped with a virtual profile generation module, a user profile matching module, and a virtual ID generation module. The virtual profile generation module is used to decrypt encrypted user attribute information and generate virtual profile information based on it. The user profile matching module performs user matching based on the generated virtual profile information. The virtual ID generation module generates virtual IDs for the two matched users.
[0161] It should be noted that the efficient communication architecture between the client and server adopts a combination of WeChat Mini Program and Spring Boot backend, achieving efficient data transmission through lightweight APIs. This approach effectively reduces communication latency and supports stable operation under high concurrency scenarios. Compared to the traditional HTTP polling method, this system optimizes the real-time chat experience through long-connection technology, providing a smoother and more immediate communication service.
[0162] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0163] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An anonymous online chat management and interaction method, characterized in that, include: Step 1: Users upload user attributes via the client; Step 2: The server performs virtual profile processing on the user attributes; Step 3: Matching based on virtual user profiles; Step 4: Establish a double-blind session channel based on the matching results; Step 5: Identify and determine the messages sent by the user.
2. The method according to claim 1, characterized in that, In step 1, the user uploads user attributes through the client, specifically as follows: Users input user attributes, including age, gender, and interest tags, through the client to construct an attribute set. The attribute set is then encrypted using an asymmetric encryption algorithm to obtain the encrypted attribute set, which is then uploaded to the server.
3. The method according to claim 2, characterized in that, In step 2, the server performs virtual profile processing on user attributes, specifically as follows: The server obtains the encrypted attribute set uploaded by the client, decrypts it, and calls the pre-trained StyleGAN2 model based on the decrypted attribute set to generate the main image. The user attributes in the attribute set are input into the condition control module of GAN to generate a virtual face image that meets the attribute constraints and a matching virtual interest label. Label the virtual face images and their corresponding virtual interest tags; Create a fictional virtual face image and its associated virtual interest tags. Combine the fictional virtual face image and its associated virtual interest tags with annotated real virtual face images and their associated virtual interest tags to generate the final virtual face image and its associated virtual interest tags, and then inject it into the matching pool.
4. The method according to claim 3, characterized in that, In step 3, matching is performed based on the virtual user profile, specifically as follows: The final virtual face image and its associated virtual interest tags are obtained from the matching pool. Based on the annotation, the fictional virtual face image and its associated virtual interest tags are separated from the real virtual face image and its associated virtual interest tags. The improved BERT model is used to analyze virtual face images and their corresponding virtual interest tags to determine whether a match is successful.
5. The method according to claim 4, characterized in that, In step 4, a double-blind session channel is established based on the matching results, specifically as follows: Let the two users who were successfully matched be user A and user B; Generate a virtual ID BVirtualID for user A that points to user B, and generate a virtual ID AVirtualID for user B that points to user A; The server sends BVirtualID to user A and AVirtualID to user B; User A and User B establish a P2P channel using the WebRTC protocol. Message transmission uses AES-256 end-to-end encryption, with the key generated locally by the client. After the session is established, the server disconnects the relay, and communication does not go through the server.
6. The method according to claim 5, characterized in that, In step 5, the message sent by the user is identified and judged, specifically as follows: The TinyBERT-based compressed multi-task model is deployed on the client side, which integrates sensitive word detection, sentiment polarity analysis and violation pattern recognition functions. Before a user sends a message, the multi-task model makes a specific determination on the content the user wants to send. If the requirements are met, the message will be sent directly; otherwise, a pop-up notification or forced blocking will be implemented depending on the specific needs.
7. An anonymous online chat management and interaction system, characterized in that, include: The client and server are defined as follows: the client is used by the user to upload user attributes and conduct anonymous sessions. The server is used to perform session matching for users.
8. The system according to claim 7, characterized in that, The client is equipped with a user attribute upload module, a session channel establishment module, and a client content security module. The user attribute upload module is used for users to upload user attribute information, encrypt it, and upload it to the server. The session channel establishment module is used to establish a double-blind session channel based on the user virtual ID generated by the server. The client content security module is used to review the content sent by the user.
9. The system according to claim 8, characterized in that, The server is equipped with a virtual profile generation module, a user profile matching module, and a virtual ID generation module. The virtual profile generation module is used to decrypt the encrypted user attribute information and generate virtual profile information based on it. The user profile matching module performs user matching based on the generated virtual profile information; the virtual ID generation module generates virtual IDs for the two matched users.