Large model-based multi-user mixed interaction data processing method and system

By using the Transformer architecture to process multi-user interactive data, identifying semantically high-density regions and topic centers, and scheduling behavioral units, the semantic conflicts and redundancy problems in multi-user high-concurrency scenarios are resolved, improving response accuracy and window utilization.

CN121118904BActive Publication Date: 2026-05-01GUANGZHOU YUNJIAN CHUANGYAN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU YUNJIAN CHUANGYAN TECHNOLOGY CO LTD
Filing Date
2025-08-26
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing language model-based interactive systems lack effective topic aggregation and cross-user context dependency modeling in multi-user, high-concurrency scenarios, resulting in semantic conflicts, context pollution, or information redundancy in generated content. Furthermore, the traditional per-user sequential splicing method reduces window utilization and response consistency.

Method used

The Transformer architecture is used for high-dimensional semantic vector encoding to identify semantically high-density clustered regions, construct a set of topic centers and a semantic mapping matrix, and combine semantic divergence degree and context resource state to schedule and select behavioral units to generate personalized responses.

Benefits of technology

It improves response accuracy and window utilization under high concurrency conditions, avoids semantic conflicts and redundancy, and ensures personalized and consistent responses for multi-user interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121118904B_ABST
    Figure CN121118904B_ABST
Patent Text Reader

Abstract

The application provides a large model-based multi-user mixed interaction data processing method and system. The method comprises the following steps: acquiring a natural language request set input by multiple users concurrently; performing high-dimensional semantic vector coding on the user request by using a Transform architecture to generate a user input semantic vector, obtaining a theme center set and a semantic mapping matrix constructed in terms of semantic similarity; constructing a behavior unit set; selecting a historical context fragment of each user based on the behavior unit set and a state vector set to obtain a selected context fragment set and a corresponding fragment source mapping table; clustering and matching a template based on the selected context fragment set in combination with the user request, inputting a large model, and outputting a personalized response of multiple users. The application establishes a processing framework with a user-theme behavior pair as the minimum decision granularity.
Need to check novelty before this filing date? Find Prior Art

Description

A Method and System for Multi-User Hybrid Interaction Data Processing Based on Large Models Technical Field

[0001] This invention belongs to the field of enterprise management, and in particular relates to a method and system for processing multi-user hybrid interactive data based on a large model. Background Technology

[0002] With the continuous improvement of the performance of large-scale language models in text generation and natural language understanding, language model-based interactive systems have been widely used in scenarios such as online customer service, educational tutoring, collaborative office work, and knowledge retrieval. As the user base increases, these systems increasingly face operating environments characterized by multiple users simultaneously initiating requests, significant topic differences, limited context windows, and strict response time requirements. Existing inference frameworks mostly assume single-user or single-turn dialogues, lacking holistic modeling of topic aggregation relationships and cross-user contextual dependencies in mixed inputs, leading to problems such as semantic conflicts, contextual pollution, or information redundancy in generated content.

[0003] When high-concurrency traffic squeezes limited model windows and computing resources, the traditional "user-sequential concatenation" approach not only reduces window utilization but also weakens the relevance and consistency of responses. Although some works have attempted to introduce scheduling strategies or reinforcement learning mechanisms to prioritize important requests, there is still a lack of systematic methods that can balance semantic focus, resource allocation fairness, and window efficiency in multi-topic, multi-user scenarios. This limits the stable and scalable performance of existing technologies in large-scale deployments under high concurrency and multiple scenarios. Summary of the Invention

[0004] The purpose of this invention is to propose a method and system for processing multi-user hybrid interactive data based on a large model, thereby solving the above-mentioned problems.

[0005] To achieve the above objectives, a method for processing multi-user hybrid interactive data based on a large model is provided in a first aspect of the present invention, the method comprising the following steps:

[0006] Obtain a set of natural language requests from multiple concurrent users, the set of natural language requests containing several user requests, and attach user identifier metadata based on the user requests;

[0007] The user request is encoded into a high-dimensional semantic vector using the Transformer architecture to generate a user input semantic vector, and a high-density semantic clustering region is identified to obtain a set of topic centers and a semantic mapping matrix constructed based on semantic similarity.

[0008] The semantic mapping matrix is ​​used to identify topic centroids and construct a set of behavioral units, where each behavioral unit represents the potential semantic target between the current user and the corresponding topic centroid in the current interaction cycle; a state vector for each behavioral pair is constructed based on the user input semantic vector, semantic divergence degree, historical semantic summary, target topic centroid, semantic similarity, and context resource state normalization value; wherein, the behavioral pair includes the corresponding user and the corresponding topic centroid.

