Engineering technical consultation intelligent question and answer method based on large language model

CN123011959APending Publication Date: 2026-10-30中交投资咨询(北京)有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611512048.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-28
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0006]本发明的一个目的是提供一种基于大语言模型的工程技术咨询智能问答方法,旨在克服现有技术中工程咨询回答未经规范验证的缺陷

Benefits of technology

[0018]第一,本发明将自然语言工程问题解构为工程对象、目标参数、工况条件以及隐性安全约束,隐性安全约束贯穿生成全过程,初始回答始终处于规范条文划定的安全边界之内,降低违反强制性条文的可能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011959A_ABST
    Figure CN123011959A_ABST
Patent Text Reader

Abstract

The application discloses an engineering technical consultation intelligent question and answer method based on a large language model, relates to the related technical field of engineering technical consultation, and aims to overcome the defects that engineering consultation answers are not verified in the prior art, and comprises the following steps: obtaining a natural language engineering question and deconstructing the natural language engineering question into an engineering object, a target parameter, a working condition and an implicit safety constraint; matching a subfield and performing semantic vector retrieval on a specification library; splicing specification articles, physical formulas and historical cases to generate an initial answer for a question and answer context; performing clarification, correction, reverse calculation verification and stress testing by a requirement clarification agent, a scheme design agent, a checking agent and a safety review agent; and inputting a candidate scheme into a debate graph neural network, and iterating according to a challenge signal and a correction signal until a preset reliability condition is met. The application can make the engineering consultation answer be subjected to physical formula reverse calculation verification and boundary working condition review, and establish a traceable relationship with specification articles, thereby reducing manual checking and recalculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of engineering and technical consulting. More specifically, this invention relates to an intelligent question-answering method for engineering and technical consulting based on a large language model. Background Technology

[0002] With the application of large language models, engineering technical consultation question-and-answer systems are gradually shifting towards automatic answers. Chinese patent document CN118536950A discloses a railway engineering consultation system and method based on BIM and large models. It constructs a knowledge graph of management units and performs semantic understanding and intelligent querying of consultation documents. This solution focuses on document retrieval; user questions are directly fed into the large language model to generate answers. Engineering objects, target parameters, operating conditions, and implicit safety constraints are not structured and parsed. Standard clauses and physical formulas are not included as constraints in the answer generation process. The generated answers are not verified by physical formula back-calculation, nor are they correlated with specific standard clauses, making it difficult for engineers to verify the source of the information.

[0003] Chinese patent document CN119150972A discloses an analysis method and system that integrates large-scale model and knowledge graph technologies. It constructs a knowledge graph to locate information nodes and generates response text using a large language model. However, this approach performs a holistic search of the knowledge base, generates responses in a single step, and does not undergo physical equation inversion verification or boundary condition stress testing. Consequently, the parameters in the responses lack a correlation mapping with the standard provisions, resulting in inconsistencies with engineering specifications and difficulties in traceability.

[0004] In summary, existing engineering and technical consultation question-and-answer methods generate answers directly within the open generation space of a large language model. These answers are not subject to normative constraints and numerical verification, and lack traceable textual evidence. To improve reliability, the retrieval is expanded and the answers are regenerated multiple times, which increases the computational load and response latency.

[0005] Therefore, it is necessary to design a technical solution that can overcome the above-mentioned defects. Summary of the Invention

[0006] One objective of this invention is to provide an intelligent question-and-answer method for engineering and technical consultation based on a large language model, which aims to overcome the shortcomings of existing engineering consultation answers that have not been standardized and verified.

[0007] To achieve these objectives and other advantages of the present invention, according to one aspect of the present invention, an intelligent question-and-answer method for engineering technical consultation based on a large language model is provided, comprising: S1: obtaining a natural language engineering problem and deconstructing it into engineering objects, target parameters, operating conditions, and implicit safety constraints; S2: matching subdomains in an engineering knowledge graph based on the engineering objects to obtain subdomain identifiers, and performing semantic vector retrieval on a standard text library based on the target parameters and operating conditions; S3: reading standard texts, physical formulas, and historical cases based on the subdomain identifiers and semantic vector retrieval results, and concatenating them into a question-and-answer context; S4: combining the natural language engineering problem, question-and-answer context, and implicit safety constraints... S5: Input the large language model to generate an initial answer; S6: The requirement clarification agent performs ambiguity recognition on the natural language engineering problem and outputs a clarification question; the solution design agent corrects the initial answer based on the clarification question to obtain candidate solutions; the verification agent verifies the candidate solutions based on physical formulas; and the security review agent performs stress tests on the candidate solutions based on the redundancy coefficient; S7: Input the candidate solutions into the debate-style graph neural network, update the candidate solutions based on the questioning signals and correction signals generated by the debate-style graph neural network, repeat the back-calculation verification and stress test until the verification results of the back-calculation verification and the review results of the stress test meet the preset reliability conditions, and output the candidate solutions after associating and mapping them with the standard provisions.

[0008] Furthermore, in S1, a lightweight semantic parser performs slot filling and dependency analysis on the natural language engineering problem, deconstructing the problem into engineering objects, target parameters, operating conditions, and implicit safety constraints. The engineering objects are matched with entity names in the engineering knowledge graph to obtain standardized entity identifiers. The target parameters are extracted by separating their numerical values, units, and parameter names. The operating conditions are classified and extracted by classifying environmental, temporal, and boundary quantities. Mandatory provisions in the standard text library corresponding to the professional field of the engineering object are matched with the target parameters and operating conditions using rules, and the constraints in the mandatory provisions that match the target parameters and operating conditions are identified as implicit safety constraints. The engineering objects, target parameters, operating conditions, and implicit safety constraints are concatenated into structured query tuples, which are then used as input for engineering knowledge graph matching and semantic vector retrieval.

[0009] Furthermore, in S2, entity links are executed between the engineering object and entity nodes in the engineering knowledge graph. When multiple candidate entity nodes are obtained from the entity link, the candidate entity node with the highest name similarity to the engineering object is selected as the entity node. Starting from the entity node, multi-hop path expansion is performed along the relation edges in the engineering knowledge graph. The number of hops in the multi-hop path expansion does not exceed the preset hop limit. The classification label of the path endpoint node is used as the subdomain identifier. The target parameters, working conditions, and implicit safety constraints are concatenated into the retrieval query text. Semantic vector encoding is performed on the retrieval query text. Similarity calculation is performed in the semantic vector index corresponding to the specification clause library. After sorting in descending order of similarity, the top N specification clauses are extracted and used as the candidate clause set. N is the preset upper limit of the number of searches. The subdomain identifier and the candidate clause set are used together as the basis for reading specification clauses, physical formulas, and historical cases.

[0010] Furthermore, in S3, the standard provisions corresponding to the semantic vector retrieval results are read from the standard provision library, the physical formulas corresponding to the subdomain identifiers are read from the physical formula library, and the historical cases corresponding to the target parameters and operating conditions are read from the historical case library. For each standard provision, the provision number, content, and validity status are segmented; for each physical formula, the formula number, variable symbols, variable units, and scope of application are extracted; and for each historical case, case identifiers, operating condition labels, and conclusion values ​​are labeled. The segmented standard provisions, extracted physical formulas, and labeled historical cases are then concatenated into a question-and-answer context according to a preset context template. The preset context template sequentially sets the standard provision segment, physical formula segment, and historical case segment. The question-and-answer context is truncated to ensure that the total number of characters in the question-and-answer context does not exceed the preset context length limit, and the truncated question-and-answer context is used as input to the large language model.

[0011] Furthermore, in S4, the natural language engineering question, question-and-answer context, and implicit safety constraints are concatenated into a generated prompt text according to a preset prompt word template. The preset prompt word template places the question-and-answer context in the first section of the generated prompt text and the implicit safety constraints in the second section, and uses a prohibitive instruction sentence to describe the implicit safety constraints. The generated prompt text is input into the large language model, the temperature parameter of the large language model is set to a preset temperature value, and the maximum generation length of the large language model is set to a preset length limit. When the target parameter value is not included in the natural language engineering question, the generated prompt text contains a missing parameter marker. The large language model generates an initial answer based on the generated prompt text, and a preset placeholder is filled in the position corresponding to the missing parameter marker in the initial answer. The initial answer contains the target parameter value, the target parameter unit, and the reference article number, which is the article number of the standard article carried when citing the standard article in the initial answer.

