An active clarification method and system for generating a requirements specification

By performing word segmentation, part-of-speech tagging, and domain dictionary matching on sparse initial requirement text, combined with mechanical design knowledge graph evaluation, problems are identified and clarified, and mechanical design requirement specifications are generated. This solves the incompleteness problem caused by sparse requirements and achieves efficient requirement specification generation.

CN123031670APending Publication Date: 2026-11-03NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202611517954.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In existing mechanical design technologies, sparse user input leads to incomplete requirement specifications, a lack of proactive clarification mechanisms, and an inability to generate complete requirement specifications.

Method used

By performing word segmentation, part-of-speech tagging, and domain dictionary matching on the sparse initial requirement text, requirement elements are extracted. Then, a completeness assessment is performed using a mechanical design domain knowledge graph to identify missing elements, generate clarification questions, obtain user feedback, update the requirement element set, and finally generate a mechanical design requirement specification.

Benefits of technology

It enables the proactive transformation from sparse requirements to complete specifications, improves interaction efficiency and specification quality, avoids conflicting requirements, and enhances clarification efficiency through dynamic updates of knowledge graphs and adaptive optimization of strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123031670A_ABST
    Figure CN123031670A_ABST
Patent Text Reader

Abstract

The application discloses a kind of active clarification method and system of generating requirement specification, belong to mechanical intelligent design technical field.The method obtains sparse initial demand text for mechanical design task, and demand element extraction is carried out by word segmentation, part-of-speech tagging and field dictionary matching, to obtain the first demand element set;Each demand element is mapped to the corresponding node of mechanical design field knowledge graph and is taken as anchor point to traverse graph, and candidate missing demand element is screened according to the association strength of surrounding node and anchor point, to generate clarification question set;According to the sorting strategy based on hierarchical information and acquisition cost and the round division strategy based on logical dependency relationship, it is clarified to user actively, and the demand element set is updated according to the clarification information fed back, and mechanical design requirement specification is generated by filling requirement specification template again.The application can actively identify the information gap of sparse demand and guide user to supplement, and it is beneficial to alleviate the problem of incomplete specification caused by demand element missing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of mechanical intelligent design technology, specifically relating to a proactive clarification method and system for generating requirements specifications. Background Technology

[0002] In the mechanical product design process, the requirements specification serves as a bridge connecting user needs with specific design solutions. Its completeness directly impacts subsequent structural design, performance analysis, and manufacturing implementation. However, in actual engineering scenarios, initial user requirements often exhibit typical sparsity characteristics. Users may only provide vague functional descriptions, scattered performance indicators, or fragmented operating conditions, lacking a systematic expression of requirement elements. This necessitates designers repeatedly communicating with users for confirmation, slowing down the design progress.

[0003] In existing technologies, the generation of mechanical design requirements specifications mainly relies on the following methods: A template-based document generation method, disclosed in Chinese Patent No. CN114386200B, is a method and device for generating engineering drawings based on parametric template technology. This method generates part templates by acquiring key parameters and then uses these templates to generate assembly drawings. However, the template fields in this type of solution are static and cannot be dynamically adjusted based on actual user input. When user input is sparse, many template fields remain blank, resulting in incomplete specifications. More importantly, this type of solution lacks a mechanism to proactively identify information gaps and guide users to supplement them. It adopts a passive information collection mode, receiving only what the user provides at a time; sparse input directly corresponds to sparse output, failing to address the fundamental problem of missing requirement elements.

[0004] Chinese patent application CN115033280A discloses a method and storage medium for automatically generating requirement specification documents based on knowledge graphs. This method constructs a knowledge graph and generates requirement documents through entity recognition and relation extraction. However, this approach lacks user interaction and verification during the completion process. The completed requirement elements in the knowledge graph may deviate from the user's true intent, and the completion mechanism is static, failing to provide dynamic and differentiated clarification guidance based on the sparse patterns of specific requirements. Furthermore, existing solutions fail to establish a closed-loop mechanism for identifying requirement information gaps and verifying user interaction. Chinese patent application CN119442531A discloses a knowledge graph-based method for assisting the design of intelligent robot prototypes. While it utilizes knowledge graphs for design assistance, its technical approach focuses on decision support during the design phase rather than proactive clarification during the requirement acquisition phase. Chinese patent application CN120524932A discloses a method for automatically generating software requirements specification documents based on a large language model. It generates requirements documents by training a requirements classifier and combining it with a large language model. However, it processes software requirements and also lacks an active clarification mechanism.

[0005] Furthermore, the existing solutions all employ a passive, one-time input model, where users provide as much requirement description as possible at once, and the system parses and generates the requirement document in one go. This model faces challenges when user input is sparse: the system lacks a mechanism to proactively identify information gaps and guide users to supplement them, resulting in sparse input directly corresponding to sparse output, failing to generate a complete requirement specification. Simultaneously, these solutions are primarily geared towards software engineering and have not established dedicated domain knowledge expression and reasoning mechanisms for the characteristics of mechanical design, making them difficult to directly adapt to the generation scenarios of mechanical design requirement specifications. Summary of the Invention

[0006] The purpose of this invention is to overcome the technical defects in the existing technology, such as incomplete specifications and lack of proactive clarification mechanism due to the lack of requirement elements in the process of converting sparse mechanical design requirements into requirement specifications. This invention proposes a proactive clarification method and system for generating requirement specifications.

[0007] This invention acquires sparse initial requirement text for mechanical design tasks input by a user; performs word segmentation and part-of-speech tagging, domain dictionary matching, and requirement element extraction on the sparse initial requirement text, transforming the unstructured natural language requirements into a structured first requirement element set; performs requirement completeness assessment based on a mechanical design domain knowledge graph, mapping each requirement element in the first requirement element set to a corresponding node in the knowledge graph, and performing graph traversal operations on the knowledge graph with each corresponding node as an anchor point to obtain a set of associated surrounding nodes; filters candidate missing requirement elements based on the association strength between surrounding nodes and anchor points and generates a corresponding set of clarification questions; outputs the set of clarification questions to the user according to a preset clarification strategy and obtains clarification information from the user, wherein the clarification strategy includes a sorting strategy based on knowledge graph hierarchical information and a round-based partitioning strategy based on logical dependencies; updates the first requirement element set according to the clarification information to obtain a second requirement element set; and fills the second requirement element set into a preset requirement specification template to generate a mechanical design requirement specification. This invention enables proactive and intelligent transformation from sparse requirements to a complete specification.

[0008] To achieve the above-mentioned objectives, the present invention provides the following technical solution: In the first aspect, a proactive clarification method for generating requirements specifications is provided, comprising the following steps: Obtain sparse initial requirements text for mechanical design tasks input by the user; The sparse initial requirement text is subjected to requirement element extraction to obtain a first requirement element set; Based on a knowledge graph in the field of mechanical design, the first set of requirements elements is assessed for completeness, and missing requirements elements and corresponding sets of clarification questions are identified. The system outputs the set of clarification questions to the user according to the preset clarification strategy and obtains the clarification information provided by the user. The first set of demand elements is updated based on the clarification information to obtain the second set of demand elements; The mechanical design requirements specification is generated based on the second set of requirements elements.

[0009] In a preferred embodiment, the step of extracting requirement elements from the sparse initial requirement text includes: performing word segmentation and part-of-speech tagging on the sparse initial requirement text; matching domain entities in the word segmentation and part-of-speech tagging results based on a mechanical design domain dictionary; using the matched domain entities as trigger words, extracting the values ​​of each requirement element from the sparse initial requirement text according to a preset requirement element extraction template to obtain a first requirement element set.

[0010] In a preferred embodiment, the requirement element extraction further includes: extracting dependency relationship information between each requirement element from the sparse initial requirement text, wherein the dependency relationship information includes at least one of numerical constraint relationship, logical sequence relationship, and spatial matching relationship; constructing a requirement element association constraint table based on the extracted dependency relationship information; in the requirement integrity assessment, when two candidate missing requirement elements have a mutually exclusive constraint relationship in the requirement element association constraint table, the two candidate missing requirement elements are merged into a selection clarification question; when a candidate missing requirement element is derived from the obtained requirement elements based on the requirement element association constraint table, the corresponding candidate missing requirement element is marked as a derivable element and is not included in the clarification question set.

