Large and small model collaborative semantic rewriting system based on complexity induction

Through the complexity-sensitive large and small model collaborative semantic rewriting system, using machine learning algorithms and dynamic threshold collaborative strategies, the problems of insufficient long-distance dependency and fine-grained recognition capabilities of the existing system are solved, efficient and accurate semantic rewriting and resource scheduling are achieved, and the overall performance and response speed of the system are improved.

CN120633677APending Publication Date: 2025-09-12HANGZHOU TUBU ER TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510727035.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

The existing complexity-sensing large and small model collaborative semantic rewriting system has weak capabilities in recognizing long-distance dependencies and fine-grained semantic patterns. The rewriting effect is not accurate enough, it is difficult to quantify the difficulty of the input text, it is unable to make intelligent decisions on model selection and parameter tuning, and resource scheduling is not flexible enough, resulting in slow overall performance and response speed.

Method used

A large and small model collaborative semantic rewriting system based on complexity sensing is adopted, including a user question receiving module, a context extraction module, a complexity evaluation module, a collaborative strategy module and an output rewriting module. Through the machine learning algorithm and dynamic threshold collaborative strategy algorithm of the complexity evaluation module, the collaborative mode of the small model and the large model is dynamically scheduled to improve the response efficiency and semantic quality.

Benefits of technology

It achieves fine-grained complexity perception and prediction capabilities, ensures the balance between accuracy, efficiency and resource utilization of large and small model collaboration strategies, improves the system's response quality and operational performance in complex and changing dialogue environments, and provides solid support for intelligent semantic rewriting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120633677A_ABST
    Figure CN120633677A_ABST
Patent Text Reader

Abstract

A big and small model collaborative semantic rewriting system based on complexity sensing comprises a user question receiving module, a context extraction module, a complexity evaluation module, a collaborative strategy module and an output rewriting module, and the user question receiving module is used for receiving questions of a current user and starting a semantic rewriting process. The context extraction module is used for integrating historical dialogue contexts and extracting key entities, the complexity evaluation module is used for evaluating user question semantic complexity and driving strategy decision, the collaborative strategy module is used for dynamically scheduling collaborative modes of small models and large models and optimizing resource allocation, and the output rewriting module is used for generating final rewritten questions. According to the large and small model collaborative semantic rewriting system based on complexity induction, a semantic complexity evaluation algorithm based on machine learning is put forward to evaluate semantic complexity, and a model collaborative strategy algorithm based on a dynamic threshold is put forward to cooperatively process tasks of all levels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine learning and collaborative strategy, and in particular to a large and small model collaborative semantic rewriting system based on complexity sensing. Background Art

[0002] Machine learning technology is a model training method based on statistical learning and optimization algorithms. It aims to solve the problem of objectively evaluating the semantic complexity of text. By constructing feature vectors and training classification and regression models, it can quantitatively judge the structure and meaning level of the input text, and provide decision support for the system to dynamically select large and small models and adjust rewriting strategies.

[0003] Collaborative strategy technology is a scheduling and fusion method for multi-model collaborative work. It aims to solve the difficult problem of balancing performance and resource consumption for tasks of different complexities. Through pre-set task complexity thresholds and model call priorities, it coordinates the division of labor and switching between large-scale precise models and small-scale efficient models in the same pipeline, and dynamically allocates computing resources with the help of strategy algorithms to achieve the optimal compromise between overall throughput and rewriting quality.

[0004] However, the existing large and small model collaborative semantic rewriting system based on complexity sensing has problems such as weak recognition of long-distance dependencies and fine-grained semantic patterns, inaccurate rewriting effects, difficulty in quantifying the difficulty of input text, inability to make intelligent decisions on model selection and parameter tuning, large fluctuations in efficiency and quality, and lack of collaborative strategies to coordinate the processing logic of tasks at all levels. As a result, the switching mechanism between large and small models is rough, resource scheduling is not flexible enough, and the overall performance and response speed are slow. Summary of the Invention

[0005] The purpose of the present invention is to provide a large and small model collaborative semantic rewriting system based on complexity sensing, so as to solve the problems of the existing large and small model collaborative semantic rewriting system based on complexity sensing proposed in the above background technology, such as weak recognition ability of long-distance dependency and fine-grained semantic pattern, insufficient rewriting effect, difficulty in quantifying the difficulty of input text, inability to make intelligent decisions in model selection and parameter tuning, large fluctuations in efficiency and quality, and lack of collaborative strategies to coordinate the processing logic of tasks at all levels, resulting in a rough switching mechanism between large and small models, inflexible resource scheduling, and slow overall performance and response speed.

