Session processing method and device, storage medium and program product
By identifying inappropriate content and its context in a session through a pre-trained large model, and generating personalized blocking strategies, the problem of slow response and high false positive rate in existing technologies is solved, and efficient and accurate user blocking management is achieved.
Patent Information
- Application Number
- CN202510976064.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-10-31
AI Technical Summary
Current technologies for adding others to a block list rely on manual triggering or simple keyword rule filtering, which suffers from problems such as delayed response, high false positive rate, and lack of contextual understanding.
By collecting user session content and using pre-trained large models for semantic understanding, we can identify illegal content and its scenarios, construct historical context vectors, generate personalized blocking strategies, including blocking targets and methods, and replace manual triggering with an automatic blocking mechanism.
It improves the diversity and response speed of blocking strategies, enhances the ability to understand the context of conversation content, reduces the probability of poor communication experiences, and improves the quality and security of the conversation environment.
Smart Images

Figure CN120875895A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a session processing method, device, storage medium, and program product. Background Technology
[0002] With the development of internet technology, it has become popular for businesses to promote their services or products by posting on service platforms, or for users to find the services or products they need by posting. Taking business posting as an example, business A can post multiple times on the same platform, each post promoting the same or different services or products. After browsing any one or more of business A's posts, user B can establish a conversation with business A through the chat controls on the post, and inquire about the services or products advertised in that post.
[0003] If one or both parties have a negative communication experience with one or more conversations, one party can add the other to a block list to prevent further conversations. However, current methods for adding someone to a block list rely on manual triggering or simple keyword filtering, which suffers from drawbacks such as delayed response, high false positive rate, and lack of contextual understanding. Summary of the Invention
[0004] This application provides a session processing method, device, storage medium, and program product. On the one hand, it enriches the blocking strategies and improves their diversity; on the other hand, it adopts an automatic blocking mechanism instead of manual triggering, which can improve the blocking response speed; in addition, it enhances the ability to understand the context of session content and improves the accuracy of blocking strategy judgment. Moreover, by applying the powerful semantic understanding and reasoning capabilities of pre-trained large models to the field of user blocking, it breaks through the limitations of traditional rule systems and achieves a leap from passive defense to active identification, and from coarse-grained control to fine-grained management. It has strong innovation and practicality and is suitable for various session scenarios that require efficient management of user interactions.
[0005] This application provides a session processing method, comprising: during a session between a first user and multiple second users through multiple session channels, collecting session content between the first user and each second user to obtain multiple session contents, each session content corresponding to a session scenario; inputting the multiple session contents into a pre-trained large model to perform semantic understanding on the multiple session contents, identifying illegal content in the multiple session contents based on the semantic understanding results, and determining at least one target session content involved in the illegal content and at least one target session scenario corresponding to the at least one target session content; constructing a historical context vector of at least one target session scenario, and predicting session distribution information and user distribution information of the illegal content based on the historical context vector of at least one target session scenario and the feature vector of at least one target session content; generating a personalized blocking strategy based on the session distribution information and user distribution information corresponding to the illegal content, the personalized blocking strategy including blocking objects and blocking methods, the blocking objects including blocking users and / or blocking session scenarios, the blocking users being second users, different blocking methods corresponding to different blocking objects, the blocking methods including temporary blocking and permanent blocking, temporary blocking corresponding to a blocking period; and calling the blocking strategy application interface according to the blocking method in the personalized blocking strategy to perform blocking operations on the blocking objects in the personalized blocking strategy.
[0006] This application also provides an electronic device, including: a memory and a processor; the memory for storing a computer program; and the processor, coupled to the memory, for executing the computer program to implement the steps in the above-described class inheritance relationship resolution method or code analysis method based on program execution.
[0007] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the steps in the above-described class inheritance relationship resolution method or code analysis method based on program execution.
[0008] This application also provides a computer program product, which includes a computer program / instructions that, when executed by a processor, enable the processor to perform the steps in the above-described method.
[0009] In this embodiment, by collecting conversation content between a first user and multiple second users and using a pre-trained large model for semantic understanding, it is possible to accurately identify inappropriate content and its corresponding conversation scenarios. By constructing historical context vectors and combining them with feature vectors of conversation content, the distribution information of inappropriate content is predicted, thereby generating personalized blocking strategies. These strategies can not only select users or conversation scenarios to block based on the specific circumstances of the inappropriate content, but also flexibly set temporary or permanent blocking methods, effectively solving the problems of delayed response, high false positive rate, and lack of contextual understanding capabilities caused by relying on manual triggering or simple keyword filtering in existing technologies. In other words, on the one hand, it enriches the blocking strategies and increases their diversity; on the other hand, by adopting an automatic blocking mechanism instead of manual triggering, it can improve the blocking response speed; furthermore, it enhances the ability to understand the context of conversation content, improving the accuracy of blocking strategy judgment; and in addition, it improves the intelligence level of conversation management, enhances user experience, reduces the probability of unpleasant communication experiences, and improves the quality and security of the conversation environment. Furthermore, by applying the powerful semantic understanding and reasoning capabilities of pre-trained large models to the field of user blocking, the limitations of traditional rule systems are broken through, achieving a leap from passive defense to active identification, and from coarse-grained control to fine-grained management. This approach is highly innovative and practical, and suitable for various conversational scenarios that require efficient management of user interactions. Attached Figure Description
[0010] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0011] Figure 1 A flowchart illustrating a session processing method provided for an exemplary embodiment of this application;
[0012] Figure 2a A flowchart illustrating another session processing method provided as an exemplary embodiment of this application;
[0013] Figure 2b A flowchart illustrating yet another exemplary embodiment of the present application provides a further example of a session processing method;
[0014] Figure 3 A schematic diagram of the structure of an electronic device provided as another exemplary embodiment of this application. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0016] It should be noted that, in the cases involving user information in the embodiments of this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) comply with relevant laws and standards.
[0017] Additionally, it should be noted that when user interaction operations or triggering operations are involved in the embodiments of this application, these operations include, but are not limited to, various interaction methods such as touch operations, gesture operations, voice operations, head movement operations, and eye movement operations. Touch operations include, but are not limited to, click operations, double-click operations, long-press operations, swipe operations, pinch operations, or mouse hover operations. Swipe operations include, but are not limited to, straight-line swipes and curved-line swipes.
[0018] Following the background technology, this application addresses the technical problems of adding others to the block list, which relies on manual triggering or simple keyword filtering, resulting in delayed response, high false positive rates, and a lack of contextual understanding. In this embodiment, by collecting conversation content between a first user and multiple second users and utilizing a pre-trained large model for semantic understanding, it can accurately identify inappropriate content and its corresponding conversation scenarios. By constructing historical context vectors and combining them with feature vectors of the conversation content, the distribution information of inappropriate content is predicted, thereby generating personalized blocking strategies. These strategies can not only select users or conversation scenarios to block based on the specific circumstances of the inappropriate content, but also flexibly set temporary or permanent blocking methods, effectively solving the problems of delayed response, high false positive rates, and lack of contextual understanding caused by relying on manual triggering or simple keyword filtering in existing technologies. On the one hand, it enriches the blocking strategies and increases their diversity; on the other hand, adopting an automatic blocking mechanism instead of manual triggering improves the blocking response speed; furthermore, it enhances the ability to understand the context of conversation content, improving the accuracy of blocking strategy judgment; additionally, it improves the intelligence level of conversation management, enhances user experience, reduces the probability of unpleasant communication experiences, and improves the quality and security of the conversation environment. Moreover, applying the powerful semantic understanding and reasoning capabilities of pre-trained large models to the user blocking domain breaks through the limitations of traditional rule systems, achieving a leap from passive defense to active identification, and from coarse-grained control to fine-grained management. It possesses strong innovation and practicality, and is suitable for various conversation scenarios requiring efficient management of user interactions.
[0019] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0020] Figure 1 This is a flowchart illustrating a session processing method provided as an exemplary embodiment of this application. Figure 1 As shown, the session processing method includes:
[0021] 101. During the process of the first user having conversations with multiple second users through multiple conversation channels, the conversation content between the first user and each second user is collected to obtain multiple conversation contents, each corresponding to a conversation scenario;
[0022] 102. Input multiple conversation contents into a pre-trained large model, perform semantic understanding on the multiple conversation contents, identify the illegal content in the multiple conversation contents based on the semantic understanding results, and determine at least one target conversation content involved in the illegal content and at least one target conversation scene corresponding to at least one target conversation content.
[0023] 103. Construct the historical context vector of at least one target session scenario, and based on the historical context vector of at least one target session scenario and the feature vector of at least one target session content, predict the session distribution information and user distribution information of the violation content;
[0024] 104. Based on the session distribution information and user distribution information corresponding to the violation content, generate personalized blocking strategies. Personalized blocking strategies include blocking objects and blocking methods. Blocking objects include blocking users and / or blocking session scenarios. Blocking users are secondary users. Different blocking objects correspond to different blocking methods. Blocking methods include temporary blocking and permanent blocking. Temporary blocking corresponds to a blocking period.
[0025] 105. According to the blocking method in the personalized blocking strategy, call the blocking strategy application interface to perform the blocking operation on the blocking object in the personalized blocking strategy.
[0026] The session processing method in this application can be applied to the terminal side of the first user, the terminal side of the second user, or the server side; this embodiment does not limit it in this respect.
[0027] In this embodiment, the specific type of conversation scenario is not limited. For example, a conversation scenario can be a post published by a first user in any target application (also known as an app). The first user can publish multiple posts, each containing a conversation identifier control. Any second user can engage in a conversation with the first user through the conversation identifier control in any post. Here, one post published by the first user can be considered a conversation scenario; if the first user publishes multiple posts, then the first user has multiple conversation scenarios. As another example, a conversation scenario can be a product link published by a first user in any target application. The first user can publish multiple product links, each containing a conversation identifier control. Any second user can engage in a conversation with the first user through the conversation identifier control in any product link. Here, one product link published by the first user can be considered a conversation scenario; if the first user publishes multiple product links, then the first user has multiple conversation scenarios. Conversely, content representing a conversation scenario, such as posts, can also be published by a second user. In this case, the number of second users can be one, and the number of first users can be multiple. However, the above are merely illustrative examples and do not constitute a limitation on the technical solution of this application.
[0028] This embodiment does not specifically limit the type or implementation form of the target application. The target application can be, for example, a service application, a shopping application, a house rental application, or a comprehensive application integrating the functions of multiple such applications, etc. The target application can be implemented as a standalone app, a mini-program that depends on an app, a webpage, etc.
[0029] This embodiment does not limit the method of conversation. For example, the first user and the second user can have a conversation through a conversation interface; another example is that the first user and the second user can have a conversation through audio or video; yet another example is that the first user and the second user can have a conversation through a combination of a conversation interface and audio or video. However, the above are merely illustrative examples and do not constitute a limitation on the technical solution of this application.
[0030] Taking a posted chat scenario as an example, the first user can be a B-end merchant who promotes their goods or services through posts. The corresponding second user can be a C-end consumer who needs these goods or services. Any second user who views a post by a merchant can initiate a chat with the merchant using the chat identifier control within that post. Alternatively, the first user can be a consumer who posts to recruit for the goods or services they need. The corresponding second user can be a merchant providing these goods or services. Any merchant who views a recruitment post by a consumer can initiate a chat with that consumer using the chat identifier control within the post. However, the above are merely illustrative examples and do not constitute a limitation on the technical solution of this application.
[0031] It should be noted that if the first user is the poster and has posted multiple posts, then any second user can engage in a conversation with the first user through a conversation identifier control in any of those posts. Each conversation corresponds to a conversation channel, which can be a channel established between the first user and any second user based on the first user's user ID and the user ID of that second user, triggered in response to any conversation identifier. This allows both parties to communicate through a real-time established conversation channel. The conversation identifier control is associated with the first user's user ID. In other words, for the same first user, if the same second user engages in conversations with the first user through conversation identifier controls in different posts posted by the first user, multiple conversations will be generated, each corresponding to a different conversation channel. Similarly, for different first users, if multiple second users engage in conversations with the corresponding first user through conversation identifier controls in at least one post posted by the first user, multiple conversations will also be generated, each corresponding to a different conversation channel. In short, regardless of whether there are one or more first or second users, each conversation corresponds to one conversation channel. Conversely, if the second user is the poster, the situation is similar to that of the first user, and will not be elaborated upon here.
[0032] In this embodiment, a scenario where a first user engages in a conversation with multiple second users is used as an example. During the conversation between the first user and multiple second users through multiple conversation channels, the conversation content between the first user and each second user can be collected to obtain multiple conversation contents, each corresponding to a conversation scenario. A conversation content is generated in one conversation. A conversation refers to a conversation generated by any second user triggering a conversation identifier control contained in any post published by the first user, or a conversation generated by the first user triggering a conversation identifier control contained in any post published by any second user. If any second user triggers the conversation identifier control contained in any post published by the first user multiple times, multiple conversations will be generated, each corresponding to one conversation content, and multiple conversations will generate multiple conversation contents. A conversation scenario refers to the post containing the conversation identifier that triggered the corresponding conversation content. Collecting the conversation content during the conversation between the first user and multiple second users ensures the real-time nature of the conversation content, facilitating subsequent processing based on the real-time content, improving response speed, avoiding response delays, and ensuring the real-time nature of blocking.
[0033] This embodiment is not limited to the specific implementation method of collecting the conversation content between the first user and each second user during conversations with multiple second users through multiple conversation channels. For example, in response to any second user's trigger operation on the conversation identifier control, a conversation content collection tool is invoked to collect the conversation content generated by the conversation channel corresponding to the first user and any second user in real time. Furthermore, when multiple second users initiate multiple conversations in parallel based on the same conversation identifier control or different conversation identifier controls, multiple conversation content collection tools can be invoked in parallel to collect the conversation content generated by each conversation channel in real time. When a trigger action occurs for the conversation identifier control, the conversation content collection tool is immediately invoked to collect the real-time conversation content, so that the collected real-time conversation content can be input into the pre-trained large model in real time. This ensures timely processing of the real-time conversation content, improves response speed, avoids response lag, and guarantees the real-time performance of the blocking. Alternatively, the pre-trained large model can be inherited from the conversation content collection tool, which can input the collected real-time conversation content into the pre-trained large model. This method can be considered to have almost no latency, ensuring timely processing of the real-time conversation content, improving response speed, avoiding response lag, and guaranteeing the real-time performance of the blocking.
[0034] In this embodiment, after collecting the conversation content between the first user and each of the second users, multiple conversation contents can be input into a pre-trained large model to perform semantic understanding on the multiple conversation contents, thereby obtaining semantic understanding results. The semantic understanding results include feature vectors of each conversation content, and the feature vectors can be semantic feature vectors. Furthermore, based on the semantic understanding results, illegal content existing in the multiple conversation contents can be identified, and at least one target conversation content involved in the illegal content and at least one target conversation scenario corresponding to the at least one target conversation content can be determined. During the conversation between the first user and multiple second users, the powerful semantic understanding and reasoning capabilities of the pre-trained large model are used to perform semantic understanding on the collected multiple conversation contents, enabling accurate identification of illegal content in the conversation and its corresponding conversation scenarios. Each target conversation content contains illegal content, which refers to conversation content that does not conform to the rules, laws, regulations, or social moral standards of the target application during the conversation. This content may have a negative impact on the other user, the target application involved in the conversation, or other third parties. For example, illegal content may include, but is not limited to, insulting remarks, malicious attacks, inflammatory language, or false information. The illegal content present in different conversation contents may be the same or different, and a single conversation content may contain one or more illegal contents, such as illegal words. A pre-trained large model refers to a model whose parameters meet the set parameter quantity requirements. The parameter quantity requirements are not specifically limited and can have different definitions in different scenarios or domains. For example, in some scenarios or domains, a pre-trained large model refers to a model with a parameter scale of tens of billions, hundreds of billions, or even trillions. However, this definition of the model's parameter quantity is merely an example and does not constitute a limitation on the technical solution of this application. The pre-trained large model can be an AI model, such as an AI large language model with powerful language understanding and generation capabilities. Applying the powerful semantic understanding and reasoning capabilities of the AI large language model to the user blocking domain breaks through the limitations of traditional rule systems, achieving a leap from passive defense to active identification, and from coarse-grained control to fine-grained management. It has strong innovation and practicality and is suitable for various conversation scenarios that require efficient management of user interactions. Furthermore, in this embodiment, semantic understanding of multiple conversation contents is performed in the pre-trained large model. Violation content existing in multiple conversation contents can be obtained through vectorization and semantic feature extraction. More specific implementation details can be found in the relevant descriptions of the following embodiments, which will not be elaborated here.
[0035] Furthermore, the aforementioned pre-trained large model can be obtained by training the initial large language model based on sample data in the field of conversation processing. Training the initial large language model with sample data can improve the accuracy of data processing of the large model. Optionally, the training process for training the initial large language model based on sample data from the conversation processing domain is as follows: Obtain a sample dataset from the conversation processing domain. The sample dataset includes multiple sample conversation contents, the sample semantic understanding results corresponding to each sample conversation content, sample violation content present in the multiple sample conversation contents, at least one target sample conversation content involved in the sample violation content, and at least one target sample conversation scene corresponding to the at least one target sample conversation content. Input the multiple sample conversation contents into the initial large language model, perform semantic understanding on the multiple sample conversation contents, identify intermediate violation content present in the multiple sample conversation contents based on the intermediate semantic understanding results, and determine at least one target sample conversation content involved in the intermediate violation content and at least one target sample conversation scene corresponding to the at least one target sample conversation content. Calculate the model loss function based on the intermediate semantic understanding results and the sample semantic understanding results, as well as the intermediate violation content and the sample violation content. If the model loss function does not meet the model training termination condition, continue training the initial large model until the model loss function meets the model training termination condition, thus obtaining the pre-trained large model. The calculation of the model loss function based on the semantic understanding results of the intermediate state and the sample semantic understanding results, as well as the intermediate state violation content and the sample violation content, can be implemented in several ways. Optional implementations include: calculating a first loss function between the intermediate state semantic understanding results and the sample semantic understanding results, and calculating a second loss function between the intermediate state violation content and the sample violation content, both of which are used as the model loss function; or, calculating the first loss function between the intermediate state semantic understanding results and the sample semantic understanding results, and calculating the second loss function between the intermediate state violation content and the sample violation content, and then performing a weighted sum of the first and second loss functions to obtain the model loss function. By calculating multiple loss functions individually or in combination, the accuracy of the model in data processing can be improved.
[0036] In this embodiment, after obtaining at least one target session scenario corresponding to at least one target session content involved in the violation through the pre-trained large model, the historical context vector of at least one target session scenario can be constructed using the pre-trained large model. That is, a historical context vector is constructed for each post involved in the violation and the session content of each post. Each target session scenario can correspond to one historical context vector. When a target session scenario involves multiple target session contents of a first user and multiple second users, the historical context vector of the target session scenario can be constructed based on multiple target session contents. The historical context vector refers to the global semantic representation vector formed by merging all target session contents (including session statements, time points, and violation markers) generated by the first user and all second users in a certain session scenario after vectorization by the pre-trained large model. This vector encodes the complete semantic information of multi-user interaction within the scenario and retains the temporal-spatial (session location) distribution characteristics of the violation content, which is used for subsequent risk scoring, distribution prediction, and dynamic updates of personalized blocking strategies. Each target session content corresponds to specific user information. The feature vector of the target session content includes the feature vector of the violating content. Therefore, based on the historical context vector of at least one target session scenario and the feature vector of at least one target session content, the session distribution information and user distribution information of the violating content can be predicted. For details on constructing the historical context vector of at least one target session scenario and predicting the session distribution information and user distribution information of the violating content based on the historical context vector of at least one target session scenario and the feature vector of at least one target session content, please refer to the relevant descriptions in the following embodiments, which will not be repeated here.
[0037] In this embodiment, after obtaining the session distribution information and user distribution information corresponding to the violating content, the pre-trained large model can also generate a personalized blocking strategy based on the session distribution information and user distribution information corresponding to the violating content. The personalized blocking strategy includes blocking objects and blocking methods. Blocking objects include blocking users and / or blocking session scenarios. Different blocking objects correspond to different blocking methods. Blocking methods include temporary blocking and permanent blocking. Temporary blocking corresponds to a blocking period. Here, a blocked user refers to a user who is about to be blocked by the first user. If the blocked user can be a second user, then the blocking user is also a user. A blocking scenario refers to the scenario that is being blocked. Taking a post scenario as an example, blocking a post scenario is equivalent to blocking all second users who generate sessions based on that post. Temporary blocking means blocking at least one second user within a specified blocking period. After the period expires, the blocking can be automatically lifted. The blocking period can be, for example, a few minutes, a few hours, a few days, or a few months. Moreover, the temporary blocking period can be a current period or a future period. For example, the current session can be blocked immediately for a few minutes or a few hours, or a future "**month**day**time period" can be set for scheduled blocking, and the blocking will be automatically performed when the time arrives. Permanent blocking refers to permanently blocking a specific second user or all second users who have a conversation based on a specific post, without any time limit. Furthermore, various blocking targets and methods can be combined to generate multiple blocking strategies. For example, a user can be temporarily blocked, or permanently blocked; a conversation can be temporarily blocked, or a conversation can be permanently blocked; and so on. Personalized blocking strategies are generated using the session distribution and user distribution information corresponding to the infringing content, enriching the blocking strategy pool. This allows for different blocking strategies to be adopted based on the actual situation when blocking users, flexibly setting temporary or permanent blocking methods, and better meeting users' blocking needs. The implementation method for generating personalized blocking strategies based on the session distribution and user distribution information corresponding to the infringing content can be found in the relevant descriptions of the following embodiments, and will not be elaborated here.
[0038] In practical applications, personalized blocking strategies include, but are not limited to: expiration time blocking strategies, time-based blocking strategies, all blocking strategies, new session blocking strategies, and current session-only blocking strategies. Expiration time blocking strategies refer to the expiration time after blocking. For example, after blocking user A, setting a one-month expiration time will automatically unblock user A after one month. Time-based blocking strategies mean that if there are three sessions between user A and user B—one day ago, five days ago, and one month ago—they can choose to block the session one month ago; the sessions one day and five days ago will not be blocked. All blocking strategies mean that all sessions between user A and user B will be blocked. New session blocking strategies block future sessions between user A and user B. For example, if user A posts an ad for selling secondhand items and a buyer (user B) uses offensive language, to prevent future conversations with this buyer, potential future conversations can be blocked, and the buyer will also be unable to contact user A through other posts. Current session-only blocking strategies block only the currently ongoing session. In addition, it should be noted that the above-mentioned blocking strategies can be combined and configured to form new blocking strategies, thereby increasing the diversity of blocking strategies.
[0039] It should be noted that regardless of who is blocked or the method of blocking, you can unblock the user by responding to their unblocking request or command, allowing both parties to continue the conversation. It should also be noted that both parties in a conversation may be blocked by the other.
[0040] Furthermore, the pre-trained large model can call the blocking strategy application interface according to the blocking methods in the personalized blocking strategy to perform blocking operations on the blocked objects in the personalized blocking strategy. In other words, the pre-trained large model can directly perform corresponding blocking operations based on the blocked objects and corresponding blocking methods contained in the newly generated personalized blocking strategy. In addition, the pre-trained large model can also combine previous historical blocking strategies and select an appropriate target blocking strategy based on the current violating content, the session distribution information and / or user distribution information corresponding to the violating content, and perform corresponding blocking operations on the blocked users based on the blocking methods contained in the target blocking strategy. Thus, by enhancing the ability to understand the context of session content, the accuracy of blocking strategy judgment is improved, providing a foundation for effectively solving the problems of delayed response, high false positive rates, and lack of contextual understanding caused by existing reliance on manual triggering or simple keyword filtering.
[0041] like Figure 2a and 2bAs shown, the blocking policy application interface can be provided by the GetStream SDK toolkit. The GetStream SDK toolkit is an open-source instant messaging development toolkit designed for rapid integration of real-time chat functionality. The GetStream SDK toolkit architecture consists of three layers: the client layer is embedded in the app as a lightweight SDK, providing UI components and API calls; the server layer maintains session state, blocking lists, and message routing, with configuration files supporting cross-device synchronization; and the policy extension layer allows developers to overlay custom logic (such as time-based blocking and session-level blocking), overcoming the limitation of the SDK's native support for only single-session blocking. The GetStream SDK toolkit primarily provides two core capabilities: first, session management, which supports the creation of one-on-one / group chats, session list retrieval, message sending and receiving, and session metadata storage; and second, user control, which implements "blocking" through interfaces, allowing specification of target users, sessions, blocking duration, and reasons. The blocking policy application interfaces provided by the GetStream SDK toolkit can be, for example, the ChatClient.banUser() interface and the banUser() interface. In addition, the GetStream SDK can also provide an interface for retrieving a list of sessions (referred to as the session interface), such as the ChatClient.queryChannels() interface.
[0042] Specifically, users involved in the violation can be blocked based on the collected violation content. The blocking method may differ for different users. Optionally, different blocking methods can be selected based on preset rules, considering the different session distribution information and user distribution information of the users who output the violation content. For example, if the session distribution information corresponding to the blocked user is relatively dense, and the density exceeds a first threshold, it indicates that the user's violation is serious. The pre-trained large model can then select a more severe blocking strategy, such as permanent blocking. If the session distribution information corresponding to the blocked user is relatively sparse, and the density is less than a second threshold, it indicates that the user's violation is minor. The pre-trained large model can then select a less severe blocking strategy, such as temporary blocking. For example, if a merchant, in a post scenario, engages in a conversation with at least one second user, and the concentration of this conversation exceeds a third threshold, indicating a serious violation, the pre-trained model can choose a more severe blocking strategy, such as permanently blocking the conversation. Conversely, if the merchant's conversation distribution is sparse and the concentration is less than a fourth threshold, indicating a less serious violation, the pre-trained model can choose a less severe blocking strategy, such as temporarily blocking a conversation or temporarily blocking the entire conversation scenario. The above examples are merely illustrative and do not constitute a limitation on the technical solution of this application.
[0043] Furthermore, after determining the blocking method for the blocked objects, the pre-trained large model can call the application interface of the blocking strategy to perform blocking operations on the blocked objects in the personalized blocking strategy. For the specific implementation of calling the blocking strategy application interface to perform blocking operations on the blocked objects in the personalized blocking strategy according to the blocking method in the personalized blocking strategy, please refer to the detailed description of the relevant embodiments below, which will not be repeated here.
[0044] In practical applications, such as Figure 2a As shown, the target application retrieves personalized blocking policies from the server upon startup. When a blocking policy is added or modified for a user, the local configuration file is changed and synchronized to the server to facilitate corresponding blocking operations for that user. Each time a new personalized blocking policy is generated, it is stored locally and also updated in the server's personalized blocking policy storage area, ensuring that the updated personalized blocking policy is available when logging into the target application on different devices.
[0045] like Figure 2b As shown, a session list is generated when a first user engages in conversations with multiple second users. This list can be stored in a storage area provided by the GetStream SDK toolkit or a specified storage area on the server. When blocking sessions, the session list to be blocked can be obtained through the session list interface provided by the GetStream SDK toolkit, and the corresponding personalized blocking policy can be obtained through the blocking policy application interface provided by the GetStream SDK toolkit, so as to block the session list based on the obtained personalized blocking policy.
[0046] In addition to automatically blocking users using a pre-trained large model, this embodiment also allows for manual blocking based on the personalized blocking strategy generated above, according to the user's actual needs. For example, in response to the first user launching the target application, a session list can be retrieved from the server or the session list storage area provided by the GetStream SDK toolkit using the session list interface provided by the GetStream toolkit, based on the first user identifier and the target application identifier. The session list contains multiple sessions, and GetStream... The SDK toolkit provides a blocking policy application interface to obtain the target application's blocking configuration file from the server. This configuration file contains multiple personalized blocking policies. In response to a first user's configuration operation on any session in the session list, a configuration page is displayed. This session is also associated with a second user participating in that session. The configuration page contains multiple configuration items for blocking configuration, including but not limited to: expiration time blocking configuration items, time period blocking configuration items, all blocking configuration items, new session blocking configuration items, and blocking only the current session configuration items. These configuration items correspond to the following blocking policies: expiration time blocking policy, time period blocking policy, all blocking policy, new session blocking policy, and blocking only the current session policy. After selecting one or more configuration items, a blocking operation is performed according to the corresponding blocking policy. In response to a first user's configuration operation on at least one of the configuration items, the corresponding configuration information is obtained and sent to the server to update the configuration file. The corresponding blocking operation is then performed based on the updated configuration file. The configuration options include: Expiration Time Blocking, which configures the expiration time after blocking a second user; Time Period Blocking, which blocks historical conversations with the second user within a target historical time period; All Blocking, which blocks all historical conversations with the second user; New Conversation Blocking, which blocks new conversations with the second user that have not yet occurred; and Block Current Conversation Only, which blocks the current conversation. This implementation supports multi-scenario blocking strategies, allowing for personalized blocking policies to be set for independent conversations generated by different posts, meeting diverse needs such as "blocking only a specific conversation," "permanently / for a limited time blocking a user," and "permanently / for a limited time blocking a specific scenario." It also enables fine-grained permission control, allowing users to set temporary or permanent blocks for specific conversations, improving the controllability and flexibility of the social experience and avoiding a "one-size-fits-all" user blocking strategy. Furthermore, it avoids false positives and preserves social channels, such as supporting "conversation-level blocking" instead of "user-level global blocking," preventing conversations containing inappropriate content while preserving normal conversational channels for users in other scenarios.In summary, based on the shielding capabilities of instant messaging development kits, by storing and identifying multiple sessions between users, a new session-level shielding strategy is added to achieve differentiated shielding control of the same object in different sessions.
[0047] The technical solutions provided in the above embodiments of this application, by collecting the conversation content between a first user and multiple second users and using a pre-trained large model for semantic understanding, can accurately identify illegal content in the conversation and its corresponding conversation scenarios. By constructing historical context vectors and combining them with the feature vectors of the conversation content, the distribution information of illegal content is predicted, thereby generating personalized blocking strategies. These strategies can not only select the user or conversation scenario to be blocked based on the specific circumstances of the illegal content, but also flexibly set temporary or permanent blocking methods, effectively solving the problems of delayed response, high false positive rate, and lack of contextual understanding capabilities caused by existing reliance on manual triggering or simple keyword filtering. On the one hand, it enriches the blocking strategies and improves their diversity; on the other hand, adopting an automatic blocking mechanism to replace manual triggering can improve the blocking response speed; furthermore, it enhances the ability to understand the context of the conversation content and improves the accuracy of blocking strategy judgment; in addition, it improves the intelligence level of conversation management, enhances the user experience, reduces the probability of bad communication experiences, and improves the quality and security of the conversation environment. Furthermore, by applying the powerful semantic understanding and reasoning capabilities of pre-trained large models to the field of user blocking, the limitations of traditional rule systems are broken through, achieving a leap from passive defense to active identification, and from coarse-grained control to fine-grained management. This approach is highly innovative and practical, and suitable for various conversational scenarios that require efficient management of user interactions.
[0048] In this embodiment, multiple conversation contents are input into a pre-trained large model to perform semantic understanding on the multiple conversation contents. Based on the semantic understanding results, illegal content in the multiple conversation contents is identified, and at least one target conversation content involved in the illegal content and at least one target conversation scene corresponding to the at least one target conversation content are determined. This includes: inputting multiple conversation contents into a pre-trained large model and vectorizing the multiple conversation contents to obtain a semantic feature vector for each conversation content; extracting semantic features from the semantic feature vector of each conversation content and identifying keywords, sentiment tendencies, risk levels, and potential guiding language in the multiple conversation contents based on the semantic features; determining illegal content in the multiple conversation contents based on the semantic attribute information, sentiment tendencies and their intensity information, risk levels, and potential guiding language of the keywords in the multiple conversation contents; and determining at least one target conversation content involved in the illegal content and at least one target conversation scene corresponding to the at least one target conversation content from the multiple conversation contents.
[0049] In one optional embodiment, multiple conversation contents are input into a pre-trained large-scale model, and the multiple conversation contents are vectorized to obtain the semantic feature vector of each conversation content. This includes: performing text cleaning on the input conversation content to remove irrelevant characters and stop words; using a word segmentation algorithm to divide the continuous text into independent lexical units; unifying the text to lowercase through case normalization and standardizing the mapping of synonyms and near-synonyms; performing structured format conversion on the pre-processed conversation content according to the input specifications of the pre-trained model, including but not limited to adding special tags; integrating multiple conversation contents into batch data and loading them into the pre-trained large-scale language model in a batch input manner; inputting the formatted conversation content into the pre-trained large-scale model, and the model performing distributed semantic encoding on the input text based on its neural network architecture and pre-trained parameter system; and extracting semantic feature vectors from the model output layer. Specifically, in the BERT model, the vector corresponding to the [CLS] tag can be extracted as a global semantic representation, while for other architecture models, the last hidden state or a specific output node can be selected as the feature carrier. Furthermore, the extracted feature vectors can be L2 normalized to convert them into unit vectors. Finally, the generated semantic feature vectors are stored in a database or other persistent storage system, providing data support for subsequent semantic retrieval, similarity analysis, and matching calculations. Through this standardized process, efficient vectorization of batch session content can be achieved, constructing a high-quality semantic feature representation system. This lays the foundation for downstream tasks such as semantic understanding and the selection of blocking strategies, and also effectively addresses issues such as response delays, high false positive rates, and lack of contextual understanding capabilities caused by reliance on manual triggering or simple keyword filtering.
[0050] In one optional embodiment, semantic features are extracted from the semantic feature vector of each session content, and keywords, sentiment tendencies, risk levels, and potential leading language in multiple session contents are identified based on the semantic features, including:
[0051] Step 1: Semantic Feature Extraction. First, the semantic feature vectors for each session content are normalized to ensure all vectors have a uniform length. Then, a neural network model is used to perform deep feature mining on the semantic feature vectors to extract higher-order semantic representations. Neural network models include, but are not limited to, Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and Transformer architectures. Specific implementation methods include encoding and transforming the feature vectors using Multilayer Perceptrons (MLPs) or Convolutional Neural Networks (CNNs), or using traditional machine learning algorithms such as Support Vector Machines (SVMs) and decision trees for feature engineering, focusing on extracting feature indicators related to keyword distribution and sentiment. It should be noted that when the semantic feature vector dimension is high, dimensionality reduction techniques such as Principal Component Analysis (PCA) and t-SNE should be used to reduce it to a reasonable dimensionality range, thereby optimizing computational efficiency and improving visualization effects.
[0052] Step 2: Keyword identification. A TF-IDF-based keyword extraction algorithm is used to calculate the TF-IDF weight value of each word in the conversation content and select words with significant weight values as candidate keywords. Then, the candidate keywords are semantically evaluated through a context relevance analysis model, and keywords with high relevance to the conversation topic are retained. Finally, a BERT pre-trained language model is used to perform deep semantic encoding on the conversation text, and semantic-level extraction of keywords is achieved based on an attention mechanism.
[0053] Step 3: Sentiment Analysis. A BERT pre-trained language model is used to perform fine-grained sentiment classification on the conversation text, outputting sentiment labels (positive / negative / neutral). Based on the sentiment classification results, the sentiment intensity is further quantified: first, sentiment words in the text are labeled with intensity values using a sentiment dictionary; second, combined with contextual features, rules and statistical methods are used to dynamically adjust the initial intensity scores, finally generating calibrated sentiment intensity assessment results to improve the accuracy and robustness of sentiment analysis.
[0054] Step 4, Risk Level Assessment: First, the conversation content is initially screened for dangerous content based on a predefined rule set (including keyword matching lists, regular expression patterns, etc.). Then, the BERT deep learning model is used to classify the conversation text for dangerous content in multiple dimensions and output a quantitative risk level (low / medium / high). Subsequently, a basic risk level score is generated for each piece of conversation content based on the risk content identification results. Finally, dynamic weight adjustment is performed by combining contextual semantic features to optimize the risk level score results and improve the accuracy and reliability of the assessment.
[0055] Step 5, Sexual Language Analysis: First, the conversation text is preliminarily screened based on a predefined rule set (including keyword matching lists, regular expression patterns, etc.) to identify potential guiding language expressions. Then, the BERT deep learning model is used to perform semantic-level classification of the conversation content, outputting the probability value of the presence of guiding language. After completing the basic identification, a professionally constructed guiding language dictionary is introduced to quantify and score the intensity of the identified guiding words. Finally, the initial intensity score is dynamically calibrated by combining the contextual features of the dialogue to improve the accuracy and reliability of the guiding language analysis results.
[0056] Step 6: Comprehensive Analysis and Result Output. The analysis results of keywords, sentiment tendencies, risk levels, and potential guiding language are integrated to form a comprehensive semantic feature representation. The keyword list includes extracted keywords and their weights; sentiment tendencies include positive, negative, and neutral, along with their intensity scores; risk levels are divided into low, medium, and high, along with their scores; and guiding language includes its probability of occurrence and its intensity score. The comprehensive semantic features are further analyzed in conjunction with the contextual information of the conversation to ensure the accuracy and consistency of the analysis results. The output includes the identified keywords and their weights, sentiment tendencies (positive, negative, neutral) and their intensity scores, risk levels (low, medium, high) and their scores, and the probability and intensity score of guiding language.
[0057] Through the above process, the full-dimensional semantic feature extraction and in-depth analysis of the conversation content can be systematically completed, thereby providing solid data support and technical guarantee for downstream application scenarios (including but not limited to content review, sentiment analysis and risk warning, etc.), and laying the foundation for effectively solving the problems of delayed response, high misjudgment rate and lack of contextual understanding caused by relying on manual triggering or simple keyword filtering.
[0058] In an optional embodiment, based on the semantic attribute information, sentiment tendency and intensity information, danger level, and potential leading language of keywords present in multiple conversational contents, the illegal content present in the multiple conversational contents is determined, including:
[0059] Step 1: Multi-dimensional Feature Integration: Extract keywords and their semantic attribute features (including but not limited to the category of keywords, such as sensitive areas like violence, pornography, and discrimination) from the conversation content; simultaneously perform sentiment analysis to quantify the sentiment tendency (positive / neutral / negative) and corresponding sentiment intensity score of the conversation content; based on a preset risk assessment model, determine the danger level (low / medium / high) of the conversation content and the corresponding risk score; through semantic pattern recognition technology, detect potential leading language features in the conversation and assess their influence intensity; finally, vectorize the above multi-source features (including keyword semantic attributes, sentiment tendency and intensity, danger level and score, leading language and intensity) to construct a comprehensive feature vector containing all feature dimensions;
[0060] Step 2: Establishing Rules for Determining Violations. First, a database of violating keywords is created, and their corresponding semantic attribute classifications are defined. Second, based on a sentiment analysis model, quantitative thresholds for sentiment tendency (negative) and its intensity are set. Simultaneously, based on a risk level system, violation determination thresholds corresponding to different risk levels are determined. Furthermore, natural language processing technology is used to identify leading language features, and criteria for their probability of occurrence and intensity are set. Finally, these multi-dimensional rules are logically integrated to construct a composite violation determination model. When conversation content simultaneously meets all of the following conditions, the system will automatically mark it as a violation: Violating keyword matching is detected; the sentiment tendency is determined to be negative and the intensity score exceeds a preset threshold; the risk level assessment result is high risk; and the probability and intensity of leading language occurrence exceed the set standards.
[0061] Step 3: Determining Violated Content. First, the system compares the keywords in the conversation content with a preset database of prohibited keywords. Second, it assesses whether the sentiment index and intensity of the conversation content exceed the system's set threshold parameters. Third, it verifies whether the danger level of the conversation content exceeds the established threshold standard. Finally, it detects whether the presence and intensity of leading language in the conversation content exceed the limit. Based on the above multi-dimensional detection results, the system will conduct a compliance assessment of the conversation content according to comprehensive judgment rules. If any violation rule is triggered by the detection index, the conversation will be automatically marked as violating content. To ensure the accuracy of the judgment, a secondary verification will be performed by combining the contextual semantic information of the conversation, and the reliability of the violation judgment will be further verified through contextual association analysis.
[0062] Furthermore, step 4 can also output results, marking the session content judged as violating the rules and classifying and recording them according to the nature of the violation (including but not limited to violence, pornography, and suggestive language); automatically generating a structured report, which includes the original text of the violating session, the specific violation type, and the basis for judgment; storing the violating session content and related metadata in a dedicated database to ensure data traceability and support subsequent auditing and in-depth analysis; and establishing a two-way feedback mechanism to allow end users or system administrators to initiate review requests for the violation judgment conclusions and support the correction of results according to the process specifications.
[0063] Through the above process, the violation judgment of the conversation content can be completed systematically, thereby providing reliable data support and decision-making basis for content review and risk management. It also lays the foundation for effectively solving the problems of delayed response, high false judgment rate and lack of contextual understanding caused by relying on manual triggering or simple keyword filtering.
[0064] In one optional embodiment, determining at least one target session content involving the violation and at least one target session scenario corresponding to the at least one target session content from multiple session contents includes:
[0065] Step 1: Identification of Violated Content. Based on a predefined system of violation judgment rules (covering multiple dimensions such as keyword matching, sentiment analysis, risk level assessment, and guidance language detection), the target conversation content is systematically labeled to locate potential violation segments. Machine learning or deep learning algorithms (including but not limited to text classifiers, sequence labeling models, and other technical frameworks) are used to automatically identify violations in the conversation content. Target conversation content that meets the violation judgment criteria is selected based on the preset quantitative threshold standards in the violation rules (such as sentiment intensity thresholds, risk level boundaries, and guidance language probability thresholds). Cross-validation is performed using the semantic environment of the conversation context to ensure the accuracy of violation judgment and effectively reduce the risk of false judgment.
[0066] Step 2: Select the complete conversation containing the violation information from the multi-turn conversation records as the target conversation; if the violation only involves a part of the conversation, then accurately extract the smallest semantic unit containing the violation information as the target conversation segment; the extracted target conversation content must meet the following requirements: 1) Maintain semantic integrity and ensure that the characteristics of the violation can be accurately restored; 2) Verify the substantial connection between the target conversation and the violation in combination with the context.
[0067] Step 3: Based on specific application scenarios, construct a conversation scenario classification system, including but not limited to typical scenarios such as social interaction, customer service, online education, and business negotiation; extract multi-dimensional features for each scenario category, covering key elements such as user role attributes, dialogue topic distribution, time dimension features, and spatial location information; achieve preliminary classification of conversation scenarios based on a preset rule set (including user role profiles, dialogue topic classification, spatiotemporal context, and other judgment conditions); and then use machine learning or deep learning algorithms (such as classification models like support vector machines and random forests, or sequence labeling models like BiLSTM-CRF) to complete accurate scenario recognition of conversation content.
[0068] Step 4: Perform multi-dimensional matching of the key features of the target session content with predefined scene category features to determine the specific scene to which the target session content belongs; cross-validate the determination results of the target session scene based on the context information of the session (including but not limited to user identity attributes, dialogue topic scope, time dimension and spatial location, etc.); ensure that the target session content and the identified scene maintain a high degree of consistency in semantics and contextual logic; at the same time, verify that the identified scene can fully map the contextual environment features in which the violation occurred;
[0069] Step 5: Perform violation marking operations on the confirmed target session content, and simultaneously record its complete attribute information (including but not limited to the original content of the session, the specific violation type, the judgment basis, etc.); perform violation marking operations on the confirmed target session scenarios, and simultaneously record its complete attribute information (including but not limited to scenario classification tags, typical feature descriptions, contextual association information, etc.); store the target session content and its associated scenario information in a structured manner in the database to ensure data traceability and provide basic support for subsequent review processes and data analysis; establish a two-way feedback mechanism to support users and administrators in initiating review requests for the judged session content and scenario results, and provide result adjustment functions;
[0070] Through the above process, it is possible to efficiently and accurately identify illegal content and its specific conversation scenarios from multiple rounds of conversations, thereby providing reliable data support for content security review and risk prevention and control. It also lays the foundation for effectively solving problems such as delayed response, high misjudgment rate and lack of contextual understanding caused by relying on manual triggering or simple keyword filtering.
[0071] In this embodiment, constructing the historical context vector of at least one target session scenario includes: determining multiple session contents under at least one target session scenario, each session content corresponding to its own session time window, the time window being the time interval formed by the start and end times of a session; inputting the multiple session contents under at least one target session scenario and the session time window of each session content into a vectorization model, and performing vectorization and timestamp marking processing on the multiple session contents under each target session scenario to obtain feature vectors of the multiple session contents under each target session scenario, each session content feature vector having its own timestamp, the multiple session contents including at least one target session content, each session content including multiple session statements, each session statement having its own session time point, a session such as a question message or a reply message, each session statement having its own timestamp, the timestamp being a time point, the timestamp of each session statement referring to the time when the session content was sent during the session, each reply content or each session content feature vector having its own timestamp, the timestamp being a time interval; and integrating the feature vectors of the multiple session contents according to the chronological order guaranteed by the timestamps of the multiple session contents under each target session scenario to obtain the historical context vector of at least one target session scenario. During integration, the content of each session within each target session scenario can be arranged and integrated in chronological order. This implementation method accurately identifies infringing content and efficiently determines the target session content and corresponding scenario through multi-dimensional feature integration and comprehensive judgment. By combining the above process with session context information, the accuracy and reliability of the identification results are ensured. Simultaneously, detailed violation information is recorded and a feedback mechanism is provided to further optimize the identification process, improve system reliability and user experience, provide strong support for content review and risk management, and lay the foundation for effectively solving problems such as delayed response, high false positive rates, and lack of contextual understanding capabilities caused by existing reliance on manual triggering or simple keyword filtering.
[0072] As can be seen from the above embodiments, multiple session contents include at least one target session content, each session content includes multiple session statements, and each session statement has its own session time point. The multiple session contents under at least one target session scenario and the session time window of each session content are input into a vectorization model. Vectorization and timestamp marking are performed on the multiple session contents under each target session scenario to obtain feature vectors for the multiple session contents under each target session scenario. This includes: determining multiple session contents under at least one target session scenario, each session content corresponding to its own session time window; inputting the multiple session contents under at least one target session scenario, the session time window of each session content, the multiple session statements of each session content, and the session time point of each session statement into a vectorization model; performing vectorization and timestamp marking on the multiple session statements in each session content under each target session scenario; and, when performing vectorization and timestamp marking on the multiple session statements in at least one target session content, special marking is performed on the feature vectors of violating content existing in each target session content to obtain the feature vector of each session content, where the timestamp of the feature vector of each violating content is the session time point of its corresponding session statement. The above process vectorizes the conversation statements in the target conversation scenario to quickly generate feature vectors for subsequent analysis. By combining conversation time points and time windows, each conversation statement is timestamped, preserving the time sequence information of the conversation and helping to analyze the dynamic changes of the conversation. The feature vectors of infringing content are specially marked to clearly identify their time points, which facilitates the rapid location and handling of violations, improves the efficiency and accuracy of identifying infringing content, and lays the foundation for effectively solving the problems of delayed response, high false judgment rate and lack of contextual understanding caused by relying on manual triggering or simple keyword filtering.
[0073] Optionally, the historical context vector of a target session scenario includes feature vectors of multiple session contents within that target session scenario and feature vectors of at least one violation content within the target session content. The session distribution information of the violation content refers to the frequency and concentration of the violation content at different times and in different target session scenarios. The user distribution information refers to the distribution pattern of users sending the violation content at different times and in different target session scenarios. Based on the historical context vectors of at least one target session scenario and the feature vectors of at least one target session content, the session distribution information and user distribution information of the violation content are predicted, including: inputting the historical context vectors of at least one target session scenario and the feature vectors of at least one target session content into a distribution prediction model, based on each target session... The process involves using special markers and timestamps on the feature vectors of inappropriate content within the conversation to determine the frequency and location of the inappropriate content in the corresponding historical context. Based on these, the frequency and concentration of the inappropriate content in each target conversation scenario are determined, serving as the conversation distribution information for the inappropriate content. Furthermore, based on the timestamps of the inappropriate content in the corresponding historical context and the conversation timestamps of each user sending the corresponding conversation statements, the user distribution pattern of each user sending the inappropriate content is determined. This distribution pattern includes, but is not limited to, the location and density of inappropriate content associated with each user, and the number of users involved in the same inappropriate content. This process vectorizes the conversation statements in the target conversation scenario, quickly generating feature vectors and providing an efficient foundation for subsequent analysis. Simultaneously, by combining conversation timestamps and time windows, each conversation statement is timestamped, fully preserving the time-series information of the conversation, which helps in analyzing the dynamic changes of the conversation. In addition, the feature vectors of inappropriate content are specially marked to clearly identify their timestamps, facilitating rapid location and processing of inappropriate behavior and significantly improving the efficiency and accuracy of inappropriate content identification. Overall, this process, through the synergistic effect of feature extraction, temporal correlation, and violation labeling, provides high-resolution and interpretable data support for risk warning and precise intervention, effectively improving the comprehensiveness and reliability of conversation content analysis. It also lays the foundation for effectively solving problems such as delayed response, high false positive rate, and lack of contextual understanding caused by relying on manual triggering or simple keyword filtering.
[0074] In this embodiment, a personalized blocking strategy is generated based on the session distribution information and user distribution information corresponding to the infringing content. This includes: determining the target to be blocked and the corresponding blocking method based on the session distribution information and user distribution information corresponding to the infringing content. This process can be based on preset rules, such as determining the target to be blocked and the corresponding blocking method based on the session distribution information and user distribution information corresponding to the infringing content under the guidance of preset rules; obtaining the previously generated personalized blocking strategy; and updating the previously generated personalized blocking strategy based on the target to be blocked and the corresponding blocking method to obtain the currently generated personalized blocking strategy. This process, by analyzing the session distribution (frequency of occurrence, concentrated time period) and user distribution (patterns of infringing users, correlation strength) of the infringing content, dynamically determines the target to be blocked (e.g., specific users / scenarios) and its blocking method (e.g., temporary banning, content filtering), and automatically updates historical strategies, achieving real-time, accurate, and adaptive personalized blocking. The overall technical effect is as follows: based on distributed data-driven blocking decisions, the targeting and timeliness of the strategy are improved; through the strategy iteration mechanism, the protection effect is continuously optimized, forming a closed-loop risk control system, which significantly enhances the flexibility and effectiveness of governance of illegal content, and also lays the foundation for effectively solving the problems of delayed response and high false judgment rate caused by relying on manual triggering or simple keyword filtering.
[0075] In this embodiment, the blocking strategy application interface is invoked according to the blocking method in the personalized blocking strategy to perform blocking operations on the objects to be blocked in the personalized blocking strategy. This includes: scoring the blocking object based on the historical context vector of the session scenario involved in the blocking object and the feature vector of the session content corresponding to the blocking object; if the risk score is greater than the risk threshold, the blocking strategy application interface is invoked according to the blocking method in the personalized blocking strategy to perform blocking operations on the objects to be blocked in the personalized blocking strategy. The above process executes operations on the blocking objects according to the method in the personalized blocking strategy by invoking the blocking strategy application interface. Specifically, the risk score is accurately calculated by combining the historical context vector of the session scenario and the feature vector of the session content of the blocking object. Once the score exceeds the risk threshold, the corresponding blocking is immediately executed according to the strategy, ensuring timely and efficient risk management, effectively maintaining the security and order of the session environment, and laying the foundation for effectively solving the problems of response lag and high false positive rate caused by relying on manual triggering or simple keyword filtering.
[0076] In one optional embodiment, if the risk score exceeds the risk threshold, the blocking strategy application interface is invoked according to the blocking method in the personalized blocking strategy to perform a blocking operation on the blocking object in the personalized blocking strategy. This includes: outputting a blocking prompt message to the first user to indicate that at least one second user in the first user's session is at risk and whether to block at least one second user; responding to the confirmation blocking operation, determining the current target blocking object, and invoking the blocking strategy application interface according to the blocking method corresponding to the target blocking object to perform the corresponding blocking operation on at least one second user. In the above process, when the score exceeds the threshold, a risk prompt and optional blocking options are immediately pushed to the first user; after user confirmation, the blocking interface is automatically invoked to accurately block the target second user. This process realizes a closed-loop management of risk warning-user decision-instant blocking, which not only ensures session security but also gives users autonomy, significantly improving the transparency of violation management and user experience.
[0077] It should be noted that the above embodiments are based on the premise that the object to be blocked is a second user. The object to be blocked can also be a first user. When the object to be blocked is a first user, the specific implementation methods of each step are the same or similar, and will not be repeated here.
[0078] At this point, all steps of the session processing method have been completed. By constructing historical context vectors and combining them with feature vectors of session content, the distribution information of infringing content is predicted, thereby generating personalized blocking strategies. These strategies can not only select users or session scenarios to block based on the specific circumstances of the infringing content, but also flexibly set temporary or permanent blocking methods, effectively solving the problems of delayed response, high false positive rates, and lack of contextual understanding capabilities caused by relying on manual triggering or simple keyword filtering in existing technologies. On the one hand, it enriches the blocking strategies and improves their diversity; on the other hand, adopting an automatic blocking mechanism to replace manual triggering can improve the blocking response speed; furthermore, it enhances the ability to understand the context of session content and improves the accuracy of blocking strategy judgment; in addition, it improves the intelligence level of session management, enhances the user experience, reduces the probability of bad communication experiences, and improves the quality and security of the session environment. Moreover, applying the powerful semantic understanding and reasoning capabilities of pre-trained large models to the field of user blocking breaks through the limitations of traditional rule systems, realizing a leap from passive defense to active identification, and from coarse-grained control to fine-grained management. It has strong innovation and practicality and is suitable for various session scenarios that require efficient management of user interaction.
[0079] Figure 3 A schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. For example... Figure 3As shown, the electronic device includes: a memory 30a and a processor 30b; the memory 30a is used to store computer programs; the processor 30b is coupled to the memory 30a and is used to execute the computer programs to implement the steps in the above method.
[0080] The detailed implementation methods and beneficial effects of each step in this embodiment have been described in detail in the foregoing embodiments, and will not be elaborated here.
[0081] Furthermore, such as Figure 3 As shown, the electronic device also includes other components such as a communication component 30c, a display 30d, a power supply component 30e, and an audio component 30f. Figure 3 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 3 The components shown.
[0082] in addition, Figure 3 The components within the dashed box are optional, not mandatory, and their specific requirements depend on the product form of the electronic device. The electronic device in this embodiment can be a terminal device such as a desktop computer, laptop computer, smartphone, or IoT device, or a server-side device such as a conventional server, cloud server, or server array. If the electronic device in this embodiment is a terminal device such as a desktop computer, laptop computer, or smartphone, it may include... Figure 3 The components within the dashed box; if the electronic device in this embodiment is implemented as a conventional server, cloud server, or server array, etc., it may be omitted. Figure 3 The component within the dashed box.
[0083] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0084] The aforementioned communication components are configured to facilitate wired or wireless communication between the device containing the communication components and other devices. The device containing the communication components can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 6G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication components receive broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication components also include a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.
[0085] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen can be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.
[0086] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
[0087] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0088] Accordingly, exemplary embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the steps in the above-described method.
[0089] Accordingly, an exemplary embodiment of this application also provides a computer program product comprising a computer program / instructions that, when executed by a processor, cause the processor to perform the steps in the above-described method.
[0090] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) containing computer-usable program code.
[0091] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0092] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0093] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0094] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interfaces, network interfaces, and memory.
[0095] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0096] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0097] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0098] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A session processing method, characterized in that, include: During the process of a first user having conversations with multiple second users through multiple conversation channels, the conversation content between the first user and each second user is collected to obtain multiple conversation contents, each corresponding to a conversation scenario; The multiple conversation contents are input into a pre-trained large model to perform semantic understanding on the multiple conversation contents. Based on the semantic understanding results, illegal content in the multiple conversation contents is identified, and at least one target conversation content involved in the illegal content and at least one target conversation scenario corresponding to the at least one target conversation content are determined. Construct a historical context vector for the at least one target session scenario, and predict the session distribution information and user distribution information of the violating content based on the historical context vector of the at least one target session scenario and the feature vector of the at least one target session content. Based on the session distribution information and user distribution information corresponding to the violation content, a personalized blocking strategy is generated. The personalized blocking strategy includes blocking objects and blocking methods. The blocking objects include blocking users and / or blocking session scenarios. The blocking users are second users. Different blocking objects correspond to different blocking methods. The blocking methods include temporary blocking and permanent blocking. The temporary blocking corresponds to a blocking period. According to the blocking method in the personalized blocking strategy, the blocking strategy application interface is called to perform the blocking operation on the blocking object in the personalized blocking strategy.
2. The method according to claim 1, characterized in that, The multiple conversation contents are input into a pre-trained large model to perform semantic understanding on the multiple conversation contents. Based on the semantic understanding results, violations are identified in the multiple conversation contents, and at least one target conversation content involved in the violation and at least one target conversation scenario corresponding to the at least one target conversation content are determined, including: The multiple conversation contents are input into a pre-trained large model, and semantic features are extracted from the vectorized multiple conversation contents. Based on the semantic features, keywords, sentiment tendencies, risk levels and potential guiding language in the multiple conversation contents are identified. Based on the semantic attributes, sentiment and intensity, danger level, and potential leading language of the keywords present in the multiple conversations, the illegal content present in the multiple conversations is determined; From the multiple session contents, determine at least one target session content involved in the violation and at least one target session scenario corresponding to the at least one target session content.
3. The method according to claim 1 or 2, characterized in that, Constructing the historical context vector of the at least one target session scenario includes: Determine multiple session contents under the at least one target session scenario, with each session content corresponding to its own session time window; The multiple conversation contents under the at least one target conversation scenario and the conversation time window of each conversation content are input into the vectorization model. The multiple conversation contents under each target conversation scenario are vectorized and timestamp marked to obtain the feature vector of the multiple conversation contents under each target conversation scenario. The feature vector of each conversation content has its own timestamp. Based on the temporal order represented by the timestamps of multiple session contents under each target session scenario, the feature vectors of multiple session contents are integrated to obtain the historical context vector of at least one target session scenario.
4. The method according to claim 3, characterized in that, Multiple conversation contents include at least one target conversation content, each conversation content includes multiple conversation statements, and each conversation statement has its own conversation time point; the multiple conversation contents under the at least one target conversation scenario and the respective conversation time window of each conversation content are input into a vectorization model, and vectorization processing and timestamp marking processing are performed on the multiple conversation contents under each target conversation scenario to obtain the feature vector of the multiple conversation contents under each target conversation scenario, including: Determine multiple session contents under the at least one target session scenario, with each session content corresponding to its own session time window; The vectorization model is used to input multiple conversation contents under the at least one target conversation scenario, the conversation time window of each conversation content, multiple conversation statements of each conversation content, and the conversation time point of each conversation statement into the vectorization model, and to perform vectorization processing and timestamp marking processing on multiple conversation statements in each conversation content under each target conversation scenario. as well as When performing vectorization and timestamp marking on multiple session statements in at least one target session content, the feature vector of the violation content in each target session content is specially marked to obtain the feature vector of each session content. The timestamp of the feature vector of each violation content is the session time point of the session statement in which it is located.
5. The method according to claim 4, characterized in that, A historical context vector for a target session scenario includes feature vectors of multiple session contents within that target session scenario and feature vectors of at least one violation content within the target session content. The session distribution information of the violation content refers to the frequency and concentration of the violation content at different times and in different target session scenarios. The user distribution information of the violation content refers to the distribution pattern of users sending the violation content at different times and in different target session scenarios. Based on the historical context vectors of the at least one target session scenario and the feature vectors of the at least one target session content, the session distribution information and user distribution information of the violation content are predicted, including: The historical context vectors of at least one target session scenario and the feature vector of at least one target session content are input into the distribution prediction model. Based on the special label and timestamp of the feature vector of the violation content in each target session content, the frequency and location of the violation content in the corresponding historical context are determined. Based on the number of times and location of the violation content in the corresponding historical context, the frequency and concentration of the violation content in each target session scenario are determined, and the frequency and concentration of the violation content in each target session scenario are used as the session distribution information of the violation content. Based on the timestamps of the infringing content in the corresponding historical context and the session timestamps when each user sent the corresponding session statements, the user distribution pattern of each user sending the infringing content is determined.
6. The method according to any one of claims 1-5, characterized in that, Based on the session distribution information and user distribution information corresponding to the aforementioned infringing content, a personalized blocking strategy is generated, including: Based on the session distribution information and user distribution information corresponding to the violation content, determine the target to be blocked and the blocking method corresponding to the target to be blocked. Retrieve the previously generated personalized blocking strategy; Based on the object to be blocked and the blocking method corresponding to the object to be blocked, the personalized blocking strategy generated in the previous generation is updated to obtain the personalized blocking strategy generated in the current generation.
7. The method according to any one of claims 1-5, characterized in that, According to the blocking method in the personalized blocking strategy, the blocking strategy application interface is called to perform a blocking operation on the blocking object in the personalized blocking strategy, including: Risk scoring is performed on the blocked object based on the historical context vector of the session scenario involved and the feature vector of the session content corresponding to the blocked object; If the risk score is greater than the risk threshold, the blocking strategy application interface is called according to the blocking method in the personalized blocking strategy to perform the blocking operation on the blocking object in the personalized blocking strategy.
8. The method according to claim 7, characterized in that, If the risk score is greater than the risk threshold, the blocking strategy application interface is invoked according to the blocking method in the personalized blocking strategy to perform a blocking operation on the blocking object in the personalized blocking strategy, including: Output a blocking prompt message to the first user to indicate that there is a risk to at least one second user in the first user's conversation and whether to block the at least one second user; In response to the confirmation of the blocking operation, the current target blocking object is determined, and according to the blocking method corresponding to the target blocking object, the blocking policy application interface is called to perform the corresponding blocking operation on the at least one second user.
9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store a computer program; the processor, coupled to the memory, is used to execute the computer program to implement the steps of any one of claims 1-8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it causes the processor to perform the steps of any one of the methods of claims 1-8.
11. A computer program product, characterized in that, The computer program product includes a computer program / instruction that, when executed by a processor, causes the processor to perform the steps of any one of the methods of claims 1-8.