[0012] Furthermore, in S5, the requirement clarification agent performs ambiguity recognition on the natural language engineering problem, calculating the semantic confidence of the target parameters and operating conditions in the natural language engineering problem. When the semantic confidence is lower than the preset ambiguity threshold, the requirement clarification agent generates a clarification question and sends it to the solution design agent. The solution design agent corrects the initial answer based on the question-and-answer context and the clarification question, obtaining a candidate solution containing candidate parameter values ​​and candidate clause numbers. The verification agent substitutes the candidate parameter values ​​into the physical formula to perform inverse calculation verification, calculates the inverse value, and compares the difference between the inverse value and the value corresponding to the target parameter to obtain the verification result. The security review agent takes the operating conditions as boundary values, which are the preset upper limit and preset lower limit values ​​corresponding to the operating conditions. Under the boundary value conditions, the candidate parameter values ​​are substituted into the physical formula again to perform inverse calculation verification, obtaining the review result. The verification result and the review result are used as inputs to the debate-style graph neural network.

[0013] Furthermore, in S6, candidate solutions, verification results, and review results are mapped to candidate solution nodes, verification nodes, and review nodes of the debate-style graph neural network, respectively. Questioning signals are mapped to the first directed edges pointing from the verification and review nodes to the candidate solution nodes, and correction signals are mapped to the second directed edges pointing from the candidate solution nodes to the solution design agent. Before mapping, candidate solution nodes undergo text vectorization, with dimensions consistent with their state vectors. The directions of the two directed edges form a loop of information. The debate-style graph neural network performs feature aggregation on the candidate solution nodes through a graph attention layer. Feature aggregation calculates attention weights based on the directions of the first and second directed edges. In the node mapping stage, the directional encoding is generated and remains unchanged. The node features of the verification node and the review node are weighted and summed according to the attention weight to obtain the updated candidate solution node features. After each round of feature aggregation, the solution design agent updates the candidate solution according to the correction signal and re-executes the inverse calculation verification and stress test. The updated candidate solution re-enters the verification and review stage to generate a new round of verification results and review results. The number of iteration rounds is accumulated by a counter and participates in the convergence determination. When the verification result and the review result meet the preset confidence condition, feature aggregation stops, the candidate solution is associated with the specification clause, and the associated mapped candidate solution is output.

[0014] Furthermore, in S2, each standard provision in the standard provision library is divided into provision units according to the provision number. Each provision unit is encoded as a provision semantic vector, and all provision semantic vectors are used to construct a semantic vector index. The search query text is encoded as a query semantic vector, and the cosine similarity between the query semantic vector and each provision semantic vector is calculated. The top K provision units are selected as the initial provision set after being sorted in descending order of cosine similarity. When the cosine similarity calculation result is lower than the preset similarity threshold, the corresponding provision unit is removed from the initial provision set. Each provision unit in the initial provision set is reordered with the search query text using a cross-encoder. The cross-encoder concatenates the search query text and the provision unit into an input sequence and outputs a reordering score. The top M provision units are selected as the candidate provision set after being sorted in descending order of the reordering score. K is greater than M, N is equal to M, and K and M are preset quantities.

[0015] Furthermore, in S5, the back-calculation verification involves substituting candidate parameter values ​​into the physical formula to calculate back-calculated values. These back-calculated values ​​are then compared with the values ​​corresponding to the target parameters and the limits specified in the standard clauses, and the corresponding deviation rates are calculated. When all deviation rates are less than or equal to the upper limit of the allowable deviation corresponding to the redundancy coefficient, the verification result is in a "pass" state. When any deviation rate exceeds the upper limit of the allowable deviation, the verification result is in a "fail" state, and this failure state serves as the basis for generating a challenge signal using the argumentative graph neural network. The stress test involves taking the temperature, pressure, and load values ​​from the working conditions and setting them to preset upper and lower limits, respectively, to obtain a set of boundary working conditions. Back-calculation verification is repeatedly performed under each boundary working condition combination in the set. When any deviation rate under any boundary working condition combination exceeds the upper limit of the allowable deviation, the review result is in a "fail" state. When all deviation rates under all boundary working condition combinations are less than or equal to the upper limit of the allowable deviation, the review result is in a "pass" state.

[0016] Furthermore, in S6, candidate solution nodes, verification nodes, and review nodes use the text vector corresponding to the candidate solution, the state vector corresponding to the verification result, and the state vector corresponding to the review result as node features, respectively. The three node feature dimensions are consistent and they participate in aggregation within the same vector space. The graph attention layer contains a preset number of attention heads, ranging from 4 to 8. Each attention head calculates its attention weight based on the directions of the first and second directed edges. The attention weights obtained from each attention head are then weighted and averaged to obtain the aggregation weight. The node features of the verification node and the review node are weighted and summed according to the aggregation weight to obtain the updated candidate solution node features. In the weighted summation, features corresponding to the state receive a positive contribution, while features corresponding to the failure state receive a negative contribution. Based on the updated candidate solution node features... The selected scheme node features generate correction signals, which are then sent to the scheme design agent along the second directed edge. The status of both the verification and review results includes both pass and fail states. The preset reliability condition is that the verification result status is pass and the review result status is pass, or the number of iteration rounds reaches the preset iteration limit, which is between 5 and 10 rounds. When the verification and review results meet the preset reliability condition, feature aggregation is stopped, and the candidate scheme corresponding to the current candidate scheme node is extracted as the output object. A one-to-one correspondence is established between the candidate clause numbers in the candidate schemes and the clause numbers in the standard clauses. The one-to-one correspondence is recorded in the form of a mapping table, which records the clause number on which each parameter is based. The one-to-one correspondence is used as an association mapping, and the candidate scheme after association mapping is output.

[0017] The present invention has at least the following beneficial effects:

[0018] First, this invention deconstructs natural language engineering problems into engineering objects, target parameters, operating conditions, and implicit safety constraints. Implicit safety constraints run through the entire generation process, and the initial answer is always within the safety boundaries defined by the normative provisions, reducing the possibility of violating mandatory provisions.

[0019] Second, the engineering knowledge graph subdomain matching and the semantic vector retrieval of the specification text library constitute a dual-channel retrieval. The subdomain identifier and the retrieval results together limit the reading scope, avoid full retrieval, and control the computational cost.

[0020] Third, the verification agent performs back-calculation verification on the candidate solutions based on physical formulas, and the safety review agent performs stress tests under boundary conditions. The candidate solutions are verified by numerical values ​​and reviewed under extreme conditions to improve the consistency between the answers and engineering realities.

[0021] Fourth, the debate-style graph neural network updates candidate solutions based on the questioning signal and the correction signal. The convergence criterion is that the verification result and the review result meet the preset confidence condition. The iteration terminates under the condition that it can be determined, and the amount of computation is predictable.

[0022] Fifth, after the candidate solutions are mapped to the standard provisions, the parameters in the answer can be traced back to the specific standard provision number. Engineers can use them without having to recalculate them themselves, reducing the workload of manual verification and repetitive calculation.

[0023] Other advantages, objectives and features of the present invention will become apparent in part from the following description, and in part from those skilled in the art through study and practice of the invention. Attached Figure Description

[0024] Figure 1 A flowchart of one embodiment of this application;

[0025] Figure 2 This is a framework diagram of one embodiment of this application;

[0026] Figure 3 This is a multi-agent verification consensus graph according to an embodiment of this application;

[0027] Figure 4 This is a schematic diagram of a dual-channel retrieval method according to an embodiment of this application. Detailed Implementation

[0028] The present invention will now be described in further detail so that those skilled in the art can implement it based on the description.