[0011] In a preferred embodiment, the requirement integrity assessment of the first set of requirement elements based on a mechanical design domain knowledge graph includes: mapping each requirement element in the first set of requirement elements to a corresponding node in the mechanical design domain knowledge graph; performing a graph traversal operation in the mechanical design domain knowledge graph using each corresponding node as an anchor point to obtain a set of surrounding nodes associated with the anchor point; determining candidate missing requirement elements associated with the first set of requirement elements based on the set of surrounding nodes; and generating the clarification question set based on the candidate missing requirement elements.

[0012] In a preferred embodiment, determining the candidate missing demand elements associated with the first demand element set based on the surrounding node set includes: calculating the association strength value between each surrounding node in the surrounding node set and the anchor point, wherein the association strength value is calculated based on the edge type weight and path length; filtering surrounding nodes whose association strength value is greater than a preset association threshold as candidate nodes; and determining the demand elements corresponding to the candidate nodes as the candidate missing demand elements.

[0013] In a preferred embodiment, the compatibility and necessity of candidate missing requirement elements are verified using the requirement element association constraint table. When there is a mutually exclusive constraint relationship between the first candidate missing requirement element and the second candidate missing requirement element in the association constraint table, the first candidate missing requirement element and the second candidate missing requirement element are merged into a single selection-type clarification question for output. When there is a time-dependent constraint in the association constraint table and the first candidate missing requirement element depends on the second candidate missing requirement element, the clarification strategy is adjusted so that the clarification question corresponding to the second candidate missing requirement element is output before the clarification question corresponding to the first candidate missing requirement element.

[0014] In a preferred embodiment, the step of outputting the set of clarification questions to the user according to a preset clarification strategy includes: obtaining the hierarchical information of the requirement elements corresponding to each clarification question in the mechanical design domain knowledge graph, and determining the hierarchical score; determining the cost score representing the ease of acquisition of the requirement elements corresponding to each clarification question based on the acquisition method, wherein the requirement elements that are easier to acquire and require fewer interaction rounds have higher cost scores; calculating the comprehensive priority score of each clarification question by weighted sum of the hierarchical score and the cost score; and outputting each clarification question to the user in descending order of the comprehensive priority score.

[0015] In a preferred embodiment, outputting the set of clarification questions to the user according to a preset clarification strategy includes: calculating the logical dependencies between the clarification questions in the set; dividing the set into multiple clarification rounds, where there are no logical dependencies between clarification questions within the same round, and outputting clarification questions from different rounds sequentially according to their logical dependencies. The user inputs clarification information for each clarification question, and the form of the clarification information includes, but is not limited to, numerical input, option selection, and text description.

[0016] In a preferred embodiment, before updating the first demand element set based on the clarification information, the method further includes: after obtaining the clarification information from user feedback, performing semantic vectorization processing on the clarification information, calculating the semantic similarity between the clarification information and each existing demand element in the first demand element set, clustering the clarification information based on the semantic similarity, and merging multiple clarification information belonging to the same semantic category after deduplication before performing the update.

[0017] In a preferred embodiment, after obtaining clarification information from user feedback and before updating the first set of demand elements based on the clarification information, a consistency verification step is further included: The clarification information is verified for consistency; if the clarification information conflicts with existing demand elements in the first set of demand elements, a conflict prompt is output to the user and confirmation information is obtained from the user. The clarification information that has passed the consistency verification is then merged with the first set of demand elements: for demand elements marked as needing clarification in the first set of demand elements, their values ​​are filled with the clarification information; for newly identified demand elements, they are added to the set. The updated set of demand elements is denoted as the second set of demand elements.

[0018] In a preferred embodiment, generating a mechanical design requirement specification based on the second set of requirement elements includes: filling each requirement element in the second set of requirement elements into the corresponding field of a preset requirement specification template; and generating the mechanical design requirement specification based on the filled requirement specification template.

[0019] In a preferred embodiment, after generating the mechanical design requirements specification, the method further includes: performing a completeness check on the mechanical design requirements specification, checking item by item whether each required field in the requirements specification template has been filled; performing a formal compliance check on the filled content, checking whether each filled value conforms to the preset value range and format specifications of the corresponding requirement element type; and outputting a verification report containing a list of missing fields and a list of fields with abnormal formats.

[0020] In a preferred embodiment, the method further includes a knowledge graph dynamic update step: after updating the first set of demand elements according to the clarification information to obtain a second set of demand elements, the newly added demand elements in the second set of demand elements and their association with existing demand elements are stored in the mechanical design domain knowledge graph.

[0021] In a preferred embodiment, the method further includes a clarification strategy adaptive optimization step: recording the historical feedback time and modification frequency of each clarification question; for clarification questions whose historical feedback time exceeds a preset time threshold or whose modification frequency exceeds a preset modification threshold, adjusting to an earlier clarification round for output in the next output.

[0022] In a preferred embodiment, constructing a requirement element association constraint table based on the extracted dependency relationship information includes: identifying numerical description fragments in the sparse initial requirement text, extracting numerical constraint pairs containing numerical ranges, upper and lower thresholds, or proportional relationships, and recording the numerical constraint relationships between the numerical constraint pairs; identifying temporal description fragments in the sparse initial requirement text, extracting conditional triggering relationships containing sequential order, and recording the logical sequence relationships between requirement elements; identifying spatial matching description fragments in the sparse initial requirement text, extracting spatial matching relationships between requirement elements in terms of installation space, size matching, or positional coordination, and recording the spatial matching relationships between requirement elements; and storing the numerical constraint relationships, the logical sequence relationships, and the spatial matching relationships as structured constraint entries in the requirement element association constraint table.

[0023] In a second aspect, the present invention provides an active clarification system for generating requirements specifications, comprising: The requirements elicitation module is used to obtain sparse initial requirements text for mechanical design tasks input by the user; The requirement extraction module is used to extract requirement elements from the sparse initial requirement text to obtain a first set of requirement elements. The integrity assessment module is used to perform a requirement integrity assessment on the first set of requirement elements based on a knowledge graph in the mechanical design field, and to identify missing requirement elements and the corresponding set of clarification questions. The clarification interaction module is used to output the set of clarification questions to the user according to a preset clarification strategy, and to obtain the clarification information provided by the user. The demand update module is used to update the first demand element set according to the clarification information to obtain the second demand element set; The specification generation module is used to generate mechanical design requirement specifications based on the second set of requirement elements.

[0024] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: This invention transforms unstructured natural language requirements into a structured set of first requirement elements by performing word segmentation, part-of-speech tagging, domain dictionary matching, and requirement element extraction on sparse initial requirement text. This provides a computable data foundation for subsequent knowledge graph-based integrity assessment. The invention then performs requirement integrity assessment on the first set of first requirement elements based on a mechanical design domain knowledge graph. Using the extracted requirement elements as anchors, it performs graph traversal within the knowledge graph, automatically identifying information gaps and generating clarification questions based on semantic relationships between entities. Combining a hierarchical information-based sorting strategy and a round-based partitioning strategy based on logical dependencies, the invention outputs clarification questions to the user. This approach overcomes the technical shortcomings of fixed template completion, which tends to deviate from the user's true intent and lacks proactive clarification capabilities, thereby improving interaction efficiency and user experience.

[0025] This invention generates a mechanical design requirement specification by updating the first set of requirement elements based on the clarification information to obtain a second set of requirement elements. This facilitates the formation of a complete closed loop from sparse requirements to a complete specification. The consistency verification mechanism helps prevent contradictory requirements from entering the specification. The dynamic update mechanism of the knowledge graph enables the system to continuously accumulate domain knowledge. The adaptive optimization mechanism of the strategy allows the clarification strategy to be adjusted according to user habits, which helps to further improve clarification efficiency and specification quality. Attached Figure Description

[0026] Figure 1 A flowchart illustrating the proactive clarification method for generating requirements specifications provided in an embodiment of the present invention; Figure 2 A schematic diagram illustrating the principle of requirement integrity assessment based on knowledge graph in the field of mechanical design, provided for embodiments of the present invention; Figure 3 This is a schematic diagram illustrating the ordering of clarification issues in the clarification strategy provided in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the clarification problem round division and adaptive optimization of the clarification strategy provided in the embodiments of the present invention. Detailed Implementation

