A Method and System for User Intent Modeling and Question Expansion Based on Decision Dimension Constraints
By setting decision dimension constraints in user intent modeling and question expansion, and identifying and supplementing low-coverage dimensions, the problem of unbalanced generated results in existing technologies is solved, achieving comprehensive coverage and improved accuracy of the question set.
Patent Information
- Application Number
- CN202611266369.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-11-10
AI Technical Summary
Existing user intent modeling and question expansion methods generate question sets that are significantly unbalanced in terms of perspective, leading to distorted information collection and biased analysis results. Furthermore, they lack feedback and correction mechanisms for the quality of the generated results.
By acquiring target keywords and industry identifiers, the decision-making dimension set is queried from the industry knowledge base, binding and distribution constraints are set, a structured question set is generated using a language model, and low-coverage dimensions are identified by statistical dimension label frequency, and targeted rewriting and supplementation are performed to ensure a balanced distribution of the question set.
It achieves comprehensive coverage and balanced distribution of the problem set across the decision-making dimension, improves the matching degree between problems and user intent and the accuracy of generated results, and provides a more reliable data foundation.
Smart Images

Figure CN123070123A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and in particular to a method and system for user intent modeling and question expansion based on decision dimension constraints. Background Technology
[0002] Existing user intent modeling and question expansion methods typically use user-input keywords as the core, generating a number of candidate questions using pre-set templates or retrieved databases. These methods first semantically expand the keywords, then construct questions in batches according to fixed sentence structures, ultimately using the generated results directly in subsequent recommendation or interaction processes. The introduction of industry knowledge is mostly limited to word list matching or entity mapping, without systematically planning the perspectives covered by the questions. The randomness in the generation process and the homogeneity of templates often lead to the question set repeatedly expanding around a few popular expressions.
[0003] Due to the limitations of the aforementioned mechanism, the generated question set exhibits a significant imbalance in the distribution of perspectives. Some perspectives are overexpressed, with a large number of candidate questions pointing to similar semantic directions, while other perspectives relevant to user decision-making are either missing or very rare. This imbalance cannot be resolved by simply increasing the number of generated questions, as new questions will continue the original generation pattern, resulting in persistent coverage blind spots. When the question set is used for user surveys or needs analysis, these blind spots directly cause information collection distortion, leading to systematic biases in subsequent analysis results.
[0004] Existing methods also lack feedback and correction mechanisms for the quality of generated results. Most processes employ a one-time generation strategy, using the results immediately after generation without quantitatively evaluating the distribution characteristics of candidate questions. Even with manual screening, only obvious duplicates can be removed based on subjective experience, making it difficult to identify which angles are not covered. This leads to an over-reliance on initial keywords and templates in the question expansion process, making it even more difficult to guarantee the effectiveness of the generated results when the input keywords are vague or belong to niche industries. Summary of the Invention
[0005] This invention provides a method and system for user intent modeling and question expansion based on decision dimension constraints, which can solve the problems in the prior art.
[0006] A first aspect of this invention provides a method for user intent modeling and question expansion based on decision dimension constraints, comprising:
[0007] Obtain the target keywords and their respective industry identifiers, and then retrieve the set of decision dimensions from the industry knowledge base based on the industry identifiers;
[0008] The target keywords and decision dimensions are embedded into the generated prompt text. Binding constraints and distribution constraints are set in the generated prompt text. The generated prompt text is then input into the language model to obtain a set of structured questions.
[0009] Extract the dimension labels corresponding to each question in the structured question set and count the frequency of occurrence of each dimension label. Calculate the distribution balance based on the frequency of occurrence and determine whether it meets the preset conditions. If the distribution balance does not meet the preset conditions, identify the low-coverage dimension based on the frequency of occurrence.
[0010] Embed the low-coverage dimension into the targeted rewrite prompt text and set the priority generation constraint. Input the targeted rewrite prompt text into the language model to obtain the supplementary questions and the dimension labels corresponding to the supplementary questions.
[0011] Add the supplementary questions and their corresponding dimension labels to the structured question set to obtain the updated structured question set.
[0012] The decision-making dimensions are retrieved from the industry knowledge base based on the industry identifier, including:
[0013] The industry knowledge base has a multi-level industry category structure pre-built, and each level of industry category in the multi-level industry category structure is associated with a corresponding decision dimension subset.
[0014] Based on the industry identifier, hierarchical matching is performed in the multi-level industry category structure. When a target level industry category corresponding to the industry identifier is matched, the decision dimension subset associated with the target level industry category is determined as the candidate decision dimension set.
[0015] If no target-level industry category corresponding to the industry identifier is found, trace upwards layer by layer along the multi-level industry category structure to locate the upper-level industry category that has a belonging relationship with the industry identifier, and determine the decision dimension subset associated with the upper-level industry category as the candidate decision dimension set.
[0016] When there are multiple candidate decision dimension sets, determine the fit between each decision dimension in each candidate decision dimension set and its corresponding industry identifier.
[0017] The multiple candidate decision dimension sets are fused based on the fit to obtain the decision dimension set corresponding to the industry identifier.
[0018] The target keywords and decision dimensions are embedded into the generated prompt text. Binding constraints and distribution constraints are set in the generated prompt text. The generated prompt text is then input into a language model to obtain a set of structured questions, including:
[0019] Extract the dimension name of each decision dimension from the set of decision dimensions, and construct a list of dimension names;
[0020] A binding constraint field is constructed based on a list of dimension names, wherein the binding constraint field requires that each generated question text be associated with at least one dimension label from the list of dimension names;
[0021] Calculate the target occurrence frequency interval for each dimension name based on the list of dimension names and the preset total number of questions, and construct a distribution constraint field based on the target occurrence frequency interval;
[0022] Combine the target keywords, dimension name list, binding constraint fields, and distribution constraint fields in a preset order to construct and generate prompt text;
[0023] The generated prompt text is input into the language model, and the response text output by the language model is received.
[0024] The response text is parsed to extract the question text and dimension labels contained in each question unit. The question text and the corresponding dimension labels are associated and encapsulated to generate a structured question set.
[0025] Extract the dimension labels corresponding to each question in the structured question set and count the frequency of occurrence of each dimension label. Calculate the distribution balance based on the frequency of occurrence and determine whether it meets preset conditions. If the distribution balance does not meet the preset conditions, identify low-coverage dimensions based on the frequency of occurrence, including:
[0026] Iterate through each question unit in the structured question set, extract the dimension labels associated with each question unit, and generate a sequence of dimension labels;
[0027] Count each dimension label in the dimension label sequence to generate a frequency mapping table containing the correspondence between dimension labels and their frequency of occurrence;
[0028] The frequency mean is calculated based on the occurrence frequency of all dimension labels in the frequency mapping table. The frequency variance is calculated based on the deviation between the occurrence frequency of each dimension label and the frequency mean. The frequency variance is used as the distribution balance.
[0029] The distribution balance is compared with a preset balance threshold. When the distribution balance is greater than the preset balance threshold, the dimension labels are determined to be unbalanced in the structured problem set.
[0030] When a distribution imbalance is determined, dimension labels with a frequency lower than the average frequency are selected from the frequency mapping table, and the selected dimension labels are marked as low-coverage dimensions.
[0031] Embed the low-coverage dimension into the targeted rewrite prompt text and set priority generation constraints. Input the targeted rewrite prompt text into the language model to obtain the supplementary questions and their corresponding dimension labels, including:
[0032] Extract the dimension name of each low-coverage dimension from the list of low-coverage dimensions, and construct the target dimension name set;
[0033] Extract the current occurrence frequency of each dimension name in the target dimension name set from the frequency mapping table, calculate the difference between the current occurrence frequency and the frequency mean as the frequency gap value, use the frequency gap value as a weight factor to allocate the number of supplementary questions, and generate a dimension supplement quota table.
[0034] Construct a reverse exclusion constraint field, which prohibits the language model from generating supplementary questions where dimension labels belong to a set of target dimension names;
[0035] Construct a frequency binding constraint field, which forces the language model to generate the same number of supplementary questions for each dimension name in the target dimension name set as the number of supplementary questions allocated in the dimension supplementary quota table;
[0036] Combine the target keywords, target dimension name set, dimension supplement quota table, reverse exclusion constraint field and frequency binding constraint field to generate targeted rewrite prompt text;
[0037] Input the targeted rewrite prompt text into the language model and receive the supplementary response text output by the language model;
[0038] The supplementary response text is parsed to extract the supplementary question text and dimension labels contained in each supplementary question unit.
[0039] Add the supplementary questions and their corresponding dimension labels to the structured question set. The updated structured question set includes:
[0040] Based on the dimension labels corresponding to the supplementary question, extract the existing question text with the corresponding dimension labels from the structured question set, calculate the semantic similarity between the supplementary question and the existing question text, and mark the supplementary question as a retained supplementary question when the semantic similarity is lower than the preset similarity threshold.
[0041] Group the retained supplementary questions according to the dimension labels and calculate the number of retained supplementary questions under each dimension label. Add the number of retained supplementary questions to the current occurrence frequency of the corresponding dimension label in the frequency mapping table to obtain the expected occurrence frequency. Calculate the expected frequency mean based on the expected occurrence frequency of all dimension labels. Calculate the expected frequency variance based on the deviation between the expected occurrence frequency of each dimension label and the expected frequency mean as the expected distribution balance.
[0042] When the expected distribution balance is less than the preset balance threshold, the supplementary questions and their corresponding dimension labels are added to the structured question set. When the expected distribution balance is greater than the preset balance threshold, the dimension labels whose expected frequency exceeds the expected frequency average are filtered out, and the number of corresponding supplementary questions is reduced until the expected frequency equals the expected frequency average before being added to the structured question set, thus obtaining the updated structured question set.
[0043] The method further includes:
[0044] Extract the industry brand database of the target keyword's industry from the industry knowledge base. The industry brand database includes the mainstream brand names, brand abbreviations and brand aliases in the industry.
[0045] Traverse each question text in the updated structured question set, perform word segmentation on the question text to obtain a word sequence, and match each word in the word sequence with the brand name, brand abbreviation and brand alias in the industry brand database;
[0046] When a match is successful, the corresponding problem text is marked as a brand leakage problem. The dimension labels corresponding to the brand leakage problem are extracted, and a brand replacement constraint field is constructed. The brand replacement constraint field requires that the brand name be replaced with a general expression while retaining the dimension labels and user intent.
[0047] The brand leakage issue, its corresponding dimension label, and brand replacement constraint field are combined to generate a brand correction prompt text. The brand correction prompt text is then input into a language model to obtain the corrected issue text. The corrected issue text is then used to replace the brand leakage issue in the updated structured issue set.
[0048] A second aspect of this invention provides a user intent modeling and question expansion system based on decision dimension constraints, comprising:
[0049] The dimension acquisition unit is used to acquire target keywords and their respective industry identifiers, and to retrieve a set of decision dimensions from the industry knowledge base based on the industry identifiers.
[0050] The question generation unit is used to embed the target keywords and decision dimension set into the generated prompt text, set binding constraints and distribution constraints in the generated prompt text, and input the generated prompt text into the language model to obtain a set of structured questions;
[0051] The balance analysis unit is used to extract the dimension labels corresponding to each question in the structured question set and count the frequency of occurrence of each dimension label. It calculates the distribution balance based on the frequency of occurrence and determines whether it meets the preset conditions. When the distribution balance does not meet the preset conditions, it identifies low-coverage dimensions based on the frequency of occurrence.
[0052] The supplementary generation unit is used to embed the low-coverage dimension into the targeted rewriting prompt text and set priority generation constraints. The targeted rewriting prompt text is input into the language model to obtain the supplementary question and the dimension label corresponding to the supplementary question.
[0053] The question update unit is used to add supplementary questions and their corresponding dimension labels to the structured question set, resulting in an updated structured question set.
[0054] A third aspect of the present invention provides an electronic device, comprising:
[0055] processor;
[0056] Memory used to store processor-executable instructions;
[0057] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0058] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0059] This invention applies explicit boundary constraints to question generation by utilizing a set of decision dimensions in an industry knowledge base. This ensures that questions generated by the language model always revolve around core industry decision points, avoiding interference from irrelevant topics. Binding constraints embed dimension information into prompt text, guaranteeing that each question can be traced back to a specific decision dimension, improving the match between questions and user intent. Distribution constraints promote a more balanced number of questions across dimensions, suppressing dimension bias at the generation source and expanding the coverage of the question set. By extracting dimension labels and counting their frequency, the distribution of questions across decision dimensions can be objectively quantified. Calculating distribution balance and judging preset conditions can automatically detect imbalances in dimension distribution without manual comparison. When the balance does not meet requirements, low-coverage dimensions are directly identified based on frequency, providing clear data support for the question expansion process and improving diagnostic efficiency and accuracy. Low-coverage dimensions are embedded into targeted rewritten prompt text, and priority generation constraints are set to guide the language model to compensate for missing dimensions, avoiding repeated questioning on already fully covered dimensions. After supplementary questions and their dimension labels are merged into the original structured question set, the overall dimension coverage becomes more complete, and the distribution balance is improved. The updated question set is comprehensive and representative in terms of decision-making dimensions, providing a more reliable data foundation for understanding and retrieving downstream user intent. Attached Figure Description
[0060] Figure 1 A flowchart illustrating the user intent modeling and question expansion method based on decision dimension constraints;
[0061] Figure 2 A schematic diagram showing the distribution of the fit between various decision dimensions and industry identifiers;
[0062] Figure 3 Generate flowcharts for a set of structured questions;
[0063] Figure 4 Extend the full-process data evolution trend chart for problems based on decision-dimensional constraints. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0066] Figure 1 This is a flowchart illustrating the user intent modeling and question expansion method based on decision dimension constraints according to an embodiment of the present invention.
[0067] User intent modeling and question expansion methods based on decision dimension constraints include:
[0068] Obtain the target keywords and their respective industry identifiers, and then retrieve the set of decision dimensions from the industry knowledge base based on the industry identifiers;
[0069] The target keywords and decision dimensions are embedded into the generated prompt text. Binding constraints and distribution constraints are set in the generated prompt text. The generated prompt text is then input into the language model to obtain a set of structured questions.
[0070] Extract the dimension labels corresponding to each question in the structured question set and count the frequency of occurrence of each dimension label. Calculate the distribution balance based on the frequency of occurrence and determine whether it meets the preset conditions. If the distribution balance does not meet the preset conditions, identify the low-coverage dimension based on the frequency of occurrence.
[0071] Embed the low-coverage dimension into the targeted rewrite prompt text and set the priority generation constraint. Input the targeted rewrite prompt text into the language model to obtain the supplementary questions and the dimension labels corresponding to the supplementary questions.
[0072] Add the supplementary questions and their corresponding dimension labels to the structured question set to obtain the updated structured question set.
[0073] The decision-making dimensions are retrieved from the industry knowledge base based on the industry identifier, including:
[0074] The industry knowledge base has a multi-level industry category structure pre-built, and each level of industry category in the multi-level industry category structure is associated with a corresponding decision dimension subset.
[0075] Based on the industry identifier, hierarchical matching is performed in the multi-level industry category structure. When a target level industry category corresponding to the industry identifier is matched, the decision dimension subset associated with the target level industry category is determined as the candidate decision dimension set.
[0076] If no target-level industry category corresponding to the industry identifier is found, trace upwards layer by layer along the multi-level industry category structure to locate the upper-level industry category that has a belonging relationship with the industry identifier, and determine the decision dimension subset associated with the upper-level industry category as the candidate decision dimension set.
[0077] When there are multiple candidate decision dimension sets, determine the fit between each decision dimension in each candidate decision dimension set and its corresponding industry identifier.
[0078] The multiple candidate decision dimension sets are fused based on the fit to obtain the decision dimension set corresponding to the industry identifier.
[0079] The industry knowledge base is constructed using a multi-level industry category structure to systematically organize various industries. This multi-level industry category structure can be understood as a tree-like classification system. The top-level nodes correspond to macro-level industry categories (such as "Manufacturing," "Financial Services," and "Retail"), the middle-level nodes correspond to sub-sectors (such as "Automobile Manufacturing," "Consumer Electronics," and "Commercial Banks"), and the bottom-level nodes correspond to specific industry sub-categories (such as "New Energy Passenger Vehicles," "Smartphones," and "Personal Credit"). Each level of industry category node is pre-associated with a corresponding subset of decision-making dimensions. These subsets are labeled and maintained by industry experts based on the characteristics of the industry at that level, reflecting the core dimensions that users typically focus on when making decisions within that category, such as "price," "brand reputation," "after-sales service," and "technical parameters." The lower the level, the more refined and industry-specific the associated subsets of decision-making dimensions are; the higher the level, the more general and comprehensive the associated subsets of decision-making dimensions are.
[0080] Once the industry identifier corresponding to the target keyword is obtained, a hierarchical matching operation is performed within the multi-level industry category structure using this identifier as an index. The basic logic of hierarchical matching is to prioritize precise matching at the finest-grained bottom-level categories. If a target-level industry category node that perfectly corresponds to the industry identifier is found, the subset of decision dimensions associated with that node is directly determined as the candidate set of decision dimensions, without further tracing. This precise matching strategy ensures that the obtained decision dimensions are highly industry-specific, avoiding the use of overly broad upper-level dimensions that could cause the subsequently generated question set to deviate from the user's actual decision-making scenario.
[0081] In practical applications, the industry identifier may not find a completely corresponding underlying node in a multi-level industry category structure due to differences in user input granularity or updates to the industry knowledge base. To address this, a backtracking strategy is adopted, tracing upwards layer by layer: starting from the currently failed matching level, the system moves upwards layer by layer along the parent node direction of the multi-level industry category structure, checking whether each upper-level industry category node has a hierarchical relationship with the industry identifier (i.e., the industry identifier belongs to the upper-level category semantically or in the classification system). Once an upper-level industry category node that satisfies the hierarchical relationship is located, the subset of decision dimensions associated with that node is determined as the candidate decision dimension set. This backtracking mechanism ensures that decision dimensions with a certain degree of industry relevance can still be obtained even when exact matching fails, guaranteeing the robustness of the overall process.
[0082] In some scenarios, hierarchical matching and layer-by-layer tracing may locate multiple industry category nodes that meet the conditions, thus generating multiple sets of candidate decision dimensions. For example, after a certain industry identifier fails to achieve exact matching at the bottom layer, it finds upper-level categories with affiliation relationships at the middle and top layers, each associated with different subsets of decision dimensions. In this case, directly selecting one of the candidate sets may result in incomplete coverage of decision dimensions or the introduction of irrelevant dimensions. Therefore, it is necessary to evaluate the fit between each decision dimension in each candidate set and its corresponding industry identifier. The calculation of fit considers multiple factors: the semantic distance between the industry category level of the decision dimension and its corresponding industry identifier (the closer the level, the higher the fit), the frequency of use of the decision dimension in historical queries of similar industries, and the semantic relevance between the decision dimension and the target keywords. Let a certain decision dimension... The compatibility with the industry-specific logo is ,but Based on hierarchical distance weights Historical frequency weight Weights related to semantic relevance The weighted combination yields, i.e. ,in To normalize the score for hierarchical distance, For historical frequency normalization scores, The score is normalized to reflect semantic relevance, and .
[0083] Based on the adaptability of each decision dimension The process involves fusing multiple candidate decision dimensions. The core logic of this fusing process comprises two stages: deduplication and filtering. The deduplication stage merges decision dimensions with highly overlapping semantics from different candidate sets to avoid repeatedly expressing the same decision intent. The filtering stage, on the other hand, uses a fit threshold... Filter all candidate dimensions and retain only the fit. The decision dimensions are determined by removing redundant dimensions that are not sufficiently relevant to the industry identifier. After deduplication and filtering, the remaining decision dimensions are sorted from highest to lowest fit to form the final set of decision dimensions corresponding to the industry identifier. This set of decision dimensions balances the specific dimensions of the fine-level categories with the general dimensions of the higher-level categories, achieving a balance between the breadth of dimension coverage and industry specificity.
[0084] The above process is illustrated using a real-world query from the smartphone industry as an example: The industry identifier is "foldable screen phone." In a multi-level industry category structure, the bottom-level node "foldable screen phone" has a corresponding record, resulting in a successful match and obtaining the associated decision-making dimension subset, including dimensions such as "folding mechanism durability," "unfolded screen quality," "hinge design," "portability," and "battery life." Simultaneously, since "foldable screen phone" belongs to the intermediate-level category "smartphone," this intermediate-level category also includes general dimensions such as "brand reputation," "price," "system smoothness," and "camera capabilities." When multiple candidate sets coexist, the fit degree is calculated for each dimension individually. "Durability of the folding mechanism" received high compatibility due to the close layer spacing and high historical query frequency. "Hinge design" and "screen unfolding quality" were also retained. However, some general dimensions such as "system smoothness" received low compatibility. Below the threshold The filtered and finally merged decision dimension set not only reflects the unique concerns of foldable screen phones, but also retains the core decision dimensions of the smartphone category, providing high-quality dimensional constraint input for the generation of subsequent prompt text.
[0085] The entire process of acquiring the decision dimension set effectively addresses the issue of inconsistent industry identifier granularity through a multi-level hierarchical matching and fallback mechanism. Through adaptation calculation and fusion processing, the accuracy and completeness of the final decision dimension set are ensured, laying a reliable dimensional constraint foundation for the subsequent generation of structured problem sets by the language model.
[0086] The target keywords and decision dimensions are embedded into the generated prompt text. Binding constraints and distribution constraints are set in the generated prompt text. The generated prompt text is then input into a language model to obtain a set of structured questions, including:
[0087] like Figure 2 As shown, Figure 2 This diagram illustrates the distribution of the fit between the various decision dimensions and industry identifiers in this invention. It shows the quantitative distribution of the fit between each candidate decision dimension and the industry identifier of "foldable screen phone" during the multi-level industry category structure matching process. As shown in the figure, the fit threshold is set to 0.45. Redundant dimensions such as "system smoothness" that are below this threshold have been eliminated. The dimensions that are ultimately retained achieve a precise balance between industry relevance and coverage breadth.
[0088] like Figure 3 As shown, Figure 3 This is a flowchart for generating the structured problem set of this invention.
[0089] Extract the dimension name of each decision dimension from the set of decision dimensions, and construct a list of dimension names;
[0090] A binding constraint field is constructed based on a list of dimension names, wherein the binding constraint field requires that each generated question text be associated with at least one dimension label from the list of dimension names;
[0091] Calculate the target occurrence frequency interval for each dimension name based on the list of dimension names and the preset total number of questions, and construct a distribution constraint field based on the target occurrence frequency interval;
[0092] Combine the target keywords, dimension name list, binding constraint fields, and distribution constraint fields in a preset order to construct and generate prompt text;
[0093] The generated prompt text is input into the language model, and the response text output by the language model is received.
[0094] The response text is parsed to extract the question text and dimension labels contained in each question unit. The question text and the corresponding dimension labels are associated and encapsulated to generate a structured question set.
[0095] Extracting the dimension name of each decision dimension from the decision dimension set is the initial step in constructing the generated prompt text. Each dimension entry in the decision dimension set typically includes fields such as dimension number, dimension name, dimension description, and its level. During the extraction phase, only the dimension name field needs to be retrieved, forming an ordered list of dimension names. For example, for the target keyword "enterprise procurement management software," the decision dimension set corresponding to the industry identifier might cover multiple dimension names such as "cost control," "supplier management," "approval process," "data security," and "system integration." These names are arranged in order of dimension number to construct the dimension name list. The ordered nature of the dimension name list helps maintain consistent referencing relationships in the subsequent construction of constraint fields, avoiding confusion or omissions of dimension names in the prompt text.
[0096] When constructing binding constraint fields based on a list of dimension names, it is necessary to explicitly specify, in the form of natural language instructions, that the language model must attach at least one dimension label from the dimension name list to each question text when generating questions. The core semantics of binding constraint fields is "forced association," meaning that the language model must not generate any unlabeled questions outside the dimension name list, nor can it use custom dimension names not appearing in the list as labels. In actual construction, binding constraint fields can be expressed as: "Each question must include a dimension label field in its output structure, and the value of this field must strictly come from the following dimension name list: [dimensional name list], and no labels outside the list may be used." This explicit constraint expression can significantly reduce the probability of label offsets or missing labels in the language model output, laying the foundation for subsequent structured parsing.
[0097] The construction of the distribution constraint field depends on two inputs: a list of dimension names and a preset total number of issues. Let the preset total number of issues be... The total number of dimensions in the dimension name list is Then the frequency of occurrence of the benchmark corresponding to each dimension name is Considering that uniform distribution might be too stringent in real-world scenarios, a target occurrence frequency interval is set for each dimension instead of a single numerical value. Specifically, the lower bound of the target occurrence frequency interval is... The upper boundary is ,in This allows for a margin of safety to accommodate natural distribution differences caused by varying semantic breadth in different dimensions. Based on the frequency range of the target occurrence in each dimension, a distribution constraint field is constructed to instruct the language model to generate all... When generating questions, the frequency of each dimension label should fall within the corresponding target frequency range. An example of the distribution constraint field is: "In all generated questions, the frequency of the label 'Cost Control' should be between [lower bound, upper bound], the frequency of the label 'Supplier Management' should be between [lower bound, upper bound], and so on, to ensure a balanced distribution of labels across all dimensions."
[0098] The target keywords, dimension name list, binding constraint fields, and distribution constraint fields are combined in a preset order to construct the complete generation prompt text. The preset order follows a logical structure of "background → constraint → task": the prompt text first provides the target keywords as the thematic background for question generation, clarifying the domain scope of the problem for the language model; secondly, it lists the dimension names, providing the language model with a complete set of usable dimension labels; then, it sequentially inserts the binding constraint fields and distribution constraint fields, instructing the language model on the output format and distribution requirements; finally, it ends with a task instruction, requiring the language model to generate the correct output according to the specified format. The output is typically a structured question. The output format is usually a JSON array, with each element containing two fields: "question" and "dimension_tag," corresponding to the question text and dimension tag, respectively. The reason for using a structured output format is that JSON has clear field boundaries, facilitating accurate extraction of the question text and dimension tags in subsequent parsing steps and reducing the risk of parsing failures due to irregular natural language formats.
[0099] After the generated prompt text is input into the language model, the language model generates response text according to the constraints and formatting requirements in the prompt text. The response text is typically a string containing a JSON array, where each JSON object corresponds to a question unit. Upon receiving the response text, it needs to be parsed. The parsing process includes the following layers: First, the start and end boundaries of the JSON array in the response text are located, and the JSON string is extracted; then, the JSON string is deserialized to obtain a list of question units; for each question unit, the values of the "question" and "dimension_tag" fields are read to obtain the question text and dimension label. During the extraction process, the field values need to be validated for validity: the question text field cannot be an empty string, and its character length should meet the preset minimum length threshold; the value of the dimension label field must belong to the dimension name list. If a label value not in the list appears, the question unit is marked as an abnormal entry and is not included in the structured question set.
[0100] After validation, the valid question texts are associated and encapsulated with their corresponding dimension labels. The encapsulation results are stored as question objects, each containing a unique question number, question text content, dimension label, and a generation source marker (marked as "initial generation" to distinguish it from subsequently generated questions). All valid question objects are aggregated to generate a structured question set. This structured question set serves as input for subsequent distribution balance calculations and low-coverage dimension identification; its quality directly impacts the accuracy of overall intent modeling. If the number of abnormal entries exceeds a preset threshold during parsing, a regeneration mechanism is triggered, re-inputting the original generated prompt text into the language model to obtain higher-quality response text, until the number of valid questions in the structured question set reaches the preset total number of questions. until.
[0101] In practical applications, target keywords may involve multiple cross-industry scenarios. For example, "medical equipment procurement" involves both the medical industry and the procurement management industry. In this case, the dimension name list may contain dimension names from two different industry knowledge bases. To address this, when constructing the dimension name list, it is necessary to perform deduplication on cross-industry dimensions to ensure that dimension names with the same semantic meaning do not appear repeatedly in different forms. This avoids semantically redundant target frequency ranges in the distribution constraint field, ensuring that the language model can correctly understand the distribution requirements of each dimension. Deduplication can be achieved by calculating the string similarity between dimension names. When the similarity between two dimension names exceeds a preset similarity threshold, the dimension name with the broader semantic meaning is retained, and the other is merged into it.
[0102] Extract the dimension labels corresponding to each question in the structured question set and count the frequency of occurrence of each dimension label. Calculate the distribution balance based on the frequency of occurrence and determine whether it meets preset conditions. If the distribution balance does not meet the preset conditions, identify low-coverage dimensions based on the frequency of occurrence, including:
[0103] Iterate through each question unit in the structured question set, extract the dimension labels associated with each question unit, and generate a sequence of dimension labels;
[0104] Count each dimension label in the dimension label sequence to generate a frequency mapping table containing the correspondence between dimension labels and their frequency of occurrence;
[0105] The frequency mean is calculated based on the occurrence frequency of all dimension labels in the frequency mapping table. The frequency variance is calculated based on the deviation between the occurrence frequency of each dimension label and the frequency mean. The frequency variance is used as the distribution balance.
[0106] The distribution balance is compared with a preset balance threshold. When the distribution balance is greater than the preset balance threshold, the dimension labels are determined to be unbalanced in the structured problem set.
[0107] When a distribution imbalance is determined, dimension labels with a frequency lower than the average frequency are selected from the frequency mapping table, and the selected dimension labels are marked as low-coverage dimensions.
[0108] After obtaining the set of structured questions, it is necessary to systematically statistically analyze and evaluate the balance of the dimension labels associated with each question in the set to determine whether the generated results are reasonably distributed across the decision dimensions. This process begins with a step-by-step traversal of the set of structured questions.
[0109] When traversing the structured question set, for each question unit in the set, the dimension label assigned to that question unit by the language model during the generation phase is extracted. Each question unit carries a dimension label field during structured storage, which records the decision dimension category to which the question belongs, such as "price," "after-sales service," "product performance," and "brand reputation." After extracting the dimension labels of all question units in sequence, they are concatenated according to the order of the question units to form a complete dimension label sequence. The length of this sequence is consistent with the number of question units in the structured question set, and each element at a position corresponds to the dimension label associated with the question unit at that position. The construction of the dimension label sequence preserves the correspondence between questions and dimensions, providing an ordered data foundation for subsequent statistics.
[0110] After constructing the dimension label sequence, each dimension label appearing in the sequence is counted. A frequency mapping table is constructed using the string value of the dimension label as the key and the number of times that dimension label appears in the sequence as the value. The frequency mapping table is stored in a dictionary structure, covering all dimension label types that have appeared in the structured question set. For example, if the structured question set contains 20 question units, and the dimension label "price" appears 6 times, "after-sales service" appears 2 times, "product performance" appears 8 times, and "brand reputation" appears 4 times, then the frequency mapping table records these four dimension labels and their corresponding frequencies. The establishment of the frequency mapping table transforms the original label sequence into an aggregated statistical form, facilitating subsequent numerical calculations and comparisons.
[0111] After the frequency mapping table is constructed, the mean frequency is calculated based on the occurrence frequency of all dimension labels recorded in the table. Suppose there are a total of [number] frequencies in the frequency mapping table. The first different dimension label The frequency of each dimension label is The frequency mean is calculated as follows: The frequency mean reflects the number of issues each dimension label should cover under an ideal uniform distribution, and serves as a benchmark for measuring the balance of the distribution.
[0112] In frequency mean After the calculation is completed, the frequency variance is further calculated. This is used to quantify the overall deviation of the frequency of each dimension's label occurrence from the mean. The formula for calculating the frequency variance is: Frequency variance A larger frequency variance indicates a more significant difference in the frequency of occurrence of labels across different dimensions, meaning a more uneven distribution of the problem across the decision-making dimensions; conversely, a smaller frequency variance indicates that the coverage of labels across different dimensions is more similar, and the distribution is more uniform. (The last sentence appears to be incomplete and possibly refers to a different context.) As a quantitative indicator of distribution balance, it expresses the balance of dimensional coverage in the current set of structured problems in a unified numerical form.
[0113] The calculated distribution balance With preset equalization threshold Perform numerical comparisons. Preset equalization threshold. These are reference values pre-set during the system configuration phase based on the specific application scenario and the number of dimensions, used to define the upper limit of the "acceptable degree of distribution imbalance." When the distribution of labels across all dimensions in the current set of structured questions is considered balanced, no further generation is needed, and the current set of structured questions is directly used as the final output. If the distribution of decision dimension labels is unbalanced in the structured question set, it indicates that some decision dimensions are insufficiently covered in the current question set, necessitating the initiation of a subsequent supplementary generation process. This judgment mechanism replaces subjective human judgment with objective numerical comparison, ensuring the consistency and repeatability of the evaluation process.
[0114] When a distribution imbalance is determined, select items from the frequency mapping table that have a frequency lower than the frequency mean. The dimension labels are then used to mark these dimension labels as low-coverage dimensions. Specifically, each record in the frequency mapping table is traversed, and for each occurrence frequency... The dimension labels are then included in the low-coverage dimension set. Referring to the previous example, if the frequency mean... If the value is 5, then both "after-sales service" (occurring 2 times) and "brand reputation" (occurring 4 times) are satisfied. The conditions that appear in the text are marked as low-coverage dimensions; while "price" (occurring 6 times) and "product performance" (occurring 8 times) are not in the low-coverage dimension set. The identification results of low-coverage dimensions are output in the form of a dimension label list, which serves as the direct input for the subsequent construction of targeted rewriting prompt text.
[0115] The core of this design lies in using frequency variance as an indicator of distribution balance. Compared to the range method, which only counts the difference between the maximum and minimum frequencies, frequency variance comprehensively reflects the dispersion of all dimensional labels, exhibiting stronger sensitivity and discriminative power for scenarios with multiple low-coverage dimensions. Using the mean as a threshold to filter low-coverage dimensions ensures that the filtering criteria adaptively adjust to the actual distribution, avoiding misjudgments caused by fixed thresholds. When the size of the question set changes or the number of dimensions increases or decreases, the frequency mean is automatically updated, ensuring that the identification results of low-coverage dimensions always remain consistent with the actual distribution of the current set.
[0116] In practice, if a decision dimension is completely uncovered in the structured question set (i.e., the frequency of that dimension label is 0), that dimension label will still be included in the frequency mapping table and used as a frequency of 0 in the calculation of the mean and variance. This ensures that even completely missing dimensions can be identified as low-coverage dimensions and enter the subsequent supplementation generation process, preventing important decision dimensions from being completely omitted. The above statistical and evaluation process provides accurate input for the subsequent targeted supplementation generation of low-coverage dimensions, thereby driving the overall question expansion process to converge towards a more balanced and comprehensive direction.
[0117] Embed the low-coverage dimension into the targeted rewrite prompt text and set priority generation constraints. Input the targeted rewrite prompt text into the language model to obtain the supplementary questions and their corresponding dimension labels, including:
[0118] Extract the dimension name of each low-coverage dimension from the list of low-coverage dimensions, and construct the target dimension name set;
[0119] Extract the current occurrence frequency of each dimension name in the target dimension name set from the frequency mapping table, calculate the difference between the current occurrence frequency and the frequency mean as the frequency gap value, use the frequency gap value as a weight factor to allocate the number of supplementary questions, and generate a dimension supplement quota table.
[0120] Construct a reverse exclusion constraint field, which prohibits the language model from generating supplementary questions where dimension labels belong to a set of target dimension names;
[0121] Construct a frequency binding constraint field, which forces the language model to generate the same number of supplementary questions for each dimension name in the target dimension name set as the number of supplementary questions allocated in the dimension supplementary quota table;
[0122] Combine the target keywords, target dimension name set, dimension supplement quota table, reverse exclusion constraint field and frequency binding constraint field to generate targeted rewrite prompt text;
[0123] Input the targeted rewrite prompt text into the language model and receive the supplementary response text output by the language model;
[0124] The supplementary response text is parsed to extract the supplementary question text and dimension labels contained in each supplementary question unit.
[0125] After identifying low-coverage dimensions, they need to be transformed into targeted rewrite prompts with precise constraints to drive the language model to generate supplementary questions in a targeted manner. The low-coverage dimension list is traversed, and the dimension name field of each low-coverage dimension is extracted. All extracted dimension names are then aggregated to construct a target dimension name set. This set only contains dimension names that currently have insufficient frequency and require supplementary question coverage, excluding dimensions that have already achieved balanced distribution. The construction of the target dimension name set is the foundation for subsequent constraint field generation and quota allocation; its completeness directly affects the accuracy of the direction of supplementary questions.
[0126] For each dimension name in the target dimension name set, retrieve its current frequency from the frequency mapping table, and calculate the average frequency of that frequency compared to the average frequency of all dimension labels. The difference between these values is defined as the frequency gap value. The frequency gap value reflects the degree of inadequacy of the current dimension in the issue distribution; a larger gap indicates that the dimension is less covered and requires more issues to be added. Using the frequency gap value as a weighting factor, the number of issues to be added to each dimension is allocated proportionally, thus generating a dimension supplementation quota table. Let the target dimension name set contain the following values: The current frequency of occurrence of each dimension name is Its frequency gap value ,but The target dimension name set contains a total of The dimension, the first Number of supplementary questions allocated to each dimension according to Calculation, where This represents the total quota for supplementary issues in this round. The Dimension Supplementary Quota table stores the name of each dimension and the corresponding number of supplementary issues in key-value pairs for reference by subsequent constraint fields.
[0127] When constructing the reverse exclusion constraint field, the language model is explicitly informed that in this generation task, all output supplementary questions must have dimension labels belonging to the target dimension name set, and questions with dimension labels outside the target dimension name set are prohibited. The reverse exclusion constraint field embeds prompt text in the form of natural language instructions, such as specifying "Generate questions only for the following dimensions; questions belonging to other dimensions must not be generated," followed by a complete enumeration list of the target dimension name set. This constraint aims to prevent the language model from biasing towards frequently occurring dimensions during generation, thus avoiding mismatches between supplementary questions and low-coverage dimensions. The design logic of the reverse exclusion constraint field is to strictly narrow the language model's generation space to the target dimension range by negatively limiting the boundary.
[0128] When constructing the frequency binding constraint field, the number of supplementary questions corresponding to each dimension name in the dimension supplementary quota table is written into the constraint field as a mandatory instruction. This requires the language model to strictly generate the corresponding number of supplementary questions for each dimension according to the quota, without generating more or less. The frequency binding constraint field is usually expressed in the form of structured instructions, such as "For dimension A, a certain number of supplementary questions must be generated." One problem; for dimension B, it is necessary to generate The system generates "one question" and requires each generated question to be explicitly labeled with its corresponding dimension in the output. The frequency binding constraint field and the reverse exclusion constraint field work together. The former constrains the number of questions generated, and the latter constrains the direction of generation. Together, they ensure the precise controllability of the dimensional distribution of the supplementary questions.
[0129] After constructing the aforementioned constraint fields, the target keywords, target dimension name set, dimension supplement quota table, reverse exclusion constraint field, and frequency binding constraint field are combined according to a predefined prompt template to generate targeted rewrite prompt text. The target keywords provide domain semantic context, ensuring that the supplementary questions generated by the language model are consistent with the original user intent; the target dimension name set and dimension supplement quota table provide a structured description of the generation task; and the reverse exclusion constraint field and frequency binding constraint field provide strict control over the generation boundaries. The order of the fields in the prompt template is designed, placing the constraint fields after the task description and before the generation instructions to ensure that the language model can fully perceive the constraint boundaries after understanding the task objective before executing the generation.
[0130] After inputting the targeted rewrite prompt text into the language model, the system receives the supplementary response text output by the language model. The supplementary response text typically contains multiple supplementary question units, each consisting of supplementary question text and dimension labels. Driven by the frequency binding constraint field, the language model explicitly labels the corresponding dimension labels for each question in the output. When parsing the supplementary response text, the text is segmented according to predefined delimiters or structural markers, locating the start and end boundaries of each supplementary question unit, and extracting the supplementary question text field and dimension label field. The extracted dimension labels need to be compared and verified against the target dimension name set. If there are supplementary question units whose dimension labels are not in the target dimension name set, they are marked as abnormal and filtered out, not included in subsequent supplementary question sets. For valid supplementary question units, their supplementary question text and dimension labels are saved as a complete structured entry for later addition to the structured question set.
[0131] In practical applications, if the frequency gap value of a certain dimension A negative value indicates that the frequency of this dimension exceeds the mean, meaning it is not a low-coverage dimension and should not be included in the target dimension name set. Therefore, when constructing the target dimension name set, dimensions with a frequency gap value less than or equal to zero should be filtered out. Furthermore, when... If there is a surplus after the total quota is allocated proportionally, the surplus can be added to the dimension with the largest frequency gap value to ensure that the total quota is in line with the overall quota. To maintain consistency and avoid underestimating the total number of supplementary questions due to rounding operations, the above complete process ensures that low-coverage dimensions are supplemented and covered with precise quantitative and directional constraints. This results in a more balanced dimensional distribution of the final structured question set, thus more comprehensively reflecting the user's decision-making intent.
[0132] Add the supplementary questions and their corresponding dimension labels to the structured question set. The updated structured question set includes:
[0133] Based on the dimension labels corresponding to the supplementary question, extract the existing question text with the corresponding dimension labels from the structured question set, calculate the semantic similarity between the supplementary question and the existing question text, and mark the supplementary question as a retained supplementary question when the semantic similarity is lower than the preset similarity threshold.
[0134] Group the retained supplementary questions according to the dimension labels and calculate the number of retained supplementary questions under each dimension label. Add the number of retained supplementary questions to the current occurrence frequency of the corresponding dimension label in the frequency mapping table to obtain the expected occurrence frequency. Calculate the expected frequency mean based on the expected occurrence frequency of all dimension labels. Calculate the expected frequency variance based on the deviation between the expected occurrence frequency of each dimension label and the expected frequency mean as the expected distribution balance.
[0135] When the expected distribution balance is less than the preset balance threshold, the supplementary questions and their corresponding dimension labels are added to the structured question set. When the expected distribution balance is greater than the preset balance threshold, the dimension labels whose expected frequency exceeds the expected frequency average are filtered out, and the number of corresponding supplementary questions is reduced until the expected frequency equals the expected frequency average before being added to the structured question set, thus obtaining the updated structured question set.
[0136] Before merging supplementary questions and their corresponding dimension labels into the structured question set, semantic deduplication of the supplementary questions is necessary to avoid introducing content that highly overlaps with existing questions, thus ensuring the incremental value of the question set's information. Specifically, for each supplementary question, based on its dimension label, all existing question texts belonging to the same dimension label are extracted from the current structured question set, forming a reference text set for that dimension. Subsequently, the semantic similarity between the supplementary question and each existing question text in the reference text set is calculated. Semantic similarity is typically calculated by mapping the question text to a semantic vector space and then calculating the cosine similarity. That is, the supplementary question and existing question texts are respectively transformed into dense vectors of fixed dimensions through a pre-trained semantic encoding model, and then the cosine value between the two vectors is calculated as the similarity measure. When the semantic similarity between the supplementary question and any existing question text in the reference text set is lower than the preset similarity threshold, the supplementary question is considered to have sufficient semantic difference from the existing content and is marked as a retained supplementary question; if the semantic similarity between any existing question text and the supplementary question reaches or exceeds the preset similarity threshold, the supplementary question is considered to be highly repetitive with the existing question and is discarded and not included in the subsequent processing flow.
[0137] After semantic deduplication, all retained supplementary questions are grouped according to their corresponding dimension labels. The number of retained supplementary questions under each dimension label is counted to obtain the count of retained supplementary questions for each dimension. Let the dimension labels be... The number of supplementary questions to be retained is Dimension labels in the frequency mapping table The corresponding current frequency of occurrence is Then dimension label Expected frequency of occurrence The result is obtained by adding the current frequency of occurrence to the number of retained supplementary questions, i.e. For dimension labels that did not participate in this round of supplementation, the number of supplementary questions retained is 0, and their expected frequency of occurrence remains unchanged from their current frequency. The mean expected frequency is calculated based on the expected frequencies of all dimension labels. The formula is ,in This represents the total number of labels across different dimensions in the frequency mapping table. Furthermore, based on the deviation between the expected frequency of each dimension label and the expected mean frequency, the expected frequency variance is calculated. The formula is ,Will As an indicator of expected distribution balance, it is used to measure whether the frequency distribution of each dimension label tends to be balanced after all the supplementary questions are added to the structured question set.
[0138] The introduction of a mechanism to determine the expected distribution balance is to prevent situations where the merging operation would disrupt the overall dimensionality distribution balance, which could be predicted before the supplementary questions are written. This mechanism is applied when the expected frequency variance... Less than the preset equalization threshold If, after including all retained supplementary questions into the structured question set, the frequency distribution of each dimension label is still in an acceptable equilibrium state, then all retained supplementary questions and their corresponding dimension labels are directly added to the structured question set to complete this round of update and obtain the updated structured question set.
[0139] When the expected frequency variance Greater than or equal to the preset equalization threshold This indicates that directly adding all retained supplementary questions would lead to excessively high frequencies for certain dimension labels, causing a significant skew in the overall distribution. Therefore, further reduction of the retained supplementary questions is necessary. Specifically, this involves filtering out questions with expected frequencies. Exceeding the expected average frequency The dimension label, that is, satisfying The set of dimension labels. For these dimension labels that exceed the mean, calculate the excess amount by which their expected frequency exceeds the expected frequency mean, i.e. .because During the reduction process, it will be accompanied by The frequency of occurrence of this dimension label changes dynamically, and in practice, it is reduced iteratively: for each excess dimension label, the number of questions equal to the excess is removed from its retained supplementary questions, so that the expected frequency of occurrence of this dimension label is reduced to the current average expected frequency. , that is to say ,in This represents the actual number of supplementary questions included in this dimension label after adjustment. The removal operation prioritizes deleting supplementary questions with relatively high semantic similarity (i.e., closest to the existing question text) under this dimension label to ensure that the final retained supplementary questions have the greatest semantic diversity.
[0140] After the reduction and adjustment are completed, the supplementary questions actually retained under each dimension label after adjustment, along with their corresponding dimension labels, are added to the structured question set, resulting in an updated structured question set. The updated structured question set is more comprehensive in dimension coverage and more balanced in dimension distribution, while ensuring semantic differences between questions and avoiding information redundancy. The core idea of this mechanism is to pre-check the expected distribution balance, pruning supplementary content that may cause distribution imbalance before writing, rather than making secondary corrections after writing, thereby reducing unnecessary backtracking operations and improving overall processing efficiency.
[0141] In practical applications, the aforementioned expected balance verification mechanism is particularly important when the target keywords involve multiple dimensions of the industry knowledge base and the number of historical questions varies significantly across these dimensions. For example, an industry knowledge base may contain 10 decision-making dimensions. Some dimensions have accumulated a large number of questions in historical data, while some emerging dimensions have fewer questions. During the supplementary question generation stage, the language model may generate a large number of supplementary questions for the low-coverage dimensions. If all of these are included, the frequency of these dimensions will quickly exceed that of the high-coverage dimensions, leading to a reverse imbalance in the distribution. By calculating the expected frequency variance and implementing an excess reduction mechanism, the number of supplementary questions ultimately included in each dimension can be precisely controlled, ensuring that the structured question set maintains a stable equilibrium in dimensional coverage. This provides high-quality, unbiased question input for subsequent user intent modeling.
[0142] The method further includes:
[0143] Extract the industry brand database of the target keyword's industry from the industry knowledge base. The industry brand database includes the mainstream brand names, brand abbreviations and brand aliases in the industry.
[0144] Traverse each question text in the updated structured question set, perform word segmentation on the question text to obtain a word sequence, and match each word in the word sequence with the brand name, brand abbreviation and brand alias in the industry brand database;
[0145] When a match is successful, the corresponding problem text is marked as a brand leakage problem. The dimension labels corresponding to the brand leakage problem are extracted, and a brand replacement constraint field is constructed. The brand replacement constraint field requires that the brand name be replaced with a general expression while retaining the dimension labels and user intent.
[0146] The brand leakage issue, its corresponding dimension label, and brand replacement constraint field are combined to generate a brand correction prompt text. The brand correction prompt text is then input into a language model to obtain the corrected issue text. The corrected issue text is then used to replace the brand leakage issue in the updated structured issue set.
[0147] After supplementing and updating the structured question set, brand neutrality verification is required to ensure that the generated question text does not contain specific brand names, thereby guaranteeing the universality and fairness of user intent modeling. Specifically, an industry brand database corresponding to the industry to which the target keywords belong is extracted from the industry knowledge base. The industry brand database is a pre-built and continuously maintained brand entity dictionary for a specific industry, containing the official full names, commonly used brand abbreviations, and brand aliases widely used in users' daily expressions. For example, in the consumer electronics industry, a brand's official full name, English abbreviation, and commonly used nicknames on social media are all included as independent entries in the industry brand database. The coverage of the industry brand database directly determines the recall capability of the subsequent matching process. Therefore, during its construction, it is necessary to combine industry reports, e-commerce platform data, and user review corpora for multi-source fusion, and prioritize them according to brand awareness and market share to improve matching efficiency.
[0148] The algorithm iterates through each question text in the updated structured question set, performing word segmentation on each text to obtain the corresponding word sequence. The word segmentation employs a fine-grained strategy oriented towards Chinese semantics, capable of recognizing common abbreviations and mixed pinyin spellings in brand names, avoiding missed detections due to overly coarse segmentation causing brand words to be fragmented. After obtaining the word sequence, each word is sequentially matched against the brand name, brand abbreviation, and brand alias included in the industry brand database. The matching process combines exact matching and fuzzy matching: exact matching is used to identify complete brand entries, while fuzzy matching handles cases where the brand name contains variant spellings or special characters in the question text. To improve matching speed, an Aho-Corasick automaton is pre-built for all entries in the industry brand database during loading, supporting multi-mode parallel scanning of the word sequence, thus completing the detection of all brand entries in a single traversal.
[0149] When any term in a question text successfully matches an entry in the industry brand database, the question text is marked as a brand leakage question. The existence of brand leakage questions implies specific brand preferences in the question set, affecting the neutrality of subsequent user intent analysis; therefore, they must be rewritten. The dimension labels corresponding to brand leakage questions in the structured question set are extracted. These dimension labels record the decision dimension category to which the question belongs and are crucial for maintaining semantic consistency during subsequent rewriting. Based on this, a brand replacement constraint field is constructed. The brand replacement constraint field is a structured natural language instruction whose core requirement is to replace brand names, brand abbreviations, and brand aliases appearing in the question text with corresponding general expressions, while preserving the semantics of the original question's dimension labels and the expression of user intent. The selection of general expressions follows industry conventions; for example, specific brand names are replaced with neutral expressions such as "a certain brand," "mainstream brand," or "similar products on the market," ensuring that the replaced question text still has practical information gathering value and does not lose its specificity due to over-generalization.
[0150] The brand replacement constraint field must be explicitly specified during construction to prohibit the introduction of new brand names. This prevents the language model from automatically generating other brand terms during the rewriting process, which could lead to the brand leakage issue still containing brand information after correction. Furthermore, the constraint field will explicitly list all brand terms detected in the problem text, requiring the language model to replace each detected brand term individually, rather than just processing the most prominent brand name. This avoids the problem of partial correction failure due to the omission of brand abbreviations or aliases.
[0151] The original text of the brand leakage question, the corresponding dimension labels, and the constructed brand replacement constraint fields are combined according to a fixed template to generate brand correction prompt text. The template structure of the brand correction prompt text includes three functional sections: the first section presents the original brand leakage question text, providing the language model with the input for rewriting; the second section embeds dimension labels, clearly informing the language model of the decision dimension to which the current question belongs, requiring the rewritten result to still semantically serve the user's decision-making information needs under that dimension; the third section embeds brand replacement constraint fields, regulating the output behavior of the language model in the form of explicit constraints, preventing the rewritten result from deviating from the original intent or introducing new brand bias.
[0152] The brand correction prompt text is input into the language model, which generates a corrected question text based on the constraints in the prompt text. The corrected question text should meet the following conditions: it should not contain any brand terms included in the industry brand database; it should be semantically consistent with the user intent of the original question; and its decision dimension should match the semantic category corresponding to the original dimension label. After obtaining the corrected question text, a second brand check is performed, that is, the corrected question text is segmented again and matched with the industry brand database to verify whether there are still brand terminology residues in the correction result. If the second check passes, the corresponding brand leakage question in the updated structured question set is replaced with the corrected question text, while retaining the original dimension labels to maintain the integrity of the dimension distribution in the structured question set. If the second check fails, the brand correction prompt text is reconstructed and rewritten by the language model again until the correction result passes the brand check, or the question text is marked as a manual review item and temporarily removed from the set after reaching the preset maximum number of retries.
[0153] After brand correction, all question texts in the updated structured question set do not contain specific brand names. While maintaining the integrity of dimensional coverage, the question set also possesses brand neutrality, which can more objectively reflect users' real information needs in the industry decision-making scenario, providing a high-quality data foundation for subsequent user intent analysis and question recommendation.
[0154] like Figure 4 As shown, Figure 4 This diagram illustrates the overall data evolution trend of the problem expansion process based on decision-dimensional constraints in this invention. It fully presents the dynamic evolution trend of core indicators throughout the entire process from initial input to final output, corresponding to the overall method flow described in weight 1. The horizontal axis is divided into five key stages: "Initial," "Dimension Fusion," "Problem Generation," "Supplementary Generation," and "Brand Correction." The left vertical axis represents the number of dimensions and problems, while the right vertical axis represents the distribution balance (measured as 10 times the frequency variance). The data evolution shows that in the "Dimension Fusion" stage, the number of dimensions expands from 5 to 8 through the fit selection in weight 2; in the "Problem Generation" stage, 24 structured problems are generated based on binding and distribution constraints, at which point the balance index is 4.2; after "Low-Coverage Dimension Identification" and "Supplementary Generation," the total number of problems increases to 30, and targeted rewriting of low-coverage dimensions such as price and brand reputation significantly optimizes the balance to 3.1; finally, "Brand Correction" maintains the number of problems while further ensuring data neutrality.
[0155] A second aspect of this invention provides a user intent modeling and question expansion system based on decision dimension constraints, comprising:
[0156] The dimension acquisition unit is used to acquire target keywords and their respective industry identifiers, and to retrieve a set of decision dimensions from the industry knowledge base based on the industry identifiers.
[0157] The question generation unit is used to embed the target keywords and decision dimension set into the generated prompt text, set binding constraints and distribution constraints in the generated prompt text, and input the generated prompt text into the language model to obtain a set of structured questions;
[0158] The balance analysis unit is used to extract the dimension labels corresponding to each question in the structured question set and count the frequency of occurrence of each dimension label. It calculates the distribution balance based on the frequency of occurrence and determines whether it meets the preset conditions. When the distribution balance does not meet the preset conditions, it identifies low-coverage dimensions based on the frequency of occurrence.
[0159] The supplementary generation unit is used to embed the low-coverage dimension into the targeted rewriting prompt text and set priority generation constraints. The targeted rewriting prompt text is input into the language model to obtain the supplementary question and the dimension label corresponding to the supplementary question.
[0160] The question update unit is used to add supplementary questions and their corresponding dimension labels to the structured question set, resulting in an updated structured question set.
[0161] A third aspect of the present invention provides an electronic device, comprising:
[0162] processor;
[0163] Memory used to store processor-executable instructions;
[0164] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0165] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0166] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for user intent modeling and question expansion based on decision dimension constraints, characterized in that, include: Obtain the target keywords and their respective industry identifiers, and then retrieve the set of decision dimensions from the industry knowledge base based on the industry identifiers; The target keywords and decision dimensions are embedded into the generated prompt text. Binding constraints and distribution constraints are set in the generated prompt text. The generated prompt text is then input into the language model to obtain a set of structured questions. Extract the dimension labels corresponding to each question in the structured question set and count the frequency of occurrence of each dimension label. Calculate the distribution balance based on the frequency of occurrence and determine whether it meets the preset conditions. If the distribution balance does not meet the preset conditions, identify the low-coverage dimension based on the frequency of occurrence. Embed the low-coverage dimension into the targeted rewrite prompt text and set the priority generation constraint. Input the targeted rewrite prompt text into the language model to obtain the supplementary questions and the dimension labels corresponding to the supplementary questions. Add the supplementary questions and their corresponding dimension labels to the structured question set to obtain the updated structured question set.
2. The method according to claim 1, characterized in that, The decision-making dimensions are retrieved from the industry knowledge base based on the industry identifier, including: The industry knowledge base has a pre-built multi-level industry category structure, and each level of industry category in the multi-level industry category structure is associated with a corresponding decision dimension subset. Based on the industry identifier, hierarchical matching is performed in the multi-level industry category structure. When a target level industry category corresponding to the industry identifier is matched, the decision dimension subset associated with the target level industry category is determined as the candidate decision dimension set. If no target-level industry category corresponding to the industry identifier is found, trace upwards layer by layer along the multi-level industry category structure to locate the upper-level industry category that has a belonging relationship with the industry identifier, and determine the decision dimension subset associated with the upper-level industry category as the candidate decision dimension set. When there are multiple candidate decision dimension sets, determine the fit between each decision dimension in each candidate decision dimension set and its corresponding industry identifier. The multiple candidate decision dimension sets are fused based on the fit to obtain the decision dimension set corresponding to the industry identifier.
3. The method according to claim 1, characterized in that, The target keywords and decision dimensions are embedded into the generated prompt text. Binding constraints and distribution constraints are set in the generated prompt text. The generated prompt text is then input into a language model to obtain a set of structured questions, including: Extract the dimension name of each decision dimension from the set of decision dimensions, and construct a list of dimension names; A binding constraint field is constructed based on a list of dimension names, wherein the binding constraint field requires that each generated question text be associated with at least one dimension label from the list of dimension names; Calculate the target occurrence frequency interval for each dimension name based on the list of dimension names and the preset total number of questions, and construct a distribution constraint field based on the target occurrence frequency interval; Combine the target keywords, dimension name list, binding constraint fields, and distribution constraint fields in a preset order to construct and generate prompt text; The generated prompt text is input into the language model, and the response text output by the language model is received. The response text is parsed to extract the question text and dimension labels contained in each question unit. The question text and the corresponding dimension labels are associated and encapsulated to generate a structured question set.
4. The method according to claim 1, characterized in that, Extract the dimension labels corresponding to each question in the structured question set and count the frequency of occurrence of each dimension label. Calculate the distribution balance based on the frequency of occurrence and determine whether it meets preset conditions. If the distribution balance does not meet the preset conditions, identify low-coverage dimensions based on the frequency of occurrence, including: Iterate through each question unit in the structured question set, extract the dimension labels associated with each question unit, and generate a sequence of dimension labels; Count each dimension label in the dimension label sequence to generate a frequency mapping table containing the correspondence between dimension labels and their frequency of occurrence; The frequency mean is calculated based on the occurrence frequency of all dimension labels in the frequency mapping table. The frequency variance is calculated based on the deviation between the occurrence frequency of each dimension label and the frequency mean. The frequency variance is used as the distribution balance. The distribution balance is compared with a preset balance threshold. When the distribution balance is greater than the preset balance threshold, the dimension labels are determined to be unbalanced in the structured problem set. When a distribution imbalance is determined, dimension labels with a frequency lower than the average frequency are selected from the frequency mapping table, and the selected dimension labels are marked as low-coverage dimensions.
5. The method according to claim 1, characterized in that, Embed the low-coverage dimension into the targeted rewrite prompt text and set priority generation constraints. Input the targeted rewrite prompt text into the language model to obtain the supplementary questions and their corresponding dimension labels, including: Extract the dimension name of each low-coverage dimension from the list of low-coverage dimensions, and construct the target dimension name set; Extract the current occurrence frequency of each dimension name in the target dimension name set from the frequency mapping table, calculate the difference between the current occurrence frequency and the frequency mean as the frequency gap value, use the frequency gap value as a weight factor to allocate the number of supplementary questions, and generate a dimension supplement quota table. Construct a reverse exclusion constraint field, which prohibits the language model from generating supplementary questions where dimension labels belong to a set of target dimension names; Construct a frequency binding constraint field, which forces the language model to generate the same number of supplementary questions for each dimension name in the target dimension name set as the number of supplementary questions allocated in the dimension supplementary quota table; Combine the target keywords, target dimension name set, dimension supplement quota table, reverse exclusion constraint field and frequency binding constraint field to generate targeted rewrite prompt text; Input the targeted rewrite prompt text into the language model and receive the supplementary response text output by the language model; The supplementary response text is parsed to extract the supplementary question text and dimension labels contained in each supplementary question unit.
6. The method according to claim 1, characterized in that, Add the supplementary questions and their corresponding dimension labels to the structured question set. The updated structured question set includes: Based on the dimension labels corresponding to the supplementary question, extract the existing question text with the corresponding dimension labels from the structured question set, calculate the semantic similarity between the supplementary question and the existing question text, and mark the supplementary question as a retained supplementary question when the semantic similarity is lower than the preset similarity threshold. Group the retained supplementary questions according to the dimension labels and calculate the number of retained supplementary questions under each dimension label. Add the number of retained supplementary questions to the current occurrence frequency of the corresponding dimension label in the frequency mapping table to obtain the expected occurrence frequency. Calculate the expected frequency mean based on the expected occurrence frequency of all dimension labels. Calculate the expected frequency variance based on the deviation between the expected occurrence frequency of each dimension label and the expected frequency mean as the expected distribution balance. When the expected distribution balance is less than the preset balance threshold, the supplementary questions and their corresponding dimension labels are added to the structured question set. When the expected distribution balance is greater than the preset balance threshold, the dimension labels whose expected frequency exceeds the expected frequency average are filtered out, and the number of corresponding supplementary questions is reduced until the expected frequency equals the expected frequency average before being added to the structured question set, thus obtaining the updated structured question set.
7. The method according to claim 1, characterized in that, The method further includes: Extract the industry brand database of the target keyword's industry from the industry knowledge base. The industry brand database includes the mainstream brand names, brand abbreviations and brand aliases in the industry. Traverse each question text in the updated structured question set, perform word segmentation on the question text to obtain a word sequence, and match each word in the word sequence with the brand name, brand abbreviation and brand alias in the industry brand database; When a match is successful, the corresponding problem text is marked as a brand leakage problem. The dimension labels corresponding to the brand leakage problem are extracted, and a brand replacement constraint field is constructed. The brand replacement constraint field requires that the brand name be replaced with a general expression while retaining the dimension labels and user intent. The brand leakage issue, its corresponding dimension label, and brand replacement constraint field are combined to generate a brand correction prompt text. The brand correction prompt text is then input into a language model to obtain the corrected issue text. The corrected issue text is then used to replace the brand leakage issue in the updated structured issue set.
8. A user intent modeling and question expansion system based on decision dimension constraints, used to implement the method as described in any one of claims 1-7, characterized in that, include: The dimension acquisition unit is used to acquire target keywords and their respective industry identifiers, and then retrieve a set of decision dimensions from the industry knowledge base based on the industry identifiers. The question generation unit is used to embed the target keywords and decision dimension set into the generated prompt text, set binding constraints and distribution constraints in the generated prompt text, and input the generated prompt text into the language model to obtain a set of structured questions; The balance analysis unit is used to extract the dimension labels corresponding to each question in the structured question set and count the frequency of occurrence of each dimension label. It calculates the distribution balance based on the frequency of occurrence and determines whether it meets the preset conditions. When the distribution balance does not meet the preset conditions, it identifies low-coverage dimensions based on the frequency of occurrence. The supplementary generation unit is used to embed the low-coverage dimension into the targeted rewriting prompt text and set priority generation constraints. The targeted rewriting prompt text is input into the language model to obtain the supplementary question and the dimension label corresponding to the supplementary question. The question update unit is used to add supplementary questions and their corresponding dimension labels to the structured question set, resulting in an updated structured question set.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.