[0029] It should be understood that terms such as "having," "comprising," and "including" used in the embodiments of this application do not exclude the presence or addition of one or more other elements or combinations thereof. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of components in a specific posture. If the specific posture changes, the directional indication will also change accordingly. When an element is referred to as "fixed to" or "set on" another element, it can be directly on the other element or may have an intervening element present. When an element is referred to as "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element through an intervening element. Descriptions involving "first," "second," etc., in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features.

[0030] It should be noted that the technical solutions of the various embodiments of this application can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by this application.

[0031] like Figure 1 and Figure 2 As shown, in one embodiment, the intelligent question-and-answer method for engineering technical consultation based on a large language model is executed by a processor connected to a user terminal. The user terminal receives professional questions input by engineers in natural language and displays the final answer. Typical application scenarios include compliance verification in fields such as bridge engineering and power engineering, such as bridge bearing capacity calculation or power equipment selection. Specifically, it includes:

[0032] S1: Obtain the natural language engineering problem and deconstruct it into engineering objects, target parameters, working conditions, and implicit safety constraints. Taking "whether the bearing capacity of a bridge bearing under a given load meets the specification requirements" as an example, the deconstruction results are the engineering object bearing, the target parameter bearing capacity, the working condition given load, and the implicit safety constraint specification limit. The deconstruction is completed by a lightweight semantic parser. This parser is based on rule templates and domain dictionaries. The four parsing results are written into a structured query tuple in a fixed order and used as common input for subsequent steps.

[0033] S2: Match the engineering object to the subdomain in the engineering knowledge graph to obtain the subdomain identifier. Perform semantic vector retrieval on the code clause library based on the target parameters and working conditions. The engineering knowledge graph uses engineering objects, code clauses, and physical formulas as nodes, and membership, constraint, and derivation relationships as edges. The subdomain identifier indicates the professional branch to which the question belongs. The semantic vector retrieval concatenates the target parameters and working conditions into query text and encodes it into a vector. Recall candidate clauses in the clause vector index according to similarity. The two retrieval paths are executed in parallel to jointly limit the subsequent reading range. For example, when "bearing capacity of support" is entered, relevant clauses in the bridge design code are returned.

[0034] S3: Based on the subdomain identifier and semantic vector retrieval results, read the specification clauses, physical formulas, and historical cases, and concatenate them into a question-and-answer context. The specification clauses provide the prescriptive requirements, the physical formulas provide the calculation basis, and the historical cases provide processing experience under similar working conditions. These three types of content are concatenated sequentially according to the specification clause section, the physical formula section, and the historical case section, serving as the controlled knowledge fragments during the generation of the large language model. S4: Input the natural language engineering problem, the question-and-answer context, and implicit safety constraints into the large language model to generate an initial answer. At this stage, the large language model only reads the question-and-answer context and implicit safety constraints; the scope of the initial answer generation is limited to the controlled knowledge fragments.

[0035] S5: The requirement clarification agent performs ambiguity recognition on the natural language engineering problem and outputs clarification questions. The solution design agent corrects the initial answer based on the clarification questions to obtain candidate solutions. The verification agent verifies the candidate solutions by back-calculating using physical formulas. The safety review agent performs stress tests on the candidate solutions based on the redundancy coefficient. The requirement clarification agent is instantiated by a large language model in conjunction with clarification role prompts. The clarification questions are used to eliminate uncertain expressions in the target parameters or operating conditions. The candidate solutions include candidate parameter values ​​and candidate clause numbers. The back-calculation verification substitutes the candidate parameter values ​​into the physical formulas and compares them with the target values. The redundancy coefficient is a coefficient used to convert the upper limit of the allowable deviation, with a value of 1.1 to 1.2. The stress test is used to verify the validity of the candidate solutions under adverse conditions.

[0036] S6: Input the candidate solution into the debate-style graph neural network. Update the candidate solution based on the questioning signal and correction signal generated by the debate-style graph neural network. Repeat the back-calculation verification and stress test until the verification result of the back-calculation verification and the review result of the stress test meet the preset reliability conditions. Then, output the candidate solution after associating and mapping it with the standard clause. The questioning signal points to the position of the parameter that failed the verification or review, and the correction signal indicates the direction of modification. The preset reliability conditions are that both the verification result and the review result reach the pass state or the number of iterations reaches the preset iteration limit. For example, the iteration stops when both the verification result and the review result are in the pass state. The association mapping maps each parameter in the candidate solution to the specific standard clause number. The output simultaneously presents the parameter value, calculation process and clause basis for engineers to directly refer to.

[0037] In existing technologies, engineering consulting question-and-answer systems typically feed natural language questions directly into a large language model to generate answers. The retrieved regulatory provisions are merely added as background text to prompts. The generated results are not verified through physical formula inversion and safety condition checks, and there is a lack of correspondence between the parameters in the answer and the regulatory provisions, making it difficult for engineers to determine whether the answer meets the constraints. This embodiment incorporates implicit safety constraints into the parsing results and integrates them throughout the generation process. After generation, inversion verification and stress testing are performed sequentially. Then, a debate-based graph neural network is used to converge the verification and review results. This ensures that each parameter in the output candidate solution is numerically verified through physical formulas and corresponds to a specific regulatory provision. Engineers can use these solutions without recalculating them themselves, thus reducing the workload of manual verification and repetitive calculations while ensuring the answer meets regulatory requirements. Each step of the process outputs serves as input for the next step, making the process traceable and facilitating verification when referencing the solution.

[0038] In one embodiment, in S1, a lightweight semantic parser performs slot filling and dependency analysis on the natural language engineering problem, deconstructing the problem into engineering objects, target parameters, operating conditions, and implicit safety constraints. The lightweight semantic parser refers to a parsing program with fewer parameters than a large language model, primarily using rule templates and a domain dictionary. Slot filling fills keywords into four preset slots: engineering objects, target parameters, operating conditions, and implicit safety constraints. Dependency analysis identifies the modification and limiting relationships between keywords; for example, it associates "3000 kN" before "support" with the target parameter slot. If any slot is empty, it is retained and marked as an item awaiting clarification. Normalized matching is performed between the engineering objects and entity names in the engineering knowledge graph to obtain standardized entity identifiers. Normalized matching maps synonymous terms to unique entity names in the engineering knowledge graph; for example, it maps "support" and "support pad" to the same entity. If a match fails, the original term is retained and a confirmation identifier is recorded. The target parameters are extracted by separating their numerical values, units, and names. Parameters such as bearing capacity and cross-sectional dimensions are separated into three independent fields, with the numerical values ​​and units stored separately for conversion and verification when substituted into physical formulas. Operating conditions are categorized and extracted into environmental, temporal, and boundary quantities. Environmental quantities include temperature and humidity; temporal quantities include duration; and boundary quantities include upper load limits and upper displacement limits. The categorization results are stored in the operating condition field of the structured query tuple. Mandatory clauses from the code library corresponding to the engineering object's professional field are matched against the target parameters and operating conditions using rules. Constraints in mandatory clauses that match the target parameters and operating conditions are identified as implicit safety constraints. Mandatory clauses are those that must be followed in the code, while constraints are numerical provisions with upper or lower limits. The identified constraints do not change during the generation process, and the corresponding clause numbers are recorded. The engineering object, target parameters, operating conditions, and implicit safety constraints are concatenated into a structured query tuple, which is then used as input for engineering knowledge graph matching and semantic vector retrieval in S2. The structured query tuple is a data structure with four fields arranged in a fixed order. Subsequent matching and retrieval directly read the tuple fields, avoiding repeated parsing of natural language text.

[0039] In this embodiment, implicit security constraints are identified as independent elements during the parsing phase. Through slot filling and dependency analysis, the extraction results of the four elements are made reproducible. The four elements are fixed in the form of structured query tuples, and subsequent retrieval and generation are based on these tuples as input. Security constraints are repeatedly referenced in the process, and the generated answers are always within the boundaries defined by the standard provisions. Engineers do not need to re-verify the security conditions in the results they obtain, and the dependence on the instability of the parsing process is reduced. The entire parsing process can be checked in segments, and any abnormal output in any segment can be accurately located.