[0009] Based on the set of behavioral units and the set of state vectors, the historical context fragments of each user are scheduled and selected to obtain the set of selected context fragments and the corresponding fragment source mapping table.

[0010] Based on the selected set of context fragments, clustering and template matching are performed in conjunction with the user requests. The input is a large model, and the output is a personalized response for multiple users.

[0011] Furthermore, the structure of the Transformer architecture is as follows:

[0012] The input is a UTF-8 string sequence, which is first transformed into a vector through a 128-dimensional tokenembedding layer;

[0013] Then, it goes through 4 Transformer blocks, each containing: a multi-head self-attention mechanism, a feedforward network layer, residual connections, and normalization;

[0014] The output is a fixed-length semantic vector of the user input, representing a high-dimensional semantic representation of the current input.

[0015] Furthermore, the identification of semantically high-density clustered regions to obtain a set of topic center points and a semantic mapping matrix specifically includes:

[0016] The neighborhood density of each user input semantic vector is calculated based on the local density index; Mahalanobis distance is used as the similarity index to select the user input semantic vectors with the highest density and the most dispersed among them as candidate topic center points; the candidate topic center points are filtered to retain a maximum of K≤5 topic center points to form a topic center point set;

[0017] Calculate the normalized cosine similarity between all user input semantic vectors and the set of topic centroids to generate semantic similarity;

[0018] A semantic mapping matrix is ​​generated based on the semantic similarity, wherein each semantic similarity in the semantic mapping matrix represents the semantic similarity between the current user input and the corresponding topic centroid, and only significantly relevant connections are retained.

[0019] Furthermore, the step of identifying topic center points from the semantic mapping matrix and constructing a set of behavioral units specifically includes:

[0020] Based on the semantic mapping matrix, the corresponding user and topic center point behavior pairs are identified, and a set of behavior units is constructed.

[0021] Furthermore, the semantic divergence degree is calculated based on the semantic mapping matrix and the current corresponding topic center point.

[0022] Furthermore, the process of scheduling and selecting historical context fragments for each user based on the set of behavioral units and the set of state vectors to obtain a set of selected context fragments and a corresponding fragment source mapping table specifically includes:

[0023] For each action pair, the corresponding upper limit of window resource allocation is calculated by combining semantic similarity, semantic divergence, the remaining proportion of the current context window, and the maximum token length of the system context window.

[0024] Obtain the set of historical context fragments for each user, and for each historical context fragment, calculate its semantic window benefit ratio under the current behavior pair, which is used as the current retention priority;

[0025] The historical context fragments are sorted from high to low according to the current retention priority and added to the context cache in sequence until the cumulative length reaches the corresponding window resource allocation limit; if no historical context fragment has a current retention priority higher than the preset threshold, the current action will abandon scheduling to release resources;

[0026] By combining the filtered historical context fragments, a set of selected context fragments is generated.

[0027] Furthermore, the corresponding fragment source mapping table contains the selected context fragments and their corresponding behavior pairs.

[0028] Furthermore, the step of clustering and matching templates based on the selected set of context fragments and the user request, inputting a large model, and outputting a personalized response for multiple users specifically includes:

[0029] For all fragments in the selected context fragment set, cluster them according to their source topics to generate a set of all selected context fragments belonging to the same topic;

[0030] For each user, select the most relevant topic from the semantic mapping matrix between the current user and the corresponding topic center point, which represents the most important semantic topic corresponding to the current user's request;

[0031] By combining all selected context fragments of the same topic into a set and the most important semantic topic, a set of selected context fragments that conforms to the most important semantic topic is generated;

[0032] Based on the selected context fragments that conform to the most important semantic topic, a large model input sequence is constructed to generate a natural language response.

[0033] Furthermore, the step of constructing a large model input sequence based on the selected context fragments conforming to the most important semantic topic, and generating a natural language response, specifically includes:

[0034] Obtain context fragments that conform to the most important semantic topic, assemble them into a set according to the timestamp order of the fragment source mapping table, and insert special markers.<USER_INPUT> This is used to explicitly distinguish between historical fragments and user requests, then insert the encoded text of the user request, and finally append... <end>The marker indicates the end of the model input.

[0035] A second aspect of the invention provides a multi-user hybrid interactive data processing system based on a large model, the system comprising:

[0036] A multi-user request acquisition module is used to acquire a set of natural language requests input concurrently by multiple users. The set of natural language requests contains several user requests, and user identifier metadata is attached to the user requests.

[0037] The semantic mapping module is used to encode the user request into a high-dimensional semantic vector using the Transformer architecture, generate the user input semantic vector, identify semantic high-density clustering regions, and obtain a set of topic centers and a semantic mapping matrix constructed based on semantic similarity.

[0038] The topic matching module is used to identify topic centroids in the semantic mapping matrix and construct a set of behavioral units, where each behavioral unit represents the potential semantic target between the current user and the corresponding topic centroid in the current interaction cycle; a state vector for each behavioral pair is constructed based on the user input semantic vector, semantic divergence degree, historical semantic summary, target topic centroid, semantic similarity, and context resource state normalization value; wherein, the behavioral pair includes the corresponding user and the corresponding topic centroid;

[0039] The behavior pair analysis unit is used to schedule and select historical context fragments for each user based on the set of behavior units and the set of state vectors, so as to obtain a set of selected context fragments and a corresponding fragment source mapping table.

[0040] The personalized response module is used to cluster and match templates based on the selected set of context fragments and the user request, input a large model, and output personalized responses for multiple users.

[0041] The beneficial technical effects of the present invention are at least as follows:

[0042] This invention proposes a large-scale model data processing method and system for multi-user hybrid interactive environments, centered on topic aggregation and fine-grained scheduling of context fragments. It establishes a processing framework with user-topic behavior pairs as the smallest decision granularity through a five-level closed-loop process: semantic encoding, topic identification, state vector construction, window scheduling, input reorganization, and output generation. First, the system uses a shared encoder to perform high-dimensional semantic representation of concurrent inputs and extracts the center of interactive topics using a density-distance dual-criteria approach. Then, it constructs a state vector that integrates the user's current semantics, historical summaries, matching degree, divergence degree, and window remaining ratio, providing an interpretable and measurable input space for policy scheduling. Under window-constrained conditions, the scheduling module selectively retains cross-user historical information and generates fragment source mappings based on fragment benefit ratio and dynamic quota limits, thereby significantly compressing redundant inputs while ensuring semantic coverage. Finally, the system reorganizes the model input using a templated approach of "topic aggregation + user request localization," allowing multiple users to share the same topic context while maintaining individual responses, achieving a dual improvement in response accuracy and window utilization under high concurrency. The overall solution features unified variable definitions and clear module boundaries, which avoids the shortcomings of traditional solutions in sequentially splicing mixed inputs, while also taking into account the comprehensive needs of model windows, computational load, and multi-user fairness in real deployments. Attached Figure Description

[0043] The present invention will be further described with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.

[0044] Figure 1 is a flowchart of the multi-user hybrid interactive data processing method based on a large model according to the present invention. Detailed Implementation

[0045] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0046] As shown in Figure 1, the multi-user hybrid interaction data processing method based on a large model provided in this embodiment of the invention includes:

[0047] S1. Obtain a set of natural language requests from multiple concurrent users, the set of natural language requests containing several user requests, and attach user identifier metadata based on the user requests.

[0048] Specifically, the raw data received in this step is a set of natural language requests input concurrently by multiple users, denoted as... I N These are user requests. The data is collected in real-time via the system's deployed WebSocket communication interface. User requests are uniformly transmitted to the task scheduling module by the system's load balancer. Each request is converted to a UTF-8 string before entering the processing flow, and metadata fields such as user identifier (e.g., user_id), timestamp, and input device type are retained for subsequent behavioral feature modeling or scene correlation analysis.

[0049] Taking a typical real-world interaction as an example, suppose on an online education Q&A platform, user A enters "Please list commonly used templates for college entrance exam English essays," user B enters "Are there any summaries of college entrance exam English writing techniques," and user C enters "I always get low scores on English essays, what's the problem?" These inputs have different language forms, but their actual semantic direction is consistent, all pointing to the topic of "college entrance exam English writing." The system needs to be able to identify and aggregate this latent semantic commonality.

[0050] S2. The user request is encoded into a high-dimensional semantic vector using the Transformer architecture to generate a user input semantic vector, and a high-density semantic clustering region is identified to obtain a set of topic centers and a semantic mapping matrix constructed based on semantic similarity.