[0006] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a large and small model collaborative semantic rewriting system based on complexity induction, comprising a user question receiving module, a context extraction module, a complexity evaluation module, a collaborative strategy module, and an output rewriting module, characterized in that: the user question receiving module is used to receive questions asked by the current user, and to construct a dialogue context in combination with historical question-answer pairs; the context extraction module is used to integrate historical dialogue contexts, establish a complete dialogue context, and provide structured context information for subsequent modules; the complexity evaluation module comprises a context feature extraction unit, a complexity scoring model unit, and a scoring result output unit, and the context feature extraction unit is used to extract reference, historical dependency, syntactic structure, context, and other features. Reasoning and ambiguity risk features are encoded into structured vectors. The complexity scoring model unit proposes a semantic complexity evaluation algorithm based on machine learning, which is used to evaluate semantic complexity by combining expert annotations and system operation data, and outputs a normalized complexity score. The scoring result output unit is used to divide the task level according to the preset threshold and trigger subsequent collaborative strategies; the collaborative strategy module proposes a model collaborative strategy algorithm based on dynamic thresholds, which is used to dynamically schedule the collaborative mode of small models and large models according to the complexity score, thereby improving the response efficiency and semantic quality of the question rewriting task; the output rewriting module is used to integrate the execution results of the collaborative strategy, output semantically complete and context-consistent rewritten questions, support post-processing and user feedback records, and ensure generation quality.

[0007] Preferably, the user question receiving module captures the current question input by the user in real time and passes the question to the context extraction module, thereby ensuring that the system can respond to the user's multi-round dialogue needs in real time.

[0008] Preferably, the context extraction module dynamically constructs a complete conversation semantic environment by combining the current question and the historical conversation context, supports the functions of reference resolution, context window control, entity recognition and context trigger word tagging, and ensures that subsequent modules can accurately understand the user's intention.

[0009] Preferably, the complexity assessment module includes a context feature extraction unit, a complexity scoring model unit, and a scoring result output unit. The context feature extraction unit ensures comprehensive representation of semantic complexity by extracting referential features, historical dependency features, syntactic structure features, contextual reasoning features, and ambiguity risk features; the complexity scoring model unit proposes a semantic complexity assessment algorithm based on machine learning, and trains a scoring model by combining expert annotation data with system operation data. By adopting a gradient boosting decision tree model as a regression model, it has good feature expression ability and training efficiency, ensuring comprehensive quantification of the multi-dimensional representation of semantic complexity and providing structured input for subsequent scoring models; the scoring result output unit divides the scores into three complexity levels of low, medium, and high through preset thresholds, and triggers the corresponding processing path of the collaborative strategy module to ensure the accuracy and efficiency of the system's dynamic scheduling of model resources.

[0010] Preferably, the semantic complexity evaluation algorithm based on machine learning is specifically as follows: First, the structured vector obtained by encoding the semantic features of the current question and the historical context output by the context feature extraction unit is used as input for the machine learning model to ensure comprehensive representation of semantic complexity. Five types of features are extracted from the current question and the historical conversation context. The specific formula is expressed as follows:

[0011] F=[f ref ,f hist ,f syn ,f inf ,f amb ]

[0012] Among them, F represents the eigenvector, f ref Represented as a referential feature, f hist Expressed as a history-dependent feature, f syn Expressed as syntactic structure features, f inf Represented as contextual reasoning feature, f amb It is represented as an ambiguous risk feature. Then, the mapping relationship between features and semantic complexity is learned through the gradient boosting decision tree model to ensure that the scoring model has high feature expression ability and generalization performance. The expert annotation data set is used y i ∈[0,1] represents the manually annotated complexity label, F i It is represented as the i-th eigenvector, i represents the index of the number of eigenvectors, N represents the total number of eigenvectors, and the decision tree regression model M is trained. The specific formula is:

[0013]

[0014] in, Expressed as the model’s predicted score for semantic complexity, It represents the gradient boosting decision tree model, K represents the total number of decision trees in the decision tree model, k represents the number index of decision trees in the decision tree model, γ k Expressed as the weight coefficient of the kth decision tree, h k (F) is expressed as the prediction function of the kth decision tree. Then, pseudo labels are generated by combining the system operation data to improve the model's adaptability to actual scenarios. The pseudo label generation function φ is used to integrate the operation data and the model prediction results. The specific formula is expressed as:

[0015]

[0016] in, Denotes the optimized pseudo-label generated by fusing the model prediction value and the system operation data, ρ fail Expressed as the rewrite failure rate, ρ large It is expressed as the frequency of large model intervention, updating model parameters to minimize the hybrid loss function. The specific formula is:

[0017]

[0018] in, Expressed as a total loss function, it is used to measure the difference between the model prediction value and the true value including expert annotation and pseudo label. Represented as the decision tree model for the i-th feature vector F i The prediction output of λ is expressed as a regularization coefficient, which is used to balance the weight coefficient of expert annotation loss and pseudo label loss. Then, the active learning mechanism is used to screen the boundary samples where the model prediction is uncertain, and the training data is supplemented to improve the robustness of the model. The specific formula of the sample uncertainty score is expressed as:

[0019]

[0020] Among them, u i Expressed as the uncertainty score of the i-th eigenvector sample, select the T eigenvector samples with the highest uncertainty After being annotated by experts, they are added to the training set D exp , retrain the model, T represents the total number of feature vector samples with the highest uncertainty, t represents the index of the number of feature vector samples with the highest uncertainty, and finally, map the original output of the model to the normalized interval as the scheduling basis of the collaborative strategy module. The specific formula is expressed as follows:

[0021]

[0022] Among them, S represents the semantic complexity score of the final output, a represents the Sigmoid scaling coefficient, which is used to control the steepness of the Sigmoid curve, b represents the Sigmoid translation coefficient, which is used to control the horizontal position of the Sigmoid curve, and e represents the base of the natural logarithm.

[0023] Preferably, the collaborative strategy module proposes a model collaborative strategy algorithm based on dynamic thresholds, which ensures that the system achieves an optimal balance between response speed and semantic accuracy by dynamically selecting the collaboration mode of small models and large models according to complexity scores.

[0024] Preferably, the model collaboration strategy algorithm based on dynamic thresholds is specifically as follows: First, semantic complexity is divided into three levels: low, medium, and high by preset thresholds, providing a classification basis for subsequent model collaboration strategies to ensure on-demand resource scheduling. Assuming the complexity score of the current question is S∈[0,1], the preset thresholds α=0.3, β=0.7, and the task classification rules are as follows:

[0025]

[0026] Among them, D represents different task levels, S represents the normalized complexity score, which is output by the complexity assessment module, and α and β represent preset thresholds for dividing task levels. They need to be adjusted according to the actual scenario. Then, for low-complexity tasks, a lightweight small model is used to quickly generate rewritten questions to ensure low resource consumption and high response speed. The small model is called to generate rewritten questions based on the rule template. The specific formula is expressed as follows:

[0027]

[0028] in, It represents the rewritten question generated by calling the small model, Q0 represents the question asked by the current user, Represented as historical conversation context, Q i-1 Indicates the user asking the question in round i-1, A i-1 It represents the system answer in round i-1, i represents the index of the number of question and answer rounds, I represents the total number of question and answer rounds, and M small It is represented as a lightweight small model. Then, the semantic skeleton draft is generated by the small model, and the key semantic points are refined by the large model to balance efficiency and accuracy. small Generate a structured draft D, which includes reference relations, keywords, and intent labels. The specific formula is expressed as follows:

[0029] D={E ref ,K key ,T intent}

[0030]

[0031] Among them, E ref Represents the referential relationship parsing result generated by the small model, which is a structured mapping table. It is represented as a submodule in the small model specifically for reference resolution, with the input being the current question and historical context, and the output being the reference mapping table, K key Represents a list of key semantic elements extracted by the small model, including entity, time, and place. It is represented as a submodule in the small model specifically for keyword extraction, T intent Represents the user intent classification label identified by the small model, It is represented as a submodule in the small model specifically for intent recognition, and the large model M large Generate the final rewritten question based on draft D optimization The specific formula is:

[0032]

[0033] in, It is represented by the rewritten question generated by calling the small model. Secondly, for high-complexity tasks, the large model takes the lead in generation, and the small model provides structured prompts to ensure accurate parsing of complex semantics. The specific formula is expressed as:

[0034] p={S ctx ,L logic}

[0035] Among them, P represents the prompt information generated by the small model, including the context summary information S ctx With the logic chain information L logic Then the large model combines the prompt P to generate a rewritten question. The specific formula is:

[0036]

[0037] in, Represented as a large model M large Combined with the rewritten question generated by prompt P, finally, computing resources are dynamically allocated according to the task level, and the results of each stage are integrated to output the final rewritten question. The resource allocation weight is defined as:

[0038]

[0039] Among them, S represents the normalized complexity score of the input, λ represents the resource allocation ratio in the collaborative stage, and ω represents the resource weight of the small model, which represents the proportion of computing resources allocated to the small model under the current task complexity. The final output rewrites the question as follows:

[0040]

[0041] Among them, Q final The rewritten question is represented as the final output. The generation method is dynamically controlled by the weight ω. Through hierarchical scheduling and structured guidance, the semantic accuracy and system efficiency in multi-round dialogue scenarios are improved.

[0042] Preferably, the output rewriting module integrates the generated results of the collaborative strategy module, compares the historical context with the rewriting results and automatically repairs grammatical and structural errors to ensure that the semantic logic is not offset, outputs the final rewritten question, and ensures that the user obtains a semantically complete and logically clear search request.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] 1. The complexity scoring model unit proposes a semantic complexity evaluation algorithm based on machine learning. The algorithm first combines the semantic feature encoding of the current question and historical dialogue output by the context feature extraction unit to generate a structured vector input. Through five types of features, namely reference, historical dependency, syntactic structure, contextual reasoning and ambiguity risk, it comprehensively characterizes the semantic complexity dimension of the problem, ensuring that complexity perception covers multiple key aspects of language understanding. Then, the gradient boosting decision tree model is used to learn the mapping relationship between features and complexity scores. By training on large-scale expert-annotated data, a complexity prediction model with high feature expression ability and excellent generalization performance is established, which effectively avoids evaluation bias caused by feature overfitting and scenario drift. Secondly, the system combines actual operation data, including rewriting failure rate and large model intervention frequency, to dynamically generate pseudo labels, and continuously optimizes the adaptability and robustness of the model in real environment through a hybrid training mechanism that integrates expert labels and pseudo labels. This process not only enhances the model's ability to detect rare semantic patterns, but also strengthens the model's ability to detect rare semantic patterns. The learning ability of the algorithm is improved, and the accuracy of complexity perception in diverse scenarios is also improved. At the same time, an active learning mechanism is introduced. Based on the uncertainty measurement of model prediction, boundary samples are screened and manual labeling is guided to supplement high-value samples, which effectively improves the robustness of the model in complex language expressions and implicit contexts, and reduces the performance degradation caused by data distribution deviation. Finally, the algorithm normalizes the complexity prediction results to a unified interval through nonlinear mapping, which serves as the key basis for the decision-making of the collaborative strategy module, and realizes the intelligent scheduling of dynamic selection of large and small models for collaborative rewriting for different semantic complexity problems. Overall, the semantic complexity evaluation algorithm not only gives the system fine-grained complexity perception and prediction capabilities, but also ensures that the collaborative strategy of large and small models achieves a better balance between accuracy, efficiency and resource utilization through multiple mechanisms such as pseudo-label adaptation, active learning reinforcement, and normalized mapping, thereby improving the response quality and operation efficiency of the system in complex and changeable dialogue environments, and providing solid support for the realization of large-scale intelligent semantic rewriting.

[0045] 2. The collaborative strategy module proposes a model collaborative strategy algorithm based on dynamic thresholds. First, the algorithm divides the semantic complexity of user input into three levels: low, medium, and high by setting reasonable dynamic thresholds, and establishes a clear task classification mechanism. The complexity classification not only provides a clear basis for subsequent model collaboration, but also can flexibly adjust the threshold parameters according to actual business scenarios to ensure that computing resources can be accurately scheduled on demand to avoid resource waste and response delays. In low-complexity task processing, the system gives priority to calling lightweight small models, and combines rule templates to quickly generate rewritten questions to achieve extremely low resource consumption and extremely high response speed. At the same time, based on the historical dialogue context, it maintains basic context coherence and question rationality. For medium-complexity tasks, the small model first generates a structured draft containing reference relationships, keywords, and intent labels, and then the large model refines the key semantics and optimizes the logic based on the draft, thereby achieving a good balance between efficiency and accuracy. For high-complexity tasks, the large model takes the lead in generation. The small model assists in providing context summaries and logical chain prompts to ensure accurate parsing and semantic coherence of rewritten questions in complex scenarios. Throughout the process, the collaborative strategy module dynamically adjusts the resource allocation weights of the small model and the large model according to the complexity score, so that computing power resources are optimally utilized at different complexity levels, which not only ensures processing speed but also improves the quality of semantic rewriting. In addition, the algorithm introduces structured guidance at different stages, such as reference resolution, keyword extraction and intent recognition, to make the collaboration between large and small models closer and information transmission more efficient, effectively reducing the problems of semantic deviation and redundant generation. Through this dynamic threshold-based collaborative strategy, the system can demonstrate higher stability and intelligence in multi-round dialogues, complex question-and-answer and high-frequency interaction scenarios, truly realizing efficient collaborative rewriting of large and small models under complexity perception, improving user experience and overall system energy efficiency, and bringing practical innovation breakthroughs to the semantic processing of a large and small model collaborative semantic rewriting system based on complexity sensing. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a structural schematic diagram of the present invention; DETAILED DESCRIPTION