[0040] In one embodiment, such as Figure 4 As shown, in S2, entity links are executed between the engineering object and the entity nodes in the engineering knowledge graph. When multiple candidate entity nodes are obtained from the entity link, the candidate entity node with the highest name similarity to the engineering object is selected as the entity node. Starting from the entity node, multi-hop path expansion is performed along the relation edges in the engineering knowledge graph. The number of hops in the multi-hop path expansion does not exceed the preset upper limit of the number of hops. The category label of the path endpoint node is used as the subdomain identifier. The entity link maps the engineering object to the specific node in the engineering knowledge graph. The name similarity is calculated by combining the character overlap and semantic similarity. The multi-hop path expansion traverses the membership relation edges, constraint relation edges, and derivation relation edges hop by hop. The preset upper limit of the number of hops is used to control the traversal depth, with a value of 3 to 5 hops. The category label is the professional category to which the node belongs, such as structural engineering, geotechnical engineering, or equipment engineering. When multiple category labels coexist, they are sorted according to the cumulative value of the path weight, and the one with the highest weight is taken as the subdomain identifier. For example, when "support bearing capacity" is entered, the structural engineering category is returned. The target parameters, operating conditions, and implicit safety constraints are concatenated into the search query text. Semantic vector encoding is performed on the search query text, and similarity calculation is performed in the semantic vector index corresponding to the specification clause library. The top N specification clauses are then sorted in descending order of similarity and selected as the candidate clause set. The concatenation order is target parameters, operating conditions, and implicit safety constraints. Similarity calculation uses vector dot product or cosine similarity. The semantic vector index is constructed when the specification clause library is updated, and updates only involve newly added or revised clause units. N is a preset upper limit for the number of searches, ranging from 10 to 20, and is configured before the search begins. Subdomain identifiers and the candidate clause set are used together as the basis for reading specification clauses, physical formulas, and historical cases in S3. Subdomain identifiers limit the scope of physical formulas and historical cases, while the candidate clause set limits the objects to be read from the specification clauses. These two threads operate in parallel. When no physical formula or historical case exists under a corresponding branch, the corresponding data source returns an empty set, and the question-and-answer context is only concatenated from available data sources.

[0041] This embodiment limits the graph traversal depth by setting a preset upper limit on the number of hops and the number of entries entering the context by setting a preset upper limit on the number of searches. It also constrains the reading range by using subdomain identifiers and candidate entry sets together, so that the knowledge graph path and vector retrieval results corroborate each other. The entries entering the context are always relevant to the question, and the retrieval cost remains within a predictable range. At the same time, the multi-hop path extension records the direction of each path, the formation process of the path endpoint classification label is traceable, the interpretability of the correspondence between subdomain identifiers and candidate entry sets is stronger, and the speed at which engineers obtain the context is more stable.

[0042] In one embodiment, in S3, the standard clauses corresponding to the semantic vector retrieval results are read from the standard clause library, the physical formulas corresponding to the subdomain identifiers are read from the physical formula library, and the historical cases corresponding to the target parameters and operating conditions are read from the historical case library. These three data sources respectively assume the roles of regulation, calculation, and experience. The reading actions are executed in parallel and aggregated in the same memory area. If any data source fails to read, the error status is recorded, and reading from the remaining data sources continues. For each standard clause, the clause number, clause content, and validity status are segmented. For each physical formula, the formula number, variable symbols, variable units, and scope of application are extracted. For each historical case, a case identifier, operating condition label, and conclusion value are labeled. For example, standard clauses are segmented into clause numbers, clause text, and current or repealed identifiers; physical formulas extract variable symbols and units for conversion and verification during substitution; and cases are labeled with operating condition labels and conclusion values. The three types of processing results are written into three structured lists, with each list element corresponding one-to-one with the original entries in the data sources. The segmented standard clauses, extracted physical formulas, and labeled historical cases are concatenated into a question-and-answer context according to a preset context template. The preset context template sequentially sets up standard clause sections, physical formula sections, and historical case sections, with fixed separators connecting the sections. The section order and separators are verified before concatenation; if verification fails, the template is reloaded. The question-and-answer context is truncated to ensure the total number of characters does not exceed a preset context length limit. The truncated question-and-answer context is then used as input to the large language model in S4. The preset context length limit is between 4000 and 8000 characters. During truncation, standard clause sections and physical formula sections are prioritized for retention, while clauses with obsolete status are excluded. For example, if the input length exceeds the limit, historical case sections are discarded first, and the clause numbers of the discarded content are recorded for reloading when needed.

[0043] In this embodiment, the three types of content are segmented, extracted, and labeled before splicing. Then, they are spliced ​​according to a fixed template and truncated to the preset length limit. The content received by the large language model is always a well-structured and length-limited fragment. The variables and applicable scope of the formula can be directly used for calculation and judgment. The working condition labels of the case can be compared with the current problem. The validity status label excludes invalid clauses during truncation, thereby reducing the probability of misquotation. The scale of input processed each time is also stable. The basis information obtained by engineers is clearer in terms of structure and source.

[0044] In one embodiment, in S4, the natural language engineering question, question-and-answer context, and implicit safety constraints are concatenated into a generated prompt text according to a preset prompt word template. The preset prompt word template is a fixed-format text skeleton that specifies the arrangement order and separation method of the three types of content. The generated prompt text is the only input for subsequent generation, and the character count is counted after concatenation to confirm that it does not exceed the model's input window. The preset prompt word template places the question-and-answer context in the first section of the generated prompt text and the implicit safety constraints in the second section. The implicit safety constraints are expressed using prohibitive instruction sentences, which begin with "must not" or "prohibited," such as "the parameter values ​​exceeding the constraint limits must not be output." The question-and-answer context enters the model's attention range before the implicit safety constraints, and the instruction sentences are directly applied from the template and do not change during the generation process. The generated prompt text is input into the large language model. The temperature parameter of the large language model is set to a preset temperature value, and the maximum generated length of the large language model is set to a preset length limit. The preset temperature value is between 0.5 and 0.7, which controls the randomness of generation; the smaller the value, the more stable the result. The preset length limit is between 512 and 1024, which limits the number of characters generated in a single generation. Both parameters are set uniformly before each generation. The generated result is parsed into an initial answer according to a fixed format, and the paragraph structure is preserved for subsequent correction to locate the replacement range. When the target parameter value is not included in the natural language engineering problem, the generated prompt text includes a missing parameter marker. The large language model generates an initial answer based on the generated prompt text. A preset placeholder is filled in the position corresponding to the missing parameter marker in the initial answer. The missing parameter marker is a special symbol inserted at the target parameter slot. The preset placeholder is a fixed empty value symbol, such as a question mark, used to indicate that the value at this position has not yet been obtained, to avoid the model fabricating missing values. After parsing, the marker is removed from the generated prompt text. The initial response includes the target parameter value, the target parameter unit, and the reference article number. The reference article number is the article number of the standard article cited in the initial response. The target parameter value and unit are used to input the physical formula for subsequent back-calculation verification. The reference article number is recorded separately during output for comparison during subsequent association mapping, thereby ensuring that the generated content corresponds one-to-one with the source article.

[0045] This embodiment uses a preset prompt word template to fix the content partitions, places implicit safety constraints as prohibitive instructions after the generated prompt text, and constrains the generation process with preset temperature values ​​and preset length limits. Missing values ​​are replaced with preset placeholders, making the structure and source of the initial answer predictable. Engineers can use this to determine which parameters come from the question and which parameters need clarification. At the same time, the generated content and the source of the clause are output along with the initial answer according to the clause number. The generated content and the source of the clause are established in the first round of generation, and subsequent association mapping can be expanded along this correspondence, thereby reducing the risk of misusing unverified values.