[0051] Specifically, the core objective of this step is to extract structured semantic representations from multiple user natural language requests received within the same time window, and further identify semantic aggregation points between users, namely "interaction topic centers." This mechanism differs from the linear structure of traditional systems that use a "single request-single response" processing unit. This invention aims to abstract "topic structures" to combine semantically similar user requests, providing a more organized data foundation for subsequent contextual information selection and resource scheduling strategies. The innovation of this step lies in the first introduction of a structured representation of "interaction topic centers + user semantic mapping" into a multi-user natural language processing system, and the generation of dense semantic connections between topics in conjunction with contextual scenarios, thereby constructing a highly discriminative and stable state space for reinforcement learning strategies.

[0052] First, the system processes each input text I i Semantic vector encoding is performed by calling the unified language encoding module ENC, which is built on the Transformer architecture and has the following structure:

[0053] The input is a UTF-8 string sequence, which is first transformed into a vector through a 128-dimensional tokenembedding layer;

[0054] Next, it goes through 4 Transformer blocks, each containing: a multi-head self-attention mechanism (4 heads), a feedforward network layer (hidden layer size is 256), residual connections and normalization;

[0055] The output is a fixed-length user input semantic vector. A high-dimensional semantic representation of the current input.

[0056] After vector encoding is completed, all semantic vectors are input as point sets into the topic recognition module. To identify semantically high-density clustered regions, the system performs the following operations on the encoded vector set:

[0057] Based on the local density index ρ i Calculate the neighborhood density of each semantic vector; the local density index is calculated as follows: taking any semantic vector as the center, set a cutoff distance threshold, and count the number of other vectors in the neighborhood of the current semantic vector, which is the local density index.

[0058] Using Mahalanobis distance D i,j As a similarity index, semantic vectors with high density and dispersed distribution are selected as candidate topic points; the Mahalanobis distance is calculated as follows: obtain any two semantic vectors, calculate the covariance matrix of all semantic vectors to represent the correlation of features in each dimension, and accelerate the inverse operation of Mahalanobis distance by matrix decomposition (such as Cholesky decomposition) based on semantic vectors and covariance matrix.

[0059] The candidate topic points are filtered, and a maximum of K ≤ 5 topic centers are retained to form a topic set T = {t1, ...,t}. K }

[0060] Each theme center t j It represents the semantic core in a certain semantic direction and should theoretically have a high degree of user semantic concentration.

[0061] To establish the correspondence between user input and topics, we calculate the normalized cosine similarity between all semantic vectors and topic centers, resulting in the following matrix:

[0062]

[0063] in: The semantic vector representing the input of the i-th user is output by the language encoding module ENC. The semantic vector representing the j-th topic center is generated by the density clustering module; w i,j : indicates input I i With the theme center t j The semantic similarity between them (normalized); all vectors have been normalized to L2 norm before calculation to avoid calculation bias caused by vectors of different lengths.

[0064] We will all w i,j Composition of semantic mapping matrix In this matrix, only the top two most relevant topics for each user (i.e., the two largest w's) are retained. i,j The state space is set to zero (the value is used to define the state), and the rest are set to zero to achieve sparse mapping. This sparsification operation can prevent the dimensionality of the policy input state space from expanding in subsequent steps, while enhancing the user's interactive expression on the main relevant topics.

[0065] For example, in the above example, users A and B are both strongly associated with topic t2, while user C has weak associations with both t2 and t3. This structure effectively expresses the semantic relationship between users and groups, helping the system to focus on scheduling resources in subsequent steps.

[0066] This step outputs two variables, which are used in subsequent steps to construct the state space and the scheduling goal, respectively:

[0067] Semantic mapping matrix Each element w i,j This represents the semantic similarity between the i-th user input and the j-th topic center, retaining only salientally relevant connections.

[0068] S3. Identify topic centers using the semantic mapping matrix and construct a set of behavioral units, where each behavioral unit represents the potential semantic target between the current user and the corresponding topic center in the current interaction cycle; construct a state vector for each behavioral pair based on the user input semantic vector, semantic divergence, historical semantic summary, target topic center, semantic similarity, and context resource state normalization value; wherein, the behavioral pair includes the corresponding user and the corresponding topic center.

[0069] Specifically, in this step, the system uses the user input semantic vector e generated in step S2 as a basis. i The set of thematic centers T = {t1, ...,t} K } and semantic mapping matrix W = [w i,j This step constructs the set of state vectors required for the strategy, providing a basis for subsequent context fragment scheduling. The key innovation of this step lies in using the "user-topic behavior pair" as the smallest granularity of the strategy and comprehensively introducing three core features: the user's current intent (from e...). i ), historical semantic condensation (from h i ) and system resource constraints (from r remain This forms a state vector s with task recognition and system perception capabilities. i,j .

[0070] First, the system identifies user-topic behavior pairs based on matrix W, and constructs a set of behavior units P = {(i,j)|w}. i,j >θ}, where θ is a semantic threshold to avoid low-relevance topic noise affecting state judgment. Each (i,j) behavioral unit represents the potential semantic target of user i and topic j in the current interaction cycle.

