Question method and device based on large language model and medium
By constructing a hierarchical model for inquiry strategies and an inquiry status recognition model, the problem that traditional inquiry technologies cannot adjust strategies in real time is solved, enabling accurate analysis and dynamic optimization of inquiry strategies, and improving inquiry efficiency and effectiveness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNIVERSITY OF POLITICAL SCIENCE AND LAW
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-15
AI Technical Summary
Traditional auxiliary technologies cannot adjust and change inquiry strategies in real time according to the progress of the conversation, and cannot delve into the core strategy of inquiry activities, resulting in limited inquiry efficiency and effectiveness.
A hierarchical query strategy model is constructed based on a large language model. The preset model is fine-tuned by enhancing the retrieval database to generate a query status recognition model. The status of the query object is analyzed in real time and the appropriate query strategy and positive response probability are output, and the query strategy is dynamically adjusted.
It enables structured management of inquiry strategies, improves the guidance and effectiveness of inquiries, provides substantial strategic support, and can dynamically optimize inquiry strategies during the dialogue process.
Smart Images

Figure CN122045347A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent query technology, specifically to a query method, device, and medium based on a large language model. Background Technology
[0002] In the field of professional inquiry, the effectiveness of inquiry highly depends on the inquirer's insight into complex psychological states, control over the pace of the conversation, and ability to adjust strategies in real time. Traditional auxiliary technologies mostly focus on the recording and perception levels, such as using speech recognition technology to automatically generate notes to reduce the burden of recording, or using facial micro-expression and behavioral analysis technology to identify abnormal physiological signals in the interviewee. However, their core limitation is that these transactional auxiliary tasks do not delve into the strategic core of the inquiry activity and cannot modify and change the inquiry strategy in real time according to the progress of the conversation. Summary of the Invention
[0003] To address the aforementioned issues, this application proposes a query method based on a large language model, comprising: Based on pre-collected inquiry dialogue data, an inquiry strategy hierarchical model is constructed; wherein, the inquiry strategy hierarchical model includes at least inquiry methods and inquiry content; An enhanced retrieval database is constructed based on the hierarchical model of the inquiry strategy. The preset large language model is then fine-tuned using the enhanced retrieval database to obtain an inquiry state recognition model. Collect dialogue voice data corresponding to the current inquiry stage at preset time intervals, and convert the dialogue voice data into dialogue text. The dialogue text is input into the inquiry state recognition model. The inquiry state recognition model analyzes the state of the inquiry object to output the inquiry strategy corresponding to the next inquiry stage and the positive response probability corresponding to the inquiry strategy. Based on the inquiry strategy and the positive response probability, inquiry suggestions are generated and fed back to the inquiry personnel.
[0004] In one implementation of this application, a hierarchical model for inquiry strategies is constructed based on pre-collected inquiry dialogue data, specifically including: Collect query dialogue data, convert the query dialogue data into dialogue text, and slice the dialogue text according to a fixed duration to obtain multiple basic data units; Numericalization and dimensionality reduction analysis are performed on the basic data units to determine several principal components corresponding to the basic data units; For each principal component containing basic data units, the text similarity between the basic data units is calculated, so that the principal component is divided into several sub-components based on the text similarity. The principal components are used as the first level, the sub-components as the second level, and the basic data units as the third level. Based on the mapping relationship between the principal components, the sub-components, and the basic data units, a hierarchical query strategy model is constructed.
[0005] In one implementation of this application, a pre-defined large language model is fine-tuned using the enhanced retrieval database to obtain an inquiry state recognition model, specifically including: A time-series data unit is constructed based on the sub-component, the corresponding basic data unit, and the corresponding response marker; wherein, the response marker includes a positive response marker and a negative response marker; Based on the aforementioned time-series data units, a supervised fine-tuning dataset is constructed; An enhanced retrieval database is constructed based on the supervised fine-tuning dataset; wherein each record is associated with a basic data unit and its contextual time-series chain; Based on the supervised fine-tuning dataset, a pre-set large language model is subjected to supervised fine-tuning to obtain an inquiry state recognition model.
[0006] In one implementation of this application, after collecting the dialogue voice data corresponding to the current inquiry stage, the method further includes: Extract the query features corresponding to the current query stage; Based on the query characteristics, determine whether the current query stage is a key point for response; If so, the time interval between the next inquiry stage and the current inquiry stage will be dynamically adjusted.
[0007] In one implementation of this application, identifying whether the current inquiry stage is a key point for response based on the inquiry characteristics specifically includes: Obtain the matching feedback sequence between the sub-components and the query features corresponding to the query object in the current query phase; Based on the matching feedback sequence, the effectiveness index of the sub-component is calculated; wherein, the effectiveness index includes at least the increase in the amount of information in the respondent's response, the degree of reduction in emotional antagonism, and the degree of topic follow-up; If the value of the indicator corresponding to the validity indicator exceeds a preset threshold, the current inquiry stage is determined as a key point for response.
[0008] In one implementation of this application, the time interval between the next query phase and the current query phase is dynamically adjusted, specifically including: The adjustment urgency coefficient is calculated based on the weighted sum of the degree of reduction in emotional antagonism and the degree of topic follow-up in the effectiveness indicators. Based on the preset range in which the adjustment urgency coefficient is located, a target strategy is selected from multiple candidate adjustment strategies, so as to dynamically adjust the time interval between the next inquiry stage and the current inquiry stage through the target strategy.
[0009] In one implementation of this application, based on the inquiry strategy and the positive response probability, an inquiry suggestion is generated and fed back to the inquiry personnel, specifically including: Based on the inquiry strategy corresponding to the next inquiry stage, at least one historical dialogue unit that is semantically similar to the current dialogue text is retrieved from the basic data units associated with the sub-components of the second level in the hierarchical model of the inquiry strategy. Extract the query content marked as a positive response from at least one historical dialogue unit and use it as a sample of recommended dialogue; Based on the inquiry strategy and the recommended script examples, inquiry suggestions are generated and fed back to the inquiry personnel.
[0010] In one implementation of this application, the method further includes: Based on the query strategy hierarchical model, a strategy transition probability matrix is constructed; wherein, the strategy transition probability matrix is used to describe the historical probability distribution of transitioning from the currently used sub-component to other sub-components after obtaining a specified response; After the inquiry state recognition model outputs the inquiry strategy corresponding to the next inquiry stage, the expected value of the inquiry strategy guiding the inquiry object to make a positive response is calculated based on the positive response probability and the strategy transition probability matrix. If the expected value is less than the preset expected threshold, then a corresponding alternative strategy is added to the query suggestions.
[0011] This application provides an inquiry device based on a large language model, the device comprising: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform a query method based on a large language model as described above.
[0012] This application provides a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows: One of the query methods based on a large language model, as described in any of the preceding items.
[0013] The query method based on a large language model proposed in this application can bring the following benefits: Based on a hierarchical inquiry strategy model, this approach enables structured and hierarchical management of inquiry strategies. It breaks down the complex inquiry strategy system into three levels: principal components, sub-components, and basic data units. This preserves the integrity of the macro-strategy framework while allowing for precise location and invocation of specific inquiry methods and content through fine-grained sub-component and basic data unit division. Simultaneously, an inquiry state recognition model, fine-tuned from a large language model using an enhanced retrieval database, deeply integrates strategic experience from historical inquiry dialogue data with the semantic understanding capabilities of the large language model. This enables accurate analysis of the inquiry target's state and intelligent prediction of strategies for the next inquiry stage. Consequently, the model dynamically corrects and optimizes inquiry strategies during the dialogue process, effectively enhancing the guidance and effectiveness of inquiries and providing substantial strategic support for inquiries. Attached Figure Description
[0014] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a query method based on a large language model provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of an interrogation device based on a large language model, provided as an embodiment of this application. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0016] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0017] like Figure 1 As shown in the embodiments of this application, the query method based on a large language model includes: S101: Based on pre-collected inquiry dialogue data, construct an inquiry strategy hierarchical model; wherein, the inquiry strategy hierarchical model includes at least inquiry methods and inquiry content.
[0018] To achieve intelligent analysis and strategy recommendation of the inquiry process, this application constructs a hierarchical inquiry strategy model based on pre-collected inquiry dialogue data. This model abstracts strategy elements at different levels and their relationships, providing a standardized reference system for subsequent real-time identification and recommendation. The hierarchical inquiry strategy model includes at least inquiry methods and inquiry content. Inquiry methods refer to the specific approaches or techniques used during the inquiry process; inquiry content refers to the specific question topic, relevant information points, or key data to be obtained, which is directly related to the inquiry objective, such as the time, place, and reason for a specific event, or the viewpoints, behaviors, and needs of a specific target. By using inquiry methods and inquiry content as core components, the hierarchical inquiry strategy model can structurally express inquiry strategies from two dimensions: how to ask and what to ask, laying the foundation for subsequent model training and strategy generation.
[0019] First, data collection and preprocessing are performed. The model is built upon a large amount of real-world question-and-answer dialogue data. This data is collected from actual question-and-answer scenarios in a manner that complies with privacy and security regulations, ensuring the authenticity and validity of the data source. The collected raw audio data is converted into structured text dialogue records via a speech recognition interface and uniformly organized into a clear question-and-answer alternation format. The continuous dialogue text stream is sliced according to a fixed time length to form independent basic data units. During this process, invalid segments with pauses or blank content are automatically identified and removed, ensuring that each basic data unit contains dialogue interaction content with analytical value. Through the above preprocessing, a sample library containing tens of thousands of high-quality basic data units is finally formed.
[0020] Then, methods such as N-gram are used to transform the text content of each basic data unit into a numerical vector. Subsequently, dimensionality reduction techniques such as singular value decomposition are used to analyze the high-dimensional vector space. The purpose of dimensionality reduction is to discover hidden themes or patterns in the dialogue while preserving the main information. The analysis results typically yield several principal components, such as presenting evidence, establishing relationships, evoking emotions, and establishing competition. These principal components constitute the first level of the model, representing the basic strategy orientation of the inquiry activity.
[0021] The second step is sub-component subdivision, which involves more refined strategy division within each principal component. For all basic data units belonging to the same principal component, the semantic similarity between them is calculated. Through cluster analysis, units with highly similar semantics are grouped together to form multiple clusters. Each cluster is defined as a sub-component, representing a more specific means of achieving the strategic intent of that principal component. For example, under the principal component of presenting evidence, it might be further subdivided into sub-components such as presenting physical evidence, presenting expert opinions, and presenting witness testimony. These sub-components constitute the second level of the model, enabling the strategy description to move from macro-level types to specific implementation methods.
[0022] Finally, the above analysis results are organized into a hierarchical knowledge system. The inquiry strategy hierarchical model constructed in this application is a standard structure containing three levels. The first level is the principal component, representing the core strategy type; the second level is the sub-components, representing the specific strategy implementation methods; and the third level is the most basic data unit itself, namely the original text slices carrying the specific dialogue content. By establishing the mapping and association relationships between the principal component, sub-components, and data units, the corresponding inquiry strategy hierarchical model is generated. For example, a sub-component about presenting physical evidence will be associated with hundreds or thousands of specific dialogue units when presenting physical evidence in actual inquiries. This hierarchical structure ensures that the model has both high generalization and reference to specific scenarios.
[0023] S102: Construct an enhanced retrieval database based on the hierarchical model of the query strategy, and fine-tune the preset large language model through the enhanced retrieval database to obtain the query state recognition model.
[0024] After obtaining the query strategy hierarchical model, in order to achieve targeted optimization of the large language model so that it can accurately identify the state of the query object and output the appropriate query strategy, this application embodiment further constructs an enhanced retrieval database based on the query strategy hierarchical model, and fine-tunes the preset large language model based on it to obtain the query state recognition model.
[0025] In one embodiment, temporal data units are constructed based on the sub-components in the hierarchical model of the inquiry strategy, the basic data units corresponding to the sub-components, and the response markers obtained by these units in actual dialogue. Each temporal data unit not only contains the content of the current basic data unit, but also contains several basic data units that are adjacent to it, thus forming a complete dialogue context chain to capture the dynamic development process and contextual dependencies of the dialogue. For example, a temporal data unit about the sub-component of presenting physical evidence would include the preparatory dialogue before presenting the evidence, the specific statements when presenting the evidence, and the response content of the inquirer after presenting the evidence, clearly marking whether the response is positive cooperation or resistance and avoidance.
[0026] All constructed temporal data units are integrated to form a supervised fine-tuning dataset. Each sample in this dataset contains contextual information of the dialogue, corresponding sub-component labels, and explicit response result tags, providing rich supervision signals for model training. Subsequently, an enhanced retrieval database is constructed based on this supervised fine-tuning dataset. This database uses vector database technology to convert each basic data unit and its contextual temporal chain into high-dimensional vectors for storage, and each record is associated with corresponding sub-components, response tags, and other metadata, supporting efficient semantic similarity retrieval.
[0027] Supervised fine-tuning of the aforementioned dataset was used to perform supervised fine-tuning of a pre-defined large language model. During fine-tuning, the model took dialogue text from temporal data units as input and aimed to predict the sub-component to be used in the next inquiry stage and the probability of a positive response corresponding to that strategy. Through multiple rounds of iterative training, the model parameters were continuously adjusted, enabling the model to learn the correlation patterns between different inquiry strategies, the state of the inquiry object, and the response from historical dialogue data. Ultimately, an inquiry state recognition model was obtained that can accurately identify the inquiry state and output strategy suggestions. This model can receive the current dialogue text and infer the next inquiry strategy most likely to obtain a positive response and its probability of success.
[0028] S103: Collect the dialogue voice data corresponding to the current inquiry stage according to the preset time interval, and convert the dialogue voice data into dialogue text.
[0029] In actual inquiry processes, it is necessary to dynamically acquire the interaction information between the inquirer and the inquirer in real time for subsequent strategy analysis and adjustment. This embodiment periodically collects the dialogue voice data of the current inquiry stage at preset time intervals. This time interval can be preset according to the characteristics of the inquiry scenario, such as a fixed duration of 5 minutes, 10 minutes, etc., to ensure that representative dialogue segments are captured. The acquisition device can be a microphone array integrated into the inquiry terminal or a dedicated recording device connected to the inquiry system to ensure clear acquisition of the voice signal. The acquired dialogue voice data, i.e., the audio stream containing the real-time communication between the inquirer and the inquiree, is immediately transmitted to the voice processing module. The continuous dialogue voice data is converted into corresponding text information, i.e., dialogue text. During the conversion process, basic text cleaning is performed on the recognition results, such as removing interjections, correcting incorrectly recognized words, and standardizing punctuation, to obtain accurate and fluent dialogue text, providing high-quality text input for subsequent inquiry feature extraction and state recognition. At the same time, the system will automatically add timestamp information to the converted dialogue text, accurately recording the time when each dialogue content occurs, so as to facilitate subsequent time sequence analysis and backtracking of the dialogue process.
[0030] S104: Input the dialogue text into the inquiry state recognition model, analyze the state of the inquiry object through the inquiry state recognition model, and output the inquiry strategy corresponding to the next inquiry stage and the positive response probability corresponding to the inquiry strategy.
[0031] To promptly identify changes in the state of the questioner and dynamically adjust the questioning strategy during the inquiry process, this embodiment of the application inputs the real-time collected and converted dialogue text into a pre-trained questioning state recognition model. This model first performs deep semantic understanding of the input dialogue text, including identifying the sentiment, key information points, and logical structure of the dialogue. Based on this understanding, and combined with the hierarchical structure of the questioning strategy layering model, the model starts by analyzing the principal components at the first level to determine the most suitable core strategy type for the current dialogue, such as whether it is necessary to continue presenting evidence to enhance persuasiveness or to establish a relationship to alleviate antagonism. Next, after determining the principal components, the model further delves into the sub-components at the second level, selecting specific strategy implementation methods to achieve the intent of the principal component; for example, under the principal component of presenting evidence, selecting the sub-component of presenting witness testimony. Finally, the inquiry state recognition model outputs the specific inquiry strategy for the next inquiry stage. This strategy clarifies the sub-components to be used in the next stage and simultaneously outputs the positive response probability corresponding to the strategy. That is, after receiving the inquiry content based on the strategy, the inquiry recipient gives a predicted probability value of actively cooperating and responding, providing a key basis for subsequent strategy adjustment and inquiry suggestion generation.
[0032] In one embodiment, after real-time collection and conversion of the dialogue voice data of the current inquiry stage, the frequency of strategy analysis and prompts will be intelligently adjusted according to the tension and criticality of the dialogue progress, so as to provide more intensive and timely strategy support to the inquirer at critical moments.
[0033] First, the dialogue text obtained from the current inquiry stage is analyzed from multiple dimensions to extract inquiry features. These features include the emotional polarity of both parties, the information entropy value of the dialogue content, the frequency of key sensitive words, and the rate of change in the dialogue rhythm. Based on these features, it is determined whether the current stage is a critical point for response. A critical point for response refers to a sensitive moment during the inquiry process when the psychological state or defensive stance of the inquirer shows a potential shift. For example, when the system detects that the inquirer's tone changes from harsh to hesitant, the response content begins to touch upon the core facts of the case, or they show significant emotional or informational feedback regarding the current strategy, the inquiry features are weighted and evaluated. If the evaluation result exceeds a preset confidence threshold, the dialogue is determined to have entered a critical window period where a breakthrough may be possible.
[0034] Once the current stage is identified as a key point for response, a dynamic adjustment mechanism will be immediately triggered, shortening the time interval between the next round of analysis prompts and the current round. For example, the system will automatically switch from providing analysis prompts every 5 minutes (default) to a more frequent frequency of every 2 minutes. This adjustment is not simply about shortening the duration; its purpose is to provide near real-time strategy suggestions to the interviewer during the critical window period when the interviewee's psychology may soften. This allows the interviewer to quickly adjust their questioning strategy based on the interviewee's subtle reactions, thereby improving questioning efficiency and success rate.
[0035] In one embodiment, to accurately identify key response points that may occur during the inquiry process, it is necessary to correlate and compare the recommended inquiry strategy with the real-time language and emotional feedback of the inquiry recipient. By quantitatively evaluating the immediate effect of the strategy in the current context, it is possible to determine whether the conversation has entered a critical stage.
[0036] First, a matching feedback sequence is constructed between sub-components and the corresponding inquiry features of the inquiry subjects. This matching feedback sequence records the correspondence between the sub-components of the inquiry strategy and the response features of the inquiry subjects at the same moment in the current inquiry stage and its adjacent preceding stages. By analyzing this sequence, the immediate reaction patterns of the inquiry subjects after the implementation of different sub-component strategies can be clearly tracked. For example, after continuously using the sub-component of presenting witness testimony, the inquiry subjects' tone of voice, semantic content features (such as ambiguous statements or repetitive explanations), and emotional polarity (such as a shift from resistance to hesitation) are recorded simultaneously. These features are then mapped to the sub-components to form a matching feedback sequence for that sub-component.
[0037] Then, based on the aforementioned matching feedback sequence, the effectiveness index of the sub-components of the currently employed inquiry strategy is calculated. This index is a composite quantitative value designed to comprehensively measure the strategy's execution effect from multiple dimensions, primarily including information increment, reduction in emotional antagonism, and topic follow-through. Information increment assesses whether the amount of new information related to the facts of the case provided by the respondent in the current round has significantly increased compared to previous rounds. This can be achieved by comparing the semantic density of the response text and the frequency of new entities. Reduction in emotional antagonism can be determined by analyzing the acoustic characteristics of the respondent's speech and the emotional polarity of the text, judging whether there is a noticeable decrease in the antagonistic and resistant components of their emotional state, or the emergence of emotional signals such as confusion or hesitation that may indicate a softening of their stance. Topic follow-through measures whether the respondent's response closely revolves around the core of the topic initiated by the inquirer, rather than avoiding or shifting the topic. High follow-through usually indicates that the respondent is focused and may be deeply considering the topic.
[0038] Based on the effectiveness indicators, key points are determined, and the quantitative results of the three dimensions mentioned above are weighted and summed to obtain an overall effectiveness score. This score is compared with a preset threshold derived from the analysis of a large amount of historical successful case data. If the score exceeds the threshold, it means that the current inquiry strategy is generating positive feedback, and the psychological defenses of the inquiry recipient may be in a vulnerable window. At this time, the system will determine that the current inquiry stage is a key point for response.
[0039] In one embodiment, after identifying the current inquiry stage as a key point for response, the event interval of the prompts needs to be dynamically adjusted. This allows for the selection of the most suitable adjustment strategy based on the urgency of the key inquiry point, thereby achieving a precise match between the auxiliary rhythm and the inquiry process.
[0040] Specifically, based on the degree of reduction in emotional antagonism and the degree of topic follow-up, corresponding weights are assigned. The corresponding adjustment urgency coefficient is obtained by calculating the weighted sum of these two indicators. The adjustment urgency coefficient indicates the degree of urgency for adjusting the strategy at the current key point of the inquiry. The higher the coefficient value, the more pronounced the characteristics of the inquiry recipient being in a window of psychological volatility and highly focused attention, thus requiring a more rapid and intensive inquiry response.
[0041] After obtaining the adjustment urgency coefficient, the system executes the target adjustment strategy based on this coefficient. The system pre-defines multiple candidate adjustment strategies, each associated with a numerical range of the adjustment urgency coefficient and defining specific combinations of adjustment parameters. For example, when the urgency coefficient is in the medium range, the target strategy might simply shorten the analysis prompt interval from the base value to an intermediate value. When the urgency coefficient falls into the high range, the target strategy might include a more aggressive interval shortening and might simultaneously trigger more detailed contextual analysis or additional word choice variations. By comparing the calculated urgency coefficient with the pre-defineable range, the system automatically selects the most suitable target strategy and immediately applies all parameters defined by that strategy, thereby achieving coordinated dynamic adjustment of the next round of analysis prompt intervals and other potentially related parameters. Through this hierarchical strategy selection mechanism based on a quantified urgency coefficient, this embodiment of the application achieves intelligent control over the pace of inquiry assistance.
[0042] S105: Based on the inquiry strategy and the probability of a positive response, generate inquiry suggestions and provide feedback to the inquiry personnel.
[0043] After obtaining the inquiry strategy and positive response probability for the next inquiry stage, this key information needs to be transformed into actionable inquiry suggestions in a clear and intuitive way and fed back to the inquiry personnel to assist them in making real-time decisions.
[0044] In one embodiment, based on the strategy to be adopted in the next inquiry stage, all basic data units associated with the sub-component in the enhanced retrieval database are located, namely, the historical inquiry dialogue fragment library. Then, semantic retrieval technology is used to compare the real-time dialogue text of the current inquiry stage with these historical fragments, retrieving at least one historical dialogue unit with the most similar semantic scenario. The historical dialogue units are parsed to identify dialogue content initiated by the inquirer and marked by historical data as successfully guiding a positive response. This dialogue content is extracted and encapsulated as recommended dialogue examples. Based on the inquiry strategy and recommended dialogue examples, corresponding inquiry suggestions are generated and fed back to the inquirer. The inquiry suggestions indicate the suggested strategy subclass, display one or more best dialogue examples, and present the predicted success probability, ensuring that the inquirer can quickly and uninterruptedly obtain and understand the system's intelligent auxiliary suggestions while continuing the dialogue.
[0045] In one embodiment, to improve the global optimization capability of inquiry strategy recommendations, an inquiry expectation assessment is performed on individual strategy suggestions to provide better alternative paths when necessary. First, a strategy transition probability matrix is constructed based on massive historical inquiry dialogue data and the existing hierarchical inquiry strategy model. This matrix is a statistical model, where each row and column corresponds to a sub-component of the second level of the hierarchical inquiry strategy model. Each element in the matrix represents the statistical probability that, in historical data, after an inquirer uses a certain sub-component and receives a specific type of response, the next strategy selection will shift to another sub-component. In real-time inquiries, when the inquiry state recognition model outputs a recommended inquiry strategy for the next stage and its positive response probability, the suggestion is not directly adopted; instead, an expectation value assessment is initiated.
[0046] During the evaluation, the system starts with the predicted inquiry strategy and, combined with the strategy transition probability matrix, simulates and extrapolates the overall probability of successfully guiding the inquiry recipient to make a substantial positive response over several subsequent time periods, following historically common transition paths. This probability is the expected value of strategy guidance. If the calculated expected value of the currently recommended inquiry strategy is lower than the preset expected threshold, it indicates that the selected inquiry strategy may not be the optimal strategy, and its long-term inquiry benefits are relatively limited. In this case, based on the same strategy transition probability matrix, other strategy sub-components with expected values higher than the threshold, starting from the current state, need to be identified and considered as alternative strategies. These alternative strategies will be added to the final generated inquiry suggestions and presented to the inquiry personnel in the form of "Recommended strategy A, or consider strategies B, C," etc.
[0047] The above are embodiments of the methods proposed in this application. Based on the same idea, some embodiments of this application also provide devices and non-volatile computer storage media corresponding to the above methods.
[0048] Figure 2 This is a schematic diagram of the structure of an interrogation device based on a large language model, provided as an embodiment of this application. Figure 2 As shown, it includes: At least one processor; and, At least one processor-communication-connected memory; wherein, The memory stores instructions that can be executed by at least one processor, such that the at least one processor is able to perform a query method based on a large language model as described in any of the preceding items.
[0049] This application provides a non-volatile computer storage medium storing computer-executable instructions, which are configured as follows: One of the query methods based on a large language model, as described in any of the preceding items.
[0050] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.
[0051] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0052] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0053] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0054] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0055] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0056] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0057] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0058] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0059] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0060] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A query method based on a large language model, characterized in that, The method includes: Based on pre-collected inquiry dialogue data, an inquiry strategy hierarchical model is constructed; wherein, the inquiry strategy hierarchical model includes at least inquiry methods and inquiry content; An enhanced retrieval database is constructed based on the hierarchical model of the inquiry strategy. The preset large language model is then fine-tuned using the enhanced retrieval database to obtain an inquiry state recognition model. Collect dialogue voice data corresponding to the current inquiry stage at preset time intervals, and convert the dialogue voice data into dialogue text. The dialogue text is input into the inquiry state recognition model. The inquiry state recognition model analyzes the state of the inquiry object to output the inquiry strategy corresponding to the next inquiry stage and the positive response probability corresponding to the inquiry strategy. Based on the inquiry strategy and the positive response probability, inquiry suggestions are generated and fed back to the inquiry personnel.
2. The query method based on a large language model according to claim 1, characterized in that, Based on pre-collected inquiry dialogue data, a hierarchical model for inquiry strategies is constructed, specifically including: Collect query dialogue data, convert the query dialogue data into dialogue text, and slice the dialogue text according to a fixed duration to obtain multiple basic data units; Numericalization and dimensionality reduction analysis are performed on the basic data units to determine several principal components corresponding to the basic data units; For each principal component containing basic data units, the text similarity between the basic data units is calculated, so that the principal component is divided into several sub-components based on the text similarity. The principal components are used as the first level, the sub-components as the second level, and the basic data units as the third level. Based on the mapping relationship between the principal components, the sub-components, and the basic data units, a hierarchical query strategy model is constructed.
3. The query method based on a large language model according to claim 2, characterized in that, By fine-tuning the preset large language model using the enhanced retrieval database, an inquiry state recognition model is obtained, specifically including: A time-series data unit is constructed based on the sub-component, the corresponding basic data unit, and the corresponding response marker; wherein, the response marker includes a positive response marker and a negative response marker; Based on the aforementioned time-series data units, a supervised fine-tuning dataset is constructed; An enhanced retrieval database is constructed based on the supervised fine-tuning dataset; wherein each record is associated with a basic data unit and its contextual time-series chain; Based on the supervised fine-tuning dataset, a pre-set large language model is subjected to supervised fine-tuning to obtain an inquiry state recognition model.
4. The query method based on a large language model according to claim 1, characterized in that, After collecting the dialogue voice data corresponding to the current inquiry stage, the method further includes: Extract the query features corresponding to the current query stage; Based on the query characteristics, determine whether the current query stage is a key point for response; If so, the time interval between the next inquiry stage and the current inquiry stage will be dynamically adjusted.
5. The query method based on a large language model according to claim 4, characterized in that, Based on the query characteristics, it is identified whether the current query stage is a key point for response, specifically including: Obtain the matching feedback sequence between the sub-components and the query features corresponding to the query object in the current query phase; Based on the matching feedback sequence, the effectiveness index of the sub-component is calculated; wherein, the effectiveness index includes at least the increase in the amount of information in the respondent's response, the degree of reduction in emotional antagonism, and the degree of topic follow-up; If the value of the indicator corresponding to the validity indicator exceeds a preset threshold, the current inquiry stage is determined as a key point for response.
6. The query method based on a large language model according to claim 5, characterized in that, The time interval between the next inquiry phase and the current inquiry phase is dynamically adjusted, specifically including: The adjustment urgency coefficient is calculated based on the weighted sum of the degree of reduction in emotional antagonism and the degree of topic follow-up in the effectiveness indicators. Based on the preset range in which the adjustment urgency coefficient is located, a target strategy is selected from multiple candidate adjustment strategies, so as to dynamically adjust the time interval between the next inquiry stage and the current inquiry stage through the target strategy.
7. The query method based on a large language model according to claim 1, characterized in that, Based on the inquiry strategy and the positive response probability, inquiry suggestions are generated and fed back to the inquiry personnel, specifically including: Based on the inquiry strategy corresponding to the next inquiry stage, at least one historical dialogue unit that is semantically similar to the current dialogue text is retrieved from the basic data units associated with the sub-components of the second level in the hierarchical model of the inquiry strategy. Extract the query content marked as a positive response from at least one historical dialogue unit and use it as a sample of recommended dialogue; Based on the inquiry strategy and the recommended script examples, inquiry suggestions are generated and fed back to the inquiry personnel.
8. The query method based on a large language model according to claim 1, characterized in that, The method further includes: Based on the query strategy hierarchical model, a strategy transition probability matrix is constructed; wherein, the strategy transition probability matrix is used to describe the historical probability distribution of transitioning from the currently used sub-component to other sub-components after obtaining a specified response; After the inquiry state recognition model outputs the inquiry strategy corresponding to the next inquiry stage, the expected value of the inquiry strategy guiding the inquiry object to make a positive response is calculated based on the positive response probability and the strategy transition probability matrix. If the expected value is less than the preset expected threshold, then a corresponding alternative strategy is added to the query suggestions.
9. A query device based on a large language model, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform a query method based on a large language model as described in any one of claims 1-8.
10. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are set as follows: A query method based on a large language model as described in any one of claims 1-8.