[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0048] See also Figure 1The present invention provides a large and small model collaborative semantic rewriting system based on complexity sensing, including a user question receiving module, a context extraction module, a complexity evaluation module, a collaborative strategy module, and an output rewriting module, characterized in that: the user question receiving module is used to receive the current user's question and build a dialogue context in combination with historical question-answer pairs; the context extraction module is used to integrate historical dialogue contexts, establish a complete dialogue context, and provide structured context information for subsequent modules; the complexity evaluation module includes a context feature extraction unit, a complexity scoring model unit, and a scoring result output unit, and the context feature extraction unit is used to extract reference, historical dependency, syntactic structure, context reasoning and ambiguity risk features And encoded into a structured vector. The complexity scoring model unit proposes a semantic complexity evaluation algorithm based on machine learning, which is used to evaluate the semantic complexity by combining expert annotations and system operation data, and outputs a normalized complexity score. The scoring result output unit is used to divide the task level according to the preset threshold and trigger the subsequent collaborative strategy; the collaborative strategy module proposes a model collaborative strategy algorithm based on dynamic thresholds, which is used to dynamically schedule the collaboration mode of small models and large models according to the complexity score, thereby improving the response efficiency and semantic quality of the question rewriting task; the output rewriting module is used to integrate the execution results of the collaborative strategy, output semantically complete and context-consistent rewritten questions, support post-processing and user feedback records, and ensure generation quality.

[0049] See Figure 1 ,Furthermore, the user question receiving module captures the current question ,input by the user in real time and passes the question to the ,context extraction module, ensuring that the system can immediately respond to the ,user's multi-round dialogue needs.

[0050] See Figure 1 ,Furthermore, the context extraction module dynamically builds a complete ,conversational semantic environment by combining the current question ,with the historical conversation context, and supports the functions of ,reference resolution, context window control, entity recognition, and ,context trigger word tagging, ensuring that subsequent modules can ,accurately understand the user's intention.

[0051] See Figure 1Furthermore, the complexity assessment module includes a context feature extraction unit, a complexity scoring model unit, and a scoring result output unit. The context feature extraction unit ensures comprehensive representation of semantic complexity by extracting referential features, historical dependency features, syntactic structure features, contextual reasoning features, and ambiguity risk features; the complexity scoring model unit proposes a semantic complexity assessment algorithm based on machine learning, and trains a scoring model by combining expert annotation data with system operation data. By adopting a gradient boosting decision tree model as a regression model, it has good feature expression ability and training efficiency, ensuring comprehensive quantification of the multi-dimensional representation of semantic complexity and providing structured input for subsequent scoring models; the scoring result output unit divides the scores into three complexity levels: low, medium, and high through preset thresholds, and triggers the corresponding processing path of the collaborative strategy module to ensure the accuracy and efficiency of the system's dynamic scheduling of model resources.

[0052] See Figure 1 Furthermore, the semantic complexity evaluation algorithm based on machine learning is specifically as follows: First, the structured vector obtained by encoding the semantic features of the current question and the historical context output by the context feature extraction unit provides input to the machine learning model to ensure comprehensive representation of semantic complexity. Five types of features are extracted from the current question and the historical conversation context. The specific formula is expressed as follows:

[0053] F=[f ref ,f hist ,f syn ,f inf ,f amb ]

[0054] Among them, F represents the eigenvector, f ref Represented as a referential feature, f hist Expressed as a history-dependent feature, f syn Expressed as syntactic structure features, f inf Represented as contextual reasoning feature, f amb It is represented as an ambiguous risk feature. Then, the mapping relationship between features and semantic complexity is learned through the gradient boosting decision tree model to ensure that the scoring model has high feature expression ability and generalization performance. The expert annotation data set is used y i ∈[0,1] represents the manually annotated complexity label, F i It is represented as the i-th eigenvector, i represents the index of the number of eigenvectors, N represents the total number of eigenvectors, and the decision tree regression model M is trained. The specific formula is:

[0055]

[0056] in, Expressed as the model’s predicted score for semantic complexity, It represents the gradient boosting decision tree model, K represents the total number of decision trees in the decision tree model, k represents the number index of decision trees in the decision tree model, γ k Expressed as the weight coefficient of the kth decision tree, h k (F) is expressed as the prediction function of the kth decision tree. Then, pseudo labels are generated by combining the system operation data to improve the model's adaptability to actual scenarios. The pseudo label generation function φ is used to integrate the operation data and the model prediction results. The specific formula is expressed as:

[0057]

[0058] in, Denotes the optimized pseudo-label generated by fusing the model prediction value and the system operation data, ρ fail Expressed as the rewrite failure rate, ρ large It is expressed as the frequency of large model intervention, updating model parameters to minimize the hybrid loss function. The specific formula is:

[0059]

[0060] in, Expressed as a total loss function, it is used to measure the difference between the model prediction value and the true value including expert annotation and pseudo label. Represented as the decision tree model for the i-th feature vector F i The prediction output of λ is expressed as a regularization coefficient, which is used to balance the weight coefficient of expert annotation loss and pseudo label loss. Then, the active learning mechanism is used to screen the boundary samples where the model prediction is uncertain, and the training data is supplemented to improve the robustness of the model. The specific formula of the sample uncertainty score is expressed as:

[0061]

[0062] Among them, u i Expressed as the uncertainty score of the i-th eigenvector sample, select the T eigenvector samples with the highest uncertainty After being annotated by experts, they are added to the training set D exp , retrain the model, T represents the total number of feature vector samples with the highest uncertainty, t represents the index of the number of feature vector samples with the highest uncertainty, and finally, map the original output of the model to the normalized interval as the scheduling basis of the collaborative strategy module. The specific formula is expressed as follows:

[0063]

[0064] Among them, S represents the semantic complexity score of the final output, a represents the Sigmoid scaling coefficient, which is used to control the steepness of the Sigmoid curve, b represents the Sigmoid translation coefficient, which is used to control the horizontal position of the Sigmoid curve, and e represents the base of the natural logarithm.

[0065] See Figure 1 ,Furthermore, the collaborative strategy module proposes a model collaborative strategy algorithm based on ,dynamic thresholds, which dynamically selects the collaboration mode between small ,models and large models according to the complexity score, ,ensuring that the system achieves the optimal balance between response speed ,and semantic accuracy.

[0066] See Figure 1 Furthermore, the model collaboration strategy algorithm based on dynamic thresholds is specifically as follows: First, the semantic complexity is divided into three levels: low, medium, and high through preset thresholds, providing a classification basis for subsequent model collaboration strategies to ensure on-demand resource scheduling. Assume that the complexity score of the current question is S∈[0,1], the preset thresholds α=0.3 and β=0.7, and the task classification rules are as follows:

[0067]

[0068] Among them, D represents different task levels, S represents the normalized complexity score, which is output by the complexity assessment module, and α and β represent preset thresholds for dividing task levels. They need to be adjusted according to the actual scenario. Then, for low-complexity tasks, a lightweight small model is used to quickly generate rewritten questions to ensure low resource consumption and high response speed. The small model is called to generate rewritten questions based on the rule template. The specific formula is expressed as follows:

[0069]

[0070] in, It represents the rewritten question generated by calling the small model, Q0 represents the question asked by the current user, Represented as historical conversation context, Q i-1 Indicates the user asking the question in round i-1, A i-1 It represents the system answer in round i-1, i represents the index of the number of question and answer rounds, I represents the total number of question and answer rounds, and M small It is represented as a lightweight small model. Then, the semantic skeleton draft is generated by the small model, and the key semantic points are refined by the large model to balance efficiency and accuracy. small Generate a structured draft D, which includes reference relations, keywords, and intent labels. The specific formula is expressed as follows:

[0071] D={E ref ,K key ,T intent}

[0072]

[0073] Among them, E ref Represents the referential relationship parsing result generated by the small model, which is a structured mapping table. It is represented as a submodule in the small model specifically for reference resolution, with the input being the current question and historical context, and the output being the reference mapping table, K key Represents a list of key semantic elements extracted by the small model, including entity, time, and place. It is represented as a submodule in the small model specifically for keyword extraction, T intent Represents the user intent classification label identified by the small model, It is represented as a submodule in the small model specifically for intent recognition, and the large model M large Generate the final rewritten question based on draft D optimization The specific formula is:

[0074]

[0075] in, It is represented by the rewritten question generated by calling the small model. Secondly, for high-complexity tasks, the large model takes the lead in generation, and the small model provides structured prompts to ensure accurate parsing of complex semantics. The specific formula is expressed as:

[0076] P={S ctx ,L logic}

[0077] Among them, P represents the prompt information generated by the small model, including the context summary information S ctx With the logic chain information L logic Then the large model combines the prompt P to generate a rewritten question. The specific formula is:

[0078]

[0079] in, Represented as a large model M large Combined with the rewritten question generated by prompt P, finally, computing resources are dynamically allocated according to the task level, and the results of each stage are integrated to output the final rewritten question. The resource allocation weight is defined as:

[0080]

[0081] Among them, S represents the normalized complexity score of the input, λ represents the resource allocation ratio in the collaborative stage, and ω represents the resource weight of the small model, which represents the proportion of computing resources allocated to the small model under the current task complexity. The final output rewrites the question as follows:

[0082]

[0083] Among them, Q final The rewritten question is represented as the final output. The generation method is dynamically controlled by the weight ω. Through hierarchical scheduling and structured guidance, the semantic accuracy and system efficiency in multi-round dialogue scenarios are improved.

[0084] See Figure 1 Furthermore, the output rewriting module integrates the generated results of the collaborative strategy module, compares the historical context with the rewriting results, and automatically repairs grammatical and structural errors to ensure that the semantic logic is not offset, and outputs the final rewritten question to ensure that the user obtains a semantically complete and logically clear search request.

[0085] In specific use, first, the user question receiving module is used to receive the current user's question and build a dialogue context based on historical question-answer pairs; second, the context extraction module is used to integrate historical dialogue context, establish a complete dialogue context, and provide structured context information for subsequent modules; then, the complexity assessment module includes a context feature extraction unit, a complexity scoring model unit, and a scoring result output unit. The context feature extraction unit is used to extract referentiality, historical dependency, syntactic structure, contextual reasoning, and ambiguity risk features and encode them into structured vectors. The complexity scoring model unit proposes a semantic complexity assessment algorithm based on machine learning, which is used to evaluate semantic complexity by combining expert annotations and system operation data, and output a normalized complexity score. The scoring result output unit is used to classify tasks according to preset thresholds and trigger subsequent collaborative strategies; second, the collaborative strategy module proposes a model collaborative strategy algorithm based on dynamic thresholds, which is used to dynamically schedule the collaborative mode of small and large models according to the complexity score, thereby improving the response efficiency and semantic quality of the question rewriting task; finally, the output rewriting module is used to integrate the execution results of the collaborative strategy, output semantically complete and contextually consistent rewritten questions, support post-processing and user feedback recording to ensure generation quality.

[0086] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A large-scale model collaborative semantic rewriting system based on complexity sensing, comprising a user question receiving module, a context extraction module, a complexity assessment module, a collaborative strategy module, and an output rewriting module, characterized by: The user question receiving module is used to receive questions asked by the current user and build a dialogue context based on historical question-answer pairs; the context extraction module is used to integrate historical dialogue contexts, establish a complete dialogue context, and provide structured context information for subsequent modules; the complexity evaluation module includes a context feature extraction unit, a complexity scoring model unit, and a scoring result output unit. The context feature extraction unit is used to extract referentiality, historical dependency, syntactic structure, contextual reasoning, and ambiguity risk features and encode them into structured vectors. The complexity scoring model unit proposes a semantic complexity evaluation algorithm based on machine learning, which is used to evaluate semantic complexity in combination with expert annotations and system operation data, and output a normalized complexity score. The scoring result output unit is used to divide the task level according to a preset threshold and trigger subsequent collaborative strategies. The collaborative strategy module proposes a model collaborative strategy algorithm based on dynamic thresholds, which is used to dynamically schedule the collaborative mode of small and large models according to the complexity score, thereby improving the response efficiency and semantic quality of the question rewriting task; the output rewriting module is used to integrate the execution results of the collaborative strategy, output semantically complete and context-consistent rewritten questions, support post-processing and user feedback recording to ensure generation quality.

2. The complexity-sensing large and small model collaborative semantic rewriting system according to claim 1, characterized in that: The user question receiving module captures the current question input by the user in real time and passes the question to the context extraction module, ensuring that the system can respond to the user's multi-round dialogue needs in real time.

