CN-121998073-A - Dual-path generation method, medium and system based on dynamic update of weight coefficient
Abstract
The invention relates to a dual-path generating method, medium and system based on dynamic update of weight coefficients, which are characterized in that the weight coefficients of all the characteristic parameters are dynamically determined by acquiring the current query problem of a user, extracting the characteristic parameters of the query problem, acquiring the characteristic indexes of all the characteristic parameters, or/and the operation indexes of a retrieval thinking module and an reasoning thinking module, determining the difficulty coefficient of the query problem according to all the characteristic parameters and the corresponding weight coefficients, selectively calling the retrieval thinking module or the reasoning thinking module according to the difficulty coefficient, and outputting the query result. The problems of unreasonable resource allocation, low query efficiency, insufficient accuracy and the like in the prior art in a complex task scene are solved.
Inventors
- NIE XIAOYI
- ZHANG HAITAO
- LI XIAOYU
- MAO YUNZHOU
- Dou Wenge
- ZHU XINGHUI
Assignees
- 湖南农业大学
Dates
- Publication Date
- 20260508
- Application Date
- 20251111
Claims (10)
- 1. The dual-path generation method based on the dynamic update of the weight coefficient is characterized by comprising the following steps: acquiring a current query problem of a user, and extracting characteristic parameters of the query problem; Acquiring characteristic indexes of each characteristic parameter, or/and operating indexes of a retrieval thinking module and an reasoning thinking module so as to dynamically determine weight coefficients of each characteristic parameter; determining a difficulty coefficient of the query problem according to each characteristic parameter and the corresponding weight coefficient; and selectively calling a retrieval thinking module or an inference thinking module according to the difficulty coefficient, and outputting a query result.
- 2. The method of claim 1, wherein the steps of obtaining a current query of the user and extracting feature parameters of the query comprise: Obtaining a plurality of standard problem templates, encoding each standard problem template and query problem into an embedded representation to obtain a plurality of template embedded vectors and query embedded vectors; extracting statement analysis information of the query problem, obtaining the number of the corresponding sub-nodes of each sentence in the query problem according to the statement analysis information, and taking the maximum value of the number of the corresponding sub-nodes of each sentence as the syntax complexity; the query problem is divided to obtain a plurality of target words to be matched with the professional term set to obtain professional words, and the number of the professional words and the target words is counted to obtain the ratio of the professional words to the target words as the field specialization.
- 3. The method according to claim 2, wherein the step of obtaining the feature index of each feature parameter, or/and the operation index of the search thinking module and the inference thinking module to dynamically determine the weight coefficient of each feature parameter, further comprises: determining the reference weight of each characteristic parameter according to the fluctuation degree of each characteristic parameter and the current weight coefficient; acquiring the load balance degree among the modules, and determining the additional weight of each characteristic parameter; And obtaining the weight coefficient of each characteristic parameter after updating according to the reference weight and the additional weight of each characteristic parameter.
- 4. A method according to claim 3, wherein the step of determining the reference weight for each characteristic parameter based on the degree of fluctuation of each characteristic parameter and the current weight coefficient comprises: summing the fluctuation degrees of the characteristic parameters to obtain a fluctuation degree sum; Determining a fluctuation factor of the current characteristic parameter according to the ratio between the fluctuation degree of the current characteristic parameter and the sum of the fluctuation degrees to obtain a counter-fluctuation factor of the current characteristic parameter; and calculating the product of the current weight coefficient and the inverse fluctuation factor of the current characteristic parameter to obtain the reference weight of the current characteristic parameter.
- 5. A method according to claim 3, wherein the step of obtaining a degree of load balancing between the modules, determining additional weights for each of the characteristic parameters, further comprises: Acquiring the current load of each module, and determining the load difference value between the modules; obtaining the time for each module to output the query result, and determining the delay rate difference between the modules; determining the load balance degree according to the load difference value and the delay rate difference value; Setting the adjustment coefficient of each module, and calculating the product of the adjustment coefficient of each module and the load balancing degree to obtain the additional weight of each characteristic parameter.
- 6. The method according to claim 1, wherein the step of obtaining the feature index of each feature parameter, or/and the operation index of the search thinking module and the inference thinking module, and dynamically determining the weight coefficient of each feature parameter comprises: obtaining verification results of each query result in the current period and characteristic parameters corresponding to the query problem, and inputting the verification results and the characteristic parameters into a logistic regression classifier to obtain regression coefficients of each characteristic parameter; And fusing the regression coefficient of each characteristic parameter with the current weight according to a set proportion to obtain the updated weight coefficient of each characteristic parameter.
- 7. The method of claim 6, wherein the step of fusing the regression coefficients of the feature parameters with the current weights in a set ratio to obtain updated weight coefficients of the feature parameters comprises: obtaining the product of the current weight and the set smoothing coefficient to obtain a history retention weight; Normalizing the regression coefficient to obtain the characteristic contribution degree of each characteristic parameter; Obtaining the product of the characteristic contribution degree and the anti-smoothing coefficient to obtain the real-time contribution weight; and summing the historical retention weight and the instant contribution weight to obtain the weight coefficient of each updated characteristic parameter.
- 8. The method according to claim 1, wherein the method further comprises: And (3) obtaining the routing accuracy of each query problem in a plurality of time periods, judging whether the routing accuracy is smaller than an accuracy threshold, if not, keeping unchanged, if so, performing rollback operation, extracting a plurality of query problems for manual classification, and returning to the step (S1).
- 9. A computer storage medium storing executable program code for performing the dual path generation method based on dynamic updating of weight coefficients of any of claims 1-8.
- 10. A computer system comprising a memory and a processor, the memory storing program code executable by the processor, the program code configured to perform the dual path generation method based on dynamic updating of weight coefficients of any of claims 1-8.
Description
Dual-path generation method, medium and system based on dynamic update of weight coefficient Technical Field The present invention relates to the field of information retrieval technologies, and in particular, to a dual-path generating method, medium, and system based on dynamic update of a weight coefficient. Background Retrieval thinking modules, such as retrieval enhanced large language models (RETRIEVAL-Augmented Generation, RAG), have become the dominant mode of question-answer interactions by users through natural language. However, this technique presents a number of core challenges in the application process. In one aspect, user queries are ubiquitous with spoken language expressions, ambiguous descriptions, and contextual ambiguity issues. Especially in complex task scenes, such as scenes requiring multiple rounds of information integration, deep logic analysis or relying on domain expertise, the traditional RAG system is difficult to accurately capture user intention, so that the retrieval result deviates from the actual requirement, and the expertise and comprehensiveness of answer generation are obviously limited. On the other hand, the widely adopted query rewrite technology can optimize input expression through semantic refining, but the existing method depends on a single rewrite strategy and has limitations. The method can not effectively analyze the multi-level characteristics of the user semantics and is difficult to realize balance among multi-dimensional targets. This limitation has led to resolution accuracy of complex problems of less than 70% over long periods of time, and often results in logic breaks or knowledge conflicts. Under the situation, an inference thinking module is generated, based on the human inference process, a plurality of intelligent agents are created, and various thinking templates, such as transverse thinking, sequential thinking, criticizing thinking, integration thinking and the like, are combined to excite potential thinking capability of a language model or other intelligent systems, so that the inference problem is solved, and the resolution accuracy of the complex problem is greatly improved. But in the face of simple problems, the problem handling efficiency is reduced. How to balance the time delay rate and the problem accuracy rate and selectively select the two is a hot spot and a difficult point of research in recent years. The Chinese patent application with the application number 202510092762.7 discloses an answer generation method, a knowledge question-answering system and electronic equipment, and discloses a technical scheme for generating answers to query questions by selecting corresponding search and answer generation strategies according to complexity levels corresponding to the query questions, but the current running condition of each generation module is not considered, so that the problem that the load of a certain generation module is overlarge due to the fact that the number of query questions of a certain complexity is too large cannot be avoided. How to balance the resource allocation of different methods to improve the query efficiency and reduce the resource waste, and to improve the problems of unreasonable resource allocation, low query efficiency, insufficient accuracy and the like of the dynamic adjustment in the complex task scene in the prior art, is a technical problem to be solved in the field. Disclosure of Invention Based on the foregoing, an objective of the present application is to provide a dual-path generating method, medium and system for dynamically updating a weight coefficient, so as to solve at least one technical problem mentioned in the background art. In a first aspect, the present application provides a dual-path generating method based on dynamic update of weight coefficients, including: acquiring a current query problem of a user, and extracting characteristic parameters of the query problem; Acquiring characteristic indexes of each characteristic parameter, or/and operating indexes of a retrieval thinking module and an reasoning thinking module so as to dynamically determine weight coefficients of each characteristic parameter; determining a difficulty coefficient of the query problem according to each characteristic parameter and the corresponding weight coefficient; and selectively calling a retrieval thinking module or an inference thinking module according to the difficulty coefficient, and outputting a query result. Further, the step of obtaining the current query question of the user and extracting the characteristic parameters of the query question comprises the following steps: Obtaining a plurality of standard problem templates, encoding each standard problem template and query problem into an embedded representation to obtain a plurality of template embedded vectors and query embedded vectors; extracting statement analysis information of the query problem, obtaining the number of the corresponding