[0046] In one embodiment, such as Figure 3 As shown, in S5, the requirement clarification agent performs ambiguity recognition on the natural language engineering problem, calculating the semantic confidence of the target parameters and operating conditions in the natural language engineering problem. The semantic confidence is a quantified value of the degree of semantic consistency between the parsed result and the original question text, ranging from 0 to 1. It is output by the lightweight semantic parser during slot filling, and the calculation object is the corresponding fragment of the original question text and the slot keywords. When the semantic confidence is lower than the preset ambiguity threshold, the requirement clarification agent generates a clarification question and sends it to the solution design agent. The preset ambiguity threshold is between 0.6 and 0.8. The clarification question is used to inquire about missing or uncertain target parameter values ​​and operating conditions, such as "What is the basis for the load value?" or "What is the structural material grade?" It is also sent to the user terminal. After the supplementary information is returned, the subsequent process continues. The solution design agent modifies the initial answer based on the question-and-answer context and clarification questions, obtaining candidate solutions containing candidate parameter values ​​and candidate clause numbers. The candidate parameter values ​​are the suggested parameter values ​​for the solution, and the candidate clause numbers are the standard clause numbers supporting those values. These are recorded in pairs and written to the candidate solution cache for retrieval during the verification and review stages. The verification agent substitutes the candidate parameter values ​​into the physical formula to perform inverse calculation verification, obtaining the inverse value. It then compares the difference between the inverse value and the value corresponding to the target parameter to obtain the verification result. The inverse value is the result calculated forward using the physical formula. The absolute value of the difference between the two is calculated and recorded in the verification result. Simultaneously, the corresponding candidate parameter position is recorded as the basis for locating the challenge signal. The verification result is written to the verification result cache and updated in each iteration. The safety review agent takes the operating conditions as boundary values, which are preset upper and lower limits corresponding to the operating conditions. Under the boundary value conditions, the candidate parameter values ​​are substituted into the physical formula again to perform back-calculation verification, and the review result is obtained. The boundary values ​​are the upper and lower endpoints of the range specified in the standard, such as the highest value for temperature, pressure, and load. The review result records the back-calculated value under each boundary value condition and writes it to the review result cache. The verification result and the review result are used as input to the debate-style graph neural network in S6. The verification result and the review result carry the numerical difference, the judgment state, and the position of the candidate parameter, respectively. Before input, the format is verified, and after passing the format verification, it is written to the graph neural network input interface.

[0047] This embodiment adds two verification steps after generating candidate solutions: back-calculation verification and boundary value stress testing. The verification agent verifies the values ​​using physical formulas, and the safety review agent checks the stability using boundary conditions. The results of the two steps enter the debate-style graph neural network to participate in subsequent convergence. The candidate solution undergoes a complete numerical verification process before output. At the same time, clarification is triggered only when the semantic confidence is lower than the preset ambiguity threshold. When the problem is clearly stated, the process directly enters the solution correction, avoiding unnecessary follow-up rounds. The results obtained by engineers are verified through repeatable calculations, and the omissions caused by relying on manual verification are reduced accordingly.

[0048] In one possible implementation, the requirement clarification agent, solution design agent, verification agent, and security review agent are all built using the same agent framework. Each agent includes an input interface, role prompts, an inference module, a state cache, and an output interface. The input interface is used to receive structured messages, the role prompts are used to define the agent's responsibilities and output format, the inference module is instantiated by a large language model in conjunction with the role prompts, the state cache is used to store the message history of the current round, and the output interface is used to send structured messages. The message format includes message type, sender, receiver, payload, and parameter position. The parameter position is used to locate the questioned or corrected content to a specific field in the candidate solution. The input to the requirement clarification agent is the natural language engineering question, semantic confidence, and slots to be clarified; the output is the clarification question. The input to the solution design agent is the question-and-answer context, the clarification question, and the initial answer; the output is a candidate solution containing candidate parameter values ​​and candidate clause numbers. The input to the verification agent is the candidate solution and the physical formula; the output is the verification result containing the inverse calculation value, the difference, and the pass or fail status. The input to the security review agent is the candidate solution and the set of boundary conditions; the output is the review result containing the inverse calculation value under each combination of boundary conditions. The outputs of the four agents are uniformly structured messages. The processor schedules the process in the order of requirement clarification, solution design, verification, and security review during the process startup phase. Requirement clarification is only triggered when the semantic confidence is lower than the preset ambiguity threshold. During the iteration phase, the process is repeatedly scheduled in the order of solution design, verification, and security review. If the output of any agent is empty or fails the format verification, the result of that round will not enter the debate-style graph neural network.

[0049] This embodiment configures four intelligent agents with a unified framework and structured message format. Their responsibilities are fixed by role prompts, and their outputs carry parameter location information, enabling clarification, design, verification, and review to form a schedulable pipeline. Any abnormal output at any stage can be intercepted. The correspondence between messages and parameter locations allows for precise targeting of questions and corrections. Engineers can trace back the basis for each round of modifications according to the message records.

[0050] In one embodiment, in S6, the candidate solution, verification result, and review result are mapped to candidate solution nodes, verification nodes, and review nodes of the debate-style graph neural network, respectively. The questioning signal is mapped to the first directed edge pointing from the verification node and the review node to the candidate solution node. The correction signal is mapped to the second directed edge pointing from the candidate solution node to the solution design agent. The debate-style graph neural network uses nodes to represent data objects and directed edges to represent transmission relationships. The candidate solution node carries parameters and clause numbers, and the verification node and review node carry verification results and review results, respectively. The mapping relationship is recorded in the graph structure configuration table. The candidate solution node is vectorized into text before mapping, and its dimension is consistent with the state vector. The directions of the two directed edges form a loop of information. The debate-based graph neural network performs feature aggregation on candidate solution nodes through a graph attention layer. Feature aggregation calculates attention weights based on the directions of the first and second directed edges, and then sums the node features of the verification and review nodes according to the attention weights to obtain updated candidate solution node features. The attention weights measure the degree of influence of the verification and review results on the candidate solution; features with larger weights contribute more. The aggregation process does not call a large language model, but only performs numerical calculations. The directional encoding is generated during the node mapping stage and remains unchanged. After each round of feature aggregation, the solution design agent updates the candidate solutions based on the correction signal and re-executes the back-calculation verification and stress test. The updated candidate solutions re-enter the verification and review stage, generating a new round of verification and review results. The number of iterations is accumulated by a counter and participates in the convergence determination. When the verification and review results meet the preset reliability conditions, feature aggregation stops, the candidate solutions are associated with the standard provisions, and the associated and mapped candidate solutions are output. The preset reliability conditions are that both the verification and review results reach the pass state or the number of iterations reaches the preset iteration limit. For example, iteration stops when both the verification and review results are in the pass state. The association mapping maps the parameters in the candidate solutions to the specific standard provision numbers, and the output is presented in the form of a comparison between the number and the content of the provision. After stopping, the graph structure configuration table is cleared and the final candidate solutions are retained.

[0051] In existing technologies, multiple rounds of modifications in engineering question-and-answer systems are typically determined by a single model, lacking external verification results and a clear standard for when modifications should end, potentially leading to repeated modifications without convergence. This embodiment organizes candidate solutions, verification results, and review results into graph nodes, with directed edges formed by questioning and correction signals. A graph attention layer calculates weights by direction and aggregates features. After each round of modification, back-calculation verification and stress testing are re-executed. Convergence is categorized by both verification and review results reaching a pass state or by reaching a preset iteration limit. The modification direction always points to the failed position, and the modification process terminates under determinable conditions. Simultaneously, the association mapping is completed in one go during the output stage. The correspondence between the clause numbers in the candidate solutions and the standard clause numbers is recorded in a table, allowing subsequent queries and reviews to proceed along this table, enabling engineers to directly trace the basis for their answers.