[0071] To reflect the semantic difficulty of a user's choice, i.e., the degree of ambiguity in the distribution of their input across multiple topics, a semantic divergence degree is defined:

[0072]

[0073] Where δ i ∈[0,1], the higher the value, the more likely the user input is associated with multiple topics and the main line is unclear. During scheduling, window resource allocation should be more strictly controlled for the user's fragment.

[0074] Based on this, construct the state vector for each action pair (i,j):

[0075] s i,j =[e i ||h i ||t j ||w i,j ||δ i ||r ratio (3)

[0076] Where: e i Input semantic vectors for the user; h i For historical semantic summarization, the most recent three rounds of input are fused with time weights [0.5, 0.3, 0.2] to enhance temporal weights; t j Center the target topic; w i,j The semantic relevance has been calculated in step S2; δ i The semantic divergence degree is generated by competing judgments from multiple topics; r ratio =r remain / r max This is the normalized value for the context resource state.

[0077] To control fairness among users and robustness of window resource utilization in the scheduling strategy, a delta parameter is introduced in the state space. i In essence, this constitutes a source of structural regularization constraints, used to favor input behaviors with high semantic concentration in subsequent reward functions. Even if the subsequent policy model does not employ explicit regularization, this feature itself is already embedded as structural information.

[0078] For example, if a user U4 currently inputs "What are the scoring criteria for the College Entrance Examination English Writing", the matching degree between its semantic vector e4 and topic t1 is w. 4,1 =0.78, while the values ​​for other topics are only 0.15 and 0.07, respectively. Therefore, δ4 = 1 - 0.78 = 0.22, indicating that its target is clear and its context can be prioritized for scheduling. However, if U5 is associated with multiple topics at the same time, its δ5 will increase significantly, and the system will reduce the proportion of its long contexts retained.

[0079] Ultimately, the set of all state vectors is organized into a tensor S = {s} i,j The concatenated vector has dimensions |P|×d, where d is the dimension of the concatenated vector (e.g., 256×3+3=771), and serves as the input to the policy network. The advantages of this structure are: scalability (more resource metrics can be added), interpretability (the source of each field is clear), and semantic awareness (through w...). i,j With δ i (Joint regulation).

[0080] S4. Based on the set of behavioral units and the set of state vectors, schedule and select historical context fragments for each user to obtain a set of selected context fragments and a corresponding fragment source mapping table.

[0081] Specifically, this step undertakes the core resource control task within the overall technical framework of this invention. Its goal is to control resources in scenarios involving concurrent interactions among multiple users and topics, based on the state vector set S = {s} output in step S3. i,j } and the set of behavioral units P = {(i,j)}, for each user's set of historical context fragments The scheduling process involves selecting which segments should be retained for the large model generation process. The practical challenges of this step include: redundancy in user history segment content, uneven distribution of segment quality among different users, unstable topic aggregation, and limited window resources. Without targeted structural screening, this can easily lead to problems such as context pollution, response misalignment, and wasted windows. Therefore, this step designs a context segment scheduling mechanism based on semantic-window efficiency optimization. It integrates five indicators: semantic density, segment cost, topic matching degree, semantic divergence degree, and system window state, dynamically evaluating and selecting context segments at the behavioral unit level. Unlike conventional reinforcement learning scheduling strategies, this scheme does not rely on a single policy network for hard selection. Instead, it implements a structured selection mechanism of "scoring + constraint control" through a dual-score structure. Specifically, it introduces cross-user regularization control terms and divergence compensation factors, enabling stronger system consistency control capabilities in situations with dense multi-topic interference.

[0082] First, for each action pair (i,j), the system needs to calculate its corresponding upper limit for window resource allocation, q. i,j This upper limit is used to guide whether subsequent segment selection exceeds the quota. This allocation upper limit needs to comprehensively consider factors such as semantic concentration, resource availability, and input stability.

[0083]