[0027] Example 1: like Figure 1 As shown, this embodiment provides a proactive clarification method for generating requirements specifications, including the following steps: S1: Obtain sparse initial requirements text for a mechanical design task input by the user.

[0028] Specifically, the sparse initial requirement text refers to the mechanical design task requirements described by the user using natural language. Mechanical design tasks cover mechanical engineering fields such as CNC machine tool design, engineering machinery design, vehicle component design, and industrial equipment design. Taking a CNC machine tool design task as an example, the sparse initial requirement text input by the user is: Design a CNC machine tool for metal cutting, where the spindle speed needs to meet machining requirements, and the worktable area is approximately 800mm × 400mm. This sparse initial requirement text only contains vague descriptions of equipment type, application scenario, some performance indicators, and some geometric parameters. It lacks key requirement elements such as feed rate range, machining accuracy level, spindle power, control system type, cooling method, safety protection level, and lubrication method, exhibiting typical sparsity characteristics.

[0029] S2: Extract the requirement elements from the sparse initial requirement text to obtain the first requirement element set.

[0030] The step of extracting requirement elements from the sparse initial requirement text includes: performing word segmentation and part-of-speech tagging on the sparse initial requirement text, and using a sequence tagging method based on a hidden Markov model to identify word boundaries and part-of-speech categories in the text. The specific process is as follows: A dedicated annotated corpus for mechanical design was constructed. Text data was collected from mechanical design standards, specifications, design manuals, and historical requirement documents. Each character in the text was manually annotated, with annotation tags including word boundary tags and part-of-speech tags. Word boundary tags included B (beginning of a word), I (middle of a word), E (end of a word), and S (independent word). Part-of-speech tags included nouns, verbs, adjectives, numerals, and quantifiers. Word boundary tags and part-of-speech tags were combined into composite tag sets, such as BN for noun beginnings and SV for independent verbs. In response to the characteristics of dense numerical values, quantifiers, and units, and numerous complex technical terms in mechanical design requirement texts, this embodiment adapts the above-mentioned tagging system as follows: A composite parameter value tag is added, binding numerals, quantifiers, and units as a single parameter value unit to prevent numerical values ​​and their units from being segmented into different words; a mandatory word formation rule is set for composite terms included in the mechanical design dictionary, stipulating that no word boundaries appear within terms within the dictionary during the character annotation stage; and when estimating state transition probabilities, the transition probability of numeral tags followed by quantifiers or unit tags is increased, making the model more inclined to output composite tag sequences that conform to the conventions of mechanical parameter expression.

[0031] The parameters of a Hidden Markov Model (HMM) were estimated based on an annotated corpus. The HMM comprises three core parameters: an initial state probability matrix, representing the probability of each composite label appearing as the starting position of a sequence; a state transition probability matrix, representing the conditional probability of the next composite label appearing given the current composite label; and an emission probability matrix, representing the conditional probability of the current character appearing given a composite label. All three parameters were statistically calculated from the annotated corpus using maximum likelihood estimation.

[0032] The sparse initial requirement text to be processed is input into the Hidden Markov Model as the observation sequence. The Viterbi algorithm is used to find the optimal composite label sequence, that is, given the observed character sequence, finding the composite label sequence that maximizes the joint probability. The Viterbi algorithm uses dynamic programming to calculate the maximum probability path for each composite label at each position sequentially, recording the path backtracking pointer, and finally backtracking from the ending position to obtain the globally optimal composite label sequence. Based on the above general Viterbi solution, this embodiment introduces constraint decoding tailored to the characteristics of mechanical design requirement text: for terms that are forced into words by the mechanical design domain dictionary, it is stipulated that word boundary labels are not allowed within their corresponding character intervals, and all candidate paths that segment words within this interval are excluded; for parameter value units, it is stipulated that numeral labels must appear adjacent to quantifiers and unit labels in pairs, and all candidate paths that separate the value from its unit are downweighted or eliminated. That is, in addition to the path probability comparison of the standard Viterbi, constraints on the formation of mechanical terms and the binding constraints on numerical units are superimposed, and the candidate path with the highest joint probability that satisfies the above constraints is selected as the optimal composite label sequence.

[0033] The word segmentation and part-of-speech tagging results are parsed from the composite tag sequence: the characters marked by the B-tag are merged with the characters marked by the subsequent I-tag and E-tag to form a complete word, and the characters marked by the S-tag are treated as independent words; at the same time, part-of-speech tags are extracted from the composite tags corresponding to each word to obtain the part-of-speech category of each word.

[0034] Based on the domain entity matching results of word segmentation and part-of-speech tagging, the domain entity matching results of the mechanical design domain dictionary covers the standard terms and synonyms of various sub-domains of mechanical design; using the matched domain entity as the trigger word, the values ​​of each requirement element are extracted from the sparse initial requirement text according to the preset requirement element extraction template.

[0035] The construction method of the requirement element extraction template is as follows: First, a requirement element type system is defined. In this embodiment, it includes eight types: equipment type, functional requirements, performance indicators, operating conditions, geometric parameters, material properties, control requirements, and safety specifications. Each type corresponds to one or more sets of trigger words. Second, an extraction rule template is designed for each type. The rule template is based on dependency syntax relation definition and includes elements such as trigger words, expected part-of-speech tags of trigger words, expected dependency syntax relation types, and expected part-of-speech tags of the values ​​to be extracted. The trigger word sets of each type are combined with the corresponding extraction rule templates to form the requirement element extraction template. In the actual extraction process, dependency syntax analysis is performed on the text after word segmentation and part-of-speech tagging. The matched domain entities are used as trigger words. Words that satisfy the preset dependency syntax relation constraints are searched in the dependency syntax analysis results and extracted as the values ​​of the requirement elements. If no words that meet the constraints are extracted, the value of the requirement element is marked as empty and marked as pending clarification. The preset dependency syntax constraints refer to the type of dependency syntax relationship that should be satisfied between the trigger word and the value to be extracted, including attributive-head relation, subject-verb relation, and coordinate relation; for example, performance index elements are expected to have their numerical modifiers form an attributive-head relation with the trigger word. Only when the relation type obtained from dependency parsing matches the expected relation of the element will the corresponding word be extracted as the value of the element; otherwise, the value of the element will be marked as empty and placed in a state pending clarification.

[0036] For designing a CNC machine tool for metal cutting, using machine tool as the trigger word, dependency parsing is used to identify its modification relationship and extract the requirement element as equipment type: CNC machine tool; using cutting as the trigger word, the requirement element is extracted as functional requirement: metal cutting; using spindle speed as the trigger word, the requirement element is extracted as performance indicator: spindle speed, but no specific value was extracted and it is marked as pending clarification; using table area as the trigger word, the requirement element is extracted as geometric parameter: table area.

[0037] During the extraction of demand elements, a confidence score is calculated for each extraction result. The confidence score characterizes the credibility of the extraction result, and its value is determined by considering the following factors: whether the domain entity is precisely matched by the mechanical design domain dictionary, whether the value to be extracted and the trigger word satisfy the preset dependency syntax constraints of the element, and whether a specific value conforming to the value range and format of the element type is extracted. The above factors can be determined item by item through preset rules and normalized to the range of 0 to 1, or they can be output by a classification model trained on the domain corpus. This embodiment does not limit this. The preset confidence threshold is 0.85, which is an exemplary value. It means that the extraction result that is directly adopted is required to have a high degree of certainty. This threshold can be determined based on the requirements for extraction accuracy and combined with the manual review and statistical calibration of historical extraction results. In this embodiment, for the extraction of "Equipment Type: CNC Machine Tool", the trigger word "machine tool" is precisely matched by the domain dictionary, the dependency constraints are satisfied, and the context is clear, with a confidence score higher than 0.85, and is directly adopted. For the spindle speed requirement element, although the extraction rule is triggered, no specific value is extracted, and the confidence score is lower than 0.85, it is marked as pending confirmation, and a confirmation question "Please confirm whether it is a spindle speed requirement and supplement the specific value range" is generated and added to the clarification question set. The specific calibration logic of the confidence threshold is as follows: A batch of mechanical design requirement extraction samples that have been manually reviewed and confirmed to be correct are collected. The confidence of each sample is calculated according to the above confidence factors, and its distribution is statistically analyzed. Among them, the samples that have been manually confirmed to be correct and have been precisely matched by the dictionary and have extracted legal values ​​generally have higher confidence, while the samples that are mis-extracted or have not extracted legal values ​​have lower confidence. The quantile value between the two types of sample distributions that makes the accuracy of the directly adopted samples reach the preset requirement is taken as the threshold. As the reviewed samples accumulate, the threshold is updated periodically according to the same caliber.