[0052] In one possible implementation, the graph structure of the debate-based graph neural network is a directed graph G. The node set V contains candidate solution nodes, verification nodes, and review nodes. The directed edge set E contains first directed edges from verification and review nodes to candidate solution nodes, and second directed edges from candidate solution nodes to the solution design agent. Node features are initialized using the text vector corresponding to the candidate solution, the state vector corresponding to the verification result, and the state vector corresponding to the review result. The graph attention layer performs multi-head attention aggregation on the node features, with each attention head first calculating its attention coefficient. , where e ij Let be the attention coefficient of node j to node i, LeakyReLU be the activation function, a be the attention vector, W be the learnable weight matrix, and h be the number of nodes. i with h j The features of node i and node j are respectively, and the attention weights are obtained by softmax normalization. , where α ij The attention weights are normalized, and finally, the features of neighboring nodes are weighted and summed according to the attention weights, and then passed through an activation function to obtain the updated node features. , where h i ' represents the updated feature of node i, σ is the activation function, and the results of each attention head are weighted and averaged to serve as the output of the graph attention layer. During feature aggregation, the large language model is not invoked; only vector inner product, weighted summation, and activation function operations are performed. After each round of feature aggregation, updated candidate solution node features are output. The processor generates a correction signal based on these features and triggers a new round of inverse calculation verification and stress testing.

[0053] This embodiment models the verification and review information as a graph structure, calculates the attention coefficient with learnable parameters and normalizes it using softmax, so that the pass and fail states participate in the candidate solution update according to the attention weights. The aggregation process is a reproducible numerical operation that does not rely on the random generation of a large language model. The attention weights and aggregation results of each round can be recorded, the fusion basis is clear, and engineers can trace the degree of influence of each verification information on the candidate solution along the weights.

[0054] In one embodiment, in S2, each standard provision in the standard provision library is divided into provision units according to the provision number. Each provision unit is encoded as a provision semantic vector, and all provision semantic vectors are used to construct a semantic vector index. A provision unit is a complete text block bounded by the provision number, maintaining the integrity of the number, content, and validity status. The semantic vector index adopts an approximate nearest neighbor retrieval structure and is updated when the content of the standard provision library changes. New provision units are encoded and appended to the index following the same process. The search query text is encoded as a query semantic vector, and the cosine similarity between the query semantic vector and each provision semantic vector is calculated. After sorting by cosine similarity in descending order, the top K provision units are selected as the initial provision set. The search query text is obtained by concatenating target parameters, operating conditions, and implicit safety constraints. The cosine similarity is the cosine value of the angle between the two vectors. Here, A is the query semantic vector, B is the clause semantic vector, and K ranges from 50 to 100, initially selecting clauses that cover semantically similar clause units. When the cosine similarity calculation result is lower than a preset similarity threshold, the corresponding clause unit is removed from the initial selection clause set. The preset similarity threshold ranges from 0.7 to 0.8, and the removal occurs after selecting the first K clause units. The remaining clause units form the set to be rearranged, and rearrangement is only performed on the set to be rearranged. Each clause unit in the initial selection clause set is reordered with the search query text using a cross-encoder. The cross-encoder concatenates the search query text and clause units into an input sequence and outputs a reordering score. The top M clause units are selected as candidate clause sets after being sorted in descending order of reordering scores. The cross-encoder simultaneously observes all characters of the two texts. The reordering score better reflects the fine-grained matching degree. M ranges from 10 to 20. The candidate clause sets are then concatenated in the subsequent question-answering context. K is greater than M, N is equal to M, K and M are preset quantities, where N is the preset upper limit of the number of searches, which limits the total number of entries entering the context. The candidate entry set is filtered through two levels of vector coarse screening and cross-sorting, and the number of entries entering the context is controlled within N, so that the search accuracy and cost are balanced.

[0055] This embodiment adds a cross-encoder reordering after vector coarse screening. Coarse screening ensures recall range, while reordering ensures ranking accuracy. Low-relevance entries are removed with a preset similarity threshold, so that the candidate entry set covers relevant entries and excludes interfering content. The number of entries entering the context is kept within a preset range. At the same time, the two-level screening order is fixed, with coarse screening first and then reordering. The affiliation of each entry unit at each stage can be recorded, making the retrieval process easy to reproduce and verify. The retrieval computation does not increase linearly with the database capacity, and the speed and relevance of obtaining the context for engineers are improved.

[0056] In one embodiment, in S5, the physical formula includes input variables and output variables. Input variables are known quantities substituted into the formula, such as cross-sectional dimensions and material strength. Output variables are target quantities calculated by the formula, such as bearing capacity. The input and output variables are explicitly recorded during the physical formula library extraction stage. Before substitution, the variable units are checked. The input-output correspondence is indexed by the formula number, and the variable table is retrieved based on the formula number before substitution. Back-calculation verification involves substituting candidate parameter values ​​into the physical formula to calculate back-calculated values. The back-calculated values ​​are then compared with the values ​​corresponding to the target parameters and the limits recorded in the specification clauses. The corresponding deviation rates are calculated. The deviation rate compared with the value corresponding to the target parameter is the ratio of the absolute value of the difference to the value corresponding to the target parameter. The deviation rate compared with the limit is the ratio of the absolute value of the difference to the limit. , Where δ1 is the deviation rate compared to the target parameter value, δ2 is the deviation rate compared to the limit value, R is the calculated value, T is the target parameter value, and L is the limit value. The smaller the deviation rate, the smaller the deviation between the calculated value and the corresponding benchmark value. Intermediate values ​​are retained at each step of the calculation process. Difference comparisons are recorded separately for the difference between the calculated value and the target parameter value, and the difference between the calculated value and the limit value. These two types of differences are stored independently. When all deviation rates are less than or equal to the upper limit of the allowable deviation corresponding to the redundancy coefficient, the verification result is in a "pass" state. The redundancy coefficient ranges from 1.1 to 1.2, and the upper limit of the allowable deviation is calculated from the redundancy coefficient. Where ε is the upper limit of allowable deviation and γ is the redundancy coefficient, used to accommodate calculation errors and parameter dispersion. When the state is written into the verification result, the values ​​of the redundancy coefficient and the upper limit of allowable deviation are also written for review and comparison. When any deviation rate exceeds the upper limit of allowable deviation, the verification result is in a failure state, and the failure state is used as the basis for generating a challenge signal in the debate-style graph neural network. The failure state and the corresponding candidate parameter position are recorded together, and the challenge signal points to the parameter that needs to be modified accordingly. After the failure state is written, it is appended to the challenge signal generation queue. The stress test involves taking the temperature, pressure, and load values ​​in the working conditions at preset upper and lower limits, respectively, to form a set of boundary working conditions. Back-calculation verification is repeatedly performed under each boundary working condition combination in the set. If any deviation rate under any boundary working condition combination exceeds the upper limit of the allowable deviation, the review result is in a failed state. If all deviation rates under all boundary working condition combinations are less than or equal to the upper limit of the allowable deviation, the review result is in a passed state. The set of boundary working conditions consists of extreme working conditions obtained by arranging and combining the upper and lower limits of each working condition, such as a combination of the highest temperature, highest pressure, and highest load. The deviation rate is calculated independently for each boundary working condition combination. The review result reflects the stability of the candidate solution across the entire range of working condition variations. The verification result and the review result are written together into the input buffer of the debate-style graph neural network and updated at the beginning of each iteration.

[0057] This embodiment directly compares the deviation rate with the upper limit of the allowable deviation corresponding to the redundancy coefficient, and determines whether it passes or fails based on the numerical boundary. Then, it constructs a set of boundary conditions by combining the upper and lower limits of temperature, pressure and load, and reviews the performance of candidate solutions under extreme conditions item by item. At the same time, the deviation rate is compared with the value corresponding to the target parameter and the limit value recorded in the specification clause. The dual-caliber comparison can expose two types of problems: calculation errors and specification deviations. The verification process is based on repeatable numerical calculations, and the judgment criteria are clear. Engineers can review each step of substitution and comparison themselves, thereby eliminating candidate solutions that are not valid under boundary conditions before outputting the answer.