[0084] Where: w i,j ∈[0,1] represents the semantic similarity between the user input and the topic; δ i ∈[0,1] represents the semantic divergence of the user input; the larger the value, the less clear the user's intent. ratio ∈[0,1] represents the remaining percentage of the current system context window; r max It is the maximum token length of the system context window; σ i For user i, all w within the current period i,j The standard deviation reflects the degree of user cross-topic volatility; α, β, and γ control the weights of the three core indicators respectively; ρ is the system volatility penalty factor, used to prevent users with extremely dissimilar topics from occupying a large amount of window resources.

[0085] The core innovation of this formula lies in the final regularization term ρ. · σ i It is a suppression mechanism for users with multiple topics who are fuzzy, and can dynamically suppress the tendency of fragment redundancy caused by the equal distribution of multiple topics.

[0086] Next, for each segment Calculate the semantic-window benefit ratio Γ for the (i,j) action pair. i,j,k As its priority for retention:

[0087]

[0088] Where: h i,k For fragment h i,k The encoded vector, used with e i Homogeneous shared encoder processing; t j The central theme associated with this behavioral unit; i,k λ represents the segment length (in tokens); λ is the suppression factor for the impact of window cost on efficiency, controlling the balance between short and long segments.

[0089] This structure is a window reduction optimization term, which introduces log(1+l) into the denominator. i,k The nonlinear term is beneficial for increasing the scheduling opportunities of medium-length, high-density content, and avoiding the monopoly of extreme segments such as short sentences or long paragraphs.

[0090] The system then pressed Γ i,j,k Sort all h from highest to lowest i,k Add them sequentially to the context cache until the cumulative length reaches q. i,j If there is no fragment Γ i,j,k If the value is higher than the preset threshold ∈, then the (i,j) behavior pair will abandon scheduling in order to release resources.

[0091] During the operation, all selected fragments will be written to the final context to build the cache in the following format:

[0092] Original token sequence;

[0093] Source behavior pairs with identifier (i,j);

[0094] Subject J;

[0095] Sequence location information (used to generate content location);

[0096] The format is automatically parsed and segmented by user by the model service module, requiring no manual intervention.

[0097] Final output: Set C of selected context fragments opt ={c1,c2,...,c M }, where each c m Corresponding to a selected segment; Segment source mapping table Used to trace back the scheduling source during the response phase.

[0098] S5. Based on the selected context fragment set, cluster and match templates according to the user request, input a large model, and output personalized responses for multiple users.

[0099] Specifically, the task of this step is to process the set of context fragments C output in step S4. opt Organize the large, structured model input and combine it with the current user request I. i This involves generating multi-user response content. The biggest challenge in this step is how to construct an accurate and efficient input structure for each user within a mixed-topic, cross-user context, avoiding context pollution while maximizing the reusability of fragment content.

[0100] Therefore, this step proposes a response input organization mechanism based on "topic aggregation + user request relocation," leveraging the user-topic behavior pairs constructed in previous steps. After aggregating the fragments, they are spliced ​​together according to the user's request, ensuring that the input of each generation request has both individual context and thematic consistency, thus guaranteeing that the final generated content has responsive relevance and linguistic consistency.

[0101] This step first involves C. opt All fragments in the data are clustered according to their source theme, that is, all fragments belonging to the same theme j are grouped into a set C. j :

[0102]