[0038] Simultaneously, dependency relationship information between various requirement elements is extracted from the sparse initial requirement text. This dependency relationship information includes numerical constraint relationships, logical sequence relationships, and spatial matching relationships. Each type of dependency relationship is structured as a constraint entry in the form of "Element A - Relationship Type - Element B - Constraint Content," and an index is established according to the requirement element. Multiple constraint entries together constitute a requirement element association constraint table. In this embodiment, the following are identified: First, numerical constraint relationships, where the values ​​of cutting parameters such as spindle speed and feed rate are constrained by the cutting material, and different cutting materials correspond to different spindle speed and feed rate ranges; second, logical sequence relationships, where information about the machining object, such as cutting material and machining process, must be determined before the cutting parameters such as spindle speed and feed rate, i.e., the clarification of the latter depends on the feedback of the former; and third, spatial matching relationships, where the worktable area should match the machine tool model and worktable travel. The requirement element association constraint table records constraint entries accordingly. For example, there is a spatial matching constraint between "Equipment Type: CNC Machine Tool" and "Geometric Parameter: Worktable Area," meaning the worktable area should match the machine tool model. Similarly, there is a numerical constraint between "Performance Index: Spindle Speed" and "Functional Requirement: Metal Cutting," where different cutting materials correspond to different spindle speed ranges. This association constraint table is used in subsequent requirement completeness assessments to assist in determining the compatibility and necessity between candidate missing requirement elements. To further reflect the specific constraints of mechanical design scenarios, the requirement element association constraint table also records the following constraints based on mechanical design standards and manuals: In terms of numerical constraints, it records the conversion relationships between cutting speed and spindle speed, workpiece or tool diameter, as well as the matching relationships between module, number of teeth, and center distance in gear transmissions, and between spindle power and cutting load. When the user provides some of these quantities, the range of values ​​for the remaining quantities is correspondingly constrained. In terms of spatial matching, it records the fit specifications of the spindle taper hole and tool holder taper, the matching specifications of linear guides and sliders, the fit between the table mounting slot distance and the fixture, and the fit of mounting hole distances, etc. When two types of elements have the above standard fit relationships, once one element is determined, the other element can only be selected from the matching specifications. All of the above constraints are based on the fit and conversion relationships specified in mechanical design standards, making the requirement element association constraint table clearly specific to the mechanical field.

[0039] Through the above extraction process, the unstructured natural language requirement text is transformed into a structured set of requirement elements, denoted as the first set of requirement elements. .

[0040] S3: Based on the knowledge graph of the mechanical design field, perform a requirement integrity assessment on the first set of requirement elements, and identify the missing requirement elements and the corresponding set of clarification questions.

[0041] Knowledge graphs in the field of mechanical design are based on graph structures. It means that among them It is a set of nodes, where each node represents a mechanical design requirement element or domain concept; The knowledge graph is a set of edges, where each edge connects two nodes and represents the inclusion, dependency, constraint, or matching relationships between them. In this embodiment, the knowledge graph is pre-constructed using the standard specification GB / T6477-2008 "Terminology for Metal Cutting Machine Tools" in the field of mechanical design, historical requirement documents, and expert knowledge. The relationship types in the knowledge graph include: inclusion, dependency, constraint, and matching relationships.

[0042] The requirement integrity assessment of the first set of requirement elements based on a knowledge graph in the mechanical design domain includes: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] Each requirement element is mapped to a corresponding node in the mechanical design domain knowledge graph. Specifically, the mapping is completed by matching requirement element types with node types and requirement element values ​​with node attributes. In this embodiment, "Equipment Type: CNC Machine Tool" is mapped to the CNC Machine Tool concept node in the knowledge graph; "Functional Requirement: Metal Cutting" is mapped to the cutting processing function node.

[0043] Using each corresponding node as an anchor point, a graph traversal operation is performed in the mechanical design domain knowledge graph. The graph traversal operation employs a breadth-first traversal strategy, expanding outwards along the edges of each anchor point to a preset number of layers, obtaining the set of surrounding nodes associated with each anchor point. In this embodiment, the preset number of layers is 2. Two layers are chosen because mechanical products are typically decomposed into two levels: "equipment as a whole - functional system - design parameters," allowing for tracing back from the entire machine to the specific parameters that the user needs to specify. This traversal layer number is an exemplary value and can be adjusted according to the depth of the knowledge graph and the needs of candidate element retrieval. Using CNC machine tool nodes as anchor points, a 2-layer graph traversal is performed, obtaining associated nodes including: spindle system, feed system, control system, cooling system, spindle speed, feed rate, machining accuracy, spindle power, table travel, lubrication method, etc.

[0044] After obtaining the set of surrounding nodes, candidate missing demand elements associated with the first set of demand elements are determined based on the set of surrounding nodes. This includes calculating the association strength value between each surrounding node in the set of surrounding nodes and the anchor point. The association strength value is the product of the type weights of each edge on the traversal path from the anchor point to the surrounding node. The path length is the number of edges traversed on the path. For first-level nodes, the path length is 1, and the association strength value is equal to the type weight of that edge. For second-level nodes, the path length is 2, and the association strength value is the product of the type weights of the two edges on the path. Since the type weight is no greater than 1, the larger the path length and the more multiplication factors, the smaller the association strength value. Thus, the association strength reflects both the type weight of the edge and the path length. The type weight of the edge represents the closeness of the relationship between two types of demand elements. Strong associations, such as inclusion relationships, are assigned higher weights, while weaker associations, such as attribute relationships, are assigned lower weights. The weights can be determined based on the judgment of domain experts on the closeness of the relationship.

[0045] In this embodiment, the preset association threshold is set to 0.3, which is an exemplary value used to achieve a balance between candidate element recall and distant noise node filtering. It can be adjusted according to the density of the knowledge graph. Taking the CNC machine tool node as the anchor point, the spindle system node is the first-level node, with a relation edge weight of 0.9, which is greater than 0.3, and is selected as a candidate node. The spindle power node is the second-level node, with a CNC machine tool-spindle system relation edge weight of 0.9 and a spindle system-spindle power attribute relation edge weight of 0.5, and an association strength value of 0.9 × 0.5 = 0.45, which is greater than 0.3, and is selected as a candidate node. The spindle bearing node has an association strength value of 0.9 × 0.4 = 0.36, which is greater than 0.3 and enters the candidate in terms of association strength, but is judged as a derivable element and removed in the subsequent necessity verification of the association constraint table. Finally, the requirement elements corresponding to the candidate nodes with association strength values ​​greater than the preset association threshold and passing the association constraint table verification are determined as candidate missing requirement elements. The edge weights and thresholds mentioned above are all exemplary and can be calibrated.

[0046] Specifically, this embodiment determines the type weights of edges based on a two-level decomposition structure of the mechanical product / equipment as a whole, functional systems, and design parameters: The first level represents the compositional relationship from the overall equipment to each functional system, with weights assigned according to the indispensability of each functional system to the overall machine function, and systems undertaking major functions being assigned higher weights; the second level represents the attribute or constraint relationship from the functional system to its design parameters, with weights tiered according to the degree to which the parameters determine the function of the system, and core parameters that determine whether the system can achieve its function being assigned higher weights, while general parameters are assigned lower weights; the matching and dependency relationships between cross-functional systems are assigned based on the necessity of their coordination in assembly and operation. The above division of functional systems and design parameters is based on mechanical design standards and specifications such as metal cutting machine tool terminology, giving the type weights of edges a specific calibration basis in the field of mechanical design, rather than simply relying on subjective judgment.