[0058] In one embodiment, in S6, the candidate solution node, verification node, and review node use the text vector corresponding to the candidate solution, the state vector corresponding to the verification result, and the state vector corresponding to the review result as node features, respectively. The text vector is encoded by the parameters and clause numbers in the candidate solution, and the state vector is encoded by the pass or fail status. The three node features have the same dimension and participate in aggregation in the same vector space. The features are re-encoded at the beginning of each iteration, and the encoding result covers the features of the previous round, ensuring that the aggregation uses the latest data. The graph attention layer contains a preset number of attention heads. Each attention head calculates the attention weight based on the direction of the first directed edge and the second directed edge. The attention weights obtained by each attention head are weighted and averaged to obtain the aggregation weight. Where w is the aggregation weight, H is the number of attention heads, and α h The attention weight is obtained from the h-th attention head. The number of attention heads ranges from 4 to 8. The first directed edge carries a questioning signal, and the second directed edge carries a correction signal. The direction is used to distinguish the information flow. The attention weight is normalized within the attention head. The weighted average integrates the different characterizations of the same node relationship from multiple attention heads. The aggregate weight is the coefficient of the weighted summation. The calculation depends only on the direction of the directed edge and the node features. Multi-head computation is performed in parallel, and the results are independent of each other before weighted averaging. The node features of the verification node and the review node are weighted and summed according to the aggregate weight to obtain the updated candidate solution node features. The correction signal is generated according to the updated candidate solution node features and sent to the solution design agent along the second directed edge. Where x′ represents the updated candidate solution node features, w i Let x be the aggregate weight of the i-th term. i To verify or review node features, the weighted summation process obtains positive contributions from features corresponding to the state and negative contributions from features corresponding to the failure state. The contribution direction is determined by the state vector. The correction signal contains the position and direction of the parameters to be modified. Sending the action triggers a new round of candidate solution updates. The correction signal is written to the correction signal queue and processed sequentially according to the queue order. The states of both the verification and review results include pass and failure states. The pass and failure states are written by the judgment results of the inverse verification and stress test. After the states are written, they participate in the judgment of the preset reliability conditions. The preset reliability conditions are that the state of the verification result is pass and the state of the review result is pass, or the number of iteration rounds reaches the preset iteration limit. The preset iteration limit is between 5 and 10 rounds. The two satisfaction methods correspond to normal convergence and limited-round termination, respectively. When the limit is exceeded, feature aggregation is forcibly stopped. When the verification and review results meet the preset reliability conditions, feature aggregation stops. The number of iteration rounds is recorded by a counter. After stopping, the candidate solution corresponding to the current candidate solution node is extracted as the output object. Establish a one-to-one correspondence between the candidate clause numbers in the candidate solutions and the clause numbers in the standard clauses, and use the one-to-one correspondence as an association mapping. Output the candidate solutions after the association mapping. The one-to-one correspondence records the clause number on which each parameter is based in the form of a mapping table. When outputting, the parameters and clause numbers are presented in pairs. The association mapping table is stored in the processor's storage area for reuse in subsequent follow-up questions on the same problem.

[0059] This embodiment organizes the verification and review information into a graph structure, calculates weights in parallel with multiple attention heads, and aggregates features after weighted averaging. This allows the pass and fail states to participate in the candidate solution update according to their weights. At the same time, a preset iteration limit constrains the number of iterations, so that the process can end within a limited number of rounds even if it does not converge. In the output stage, the candidate clause number is matched one-to-one with the standard clause number, so that engineers can obtain answers with clear basis and verifiability. The results of each round of multiple iterations can be recorded and traced back, and the computational cost of the convergence process is also controlled within a preset range.

[0060] In one possible implementation, the training of the debate-style graph neural network employs supervised learning. The training samples are constructed from historical engineering consultation records reviewed by humans. Each sample contains a natural language engineering question, candidate solutions, verification results, review results, and the final candidate solution confirmed by humans. The candidate solution node features corresponding to the final candidate solution are used as supervision labels, and the state vectors corresponding to the verification results and review results are used as inputs to the graph attention layer. The mean squared error between the predicted features of the candidate solution nodes and the supervision labels is used as the loss function. The Adam optimizer is used to update the learnable parameters of the graph attention layer, with a learning rate of 0.00005 to 0.0001 and a batch size of 16 to 32. During training, the parameters of the large language model are frozen, and only the graph attention layer parameters, such as the attention vector and weight matrix, are updated. Training stops when the validation set loss does not decrease for several consecutive rounds. After training, the graph attention layer parameters are used for feature aggregation during inference. During inference, the parameters are no longer updated, and only forward computation is performed.

[0061] Although the embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the spirit and scope of the present invention, the present invention is not limited to the specific details and embodiments shown and described herein.

Claims

1. An intelligent question-answering method for engineering and technical consultation based on a large language model, characterized in that, include: S1: Obtain the natural language engineering problem and deconstruct it into engineering objects, target parameters, operating conditions, and implicit safety constraints; S2: Match the subdomains of the engineering objects in the engineering knowledge graph to obtain the subdomain identifiers, and perform semantic vector retrieval of the specification clauses library based on the target parameters and working conditions; S3: Based on the subdomain identifier and semantic vector retrieval results, read the specification clauses, physical formulas and historical cases, and concatenate them into a question-and-answer context; S4: Input the natural language engineering question, question-answering context, and implicit security constraints into the large language model to generate an initial answer; S5: The requirement clarification agent performs ambiguity recognition on the natural language engineering problem and outputs the clarification question. The solution design agent corrects the initial answer based on the clarification question to obtain candidate solutions. The verification agent verifies the candidate solutions by back-calculating based on the physical formula. The security review agent performs stress testing on the candidate solutions based on the redundancy coefficient. S6: Input the candidate solution into the debate-style graph neural network, update the candidate solution based on the questioning signal and correction signal generated by the debate-style graph neural network, repeat the back calculation verification and stress test until the verification result of the back calculation verification and the review result of the stress test meet the preset reliability conditions, and output the candidate solution after associating and mapping it with the standard clause.

2. The intelligent question-answering method for engineering and technical consultation based on a large language model according to claim 1, characterized in that, In S1, a lightweight semantic parser is used to perform slot filling and dependency analysis on the natural language engineering problem, deconstructing the natural language engineering problem into engineering objects, target parameters, operating conditions, and implicit safety constraints; and performs normalized matching between the engineering objects and entity names in the engineering knowledge graph to obtain standardized entity identifiers. The system performs numerical, unit, and parameter name separation and extraction on the target parameters; classifies and extracts environmental, temporal, and boundary quantities for the operating conditions; performs rule matching between the mandatory provisions in the standard provisions library corresponding to the professional field to which the engineering object belongs and the target parameters and operating conditions, and identifies the constraint items in the mandatory provisions that match the target parameters and operating conditions as implicit safety constraints; and concatenates the engineering object, target parameters, operating conditions, and implicit safety constraints into a structured query tuple, which is then used as input for engineering knowledge graph matching and semantic vector retrieval.

3. The intelligent question-answering method for engineering and technical consultation based on a large language model according to claim 1, characterized in that, In S2, entity links are performed between the engineering object and entity nodes in the engineering knowledge graph. When multiple candidate entity nodes are obtained from the entity link, the candidate entity node with the highest name similarity to the engineering object is selected as the entity node. Starting from the entity node, multi-hop path expansion is performed along the relation edges in the engineering knowledge graph. The number of hops in the multi-hop path expansion does not exceed the preset hop limit. The classification label of the path endpoint node is used as the subdomain identifier. The target parameters, working conditions, and implicit safety constraints are concatenated into the retrieval query text. Semantic vector encoding is performed on the retrieval query text. Similarity calculation is performed in the semantic vector index corresponding to the specification clause library. After sorting by similarity in descending order, the top N specification clauses are extracted and used as the candidate clause set. N is the preset upper limit of the number of searches. Subdomain identifiers and candidate clause sets are used together as the basis for reading specification clauses, physical formulas, and historical cases.