3. The complexity-sensing large and small model collaborative semantic rewriting system according to claim 1, characterized in that: The context extraction module dynamically builds a complete conversation semantic environment by combining the current question and historical conversation context, supporting reference resolution, context window control, entity recognition, and context trigger word tagging to ensure that subsequent modules can accurately understand user intent.

4. The complexity-sensing large and small model collaborative semantic rewriting system according to claim 3, characterized in that: The complexity assessment module includes a context feature extraction unit, a complexity scoring model unit, and a scoring result output unit. The context feature extraction unit ensures comprehensive representation of semantic complexity by extracting referential features, historical dependency features, syntactic structure features, contextual reasoning features, and ambiguity risk features. The complexity scoring model unit proposes a semantic complexity assessment algorithm based on machine learning. By combining expert annotation data with system operation data to train a scoring model, and adopting a gradient boosting decision tree model as a regression model, it has good feature expression ability and training efficiency, ensuring comprehensive quantification of the multi-dimensional representation of semantic complexity and providing structured input for the subsequent scoring model. The scoring result output unit divides the scores into three complexity levels: low, medium, and high through preset thresholds, and triggers the corresponding processing path of the collaborative strategy module to ensure the accuracy and efficiency of the system's dynamic scheduling of model resources.

5. The system for collaborative semantic rewriting of large and small models based on complexity sensing according to claim 4 is characterized in that: The semantic complexity assessment algorithm based on machine learning first obtains five types of structured feature vectors of the current question and historical dialogue through the feature extraction unit, including reference, historical dependency, syntactic structure, reasoning features and ambiguity risk features. Then, the gradient boosting decision tree model is used to learn the mapping relationship between features and semantic complexity based on the expert-annotated dataset to form a preliminary scoring model. To enhance the model's scenario adaptability, pseudo labels are generated based on system operation data, and the rewriting failure rate and large model intervention frequency are integrated to optimize the loss function and update the model parameters. Through the active learning mechanism, high-uncertainty samples are screened to supplement the annotated data to further improve the model's robustness. Finally, the Sigmoid function is used to normalize the output score to provide accurate semantic complexity assessment for subsequent policy scheduling.

6. The system for collaborative semantic rewriting of large and small models based on complexity sensing according to claim 1 is characterized in that: The collaborative strategy module proposes a model collaborative strategy algorithm based on dynamic thresholds, which ensures that the system achieves the optimal balance between response speed and semantic accuracy by dynamically selecting the collaboration mode between small models and large models according to complexity scores.

7. The system for collaborative semantic rewriting of large and small models based on complexity sensing according to claim 6 is characterized in that: The model collaboration strategy algorithm based on dynamic threshold divides the semantic complexity level based on dynamic threshold and realizes efficient question rewriting through model collaboration. First, the normalized complexity score S∈[0,1] is set, and the tasks are divided into three categories of low, medium and high complexity with the preset thresholds α=0.3 and β=0.

7. For low-complexity tasks, the lightweight small model M is called. small Based on the rule template, the rewritten question is quickly generated, and the reference relationship, keywords and intention labels are extracted to form a structured draft S. For medium-complexity tasks, the small model generates the draft, and the large model M small On this basis, we optimize key semantics, taking into account both efficiency and accuracy. For highly complex tasks, the small model extracts context summaries and logical chain hints P, while the large model leads the rewriting generation to ensure accurate understanding of complex semantics. Each stage dynamically allocates computing resources according to complexity, defines the weight of the small model ω, and adaptively integrates the results generated by the small and large models according to the task level, and finally outputs the rewritten question Q. final Through hierarchical scheduling and structured guidance, the semantic accuracy, response speed and system resource utilization in multi-round conversations are effectively improved.

8. The complexity-sensing large and small model collaborative semantic rewriting system according to claim 1, characterized in that: The output rewriting module integrates the generated results of the collaborative strategy module, compares the historical context with the rewriting results, and automatically fixes grammatical and structural errors to ensure that the semantic logic is not offset, outputs the final rewritten question, and ensures that the user obtains a semantically complete and logically clear search request.

Citation Information

Patent Citations

  • Dialogue processing method, system, electronic device and storage medium

    CN119739816A

  • Input rewriting method and device of intelligent question answering system and computer equipment

    CN119782485A

Cited By

  • Energy consumption optimization-oriented ecological environment large model hierarchical optimization method and system

    CN121920622A

  • An ecological environment large model hierarchical optimization method and system for energy consumption optimization

    CN121920622B