[0047] The calibration logic for the association threshold is as follows: taking historical mechanical design requirement samples as the object, the two-level path association strength from the whole machine node to its core design parameters that should be specified by the user, and the association strength from the whole machine to distant nodes that do not need to be specified by the user are statistically analyzed. The former is generally larger due to the multiplication of the composition relationship and the core attribute relationship, while the latter is generally smaller. The boundary between the two types of association strength distributions is taken as the association threshold, so that it can filter out distant noise nodes while recalling core parameters. The threshold is updated with the same caliber as the sample and knowledge graph are expanded.

[0048] Using the requirement element association constraint table constructed in step S2, the compatibility and necessity of candidate missing requirement elements are checked. The compatibility check identifies elements that cannot be simultaneously true or do not require repeated queries: when two candidate missing requirement elements have mutually exclusive constraints in the association constraint table, instead of generating two separate clarification questions, they are merged into a single selection-type clarification question output. For example, liquid cooling and air cooling are mutually exclusive in cooling methods, and centralized lubrication and decentralized lubrication are mutually exclusive in lubrication methods. The system merges these into selection-type clarification questions such as "Cooling method: Liquid cooling / Air cooling / Other" and "Lubrication method: Centralized lubrication / Decentralized lubrication / Other," allowing the user to select once and avoiding repeated queries for the same item.

[0049] Necessity checks are used to identify elements that can be derived from known elements and do not require additional user input. When a candidate missing requirement element can be derived from the acquired requirement elements combined with a knowledge graph or association constraint table, it is marked as a derivable element and is not included in the necessary clarification question set. In this embodiment, "Geometric Parameter: Table Progress" and the user-provided "Geometric Parameter: Table Area" belong to the same spatial geometric parameter and have a mutually exclusive substitution relationship. The table travel can be derived by combining the table area and the machine tool model, so it is marked as a derivable element and is not included in the necessary clarification questions. The spindle bearing specification is determined by the spindle system selection and is not an independent requirement element that needs to be directly specified by the user. It can also be derived from the spindle system, so it is also eliminated. For element pairs with temporal dependency constraints, the output order is adjusted according to logical sequence: when the first candidate missing requirement element depends on the second candidate missing requirement element, the clarification question of the second candidate missing requirement element is output before the first candidate missing requirement element. In this embodiment, cutting parameters such as spindle speed and feed rate depend on the cutting material, so the clarification question corresponding to the cutting material is output before the spindle speed and feed rate.

[0050] Based on the candidate missing requirement elements after the compatibility and necessity checks of the requirement element association constraint table, a set of clarification questions is generated. The final set of clarification questions generated in this embodiment includes: clarification questions corresponding to feed rate range, machining accuracy level, spindle power, cooling method, lubrication method, cutting material, spindle speed, etc.

[0051] S4: Output the set of clarification questions to the user according to the preset clarification strategy, and obtain the clarification information fed back by the user.

[0052] The preset clarification strategy includes a sorting strategy and a round division strategy. When outputting, the clarification rounds are first divided according to logical dependencies to ensure that the dependent information is obtained first. Then, within each round, the clarification issues are sorted according to the comprehensive priority score so that the issues in the same round can be presented in parallel.

[0053] The specific implementation of the sorting strategy is as follows: Obtain the hierarchical information of the requirement elements corresponding to each clarification question in the knowledge graph of the mechanical design domain. In this embodiment, the hierarchical information is defined according to the hierarchical structure of mechanical design requirements: the first layer is the overall equipment layer, the second layer is the system layer, and the third layer is the parameter layer. The set of clarification questions is sorted in descending order according to the hierarchical information, prioritizing the output of clarification questions with higher hierarchical levels. For ease of calculation, the hierarchical information is quantified into hierarchical scores: 3 for the overall equipment layer, 2 for the system layer, and 1 for the parameter layer; the higher the level, the larger the score. Cooling methods and lubrication methods belong to the system-level configurations of the cooling and lubrication systems, and are assigned a hierarchical score of 2 at the system layer; parameters or process elements such as spindle speed, feed rate, spindle power, machining accuracy, and cutting material are assigned a hierarchical score of 1 at the parameter layer. The above assignments are exemplary codes and can be adjusted according to the hierarchical division.

[0054] The comprehensive priority scoring is implemented as follows: Acquisition cost information is quantified into a cost score. The cost score represents the ease with which the user obtains the required element; a higher value indicates easier acquisition and priority for output. The cost score is determined in three tiers based on the acquisition method: elements obtainable through simple selection are assigned a cost score of 3; elements requiring the user to provide specific values ​​or ranges are assigned a cost score of 2; and elements requiring the user to consult materials or perform calculations are assigned a cost score of 1. This tiering simultaneously reflects time cost and interaction round cost: the more convenient the acquisition and the fewer interaction rounds required, the higher the score; methods requiring multiple rounds of inquiry or calculations correspond to lower scores. The number of rounds, which is the opposite of the above, is not separately counted. The comprehensive priority score is a weighted sum of the tier score and the cost score, calculated using the following formula:

[0055] in, For comprehensive priority scoring, The scores are assigned to the overall equipment level, the system level, and the parameter level, from highest to lowest: 3, 2, and 1 respectively. The cost scores are 3, 2, and 1, respectively, ranked from easiest to hardest to obtain. This refers to the hierarchical weight coefficient. This is the cost weighting coefficient. Hierarchical weight coefficient and cost weighting coefficient The value of is determined through the analytic hierarchy process (AHP) or expert survey. In this embodiment, after comprehensive evaluation and judgment by multiple experts in the field of mechanical design, it was determined that the hierarchical information of the demand elements has a more significant impact on the clarification priority than the acquisition cost; therefore, exemplarily, is selected as . =0.6, =0.4, reflecting a decision preference where hierarchical information is slightly more important.

[0056] In addition to using the analytic hierarchy process (AHP) or expert surveys to determine the aforementioned hierarchical weighting coefficients and cost weighting coefficients, they can also be determined by combining historical clarification records: statistically analyze the contributions of sorting by hierarchical information alone and sorting by acquisition cost alone to reducing rework and shortening the confirmation process in historical cases, and determine the weighting coefficients based on the relative magnitude of their contributions. When the contribution of hierarchical information is greater, its weight will increase accordingly. These weighting coefficients are updated with the same caliber as the historical clarification samples accumulate, avoiding the determination of values ​​based on subjective experience.

[0057] Clarification questions are sorted in descending order of their overall priority scores, with higher-scoring questions being output first. When two clarification questions have the same overall priority score, the one with the higher level score is output first. Since the overall priority score is determined by a weighted average of the level score and the cost score, when both the overall priority score and the level score are the same, the cost score is also the same. In this case, the clarification questions are output according to the order in which the corresponding requirement elements appear in the knowledge graph.

[0058] The specific implementation of the round-based partitioning strategy is as follows: First, based on the dependency edges in the mechanical design domain knowledge graph and the numerical and temporal dependency entries in the requirement element association constraint table, the logical dependencies between each clarification question are determined, and a clarification question dependency graph is constructed with clarification questions as nodes and directed edges pointing from the dependent question to the dependent question. Then, the dependency graph is topologically sorted and layered. Clarification questions with no predecessor dependencies (i.e., zero in-degree) are assigned to the first round. After removing the first-round questions and their connected edges, the in-degree of the remaining questions is recalculated, and newly emerging questions with zero in-degree are assigned to the next round. This process is iterated until all questions are partitioned. Questions within the same round have no logical dependencies and can be output in parallel. Questions in different rounds are output sequentially according to their dependencies, thus ensuring that dependent information is obtained first and reducing repeated questioning due to incomplete information. In this embodiment, the cooling method and lubrication method have no precursor dependency. Although the cutting material belongs to the parameter layer, it is the precursor of multiple cutting parameters. The in-degree of all three is zero, so they are assigned to the first round of parallel output. The second round consists of the feed rate range and the spindle power range, both of which depend on the cutting material. After the cutting material is assigned to the first round, its in-degree is zero, so it is assigned to the second round. The machining accuracy level needs to be comprehensively determined after the main performance parameters and the machining object are basically clear, so it is assigned to the third round.

[0059] The user provides clarification information for each clarification question, which can be in the form of numerical input, option selection, and text description: cooling method, lubrication method, etc., are obtained through option selection; spindle speed, feed rate, spindle power, machining accuracy, etc., are obtained through numerical input; cutting material, process requirements, etc., can be obtained through text description or option selection. In this embodiment, the clarification information provided by the user is: liquid cooling method selected, centralized lubrication method selected, feed rate range provided as 10-5000 mm / min, spindle power provided as 15 kW, machining accuracy grade provided as IT6, and cutting material provided as 45 steel.