4. The intelligent question-answering method for engineering and technical consultation based on a large language model according to claim 1, characterized in that, In S3, the standard provisions corresponding to the semantic vector retrieval results are read from the standard provision library, the physical formulas corresponding to the subdomain identifiers are read from the physical formula library, and the historical cases corresponding to the target parameters and operating conditions are read from the historical case library. For each standard provision, the provision number, clause content, and validity status are segmented. For each physical formula, the formula number, variable symbol, variable unit, and scope of application are extracted. For each historical case, the case identifier, operating condition label, and conclusion value are labeled. The segmented normative clauses, extracted physical formulas, and labeled historical cases are combined into a question-and-answer context according to a preset context template. The preset context template sequentially sets the standard clause section, the physical formula section, and the historical case section; The question-and-answer context is truncated so that the total number of characters in the context does not exceed the preset context length limit, and the truncated context is used as the input to the large language model.

5. The intelligent question-answering method for engineering and technical consultation based on a large language model according to claim 1, characterized in that, In S4, the natural language engineering question, question-and-answer context, and implicit security constraints are concatenated into a generated prompt text according to a preset prompt word template; The preset prompt word template places the question-and-answer context in the first section of the generated prompt text and the implicit safety constraints in the second section of the generated prompt text, and expresses the implicit safety constraints in a prohibitive instruction sentence format; the generated prompt text is input into the large language model, the temperature parameter of the large language model is set to a preset temperature value, and the maximum generation length of the large language model is set to a preset length upper limit; When the target parameter value is not included in the natural language engineering problem, the generated prompt text includes a missing parameter marker. The large language model generates an initial answer based on the generated prompt text. The position corresponding to the missing parameter marker in the initial answer is filled with a preset placeholder. The initial answer includes the target parameter value, the target parameter unit, and the reference article number. The reference article number is the article number of the standard article carried when citing the standard article in the initial answer.

6. The intelligent question-answering method for engineering and technical consultation based on a large language model according to claim 1, characterized in that, In S5, the requirement clarification agent performs ambiguity recognition on the natural language engineering problem and calculates the semantic confidence of the target parameters and operating conditions in the natural language engineering problem. When the semantic confidence is lower than the preset ambiguity threshold, the requirement clarification agent generates a clarification question and sends the clarification question to the solution design agent. The solution design agent modifies the initial answer based on the question-and-answer context and the clarification question, and obtains candidate solutions containing candidate parameter values ​​and candidate clause numbers; The verification agent substitutes the candidate parameter values ​​into the physical formula to perform back-calculation verification, calculates the back-calculated values, compares the difference between the back-calculated values ​​and the values ​​corresponding to the target parameters, and obtains the verification results. The security review agent takes the operating conditions as boundary values. The boundary values ​​are the preset upper limit and preset lower limit values ​​corresponding to the operating conditions. Under the boundary value conditions, the candidate parameter values ​​are substituted into the physical formula again to perform back-calculation and verification to obtain the review results. The verification results and review results are used as inputs to the argumentative graph neural network.

7. The intelligent question-answering method for engineering and technical consultation based on a large language model according to claim 1, characterized in that, In S6, candidate solutions, verification results, and review results are mapped to candidate solution nodes, verification nodes, and review nodes of the debate-style graph neural network, respectively. The questioning signal is mapped to the first directed edge pointing from the verification node and the review node to the candidate solution node, and the correction signal is mapped to the second directed edge pointing from the candidate solution node to the solution design agent. The candidate solution node is vectorized into text before mapping, with the dimension consistent with the state vector. The directions of the two directed edges form a loop of information. The debate-style graph neural network performs feature aggregation on the candidate solution nodes through the graph attention layer. The feature aggregation calculates the attention weights based on the directions of the first and second directed edges. The direction encoding is generated and remains unchanged during the node mapping stage. The node features of the verification node and the review node are weighted and summed according to the attention weights to obtain the updated candidate solution node features. After each round of feature aggregation is completed, the scheme design agent updates the candidate schemes based on the correction signal and re-executes the inverse calculation verification and stress test. The updated candidate schemes re-enter the verification and review stage, generating a new round of verification and review results. The number of iteration rounds is accumulated by a counter and participates in the convergence determination. When the verification results and review results meet the preset reliability conditions, feature aggregation is stopped, the candidate solutions are associated with the standard provisions, and the associated candidate solutions are output.

8. The intelligent question-answering method for engineering and technical consultation based on a large language model according to claim 3, characterized in that, In S2, each standard provision in the standard provision library is divided into provision units according to the provision number. Each provision unit is encoded as a provision semantic vector, and all provision semantic vectors are used to construct a semantic vector index. The search query text is encoded as a query semantic vector, and the cosine similarity between the query semantic vector and each provision semantic vector is calculated. The top K provision units are selected as the initial provision set after being sorted in descending order of cosine similarity. When the cosine similarity calculation result is lower than a preset similarity threshold, the corresponding provision unit is removed from the initial provision set. Each provision unit in the initial provision set is reordered with the search query text using a cross-encoder. The cross-encoder concatenates the search query text and the provision unit into an input sequence and outputs a reordering score. The top M provision units are selected as the candidate provision set after being sorted in descending order of the reordering score. K is greater than M, N is equal to M, and K and M are preset quantities.

9. The intelligent question-answering method for engineering and technical consultation based on a large language model according to claim 6, characterized in that, In S5, the back calculation verification involves substituting the candidate parameter values ​​into the physical formula to calculate the back calculation values, and then comparing the back calculation values ​​with the values ​​corresponding to the target parameters and the limits recorded in the specification clauses to calculate the corresponding deviation rates. When all deviation rates are less than or equal to the upper limit of the allowable deviation corresponding to the redundancy coefficient, the verification result is in the pass state; when any deviation rate is greater than the upper limit of the allowable deviation, the verification result is in the failure state, and the failure state is used as the basis for the debate-style graph neural network to generate the questioning signal. The stress test involves taking the temperature, pressure, and load values ​​in the working conditions and setting them to preset upper and lower limits, respectively, to obtain a set of boundary working conditions. The back-calculation verification is repeatedly performed under each boundary working condition combination in the set of boundary working conditions. When any deviation rate under any boundary working condition combination is greater than the upper limit of the allowable deviation, the review result is in a failed state. When all deviation rates under all boundary working condition combinations are less than or equal to the upper limit of the allowable deviation, the review result is in a passed state.

10. The intelligent question-answering method for engineering and technical consultation based on a large language model according to claim 7, characterized in that, In S6, candidate solution nodes, verification nodes, and review nodes use the text vector corresponding to the candidate solution, the state vector corresponding to the verification result, and the state vector corresponding to the review result as node features, respectively. The three node feature dimensions are consistent and participate in aggregation in the same vector space. The graph attention layer contains a preset number of attention heads, with the number of attention heads ranging from 4 to 8. Each attention head calculates the attention weight based on the direction of the first directed edge and the second directed edge. The attention weights obtained by each attention head are weighted and averaged to obtain the aggregation weight. The node features of the verification node and the review node are weighted and summed according to the aggregation weight to obtain the updated candidate solution node features. A correction signal is generated based on the updated candidate solution node features and sent to the solution design agent along the second directed edge. The status of the verification result and the status of the review result both include a pass status and a failure status. The preset reliability conditions are that the status of the verification result is "passed" and the status of the review result is "passed", or the number of iteration rounds reaches the preset iteration limit, which is 5 to 10 rounds. When the verification results and review results meet the preset reliability conditions, feature aggregation is stopped. After stopping, the candidate scheme corresponding to the current candidate scheme node is extracted as the output object. A one-to-one correspondence is established between the candidate clause number in the candidate scheme and the clause number of the standard clause. The one-to-one correspondence is recorded in the form of a mapping table, which records the clause number on which each parameter is based. The one-to-one correspondence is used as an association mapping, and the candidate scheme after association mapping is output.

Citation Information

Patent Citations

  • Railway engineering consultation system and consultation method based on BIM and large model

    CN118536950A

  • Analysis method and system fusing large model and knowledge graph technology

    CN119150972A