Context-Aware Intelligent Question Answering Method and System for CAD Models
By collecting and distinguishing selected perception parameters and global perception parameters in CAD software, and determining the target perception mode based on natural language query commands, dual-path data acquisition is achieved. This solves the problems of inaccurate data acquisition paths and inaccurate parsing results in existing technologies, and improves query efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI JIEMO INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2026-04-22
- Publication Date
- 2026-07-31
AI Technical Summary
Existing CAD software, after receiving natural language query commands, struggles to differentiate between query requests targeting the currently selected object and those targeting manufacturing information of products visible within the current view, based on the current runtime context parameters. This results in inaccurate data acquisition path selection, low parsing efficiency, and insufficient accuracy of results.
By collecting runtime context parameters of the current CAD software, distinguishing them into selected perception parameters and global perception parameters, determining the target perception mode based on natural language query commands, and acquiring target data through either the selected perception mode or the global perception mode, dual-path data acquisition is achieved.
It improves the accuracy and efficiency of data acquisition paths, enhances the consistency between the parsing results of dimensional values, tolerance information, and associated target information and the query intent, and improves the efficiency, accuracy, and interactive coherence of CAD model information queries.
Smart Images

Figure CN122489736A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer-aided design technology, and more specifically, to a context-aware intelligent question-answering method and system for CAD models. Background Technology
[0002] Computer-aided design software is widely used in mechanical design, product development, and engineering drawing. During actual modeling, verification, and review processes, users frequently need to raise questions regarding the current model, such as dimension queries, tolerance queries, annotation statistics, and object attribute confirmation. While existing CAD software can display model attribute information and product manufacturing information annotations, most still rely on viewing attribute panels, clicking on annotations one by one, calling measurement tools, and menu-based searches. Users typically need to repeatedly switch between the model tree, geometric objects, and annotation data to complete a full information confirmation process.
[0003] When users submit queries in natural language, existing interaction methods often struggle to effectively differentiate between the query object and the query scope, taking into account the current software's operational status. For queries related to the currently selected object, existing methods often fail to establish a stable correspondence between the query content and the model attribute information and associated annotation information of the currently selected object, requiring manual relocation of the object and manual data retrieval. For statistical or global queries, existing methods lack the ability to directly scan and centrally process the manufacturing information data of visible products within the current view; users typically have to review the annotation content line by line and then manually summarize it, resulting in low processing efficiency.
[0004] Furthermore, even if relevant model data or annotation data is obtained, the existing methods are not direct enough in terms of the corresponding analysis of dimensional values, tolerance ranges, and the geometry associated with the annotations. Especially in scenarios with complex assemblies or a large number of annotations, if the appropriate data acquisition path cannot be selected based on the natural language query requirements and the current runtime context parameters, and the acquired data cannot be analyzed in a targeted manner, problems such as the query results not matching the target object, inaccurate statistical ranges, or incomplete analysis results may occur, thereby affecting the efficiency and accuracy of CAD model information query.
[0005] Therefore, there is an urgent need for a context-aware intelligent question-answering method and system for CAD models to solve the technical problems in the existing technology that, after receiving natural language query instructions, it is difficult to combine the runtime context parameters of the current CAD software to distinguish between query requirements for the currently selected object and query requirements for manufacturing information data of products visible in the current view. This results in inaccurate data acquisition path selection, low data parsing efficiency, and insufficient accuracy of parsing results. Summary of the Invention
[0006] To address the technical problem in existing technologies that, after receiving natural language query commands, it is difficult to distinguish between query requests for the currently selected object and query requests for manufacturing information data of products visible in the current view by combining the runtime context parameters of the current CAD software, resulting in inaccurate data acquisition path selection, low data parsing efficiency, and insufficient accuracy of parsing results, this invention provides a context-aware intelligent question-answering method and system for CAD models.
[0007] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: In the first aspect, this invention discloses a context-aware intelligent question-answering method for CAD models, comprising: Step S1: Obtain the natural language query command input by the user; Step S2: Collect the runtime context parameters of the current CAD software. The runtime context parameters include selection perception parameters and global perception parameters. The selection perception parameters are used to characterize the model attribute information and associated annotation information of the currently selected object, and the global perception parameters are used to characterize the manufacturing information data of the visible products in the current view. Step S3: Determine the target perception mode corresponding to the natural language query command based on the natural language query command and runtime context parameters; Step S4: When the target perception mode is the selected perception mode, obtain the target model data corresponding to the currently selected object based on the selected perception parameters; when the target perception mode is the global perception mode, perform visible product manufacturing information scanning processing to obtain the target annotation data corresponding to the visible product manufacturing information data in the current view. Step S5: parse at least one of the target model data and target annotation data to obtain the parsing result corresponding to the natural language query command; Step S6: Output the parsing results.
[0008] Secondly, this invention discloses a context-aware intelligent question-answering system for CAD models, comprising: The query retrieval module is used to retrieve the input natural language query commands; The parameter acquisition module is used to acquire the runtime context parameters of the current CAD software. The runtime context parameters include selection perception parameters and global perception parameters. The selection perception parameters are used to represent the model attribute information and associated annotation information of the currently selected object, and the global perception parameters are used to represent the manufacturing information data of the visible products in the current view. The pattern determination module determines the target perception pattern corresponding to the natural language query command based on the natural language query command and runtime context parameters. The data acquisition module is used to acquire the target model data corresponding to the currently selected object based on the selected perception parameters when the target perception mode is the selected perception mode; when the target perception mode is the global perception mode, it performs visible product manufacturing information scanning processing to acquire the target annotation data corresponding to the visible product manufacturing information data in the current view. The result parsing module is used to parse at least one of the target model data and target annotation data to obtain the parsing result corresponding to the natural language query command; The results output module is used to output the parsing results.
[0009] Compared with related technologies, the present invention has the following beneficial effects: By collecting runtime context parameters of the current CAD software and dividing these parameters into selection-aware parameters and global-aware parameters, natural language queries can establish a correspondence with the selection state and current view state in the current software. This provides a contextual basis for subsequent object identification and query range identification, reducing object misalignment and range misalignment problems.
[0010] By determining the target perception mode based on natural language query commands and runtime context parameters, and switching between the selected perception mode and the global perception mode according to the target perception mode, local attribute queries for the currently selected object and statistical queries for manufacturing information data of visible products in the current view can be executed along different data acquisition paths, thereby improving the accuracy of data acquisition path selection.
[0011] When the target perception mode is selected perception mode, the target model data corresponding to the currently selected object is obtained based on the selected perception parameters. When the target perception mode is global perception mode, visible product manufacturing information scanning processing is performed to obtain the target annotation data corresponding to the visible product manufacturing information data in the current view. Through the dual-path data acquisition method, both local object confirmation and global view statistics can be taken into account, improving the data acquisition efficiency in complex model scenarios.
[0012] By parsing at least one of the target model data and target annotation data, the parsing results corresponding to the natural language query instructions are obtained. This enables the extraction, standardization, and result matching of dimension values, tolerance information, and associated target information according to the natural language query requirements, thereby improving the consistency between the parsing results and the query intent, and enhancing the accuracy of the output results in scenarios such as dimension confirmation, tolerance confirmation, and annotation statistics.
[0013] This invention establishes a continuous processing chain around natural language query, runtime context awareness, target awareness mode determination, dual-path data acquisition, and parsing output. It can improve the problems of difficulty in distinguishing query objects and query scope, inaccurate data acquisition path selection, and insufficient accuracy of parsing results in existing CAD software, thereby improving the efficiency, accuracy, and interactive coherence of CAD model information query. Attached Figure Description
[0014] Figure 1 A flowchart illustrating the context-aware intelligent question-answering method for CAD models provided by this invention; Figure 2 This is a schematic diagram of the modules of the context-aware CAD model intelligent question-answering system provided by the present invention. Detailed Implementation
[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0016] Example 1 Please see Figure 1 As shown, this embodiment provides a context-aware intelligent question-answering method for CAD models, including the following steps: Step S1: Obtain the natural language query command input by the user; in specific implementation, the steps include: A query input entry is set in the interactive interface of Computer-Aided Design (CAD) software. The query input entry is an interface object used to receive user queries. The interface object can be any of the following: an input box, a dialog box, a sidebar input area, or a floating input area. When the query input entry receives user input, it simultaneously records the input time, the current session identifier, and the current document identifier corresponding to this input, so that the subsequently generated natural language query instructions can be correlated with the current session state of the CAD software.
[0017] The system receives query content input by the user and generates original query text. The original query text is the text result obtained by saving the user's input content in the input order. The original query text retains the object pronouns, object names, attribute names, statistical terms, numbers, units, and tolerance symbols input by the user. The object pronouns include at least one of "this", "it", and "currently selected object". The statistical terms include at least one of "all", "statistics", "summary", and "how much". After the original query text is generated, it is written into the original query text.
[0018] The text in the original query text is normalized to generate normalized query text, which is then written into the normalized query text. The normalization process includes at least the following actions: removing leading and trailing spaces; unifying full-width and half-width characters; unifying Chinese and English punctuation; retaining numbers, units, tolerance symbols, and geometric object names; searching for standard terms corresponding to the current text terms in a pre-established term replacement table, and replacing them with the standard terms in the normalized query text. The term replacement table is used to establish the correspondence between speech-to-text terms, spoken expression terms, and standard engineering terms. After the normalized query text is generated, it serves as the input for the next step.
[0019] Based on the normalized query text, query semantic elements are extracted and written into the query semantic elements. The query semantic elements are a data set used to record structured semantic content related to the current query. Specifically, word segmentation, terminology dictionary matching, and rule matching are performed on the normalized query text to extract at least one of the following: object reference elements, object name elements, attribute name elements, statistical hint elements, range hint elements, numerical condition elements, and unit elements. Among them, the object name element is used to represent at least one of hole, face, edge, volume, feature object, and labeled object; the attribute name element is used to represent at least one of area, length, volume, centroid, diameter, size value, and tolerance range; and the range hint element is used to represent at least one of current view, full view, and visible annotation. After the query semantic elements are generated, they serve as one of the inputs for subsequent determination of the target perception mode.
[0020] If the user provides auxiliary input for the query range, the system receives and writes the query range selection information; if the user does not provide auxiliary input for the query range, the system writes the query range selection information to an unspecified state. The query range selection information is an auxiliary record associated with the natural language query instruction, used to record whether the user actively specifies the query range. The query range selection information includes at least one of querying the currently selected object and querying the current view. This step is an optional auxiliary input step and is not the only prerequisite for generating a natural language query instruction.
[0021] The original query text, normalized query text, query semantic elements, and query range selection information are merged to generate a natural language query instruction, and an instruction number is assigned to the natural language query instruction. Specifically, a blank natural language query instruction object is first created, and the current session identifier, current document identifier, and input time are written into it. Then, the original query text is written into the original query text in the natural language query instruction object, the normalized query text is written into the normalized query text in the natural language query instruction object, and the object referential element, object name element, attribute name element, statistical prompt element, range prompt element, numerical condition element, and unit element in the query semantic elements are written into the corresponding semantic elements. The query range selection information is written into the perception range. After all the writing is completed, an instruction number is generated according to a preset numbering rule, and the instruction number is written into the number in the natural language query instruction object. The preset numbering rule includes at least four items: current session identifier, current document identifier, input time, and incrementing sequence number. The incrementing sequence number is obtained by incrementing by one for each newly generated natural language query instruction within the same session. The instruction number is assigned to the natural language query instruction and is used to uniquely identify the query task during subsequent runtime context parameter acquisition, target perception mode determination, and parsing result output.
[0022] The validity of natural language query commands is validated, including at least the following: determining whether the original query text is empty; determining whether the normalized query text is empty; determining whether at least one of the object reference element, object name element, attribute name element, statistical prompt element, and range prompt element is non-empty; when the original query text or the normalized query text is empty, a re-entry prompt is output and the current record is terminated; when both the original query text and the normalized query text are not empty, but the object reference element, object name element, attribute name element, statistical prompt element, and range prompt element are all empty, the natural language query command is retained and written to the status to be further judged in conjunction with runtime context parameters; when at least one of the object reference element, object name element, attribute name element, statistical prompt element, and range prompt element is non-empty, a valid natural language query command is output, and the validation result serves as the trigger for whether to start the runtime context parameter collection task in the next step.
[0023] Through the above operations, the user's input query content is organized into a natural language query command that can be directly invoked in subsequent steps. This allows subsequent steps to combine the object reference elements, object name elements, attribute name elements, statistical prompt elements, and range prompt elements in the natural language query command to further collect runtime context parameters and determine the target perception mode accordingly.
[0024] For example, in one implementation, when a user enters "What is the diameter of this hole?" into the interactive interface of the current computer-aided design software, the system receives the query, identifies "this" as an object reference element, "hole" as an object name element, and "diameter" as an attribute name element, and outputs the entire query as a natural language query instruction. As another example, when a user enters "How many dimension annotations are there in the current view?", the system identifies "current view" as a range indicator element, "how many" as a statistical indicator element, and "dimensional annotations" as an object name element, and uses this query as input for subsequent determination of the target perception mode.
[0025] Step S2: Collect the runtime context parameters of the current CAD software. These parameters include selection perception parameters and global perception parameters. The selection perception parameters characterize the model attribute information and associated annotation information of the currently selected object, while the global perception parameters characterize the manufacturing information data of the visible products within the current view. Specifically, the implementation steps include: Step S201: After a valid natural language query command is generated, the session state of the current computer-aided design (CAD) software is read, and a runtime context parameter acquisition task corresponding to the natural language query command is established. The runtime context parameter acquisition task is bound to at least the current document identifier, the current viewport identifier, the current session identifier, and the current timestamp, so that the selected perception parameters and global perception parameters acquired subsequently correspond to the running state at the same acquisition time. After the runtime context parameter acquisition task is established, the subsequent detection of the current selected state begins.
[0026] Step S202: Call the object selection interface of the computer-aided design software to detect whether there are currently selected objects and generate a selection status result. Specifically, read the number of currently selected objects, the object identifier of each selected object, and the selection order. When the number of currently selected objects is greater than zero, write the currently selected objects into the selection status result and proceed to the subsequent collection of selection perception parameters. When the number of currently selected objects is equal to zero, generate empty selection perception parameters and write the number of selected objects into the zero value state. After the selection status result is generated, it serves as the basis for determining whether to collect the geometric attributes, feature information, material information, and associated annotation information of the selected objects.
[0027] Step S203: Read the geometric type information for each selected object and write the geometric type. The geometric type is used to represent the geometric category to which the currently selected object belongs. The geometric category includes at least one of point, line, edge, face, volume, feature object, and annotation object. When the geometric type is face, continue reading the face type; when the geometric type is edge, continue reading the edge type; when the geometric type is volume, continue reading the solid volume type or curved surface type. After the geometric type is generated, it serves as the input basis for subsequent reading of model attribute information.
[0028] Step S204: Read the model attribute information of the selected object based on the geometry type and write it into the model attribute. The model attribute is used to characterize the geometric attribute result of the currently selected object. Specifically, when the geometry type is a face, read the area; when the geometry type is an edge, read the length; when the geometry type is a volume, read the volume and centroid; when the selected face is a cylindrical face, read the diameter attribute. After the model attribute is generated, it is used as the model attribute information part of the selection perception parameter.
[0029] Step S205: Read the feature name and feature type of the modeling feature to which the selected object belongs, and write the feature information; the feature information is used to characterize the modeling feature to which the currently selected object belongs, and includes at least the feature name and feature type; the feature type includes at least one of boss, hole, and extruded body. After the feature information is generated, it is used as the feature information part of the selection perception parameters.
[0030] Step S206: Read the material information corresponding to the selected object and write the material information. The material information is used to characterize the material result corresponding to the part or assembly level where the currently selected object is located, and includes at least the material name and density. When the material information is bound to the part level, read the part level material information. When the material information is bound to the assembly level, read the assembly level material information and record the material source level. After the material information is generated, it is used as the material information part in the selection perception parameters.
[0031] Step S207: Trace the Product Manufacturing Information (PMI) annotations associated with the selected object and write the associated annotation information. The associated annotation information is used to characterize the product manufacturing information results that have a constraint relationship or annotation relationship with the currently selected object, and includes at least the annotation object identifier, annotation text content, annotation type, dimension value, tolerance, and associated geometric body identifier. Among them, the dimension value is used to represent the annotation value, the tolerance is used to represent the upper deviation and lower deviation, and the associated geometric body identifier is used to represent the physical geometry constrained by the current annotation. After the associated annotation information is generated, it is used as the associated annotation information part of the selected perception parameters.
[0032] Step S208: Combine the selected state result, geometric type, model attributes, feature information, material information, and associated annotation information obtained from steps S202 to S207 to generate selection perception parameters; the selection perception parameters are used to characterize the model attribute information and associated annotation information of the currently selected object; if step S202 determines that there is no selected object, then the zero value state is retained in the selection perception parameters; after the selection perception parameters are generated, they are used as one of the input objects for combining runtime context parameters in step S213.
[0033] Step S209: Read the current view range information to determine the acquisition boundary of the global perception parameters. The current view range information includes at least the current viewport identifier, the current view matrix, the current display state, and the current visible object range. For labeled objects that are in a hidden state, a suppressed state, or outside the current view range, they are not written into the current visible object range. After the current view range information is determined, it is used as the boundary condition for performing the visible product manufacturing information scanning in step S210.
[0034] Step S210: Based on the current view range information, perform scanning processing on the visible product manufacturing information objects within the current view range to generate a candidate annotation set; the candidate annotation set is a structured record set of each visible product manufacturing information object within the current view range; the scanning processing can be executed by calling the visible product manufacturing information scanning interface, in one implementation, the scanning interface is the visible product manufacturing information scanning instruction FETCH_VISIBLE_PMI; each record in the candidate annotation set includes at least the annotation object identifier, annotation text content, tolerance, and associated geometry; after the candidate annotation set is generated, it serves as the input object for step S211 to extract global perception parameters.
[0035] Step S211: Extract global perception parameters from the candidate annotation set and write them into the global perception parameters. The global perception parameters are used to characterize the manufacturing information data of the visible products in the current view. Specifically, extract annotation content, tolerance, and associated targets from each record in the candidate annotation set. The annotation content is used to represent the annotation text or dimension value content, the tolerance is used to represent the upper and lower deviations, and the associated targets are used to represent the geometric objects constrained by the current annotation. After the global perception parameters are generated, they are used as the input objects for performing integrity verification in step S212.
[0036] Step S212: Perform integrity verification on the global perception parameters. The integrity verification includes at least: determining whether the labeled object identifier is empty; determining whether the labeled text content is empty; determining whether the tolerance includes upper deviation and lower deviation or null value marker; determining whether the associated target is empty; for records with empty labeled object identifiers, remove them from the global perception parameters; for records with empty labeled text content but existing tolerance and associated target, retain them and write them to the parsing state; the global perception parameters after integrity verification are used as one of the input objects for combining runtime context parameters in step S213.
[0037] Step S213: Assemble the selection-aware parameters generated in step S208 with the global-aware parameters output in step S212 to generate runtime context parameters, and output them to subsequent steps. Specifically, first, create a blank runtime context parameter object and write the current document identifier, current viewport identifier, current session identifier, and current timestamp as a common context header; then, write the selection-aware parameters generated in step S208 into the selection-aware parameter sub-item of the runtime context parameter object, and write the global-aware parameters output in step S212 into the global-aware parameter sub-item of the runtime context parameter object; wherein, the selection-aware parameter sub-item is used to represent the selection state of the currently selected object. The results, geometric type, model attributes, feature information, material information, and associated annotation information are included. The global perception parameter sub-item is used to characterize the annotation content, tolerance, and associated targets of the visible product manufacturing information objects within the current view range. After the two sub-items are written, it is verified whether the selected perception parameter sub-item and the global perception parameter sub-item correspond to the same current document identifier, current viewport identifier, and current timestamp. If they correspond, the assembly is completed, and runtime context parameters are generated. If there are inconsistencies in document identifiers, viewport identifiers, or timestamps exceeding the preset time difference range, the corresponding acquisition actions in steps S201 to S212 are re-executed to update at least one inconsistent sub-item. After the runtime context parameters are generated, they serve as the input object for subsequent determination of the target perception mode in conjunction with natural language query instructions.
[0038] The purpose of collecting runtime context parameters of the current computer-aided design software is to transform the selected state, model attribute state, feature state, material state, associated annotation state, and visible product manufacturing information state in the current view into structured context data when the user submits a natural language query command. This enables subsequent steps to determine the target perception mode and select the corresponding data acquisition path based on the selected perception parameters and global perception parameters at the same time of collection.
[0039] In one implementation, when a user submits a natural language query command such as "What is the diameter of this hole?", the system detects the existence of a selected object and reads the geometric type, model attributes, feature information, material information, and associated annotation information of the selected object. If the selected object is a cylindrical surface, the diameter attribute is read from the model attributes. If the selected object is associated with dimension annotations or tolerance annotations, the system continues to extract the dimension value, tolerance information, and associated geometric information corresponding to the selected object and generates selection perception parameters.
[0040] As another example, when a user submits a natural language query command such as "how many dimension annotations are in the current view", the system reads the current view range information and performs scanning processing on the visible product manufacturing information objects within the current view range; if there are six visible dimension annotation objects in the current view, the annotation content, tolerance information and associated target information of the six dimension annotation objects are extracted to generate global perception parameters.
[0041] Step S3: Based on the natural language query command and runtime context parameters, determine the target-aware pattern corresponding to the natural language query command; in specific implementation, the steps include: Step S301: After the natural language query command and runtime context parameters are generated, a target perception mode determination task is established. The target perception mode determination task is used to jointly determine the query semantic content in the natural language query command with the current selection state and current view state in the runtime context parameters. The target perception mode determination task is bound to at least the command number, object reference element, object name element, attribute name element, statistical prompt element, range prompt element, query range selection information, selection perception parameter, and global perception parameter. After the target perception mode determination task is established, proceed to step S302.
[0042] Step S302: Based on the object reference elements, object name elements, attribute name elements, statistical hint elements, and range hint elements in the natural language query command, perform semantic classification on the current query and generate query semantic classification results. Specifically, when the object reference elements contain "this," "it," or "currently selected object," and the attribute name elements contain at least one of area, length, volume, centroid, diameter, size value, or tolerance range, the current query is written into the local object attribute query type. When the statistical hint elements contain "all," "statistics," "summary," or "how much," or the range hint elements contain at least one of "current view," "full view," or "visible annotation," the current query is written into the view range statistical query type. When both object name elements and statistical hint elements exist, the current query is written into the object-limited statistical query type. After the query semantic classification results are generated, they are used as input for step S303.
[0043] Step S303: Based on the selected perception parameter and global perception parameter in the runtime context parameters, perform a state comparison on the query semantic classification result to generate perception mode candidate results. Specifically, when the query semantic classification result is a local object attribute query type and the number of selected objects in the selected perception parameter is greater than zero, the selected perception mode is written into the perception mode candidate results. When the query semantic classification result is a view range statistical query type and there are visible product manufacturing information records in the current view range in the global perception parameter, the global perception mode is written into the perception mode candidate results. When the query semantic classification result is an object-limited statistical query type, first determine whether the statistical prompt element is not empty. If the statistical prompt element is not empty, then the global perception mode is written into the perception mode candidate results, and the object name element is written into the object name filter condition. If the statistical prompt element is empty and the object referencing element is not empty, and the number of selected objects is greater than zero, then the selected perception mode is written into the perception mode candidate results.
[0044] Step S304: Priority determination is performed on the candidate results of the perception mode to generate the target perception mode determination result. Specifically, the query range selection information is read first; when the query range selection information points to the currently selected object query, and the number of selected objects in the selected perception parameters is greater than zero, the target perception mode is determined to be the selected perception mode; when the query range selection information points to the current view query, and there are visible product manufacturing information records in the global perception parameters, the target perception mode is determined to be the global perception mode; when the query range selection information is empty or in an unspecified state, the determination is performed according to a preset priority rule. The preset priority rule is: when the statistical prompt element or the range prompt element is not empty, it is preferentially determined to be the global perception mode; when both the statistical prompt element and the range prompt element are empty, and the object referencing element is not empty and the number of selected objects is greater than zero, it is determined to be the selected perception mode. After the target perception mode determination result is generated, it is used as the input for step S305.
[0045] Step S305: Perform a consistency check on the target perception mode determination result to generate a valid target perception mode. Specifically, when the target perception mode is determined to be a selected perception mode, check whether the number of selected objects in the selected perception parameters is greater than zero; if not, continue to check whether there are visible product manufacturing information records in the global perception parameters. If they exist, rewrite the target perception mode as a global perception mode; if not, write the mode indeterminate state. When the target perception mode is determined to be a global perception mode, check whether there are visible product manufacturing information records in the global perception parameters; if not, continue to check whether there are valid selected objects in the selected perception parameters. If they exist, rewrite the target perception mode as a selected perception mode; if not, write the mode indeterminate state. After the valid target perception mode is generated, it serves as the triggering basis for step S401 or step S501.
[0046] Step S306: Write the valid target perception mode into the target perception mode and output it. The target perception mode includes at least the instruction number, target perception mode type, judgment time, judgment basis, object name filtering conditions, selected object validity status, and globally visible product manufacturing information validity status. After the target perception mode is output, it can be called by step S401 or step S501.
[0047] The purpose of determining the target perception mode corresponding to the natural language query command based on the natural language query command and runtime context parameters is to establish a correspondence between the query scope and query object semantics in the natural language query command and the selection state and view state of the current computer-aided design software, thereby providing a unique data acquisition entry point for the subsequent local object attribute reading path or global view scanning path.
[0048] For example, in one implementation, when the natural language query instruction is "What is the flatness of this face", the system identifies the object referent element "this", the object name element "face", and the attribute name element "flatness" from the natural language query instruction, and determines the target perception mode as the selected perception mode by combining the current state of a valid selected object in the runtime context parameters.
[0049] Furthermore, when the natural language query command is "how many tolerance annotations are in the current view", the system identifies the range prompt element "current view" and the statistical prompt element "how many" from the natural language query command, and combines the state that there are visible product manufacturing information objects within the current view range in the runtime context parameters to determine that the target perception mode is the global perception mode.
[0050] Step S4: When the target perception mode is the selected perception mode, obtain the target model data corresponding to the currently selected object based on the selected perception parameters; when the target perception mode is the global perception mode, perform visible product manufacturing information scanning processing to obtain the target annotation data corresponding to the visible product manufacturing information data in the current view.
[0051] In specific implementation, when the target perception mode is the selected perception mode, the steps for obtaining the target model data corresponding to the currently selected object based on the selected perception parameters include: Step S401: After the target perception mode indicates that the target perception mode is selected perception mode, a target model data acquisition task is established. The target model data acquisition task is bound to at least the instruction number, the selected perception parameter, the object reference element, the object name element, and the attribute name element. After the target model data acquisition task is established, all selected object identifiers in the selected perception parameter are read to generate a candidate selected object list, and then proceed to step S402.
[0052] Step S402: Locate the currently selected object based on the candidate selected object list and generate the target object location result. Specifically, when the natural language query instruction only contains object referential elements but not object name elements, read the selection order and write the identifier of the last selected object into the target object location result; when the natural language query instruction also contains object name elements, match the candidate selected object list item by item according to preset matching rules, which include: first matching geometric types, then matching feature information, and finally matching associated annotation information; when a candidate selected object meets the matching conditions for the first time in the above three matchings, write the identifier of the candidate selected object into the target object location result.
[0053] Step S403: Determine the reading range of the target model data based on the attribute name elements, and generate reading range results. Specifically, when the attribute name element points to area, length, volume, centroid, or diameter, the model attribute is written into the reading range result; when the attribute name element points to feature name or feature type, the feature information is written into the reading range result; when the attribute name element points to material or density, the material information is written into the reading range result; when the attribute name element points to size value, tolerance range, or geometric tolerance, the associated annotation information is written into the reading range result; when there are multiple attribute name elements, all of them are written into the reading range result simultaneously.
[0054] Step S404: Based on the target object location result and the reading range result, extract target information from the selected perception parameters to generate a target model data subset. Specifically, using the target object identifier in the target object location result as the filter key, search for the record corresponding to the target object identifier in the selected perception parameters; when the reading range result contains model attributes, extract the area, length, volume, centroid, or diameter from the corresponding record; when the reading range result contains feature information, extract the feature name and feature type from the corresponding record; when the reading range result contains material information, extract the material name and density from the corresponding record; when the reading range result contains associated annotation information, extract the annotation object identifier, annotation text content, dimension value, tolerance, and associated geometric body identifier from the corresponding record. After the target model data subset is generated, it is used as the input for step S405.
[0055] Step S405: Merge the subset of target model data to generate target model data. Specifically, first, create blank target model data; then, write the target object identifier into the object identifier, the target object geometry type into the geometry type, the extracted model attributes into the model attributes, the extracted feature names and feature types into the feature information, the extracted material names and densities into the material information, and the extracted annotation object identifier, annotation text content, dimension values, tolerances, and associated geometry identifiers into the associated annotation information. After all the information is written, read the source of the object identifier in each item and determine whether each item comes from the same target object identifier. If so, generate the target model data; otherwise, delete the information from non-target object identifiers and regenerate the target model data. After the target model data is generated, it is used as the input for steps S406 and S601.
[0056] Step S406: Perform integrity verification on the target model data. Specifically, when the attribute name element points to model attribute information, determine whether there is a corresponding value in the model attribute; when the attribute name element points to feature information, determine whether there is a feature name or feature type in the feature information; when the attribute name element points to material information, determine whether there is a material name or density in the material information; when the attribute name element points to size value or tolerance range, determine whether there is a size value, tolerance, or associated geometric identifier in the associated annotation information; if there is a missing element, write the missing information name into the missing information; if there is no missing element, write the target model data into the complete state. The target model data after integrity verification is used as the input for step S601.
[0057] By following the steps above, using the target object identifier as the main line, the geometric attributes, feature information, material information, and associated annotation information corresponding to the same selected object are merged into a single data object. This allows subsequent parsing steps to directly parse a specific object without needing to locate it across records again.
[0058] For example, in one implementation, when the target perception mode is the selected perception mode and the natural language query command is "What is the diameter of this hole", the system reads all selected object identifiers from the selected perception parameters to generate a candidate selected object list; then, it determines the target object location result based on the object referencing element "this" and the object name element "hole"; subsequently, it determines the reading range as model attributes based on the attribute name element "diameter"; finally, it extracts the diameter information from the selected perception parameters corresponding to the target object location result and merges them to generate target model data.
[0059] As another example, when the natural language query command is "What material is this part made of?", the system determines the reading range as material information based on the attribute name element "material", and extracts the material name and density from the selected perception parameters corresponding to the target object to generate target model data.
[0060] In specific implementation, when the target perception mode is global perception mode, the steps for performing visible product manufacturing information scanning processing to obtain target annotation data corresponding to the visible product manufacturing information data within the current view include: Step S501: After the target perception mode indicates that the target perception mode is global perception mode, a target annotation data acquisition task is established. The target annotation data acquisition task is bound to at least the instruction number, global perception parameters, object name filtering conditions, statistical prompt elements, and range prompt elements.
[0061] Step S502: Based on the current viewport identifier, current view matrix, current display state, and current visible object range in the runtime context parameters, determine the scan boundary and generate scan boundary results. Specifically, first, read the current viewport identifier to determine the current view window corresponding to this scan; then read the current view matrix to determine the viewing direction, display range, and screen projection range of the current view; subsequently, read the current display state and filter out candidate product manufacturing information objects with a displayable state from the product manufacturing information object set in the current document; then, determine whether each candidate product manufacturing information object has a hidden marker or whether its associated geometric object is in a hidden state. If so, write the corresponding candidate product manufacturing information object into the hidden object exclusion set and do not include it in the scan. The process involves several steps: First, defining the boundaries. Then, determining whether each candidate product manufacturing information object has a suppression marker or whether its associated geometric object is in a suppressed state. If so, the corresponding candidate product manufacturing information object is written into the suppression object exclusion set and is not included in the scan boundary. For candidate product manufacturing information objects that are not excluded from the hidden object exclusion set and the suppression object exclusion set, their display position or the screen projection position of their associated geometric object is read and compared with the screen projection range determined by the current view matrix. When the display position or screen projection position falls within the screen projection range, the candidate product manufacturing information object is written into the currently visible object set. Finally, the current viewport identifier, the currently visible object set, the hidden object exclusion set, and the suppression object exclusion set are merged to generate the scan boundary result. The scanning boundary result includes at least the current viewport identifier, the visible range identifier, the hidden object exclusion identifier, and the suppressed object exclusion identifier; wherein, the visible range identifier is used to characterize the view range corresponding to the current visible object set, the hidden object exclusion identifier is used to characterize the set of product manufacturing information objects excluded by the hidden state, and the suppressed object exclusion identifier is used to characterize the set of product manufacturing information objects excluded by the suppressed state. After the scanning boundary result is generated, it is used as the input for step S503 to perform visible product manufacturing information scanning processing.
[0062] Step S503: Based on the scan boundary results, the visible product manufacturing information scanning process is invoked to generate raw scan data of product manufacturing information. Specifically, the visible product manufacturing information scanning instruction FETCH_VISIBLE_PMI is sent to the current computer-aided design software, where FETCH_VISIBLE_PMI is the name of the scanning instruction used to obtain visible product manufacturing information within the current view. The scanning process returns a structured data stream. In one implementation, the structured data stream is JavaScript object representation, i.e., JSON format data. After the raw scan data of product manufacturing information is generated, it is used as the input for step S504.
[0063] Step S504: The original scanned data of product manufacturing information is split to generate a candidate annotation set. Specifically, the original scanned data of product manufacturing information is split according to the annotation object identifier, so that each candidate annotation record corresponds to a product manufacturing information object; and the annotation object identifier, annotation content, tolerance, associated target and annotation type are read from each candidate annotation record; wherein, the annotation content is used to represent the annotation text or dimension value content, the tolerance is used to represent the upper deviation and lower deviation related data, and the associated target is used to represent the set of geometric objects constrained by the current annotation object; after the candidate annotation set is generated, it is used as the input for step S505.
[0064] Step S505: Based on the object name filtering condition, statistical prompt elements, and range prompt elements, the candidate label set is filtered to generate the target label candidate set. Specifically, when the object name filtering condition is empty, the entire candidate label set is written into the target label candidate set; when the object name filtering condition is not empty, a preset object mapping table is read, which is used to establish the correspondence between object names and label types and associated target feature values; then, according to the object name filtering condition, the corresponding label type or associated target feature value is searched in the preset object mapping table, and only candidate label records that satisfy the correspondence are retained; when the statistical prompt element requires statistical quantity, only candidate label records where both the label object identifier and label type are not empty are retained; when the statistical prompt element requires statistical tolerance distribution, only candidate label records where the tolerance is not empty are retained; after the target label candidate set is generated, it is used as the input for step S506.
[0065] Step S506: Extract targets from the target annotation candidate set and generate a target annotation data subset. Specifically, extract the annotation object identifier, annotation content, tolerance, associated target, and annotation type for each record in the target annotation candidate set. For records with empty annotation content but existing tolerance and associated target, retain the record and write an empty value status to the annotation content status. For records with multiple geometric object identifiers in the associated target, write the multiple geometric object identifiers into the associated target list in the original order. After the target annotation data subset is generated, it is used as the input for step S507.
[0066] Step S507: Merge the target annotation data subsets to generate target annotation data. Specifically, first, create a blank target annotation data set; then, write each target annotation data subset into the corresponding target annotation data object according to the record order; each target annotation data object includes at least the annotation object identifier, annotation type, annotation content, tolerance, associated target, current viewport identifier, and record sequence number; after all records are written, combine multiple target annotation data objects into a target annotation data set, and write the record count into the total count. After the target annotation data is generated, it serves as the input for steps S508 and S601.
[0067] Step S508: Perform integrity verification on the target annotation data. Specifically, determine whether the annotation object identifier, annotation type, tolerance, and associated target in each target annotation data object are empty. For records with empty annotation object identifiers, remove them. For records with empty tolerances but existing annotation content and associated targets, retain them and write them to the no-tolerance state. For records with empty associated targets but existing annotation object identifiers, annotation types, and annotation content, retain them and write them to the pending-parsing association state. The target annotation data after integrity verification is used as the input for step S601.
[0068] When the target perception mode is global perception mode, the visible product manufacturing information scanning process is performed to obtain the target annotation data corresponding to the visible product manufacturing information data in the current view. The purpose is to transform the scattered product manufacturing information objects in the current view into structured target annotation data that can be directly used for statistics and analysis, so that subsequent steps can continue to process the data around the size quantity, tolerance distribution and related target relationships.
[0069] Furthermore, in one implementation, when the target perception mode is global perception mode and the natural language query command is "how many dimension annotations are in the current view", the system first determines the scanning boundary based on the current viewport identifier, the current view matrix, the current display state, and the range of currently visible objects; then, it performs scanning processing only on product manufacturing information objects that are visible within the scanning boundary and are not hidden or suppressed; if the scanning result contains eight dimension annotation object information, the eight object information is split into a candidate annotation set, and target annotation data is generated after filtering, merging, and integrity verification are completed.
[0070] For example, when the natural language query command is "What tolerance annotations are there for holes in the current view", the system performs filtering on the candidate annotation set based on the filtering requirements corresponding to the object name element "hole" and the statistical prompt element, retaining only the tolerance annotation objects whose associated target is the hole feature or the hole geometry, and then generates the target annotation data.
[0071] Step S5 involves parsing at least one of the target model data and target annotation data to obtain the parsing result corresponding to the natural language query command. Specifically, the implementation steps include: Step S601: After at least one of the target model data and target annotation data is generated, a parsing task is established. The parsing task is at least bound to an instruction number, a natural language query instruction, target model data, target annotation data, attribute name elements, statistical prompt elements, and range prompt elements. After the parsing task is established, the type of the currently available input object is determined. When the target model data exists but the target annotation data does not exist, the model parsing path is written into the parsing path type. When the target annotation data exists but the target model data does not exist, the annotation parsing path is written into the parsing path type. When both the target model data and the target annotation data exist, the joint parsing path is written into the parsing path type.
[0072] Step S602: Based on attribute name elements, statistical hint elements, and range hint elements, determine the information to be parsed and generate a set of information to be parsed. Specifically, when the attribute name element points to area, length, volume, centroid, or diameter, write the model attributes from the target model data into the set to be parsed; when the attribute name element points to feature name, feature type, material name, or density, write the feature information or material information from the target model data into the set to be parsed; when the attribute name element points to dimension value, tolerance range, geometric tolerance, or labeled associated object, write the associated label information from the target model data or the label content, tolerance, and associated object from the target label data into the set to be parsed; when the statistical hint element points to quantity statistics, tolerance distribution statistics, or object category statistics, write the target label data set into the set to be parsed.
[0073] Step S603: Perform parsing on the set of information to be parsed to generate intermediate parsing results. Specifically, when the set to be parsed contains model attributes, read the area, length, volume, centroid, or diameter values and write them into the model attribute parsing results; when the set to be parsed contains feature information, read the feature name and feature type and write them into the feature parsing results; when the set to be parsed contains material information, read the material name and density and write them into the material parsing results; when the set to be parsed contains annotation content, extract the dimension values or annotation text content and write them into the annotation content parsing results; when the set to be parsed contains tolerances, read the upper and lower deviations in the tolerances and write them into the original tolerance parsing results; when the set to be parsed contains associated targets, read the list of geometric object identifiers in the associated targets and write them into the associated target parsing results.
[0074] Step S604: Perform standardization processing on the intermediate analysis results to generate standardized analysis results. Specifically, when both upper and lower deviations exist in the original tolerance analysis results, determine whether the absolute values of the upper and lower deviations are equal and whether their signs are opposite. If so, convert the original tolerance analysis results into positive and negative format results. If not, write the upper and lower deviation values into the asymmetric tolerance results in the order of upper and lower deviations. For the analysis results of associated targets, organize the list of geometric object identifiers into an associated geometry list. For the analysis results of annotation content, split the numerical part and the unit part and write the dimension value and unit respectively. For the analysis results of model attributes, write the attribute name and attribute value one-to-one into the standardized attribute results.
[0075] Step S605: Based on the natural language query command, perform result matching on the standardized parsing results to generate the target parsing results. Specifically, when the attribute name element points to only a single attribute, select the parsing content that matches the attribute name from the standardized parsing results and write it into the target parsing results; when the attribute name element points to both dimension value and tolerance range, write both the dimension value and tolerance results into the target parsing results; when the statistical prompt element points to quantity statistics, count the total number of records in the target annotation data or the number of filtered records, and write the count result into the target parsing results; when the range prompt element points to the current view, write the current viewport identifier and parsing content into the target parsing results; when the object name element exists, write the object name element and the associated geometry list or annotation type result into the target parsing results.
[0076] Step S606: Perform consistency verification on the target parsing results to generate valid parsing results. Specifically, determine whether the object name in the target parsing results is consistent with the geometric type or feature information in the target model data; determine whether the tolerance result in the target parsing results originates from tolerance; determine whether the list of associated geometries in the target parsing results originates from associated targets; determine whether the statistical values in the target parsing results originate from the number of records in the target annotation data set. When the corresponding items in the above four source verifications are true, write the target parsing results into the valid parsing results. When any corresponding item is false, write the false item into the exception record, and re-execute the corresponding parsing actions in steps S603 to S605 based on the exception record, or write the missing information into the valid parsing results. After the valid parsing results are generated, they are used as input for subsequent response output steps.
[0077] Step S607: Write the valid parsing result into the parsing result and output it. The parsing result includes at least the instruction number, parsing path type, parsing source, dimension value result, tolerance result, associated geometry result, statistical result, unit result, and result generation time. After the parsing result is output, it can be called by the subsequent response output step.
[0078] By performing the above steps, the values in the target model data and target annotation data are converted into size values, tolerance ranges, associated geometries, or statistical results that correspond one-to-one with the user's query content. This allows subsequent output steps to directly output the query results without having to perform selection, tolerance conversion, or object association judgment again.
[0079] For example, in one implementation, when the target model data contains dimensional values, tolerance information, and associated target information, the system first parses the dimensional values and tolerance information, and then performs standardization processing on the parsing results; if the upper deviation in the tolerance information is 0.1 and the lower deviation is -0.1, then it is standardized to a tolerance result of plus or minus 0.1; if the associated target information contains two geometric object identifiers, then they are organized into a corresponding associated geometric list, and finally, a parsing result corresponding to the natural language query command is generated.
[0080] Furthermore, when the target annotation data corresponds to the natural language query command "how many dimension annotations are there in the current view", the system counts the number of annotation objects in the target annotation data and outputs the count result as the parsing result; when the target annotation data corresponds to the natural language query command "what tolerance annotations are there in the current view", the system matches and organizes the annotation content, tolerance information and associated target information of each annotation object, and generates a parsing result in the form of a list.
[0081] Step S6: Output the parsing results.
[0082] This example illustrates that when a user inputs "What is the diameter of this hole?", the system first obtains the natural language query command, then collects the runtime context parameters corresponding to the currently selected object, then determines that the target perception mode is the selected perception mode, obtains the target model data based on the selected perception parameters, and finally parses the target model data to output the diameter result corresponding to the hole.
[0083] As another example, when a user inputs "how many dimension annotations are in the current view", the system first obtains the natural language query command, then collects the runtime context parameters within the current view range, then determines the target perception mode as the global perception mode, and performs visible product manufacturing information scanning processing to obtain target annotation data. Finally, the target annotation data is parsed, and the number of dimension annotations in the current view is output.
[0084] Example 2 See Figure 2 As shown, this embodiment provides a context-aware intelligent question-answering system for CAD models. Since this system uses the context-aware intelligent question-answering method for CAD models in Embodiment 1, it has the same effect, which will not be repeated here. The system includes: The query retrieval module is used to retrieve the input natural language query commands; The parameter acquisition module is used to acquire the runtime context parameters of the current CAD software. The runtime context parameters include selection perception parameters and global perception parameters. The selection perception parameters are used to represent the model attribute information and associated annotation information of the currently selected object, and the global perception parameters are used to represent the manufacturing information data of the visible products in the current view. The pattern determination module determines the target perception pattern corresponding to the natural language query command based on the natural language query command and runtime context parameters. The data acquisition module is used to acquire the target model data corresponding to the currently selected object based on the selected perception parameters when the target perception mode is the selected perception mode; when the target perception mode is the global perception mode, it performs visible product manufacturing information scanning processing to acquire the target annotation data corresponding to the visible product manufacturing information data in the current view. The result parsing module is used to parse at least one of the target model data and target annotation data to obtain the parsing result corresponding to the natural language query command; The results output module is used to output the parsing results.
[0085] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of protection of the present invention.
Claims
1. A method for intelligent question answering of CAD models based on context awareness, characterized in that, include: Step S1: Obtain the input natural language query command; Step S2: Collect the runtime context parameters of the current CAD software. The runtime context parameters include selection perception parameters and global perception parameters. The selection perception parameters are used to characterize the model attribute information and associated annotation information of the currently selected object, and the global perception parameters are used to characterize the manufacturing information data of the visible products in the current view. Step S3: Determine the target perception mode corresponding to the natural language query command based on the natural language query command and runtime context parameters; Step S4: When the target perception mode is the selected perception mode, obtain the target model data corresponding to the currently selected object based on the selected perception parameters; when the target perception mode is the global perception mode, perform visible product manufacturing information scanning processing to obtain the target annotation data corresponding to the visible product manufacturing information data in the current view. Step S5: parse at least one of the target model data and target annotation data to obtain the parsing result corresponding to the natural language query command; Step S6: Output the parsing results.
2. The context-aware intelligent question-answering method for CAD models according to claim 1, characterized in that, The method for collecting runtime context parameters of the current CAD software includes: reading the current session state and establishing a runtime context parameter collection task corresponding to the natural language query command; detecting whether a selected object exists, and if so, reading the geometric type, model attributes, feature information, material information, and associated annotation information of the selected object to generate selection perception parameters; reading the current view range information and performing scanning processing on the visible product manufacturing information objects within the current view range to extract annotation content, tolerance information, and associated target information to generate global perception parameters; and assembling the selection perception parameters and global perception parameters to generate runtime context parameters.
3. The context-aware intelligent question-answering method for CAD models according to claim 1, characterized in that, The method for determining the target-aware pattern corresponding to a natural language query instruction includes: generating a query semantic classification result based on object referential elements, object name elements, attribute name elements, statistical hint elements, and range hint elements in the natural language query instruction; generating candidate perception pattern results based on the query semantic classification result and the selected perception parameters and global perception parameters in the runtime context parameters; performing priority determination on the candidate perception pattern results based on query range selection information used to record whether the user actively specifies the query range, and generating a target perception pattern determination result; and performing consistency verification on the target perception pattern determination result to generate a valid target perception pattern.
4. The context-aware intelligent question-answering method for CAD models according to claim 3, characterized in that, When the target perception mode is the selection perception mode, the method for obtaining the target model data corresponding to the currently selected object based on the selection perception parameters includes: reading the selected object identifier in the selection perception parameters to generate a candidate selected object list; generating the target object location result based on the candidate selected object list and the object referencing feature or object name feature; determining the reading range result based on the attribute name feature; extracting target information from the selection perception parameters based on the target object location result and the reading range result to generate a target model data subset; merging and verifying the integrity of the target model data subset to generate the target model data.
5. The context-aware intelligent question-answering method for CAD models according to claim 3, characterized in that, When the target perception mode is global perception mode, the method for performing visible product manufacturing information scanning processing to obtain target annotation data corresponding to the visible product manufacturing information data in the current view includes: determining the scanning boundary based on runtime context parameters; performing visible product manufacturing information scanning processing based on the scanning boundary to generate raw product manufacturing information scanning data; splitting the raw product manufacturing information scanning data according to the annotation object identifier to generate a candidate annotation set; filtering the candidate annotation set based on object name filtering conditions, statistical prompt elements, and range prompt elements generated based on object name elements to generate a target annotation candidate set; extracting target information based on the target annotation candidate set and performing merging and integrity verification to generate target annotation data.
6. The context-aware intelligent question-answering method for CAD models according to claim 1, characterized in that, The method for obtaining the parsing results corresponding to the natural language query command includes: determining the set of information to be parsed based on the attribute name elements, statistical hint elements, and range hint elements in the natural language query command; parsing the model attribute information, feature information, material information, and associated annotation information in the target model data, or the annotation content, tolerance information, and associated target information in the target annotation data, based on the set of information to be parsed, to generate intermediate parsing results; performing standardization processing based on the intermediate parsing results to generate standardized parsing results; and performing result matching and consistency verification on the standardized parsing results based on the natural language query command to generate valid parsing results.
7. The context-aware intelligent question-answering method for CAD models according to claim 2, characterized in that, Generating selected perception parameters includes: reading at least one of the model attribute information of the selected object, such as area, length, volume, centroid, or diameter; reading the feature name and feature type of the modeling feature to which the selected object belongs; reading the material name and density corresponding to the selected object; and tracing the dimension values, tolerance information, and associated geometric information associated with the selected object.
8. The context-aware intelligent question-answering method for CAD models according to claim 3, characterized in that, Generating a valid target perception mode includes: when the object referencing element is not empty and the number of selected objects in the selected perception parameter is greater than zero, the target perception mode is determined to be the selected perception mode; when the statistical prompt element or range prompt element is not empty and there are visible product manufacturing information records in the current view in the global perception parameter, the target perception mode is determined to be the global perception mode.
9. The context-aware intelligent question-answering method for CAD models according to claim 4, characterized in that, The generation of target object location results includes: when only object referential elements exist in the natural language query command, the identifier of the last selected object is written into the target object location result; when object name elements exist in the natural language query command, matching is performed in the order of geometric type, feature information and associated annotation information, and the matched object identifier is written into the target object location result.
10. A context-aware intelligent question-answering system for CAD models, implementing the context-aware intelligent question-answering method for CAD models according to any one of claims 1-9, characterized in that, include: The query retrieval module is used to retrieve the input natural language query commands; The parameter acquisition module is used to acquire the runtime context parameters of the current CAD software. The runtime context parameters include selection perception parameters and global perception parameters. The selection perception parameters are used to represent the model attribute information and associated annotation information of the currently selected object, and the global perception parameters are used to represent the manufacturing information data of the visible products in the current view. The pattern determination module determines the target perception pattern corresponding to the natural language query command based on the natural language query command and runtime context parameters. The data acquisition module is used to acquire the target model data corresponding to the currently selected object based on the selected perception parameters when the target perception mode is the selected perception mode; when the target perception mode is the global perception mode, it performs visible product manufacturing information scanning processing to acquire the target annotation data corresponding to the visible product manufacturing information data in the current view. The result parsing module is used to parse at least one of the target model data and target annotation data to obtain the parsing result corresponding to the natural language query command; The results output module is used to output the parsing results.