[0060] After obtaining the clarification information from user feedback, the clarification information is semantically vectorized. Specifically, a pre-trained language model is used to convert each clarification information text into a fixed-dimensional semantic vector. This embodiment does not limit the specific type or vector dimension of the pre-trained language model.

[0061] After obtaining the semantic vectors of each clarification message, the semantic similarity between each clarification message is calculated. The semantic similarity between two clarification messages is measured by cosine similarity, which ranges from 0 to 1. A higher value indicates that the two clarification messages are semantically more similar. For any two clarification messages, the cosine similarity is calculated by dividing the dot product of their semantic vectors by the product of their vector magnitudes.

[0062] Based on the semantic similarity mentioned above, the clarification information is clustered and grouped using well-known clustering methods such as density peak clustering. The local cutoff distance is determined as follows: The semantic similarity sequence of each clarification message is sorted in descending order. The difference between any two adjacent semantic similarities in the sequence is calculated, and the largest difference is taken. The semantic similarity of the smaller side of this largest difference is used as the local cutoff distance for that clarification message. Messages with semantic similarity not less than the local cutoff distance are considered nearest neighbors. Based on this, the local density of each clarification message is calculated using the conventional density peak clustering method, cluster centers are determined, and the remaining clarification information is assigned to the corresponding cluster centers, completing the clustering grouping. Taking the smaller side of the largest difference as the cutoff distance ensures that the nearest neighbor range only includes clarification information that is truly semantically similar, avoiding merging information with significant differences into the same group. Considering that mechanical design clarification information includes both numerical parameters and option-based / textual descriptions, this embodiment makes an adaptation and improvement to the calculation of local density: In addition to statistically analyzing nearest neighbors based on semantic similarity, a requirement element type consistency constraint is introduced. Only when two pieces of clarification information belong to the same requirement element type or the same parameter family are they included in each other's local density. For numerical clarification information, it is also required that their parameter names are identical and their numerical ranges are compatible to be included in the nearest neighbor calculation. This results in a composite local density determined by both semantic similarity and parameter type consistency, avoiding the mis-clustering of different types of clarification information into the same group simply because of accidental similarity in wording. The cluster centers are still determined using the conventional method of clustering based on density peaks, according to local density and relative distance.

[0063] After clustering, duplicate clarification messages within each cluster are deduplicated and merged. For multiple clarification messages within the same cluster, the clarification message with the highest semantic similarity to its cluster center is selected as the representative clarification message, while other non-representative clarification messages within the same cluster are discarded. After deduplication and merging, only the representative clarification messages from each cluster are used in subsequent requirement element update steps.

[0064] Taking this embodiment as an example, the preset clustering threshold is set to 0.75, which is an exemplary value. The closer the cosine similarity is to 1, the more similar the semantics. This threshold can be determined based on the requirements for merging granularity and the clustering effect of historical feedback. The user provided feedback on the cutting material as 45# steel and the feed rate as 10-5000mm / min for steel cutting. The semantic vectors of the two clarification messages have a calculated cosine similarity of 0.82, which is greater than the preset clustering threshold of 0.75. Therefore, they are classified into the same semantic category, and the system automatically associates and stores the two pieces of information. After clustering, grouping, deduplication, and merging, the two clarification messages are merged and stored as "Cutting material: 45# steel, Feed rate: 10-5000mm / min". The merged information supports the updating of both the cutting material and feed rate requirements, avoiding information redundancy and logical fragmentation caused by repeatedly storing and updating multiple pieces of information of the same semantic category. The specific calibration logic of the clustering threshold is as follows: Select historical clarification information of mechanical design, and separately calculate the semantic similarity between different expressions of the same demand element and the semantic similarity between different demand elements. The former is generally higher because it points to the same parameter, while the latter is generally lower. Take the boundary between the two similarity distributions as the clustering threshold so that different expressions of the same parameter can be merged and different parameters are not mistakenly merged. The threshold is updated with the same caliber as the sample accumulates.

[0065] S5: Update the first set of demand elements according to the clarification information to obtain the second set of demand elements.

[0066] Before the update, this embodiment also includes a consistency verification step: performing a consistency verification on the clarification information. This involves checking whether there are logical conflicts or numerical contradictions between the clarification information and existing requirement elements in the first requirement element set. If a conflict is detected, a conflict prompt is output to the user, and confirmation information is obtained from the user. For example, if the user has already selected liquid cooling as the cooling method but then fills in an air cooling method that is mutually exclusive with liquid cooling, or if the entered feed rate exceeds the reasonable feed range corresponding to the selected cutting material, it is determined that there is a conflict between the clarification information and existing requirement elements. A conflict prompt is output to the user, and confirmation is requested. The update is based on the information confirmed by the user, preventing contradictory requirements from entering the specification.

[0067] The clarification information, after consistency verification, is merged with the first set of demand elements: for demand elements marked as needing clarification in the first set of demand elements, their values ​​are populated with the clarification information; for newly identified demand elements, they are added to the set. The updated set of demand elements is denoted as the second set of demand elements. .

[0068] S6: Generate a mechanical design requirements specification based on the second set of requirements elements.

[0069] Specifically, each requirement element in the second set of requirement elements is filled into the corresponding field of a preset requirement specification template, and the mechanical design requirement specification is generated based on the filled requirement specification template. The requirement specification template is predefined according to mechanical design industry standards and includes functional requirements, performance parameters, geometric parameters, operating conditions, structural requirements, control requirements, and safety specifications.

[0070] After generating the mechanical design requirements specification, the process also includes a completeness verification step: checking each required field in the requirements specification template to see if it has been filled; verifying the formal compliance of the filled content, checking whether each filled value conforms to the preset value range and format specifications of the corresponding requirement element type; and outputting a verification report containing a list of missing fields and a list of fields with abnormal formats.

[0071] The mechanical design requirements specification is a structured document that can be directly used for subsequent detailed design, experimental analysis, and manufacturing process planning.

[0072] In a preferred embodiment, the method further includes a knowledge graph dynamic update step: storing the newly added demand elements in the second demand element set and their association with existing demand elements into the mechanical design domain knowledge graph, so that the knowledge graph continues to evolve.

[0073] In a preferred embodiment, the method further includes a clarification strategy adaptive optimization step: recording the historical feedback time and modification frequency of users for each clarification question; for clarification questions whose historical feedback time exceeds a preset time threshold or whose modification frequency exceeds a preset modification threshold, adjusting the output to an earlier clarification round in the next output. The preset time threshold and preset modification threshold are not fixed empirical values, but are determined based on accumulated historical interaction statistics. For example, setting quantile values ​​for the historical feedback time distribution and historical modification frequency distribution of similar clarification questions are used, so that questions judged to have excessive time consumption or repeated modifications are queried in rounds with more complete information. Both types of thresholds can be periodically updated with the accumulation of interaction data and are calibrable parameters.

[0074] To verify the technical effect of the present invention compared with the existing solutions, five typical mechanical design tasks were selected: metal cutting CNC machine tools, industrial robot robotic arms, hydraulic components of engineering machinery, key components of vehicles, and special tooling fixtures. Ten initial requirement samples with different sparsity were collected for each category, for a total of fifty samples. The existing solutions and the active clarification method of the present invention were compared and tested. The test uses the mandatory requirements elements that should be clearly defined after requirements analysis for each sample as the benchmark. It statistically analyzes the completeness of requirement elements, the number of interaction rounds required to achieve the same level of completeness, the first-time pass rate of the specification, the accuracy rate of supplemented or clarified content, and the specification rework rate. The requirement element completeness is the proportion of correctly obtained mandatory elements out of the total number of mandatory elements. The number of interaction rounds is the number of clarification or communication rounds required to obtain a specification with the same level of completeness. The accuracy rate is the proportion of supplemented or clarified values ​​that are manually verified as correct. The first-time pass rate of the specification is the proportion of samples whose specifications pass the completeness and formal compliance checks on the first generation without needing to be returned for modification out of the total number of samples. The specification rework rate is the proportion of samples whose specifications fail the first check and need to be returned for supplementation or modification and then checked again out of the total number of samples. Under this test caliber, one failure to pass a check is counted as one rework, therefore the sum of the first-time pass rate and the rework rate for the same solution is 100%. All the above indicators are statistical averages across fifty samples, with ratio indicators obtained by dividing the number of samples with the corresponding event by the total number of samples. The completeness of requirement elements, number of interaction rounds, first-time pass rate, and rework rate reflect the effectiveness of the overall clarification process. Compared with the traditional passive template generation scheme that does not perform active clarification, the results are shown in Table 1. The accuracy rate of the completed or clarified content reflects the reliability of the content obtained by automatic completion or clarification. Compared with the static knowledge graph automatic completion scheme without interactive verification, the results are shown in Table 2.