[0103] Next, for each user i, we match it with the topic using the matching matrix W = [w i,j (Already used in step S3), select the most relevant topic:

[0104]

[0105] This means that user i is currently used to request I. i The corresponding primary semantic topic will be the basis for generating inputs.

[0106] Subsequently, the system constructs a complete large model input sequence X for the user. i It includes the following parts (assembled in order):

[0107] A set is composed of selected context fragments that conform to the most important semantic topic. The context fragment, press c m Concatenate the timestamps in order;

[0108] Insert special mark<USER_INPUT> This is used to explicitly distinguish between historical fragments and user requests;

[0109] Insert User Request I i Encoded text;

[0110] Final addition <end>The marker indicates the end of the model input.

[0111] Input generation construction diagram:

[0112]

[0113] Each segment All taken from sets That is, with user request I i Match context fragments under the topic. After organizing all fields, the system will... i The data is encoded by a word segmenter and input into the large model inference engine, ensuring...

[0114] The length is less than a typical setting such as 4096 tokens. If the limit is exceeded, the tail segment is discarded in chronological order until the length constraint is met.

[0115] Example (User U1 requests "Can you provide travel route recommendations?", with the most matching topic j=3 - travel):

[0116] "I recommend Zhangjiajie National Forest Park..."

[0117] "I suggest a 3-day itinerary, with the first day staying in..."

[0118] <USER_INPUT>

[0119] Could you recommend some travel routes?

[0120] <end>

[0121] The input is fed into the large model service module (example configuration: Decoder-onlyTransformer, 8 layers, 12 heads, hidden=512) for generation, resulting in the natural language response R. i This refers to user i's final response.

[0122] This invention also provides a multi-user hybrid interactive data processing system based on a large model, the system comprising:

[0123] A multi-user request acquisition module is used to acquire a set of natural language requests input concurrently by multiple users. The set of natural language requests contains several user requests, and user identifier metadata is attached to the user requests.

[0124] The semantic mapping module is used to encode the user request into a high-dimensional semantic vector using the Transformer architecture, generate the user input semantic vector, identify semantic high-density clustering regions, and obtain a set of topic centers and a semantic mapping matrix constructed based on semantic similarity.

[0125] The topic matching module is used to identify topic centroids in the semantic mapping matrix and construct a set of behavioral units, where each behavioral unit represents the potential semantic target between the current user and the corresponding topic centroid in the current interaction cycle; a state vector for each behavioral pair is constructed based on the user input semantic vector, semantic divergence degree, historical semantic summary, target topic centroid, semantic similarity, and context resource state normalization value; wherein, the behavioral pair includes the corresponding user and the corresponding topic centroid;

[0126] The behavior pair analysis unit is used to schedule and select historical context fragments for each user based on the set of behavior units and the set of state vectors, so as to obtain a set of selected context fragments and a corresponding fragment source mapping table.

[0127] The personalized response module is used to cluster and match templates based on the selected set of context fragments and the user request, input a large model, and output personalized responses for multiple users.

[0128] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0129] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or units may be electrical, mechanical, or other forms.

[0130] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0131] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.< / end> < / end> < / end>

Claims

1. A multi-user hybrid interaction data processing method based on a large model, characterized in that, The method includes the following steps: obtaining a set of natural language requests input concurrently by multiple users, the set containing several user requests, and attaching user identifier metadata based on the user requests; encoding the user requests using a Transformer architecture to generate user input semantic vectors, and identifying semantically high-density clustered regions to obtain a set of topic centers and a semantic mapping matrix constructed based on semantic similarity; identifying topic centers using the semantic mapping matrix to construct a set of behavioral units, where each behavioral unit represents the potential semantic target between the current user and the corresponding topic center in the current interaction cycle; constructing a state vector for each behavioral pair based on the user input semantic vector, semantic divergence, historical semantic summary, target topic center, semantic similarity, and context resource state normalization value; wherein, the behavioral pair includes the corresponding user and the corresponding topic center; and performing historical context segment analysis on each user based on the set of behavioral units and the set of state vectors. The scheduling selection process involves obtaining a set of selected context fragments and a corresponding fragment source mapping table. Specifically, this includes: for each action pair, calculating the corresponding upper limit for window resource allocation by combining semantic similarity, semantic divergence, the remaining proportion of the current context window, and the maximum token length of the system context window; obtaining the historical context fragment set for each user, calculating the semantic window efficiency ratio of each historical context fragment under the current action pair as the current retention priority; sorting the historical context fragments from high to low according to the current retention priority and adding them to the context cache sequentially until the cumulative length reaches the corresponding upper limit for window resource allocation; if no historical context fragment has a current retention priority higher than a preset threshold, the current action pair is abandoned to release resources; generating a set of selected context fragments by combining the selected historical context fragments; clustering and matching templates based on the selected context fragment set and the user requests, inputting into a large model, and outputting personalized responses for multiple users.

2. The multi-user hybrid interactive data processing method based on a large model according to claim 1, characterized in that, The Transformer architecture is structured as follows: the input is a UTF-8 string sequence, which is first transformed into a vector through a 128-dimensional tokenembedding layer; then it passes through 4 Transformer blocks, each containing: a multi-head self-attention mechanism, a feedforward network layer, residual connections, and normalization; the output is a fixed-length user input semantic vector, representing the high-dimensional semantic representation of the current input.

3. The multi-user hybrid interactive data processing method based on a large model according to claim 1, characterized in that, The process of identifying high-density semantic clustering regions to obtain a set of topic center points and a semantic mapping matrix specifically includes: calculating the neighborhood density of each user input semantic vector based on a local density index; using Mahalanobis distance as a similarity index, selecting the user input semantic vectors with the highest density and the most dispersed relationships as candidate topic center points; and filtering the candidate topic center points to retain the most... A set of topic centroids is formed by identifying several topic centroids. The normalized cosine similarity between all user input semantic vectors and the set of topic centroids is calculated to generate semantic similarity. A semantic mapping matrix is ​​generated based on the semantic similarity, where each semantic similarity in the semantic mapping matrix represents the semantic similarity between the current user input and the corresponding topic centroid, retaining only significantly relevant connections.