[0075] Table 1. Comparison between the present invention and traditional passive template generation schemes

[0076] Table 2 Comparison of the present invention with static knowledge graph automatic completion schemes

[0077] Based on device type, the completeness of requirement elements for the five types of samples under the traditional passive template generation scheme was approximately 30%, 33%, 40%, 37%, and 35%, respectively. After adopting the present invention, these figures were approximately 90%, 93%, 94%, 91%, and 92%, respectively. The sparser the initial requirements, the more significant the improvement in completeness. Test results show that the present invention, by actively identifying information gaps and guiding users to supplement them according to a sorting and round-based strategy, significantly improves the completeness of transforming sparse requirements into complete specifications, reducing interaction rounds and rework. Furthermore, the accuracy rate of the supplemented or clarified content after user interaction verification is higher than that of the static knowledge graph automatic completion scheme, verifying the technical effectiveness of the present invention.

[0078] Example 2: This embodiment provides a proactive clarification system for generating requirements specifications, including: The requirements elicitation module is used to acquire sparse initial requirements text for mechanical design tasks input by the user. This module includes a natural language text input interface, supporting users to submit initial requirements text via text input boxes, speech-to-text conversion, or file import.

[0079] The requirement extraction module is used to extract requirement elements from the sparse initial requirement text to obtain a first set of requirement elements. The requirement extraction module includes: a word segmentation and part-of-speech tagging unit for performing word segmentation and part-of-speech tagging on the sparse initial requirement text; a domain dictionary matching unit for matching domain entities in the word segmentation and part-of-speech tagging results based on a mechanical design domain dictionary; a template extraction unit for extracting the values ​​of each requirement element from the sparse initial requirement text according to a preset requirement element extraction template, using the matched domain entity as a trigger word; a confidence evaluation unit for calculating the confidence score of each extraction result, and marking the requirement element corresponding to the extraction result as pending confirmation when the confidence score is lower than a preset confidence threshold; and a dependency relationship extraction unit for extracting dependency relationship information between each requirement element from the sparse initial requirement text and constructing a requirement element association constraint table.

[0080] The integrity assessment module is used to assess the integrity of the first set of requirements based on a knowledge graph in the mechanical design field, and to identify missing requirements and the corresponding set of clarification questions. The integrity assessment module includes: a node mapping unit, used to map each requirement element in the first requirement element set to a corresponding node in the mechanical design domain knowledge graph; a graph traversal unit, used to perform graph traversal operations in the mechanical design domain knowledge graph with each corresponding node as an anchor point to obtain a set of surrounding nodes associated with the anchor point; an association strength filtering unit, used to calculate the association strength value between each surrounding node in the surrounding node set and the anchor point, filter surrounding nodes with an association strength value greater than a preset association threshold as candidate nodes, and determine the requirement elements corresponding to the candidate nodes as candidate missing requirement elements; an association constraint verification unit, used to perform compatibility and necessity verification on the candidate missing requirement elements using the requirement element association constraint table, merge candidate missing requirement elements with mutually exclusive constraints into selection clarification questions, mark candidate missing requirement elements that can be deduced from the obtained requirement elements as deducible elements and remove them, and adjust the output order of clarification questions according to time dependence; and a clarification question generation unit, used to generate the clarification question set based on the candidate missing requirement elements that have passed the association constraint verification.

[0081] The clarification interaction module is used to output the set of clarification questions to the user according to a preset clarification strategy and to obtain clarification information from the user. The clarification interaction module includes: a hierarchical sorting unit, used to obtain the hierarchical information of the requirement elements corresponding to each clarification question in the mechanical design domain knowledge graph, and to sort the clarification questions in the set of clarification questions according to the hierarchical information; a round partitioning unit, used to calculate the logical dependencies between the clarification questions in the set of clarification questions and to divide the set of clarification questions into multiple clarification rounds; an interaction output unit, used to output clarification questions to the user according to the sorting and round partitioning results and to receive feedback clarification information; and a semantic deduplication unit, used to perform semantic vectorization processing on the clarification information, calculate semantic similarity, and perform clustering, grouping, and deduplication merging.

[0082] The requirement update module is used to update the first requirement element set according to the clarification information to obtain the second requirement element set.

[0083] The specification generation module is used to generate mechanical design requirement specifications based on the second set of requirement elements.

[0084] In one embodiment, the system further includes a consistency verification module connected between the clarification interaction module and the requirement update module, used to perform consistency verification on the clarification information, and when the clarification information conflicts with existing requirement elements in the first requirement element set, outputting a conflict prompt to the user and obtaining the user's confirmation information.

[0085] In one embodiment, the system further includes a knowledge graph update module connected to the output of the demand update module, used to store the newly added demand elements in the second demand element set and their association with existing demand elements into the mechanical design domain knowledge graph.

[0086] In one implementation, the system further includes a strategy adaptive optimization module, which records the historical feedback time and modification frequency of each clarification question. For clarification questions whose feedback time exceeds a preset time threshold or whose modification frequency exceeds a preset modification threshold, the system will adjust the output to an earlier clarification round in the next output.

[0087] Example 3: like Figure 2 As shown, this embodiment details the principle of requirement integrity assessment based on knowledge graphs in the field of mechanical design.

[0088] Figure 2 The diagram shows a partial structure of a knowledge graph in the field of mechanical design, which is divided into an overall equipment layer, a system layer, and a parameter layer. Figure 2 Centered on the CNC machine tool node, the CNC machine tool node is connected to system-level nodes such as the spindle system, feed system, control system, and bed system through containment relationship edges; the system-level nodes are connected to parameter-level nodes such as spindle speed, feed rate, spindle power, machining accuracy, table travel, and spindle bearings through attribute relationship edges. The nodes corresponding to the functional requirements such as metal cutting and geometric parameters such as table area that have been obtained are also labeled.

[0089] Figure 2 The nodes corresponding to the extracted demand elements in the first demand element set are marked with an unfilled border, the nodes corresponding to the candidate missing demand elements identified by graph traversal are marked with a gray filled border, the noise nodes that are excluded because their association strength value is lower than the preset association threshold are marked with a dashed box, and nodes that are removed because they have passed the association strength screening but have been determined to be derivable elements after the necessity check of the association constraint table can also be marked with an asterisk.

[0090] Figure 2The arrows starting from the CNC machine tool node illustrate the graph traversal path: Level 1 traversal obtains directly related nodes, and Level 2 traversal further obtains parameter layer nodes from system layer nodes. Through association strength calculation and threshold filtering, and then verification by the association constraint table, the final set of candidate missing requirement elements is determined.

[0091] Example 4: like Figure 3 As shown in the example, this embodiment details the principles of sorting and dividing the clarification issues into rounds in the clarification strategy.

[0092] Figure 3 The left side is the mechanical design requirement hierarchy tree, which is arranged from top to bottom as the overall equipment layer, system layer, and parameter layer, corresponding to level scores of 3, 2, and 1 respectively. Figure 3 The right side shows a list of clarification questions sorted in descending order of comprehensive priority scores. The cost scores are ranked from easiest to hardest to 1, with higher-scoring questions appearing first within the same round.

[0093] like Figure 4 As shown in the figure, this embodiment details the round division principle based on logical dependencies and the adaptive optimization feedback mechanism of the strategy in the clarification strategy.

[0094] Figure 4 The logical dependencies between clarification problems are presented in the form of a directed graph. Nodes represent clarification problems, and directed edges point from dependent problems to dependent problems. The graph is divided into three rounds using a topological sorting algorithm: the first round includes undependent, parallel-answerable cooling methods, lubrication methods, and cutting materials; the second round consists of problems dependent on the first round, including the feed rate range of the cutting material, the spindle speed range, and the spindle power; and the third round consists of problems dependent on the second round, such as the machining accuracy level determined by combining the aforementioned information. Figure 4 A statistical table records the historical feedback time and modification frequency of each clarification question. Questions whose feedback time or modification frequency exceeds the corresponding preset threshold are adjusted to an earlier round of output in the next interaction. The threshold is determined based on the quantile value of the historical statistical distribution.

[0095] In summary, this invention transforms sparse natural language requirements into structured requirement element representations through requirement element extraction, automatically identifies gaps in requirement information and generates clarification questions through a graph traversal mechanism based on a knowledge graph in the mechanical design domain, optimizes user interaction experience through a clarification strategy of sorting and round division, ensures logical consistency between requirement elements through consistency verification, enables the system to continuously accumulate domain knowledge through dynamic updates of the knowledge graph, and allows the clarification strategy to be personalized according to user habits through adaptive optimization of the strategy. Ultimately, this invention achieves a proactive and intelligent transformation from sparse mechanical design requirements to complete requirement specifications.

[0096] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A proactive clarification method for generating requirements specifications, characterized in that, Includes the following steps: Obtain sparse initial requirements text for mechanical design tasks input by the user; The sparse initial requirement text is subjected to requirement element extraction to obtain a first requirement element set; Based on a knowledge graph in the field of mechanical design, the first set of requirements elements is assessed for completeness, and missing requirements elements and corresponding sets of clarification questions are identified. The system outputs the set of clarification questions to the user according to the preset clarification strategy and obtains the clarification information provided by the user. The first set of demand elements is updated based on the clarification information to obtain the second set of demand elements; The mechanical design requirements specification is generated based on the second set of requirements elements.

2. The proactive clarification method for generating a requirements specification document according to claim 1, characterized in that, The step of extracting requirement elements from the sparse initial requirement text includes: performing word segmentation and part-of-speech tagging on the sparse initial requirement text; matching domain entities in the word segmentation and part-of-speech tagging results based on a mechanical design domain dictionary; using the matched domain entities as trigger words, extracting the values ​​of each requirement element from the sparse initial requirement text according to a preset requirement element extraction template to obtain a first requirement element set.

3. The proactive clarification method for generating a requirements specification document according to claim 1, characterized in that, The requirement integrity assessment of the first set of requirement elements based on a knowledge graph in the mechanical design domain includes: Map each requirement element in the first set of requirement elements to the corresponding node in the mechanical design domain knowledge graph; Using each of the corresponding nodes as anchor points, a graph traversal operation is performed in the mechanical design domain knowledge graph to obtain the set of surrounding nodes associated with the anchor points; Based on the set of surrounding nodes, candidate missing demand elements associated with the first set of demand elements are determined; The set of clarification questions is generated based on the candidate missing requirement elements.

4. The proactive clarification method for generating a requirements specification document according to claim 3, characterized in that, The step of determining the candidate missing demand element associated with the first demand element set based on the surrounding node set includes: calculating the association strength value between each surrounding node in the surrounding node set and the anchor point; filtering surrounding nodes whose association strength value is greater than a preset association threshold as candidate nodes; and determining the demand element corresponding to the candidate node as the candidate missing demand element.

5. The proactive clarification method for generating a requirements specification document according to claim 1, characterized in that, The step of outputting the set of clarification questions to the user according to a preset clarification strategy includes: Obtain the hierarchical information of the requirement elements corresponding to each clarification question in the knowledge graph of the mechanical design domain, and determine the hierarchical score; The cost score representing the ease or difficulty of obtaining the required elements corresponding to each clarification question is determined based on the method of obtaining them. The overall priority score for each clarification issue is calculated by weighting the score at the level of clarification with the score at the cost level. Clarification questions are presented to the user in descending order of the overall priority score.

6. The proactive clarification method for generating a requirements specification document according to claim 1, characterized in that, The step of generating a mechanical design requirement specification based on the second set of requirement elements includes: filling each requirement element in the second set of requirement elements into the corresponding field of a preset requirement specification template; and generating the mechanical design requirement specification based on the filled requirement specification template.

7. The proactive clarification method for generating a requirements specification document according to claim 1, characterized in that, It also includes a knowledge graph dynamic update step: after updating the first set of demand elements according to the clarification information to obtain the second set of demand elements, the newly added demand elements in the second set of demand elements and their association with existing demand elements are stored in the mechanical design domain knowledge graph.

8. The proactive clarification method for generating a requirements specification document according to claim 1, characterized in that, Before updating the first set of demand elements based on the clarification information, the method further includes: The clarification information is semantically vectorized, and the semantic similarity between the clarification information and each existing demand element in the first demand element set is calculated. The clarification information is then clustered based on the semantic similarity. Multiple clarification information items belonging to the same semantic category are deduplicated and merged before the update is performed.

9. The proactive clarification method for generating a requirements specification document according to claim 6, characterized in that, After generating the mechanical design requirements specification based on the second set of requirements elements, the process further includes: Perform a completeness check on the mechanical design requirements specification document, and check item by item whether each required field in the requirements specification document template has been filled in; Perform a formal compliance check on the filled content, and check whether each filled value conforms to the preset value range and format specifications of the corresponding requirement element type; Output a validation report containing a list of missing fields and a list of fields with formatting errors.

10. The proactive clarification method for generating a requirements specification document according to claim 1, characterized in that, The extraction of demand elements also includes: Extract dependency relationship information between each requirement element from the sparse initial requirement text. The dependency relationship information includes at least one of numerical constraint relationship, logical sequence relationship and spatial matching relationship. A requirement element association constraint table is constructed based on the extracted dependency relationship information. In the requirement integrity assessment, when two candidate missing requirement elements have a mutually exclusive constraint relationship in the requirement element association constraint table, the two candidate missing requirement elements are merged into a selection clarification question. When a candidate missing requirement element is derived from the obtained requirement elements based on the requirement element association constraint table, the corresponding candidate missing requirement element is marked as a derivable element and is not included in the clarification question set.

11. The proactive clarification method for generating a requirements specification document according to claim 10, characterized in that, The step of constructing a requirement element association constraint table based on the extracted dependency relationship information includes: Identify numerical description fragments in the sparse initial requirement text, extract numerical constraint pairs containing numerical ranges, upper and lower thresholds, or proportional relationships, and record the numerical constraint relationships between the numerical constraint pairs. Identify the temporal description fragments in the sparse initial requirement text, extract the conditional triggering relationships containing the sequence, and record the logical sequence relationship between requirement elements; Identify spatial matching description fragments in the sparse initial requirement text, extract the spatial matching relationships between requirement elements in terms of installation space, size matching, or positional coordination, and record the spatial matching relationships between requirement elements. The numerical constraint relationships, the logical sequence relationships, and the spatial matching relationships are stored as structured constraint entries in the requirement element association constraint table.

12. A proactive clarification system for generating requirements specifications, used to implement the proactive clarification method for generating requirements specifications as described in any one of claims 1-11, characterized in that, include: The requirements elicitation module is used to obtain sparse initial requirements text for mechanical design tasks input by the user; The requirement extraction module is used to extract requirement elements from the sparse initial requirement text to obtain a first set of requirement elements. The integrity assessment module is used to perform a requirement integrity assessment on the first set of requirement elements based on a knowledge graph in the mechanical design field, and to identify missing requirement elements and the corresponding set of clarification questions. The clarification interaction module is used to output the set of clarification questions to the user according to a preset clarification strategy, and to obtain the clarification information provided by the user. The demand update module is used to update the first demand element set according to the clarification information to obtain the second demand element set; The specification generation module is used to generate mechanical design requirement specifications based on the second set of requirement elements.

Citation Information

Patent Citations

  • A method and device for generating engineering drawings based on parametric template technology

    CN114386200B

  • Knowledge graph-based demand specification document automatic generation method and storage medium

    CN115033280A

  • Intelligent robot prototype aided design method based on knowledge graph

    CN119442531A

  • Software requirement specification document automatic generation method based on large language model

    CN120524932A