4. The multi-user hybrid interactive data processing method based on a large model according to claim 1, characterized in that, The step of identifying the topic center point based on the semantic mapping matrix and constructing a set of behavioral units specifically includes: identifying the corresponding user and topic center point behavior pairs based on the semantic mapping matrix and constructing a set of behavioral units.

5. The multi-user hybrid interactive data processing method based on a large model according to claim 1, characterized in that, The semantic divergence degree is calculated based on the semantic mapping matrix and the current corresponding topic center point.

6. The multi-user hybrid interactive data processing method based on a large model according to claim 1, characterized in that, The corresponding fragment source mapping table contains the selected context fragments and their corresponding behavior pairs.

7. The multi-user hybrid interactive data processing method based on a large model according to claim 1, characterized in that, The step of clustering and matching templates based on the selected context fragment set and the user request, inputting into a large model, and outputting personalized responses for multiple users specifically includes: clustering all fragments in the selected context fragment set according to their source topics to generate a set of all selected context fragments belonging to the same topic; for each user, selecting the most relevant topic from the semantic mapping matrix between the current user and the corresponding topic centroid, representing the most important semantic topic corresponding to the current user's request; combining the set of all selected context fragments for the same topic and the most important semantic topic to generate a set of selected context fragments that conform to the most important semantic topic; and constructing a large model input sequence based on the set of selected context fragments that conform to the most important semantic topic to generate a natural language response.

8. The multi-user hybrid interactive data processing method based on a large model according to claim 7, characterized in that, The process of constructing a large model input sequence based on the selected context fragments conforming to the most important semantic theme and generating a natural language response specifically includes: obtaining context fragments from the selected context fragment set that conform to the most important semantic theme, concatenating them according to the timestamp order of the fragment source mapping table, and inserting special markers.<USER_INPUT> This is used to explicitly distinguish between historical fragments and user requests, then insert the encoded text of the user request, and finally append... <end> The marker indicates the end of the model input.< / end> 9. A multi-user hybrid interactive data processing system based on a large model, characterized in that: The system includes: a multi-user request acquisition module, used to acquire a set of natural language requests input concurrently by multiple users, the natural language request set containing several user requests, and to attach user identifier metadata based on the user requests; a semantic mapping module, used to encode the user requests into high-dimensional semantic vectors using a Transformer architecture, generate user input semantic vectors, and identify semantically high-density clustered regions to obtain a set of topic centers and a semantic mapping matrix constructed based on semantic similarity; a topic matching module, used to identify topic centers using the semantic mapping matrix, construct a set of behavioral units, where each behavioral unit represents the potential semantic target between the current user and the corresponding topic center in the current interaction cycle; and to construct a state vector for each behavioral pair based on the user input semantic vector, semantic divergence, historical semantic summary, target topic center, semantic similarity, and context resource state normalization value; wherein, the behavioral pair includes the corresponding user and the corresponding topic center; and a behavioral pair analysis unit, used to analyze each behavioral pair based on the set of behavioral units and the set of state vectors. The scheduling and selection of historical context fragments for each user results in a set of selected context fragments and a corresponding fragment source mapping table. Specifically, this includes: for each behavior pair, calculating the corresponding window resource allocation limit by combining semantic similarity, semantic divergence, the remaining proportion of the current context window, and the maximum token length of the system context window; obtaining the historical context fragment set for each user, calculating the semantic window efficiency ratio of each historical context fragment under the current behavior pair as the current retention priority; sorting the historical context fragments from high to low according to the current retention priority, and adding them to the context cache sequentially until the cumulative length reaches the corresponding window resource allocation limit; if no historical context fragment has a current retention priority higher than a preset threshold, the current behavior pair is abandoned to release resources; generating a set of selected context fragments by combining the selected historical context fragments; and a personalized response module, used to cluster and match templates based on the selected context fragment set and the user request, inputting into a large model and outputting personalized responses for multiple users.

Citation Information

Patent Citations

  • Text division method and device and electronic equipment

    CN119829764A

  • Letter text analysis method driven by multilayer dynamic aggregation large language model

    CN120387459A