An AI large model-based engineering project data query method, device and medium
By employing an AI-based large-scale model-based method for querying engineering project data, the problems of irrelevant data and fragmentation in search results were solved. Through semantic relevance and business matching calculations, efficient and professional query reports were generated, improving the accuracy and completeness of data queries.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN PUSITAI TECH DEV CO LTD
- Filing Date
- 2026-04-09
- Publication Date
- 2026-07-10
AI Technical Summary
Existing engineering project data query methods contain a large amount of irrelevant and outdated historical data in the search results, and the query results are fragmented. They cannot effectively combine metadata for accurate filtering and reordering, and ignore the deep logical relationships between engineering entities.
The method employs an AI-based big data model to receive natural language query requests, parse the query intent object and vector, collect multi-source heterogeneous data and segment it into data fragments, attach metadata, and use the AI big data model to map the data fragments into semantic vectors to form an engineering project database. By calculating semantic relevance and business matching degree, the top K data fragments are selected and linked with the engineering project knowledge graph to generate a query report.
This approach ensures the relevance of candidate data to business operations while retaining semantically relevant data shards with incomplete metadata. This improves query recall and ranking accuracy, generates structured query reports, and enhances the professionalism and decision-making reference value of the reports.
Smart Images

Figure CN122364274A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data query technology, and in particular to a method, device and medium for querying engineering project data based on an AI large model. Background Technology
[0002] With the widespread application of Building Information Modeling (BIM), the Internet of Things (IoT), and digital construction management, the amount of data generated throughout the entire lifecycle of engineering projects is growing exponentially. The data format has also evolved from the previous structured database records to a multi-source heterogeneous data system that includes design drawings, construction logs, progress reports, contract texts, and on-site images. In the past, engineering project data queries mainly relied on relational database retrieval technology based on keyword matching. In recent years, semantic analysis technology has begun to be introduced, attempting to improve retrieval results by understanding user query intent. In particular, the rise of the Transformer architecture has provided a new technical path and development direction for handling complex natural language queries.
[0003] Nevertheless, existing data query methods still have room for improvement. First, simple keyword matching or basic semantic retrieval ignores the constraints of "business rules" in engineering management and cannot combine metadata for accurate filtering and reordering, resulting in a large amount of irrelevant and outdated historical data in the search results. Second, structured data and unstructured data are usually processed separately, or only the text is simply vectorized, ignoring the deep logical relationships between engineering entities, resulting in fragmented query results. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a method for querying engineering project data based on a large AI model to solve the problems of the search results containing a large amount of irrelevant historical outdated data and the fragmentation of search results.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] Firstly, this invention provides a method for querying engineering project data based on an AI large-scale model, which includes:
[0008] Receive users' natural language query requests and parse them using a large AI model to obtain the query intent object and query intent vector;
[0009] Collect multi-source heterogeneous data of engineering projects provided by users, divide it into data shards, attach corresponding metadata to each data shard, use an AI big model to map the data shards into semantic vectors, and associate and store the data shards, metadata and semantic vectors to form an engineering project database.
[0010] Metadata filtering is performed on the engineering project database to form candidate datasets. For the semantic vectors of each data fragment in the candidate datasets, semantic relevance is calculated with the query intent vector to obtain semantic relevance scores.
[0011] The metadata of each data shard in the candidate dataset is used to calculate the business matching degree with the query intent object to obtain the business matching degree score. After fusing the semantic relevance score and the business matching degree score, the candidate dataset is re-ranked and the top K data shards are selected.
[0012] Extract engineering entities from K data shards, link them with nodes in the engineering project knowledge graph, and extract subgraphs associated with the query intent object.
[0013] After the K data pieces are joined and aggregated according to the subgraph, they are expanded according to the result organization rules to generate a query report.
[0014] As a preferred embodiment of the engineering project data query method based on AI big model described in this invention, the step of obtaining the query intent object and the corresponding query intent vector refers to calling the AI big model to perform deep semantic understanding and structured parsing on the natural language query request, identifying and extracting the query intent object, while the AI big model extracts the query intent vector through pooling.
[0015] As a preferred embodiment of the AI-based large-scale model-based engineering project data query method of the present invention, the step of associating and storing data fragments, metadata, and semantic vectors to form an engineering project database specifically includes:
[0016] Multi-source heterogeneous data is segmented based on data type and semantic boundaries to generate data fragments with independent semantics, and corresponding metadata is attached to each data fragment;
[0017] The AI large model is used to extract and encode features for each data slice to obtain semantic vectors;
[0018] In the storage medium, a storage record is created for each data shard. In the storage record, an index and association relationship are established between the data shards, metadata, and corresponding semantic vectors to form the project database.
[0019] As a preferred embodiment of the AI-based large-scale model-based engineering project data query method of the present invention, the step of filtering the engineering project database using metadata to form a candidate dataset specifically involves:
[0020] Parse the content of the query intent object and extract key constraints;
[0021] Traverse each storage record in the project database, read the metadata of the data shards attached to the storage record, match and compare the fields in the metadata with the key constraints one by one, and obtain the storage records that meet the filtering conditions.
[0022] For storage records that meet the filtering criteria, the corresponding data shards are identified as candidate data shards, and all candidate data shards are aggregated to form a candidate dataset.
[0023] As a preferred embodiment of the AI-based large-scale model-based engineering project data query method of the present invention, the step of obtaining the semantic relevance score specifically includes:
[0024] Read each data slice in the candidate dataset and extract the corresponding semantic vector;
[0025] The semantic relevance score between the semantic vector and the query intent vector is calculated using the cosine similarity formula.
[0026] As a preferred embodiment of the AI-based large-scale model-based engineering project data query method of the present invention, the selection of the first K data shards specifically involves:
[0027] Identify explicitly specified business elements within the query intent object;
[0028] Read the metadata attached to each data shard in the candidate dataset, calculate the entity matching score, time matching score and status matching score based on the metadata, and then perform a weighted sum to obtain the business matching score.
[0029] For each data slice in the candidate dataset, the corresponding semantic relevance score and business matching score are weighted and summed to generate a comprehensive relevance score;
[0030] The data segments in the candidate dataset are sorted in descending order of their comprehensive relevance scores, and the top K data segments are selected.
[0031] As a preferred embodiment of the AI-based large-scale model-based engineering project data query method of the present invention, the extraction of the sub-graph associated with the query intent object specifically includes:
[0032] The engineering entities in the K data shards are compared and linked with the nodes in the engineering project knowledge graph. When an engineering entity is successfully matched with a node in the engineering project knowledge graph, a link relationship between the engineering entity and the node is established.
[0033] Starting from all successfully linked nodes, the topology of the project knowledge graph is traversed. The traversal process expands along the relationship edges between nodes until the preset hop depth is met.
[0034] The nodes and edges visited during the traversal together form a subgraph associated with the query intent object.
[0035] As a preferred embodiment of the AI-based large-scale model-based engineering project data query method of the present invention, the generation of the query report specifically includes:
[0036] Based on the logical relationships revealed by the subgraphs, construct a set of related evidence;
[0037] Based on the intent category identified in the query intent object, the corresponding result organization rule is selected from the predefined result organization rule library;
[0038] After mapping and filling the evidence items and evidence groups in the associated evidence set according to the chapter framework and indicator items defined by the result organization rules, they are transformed into charts to obtain the query report.
[0039] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the engineering project data query method based on AI large model as described in the first aspect of the present invention.
[0040] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the engineering project data query method based on an AI large model as described in the first aspect of the present invention.
[0041] The beneficial effects of this invention are as follows: By adopting a candidate recall based on entity constraints and a joint re-ranking mechanism based on semantic relevance and business matching, the business relevance of candidate data is guaranteed while retaining data fragments with incomplete metadata but semantic relevance. This balances query recall rate and ranking accuracy, improving the relevance of report content. By utilizing the topological logic of knowledge graphs, fragmented data is automatically aggregated into sets of related evidence such as causal chains and temporal chains, and a structured query report is automatically generated according to a preset template. This not only significantly shortens the time for manual writing, formatting, and verification, but also enhances the professionalism and decision-making reference value of the report through the presentation of visualized logical relationships. Attached Figure Description
[0042] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1This is a flowchart of a method for querying engineering project data based on an AI-powered large-scale model.
[0044] Figure 2 A flowchart for obtaining the query intent object and query intent vector.
[0045] Figure 3 This is a flowchart for selecting the first K data slices.
[0046] Figure 4 A flowchart for obtaining candidate datasets. Detailed Implementation
[0047] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0048] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0049] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0050] Reference Figures 1-4 This is one embodiment of the present invention, which provides a method for querying engineering project data based on an AI large model, including the following steps:
[0051] S1. Receive the user's natural language query request and parse it using an AI big data model to obtain the query intent object and query intent vector.
[0052] S1.1 It should be noted that the system receives natural language query requests from users regarding engineering project management. These requests consist of raw strings, such as "Please analyze the main reasons for the delayed concrete construction progress in section A last month." The system performs word segmentation on the raw strings. Specifically, based on a predefined word segmentation dictionary, it performs a maximum forward matching scan. The maximum forward matching scan starts from the beginning of the raw string and attempts to match the longest term in the dictionary at each position. If a term is matched at the current position, it is segmented as an independent word unit. All word units are then arranged sequentially to obtain a sequence of word units.
[0053] S1.2 It should be noted that a hybrid training set is constructed. Specifically, the hybrid training set consists of two parts: the first part is unlabeled general text corpus collected through the Internet, which is used to endow the AI large model with basic language capabilities; the second part is historical natural language query requests and corresponding actual intent objects, which are used to teach the AI large model to complete specific engineering project query parsing tasks.
[0054] The large AI model adopts a Transformer architecture, which includes an input embedding layer and multiple Transformer layers. The input embedding layer includes a word embedding matrix and a position embedding matrix. Each Transformer layer includes a multi-head self-attention structure, a residual connection structure, a layer normalization structure, and a feedforward neural network. The feedforward neural network includes two fully connected linear transformation layers and a ReLU activation function located between the two fully connected linear transformation layers.
[0055] At the top of the large AI model, a multi-task output head is pre-defined, comprising two parallel branches: the first branch is a traditional language modeling head, used to perform a self-supervised task of "predicting the next word" on a general text corpus. The second branch is a task-specific head, including a sequence labeling layer (composed of a fully connected linear layer and a conditional random field layer connected sequentially) for generating query intent objects and a pooling projection layer for generating query intent vectors.
[0056] The language modeling head is used during the training phase to perform self-supervised learning based on general text corpora to predict the next word, thereby improving the general semantic modeling capability of large AI models; when actually parsing natural language query requests, the task-specific head output is called.
[0057] During training, data is selected from the mixed training set using an alternating sampling method. In odd-numbered iterations, general text is sampled, input into the AI model, and the language modeling output branch is activated. The cross-entropy loss between the AI model's predicted next word and the actual next word is calculated to obtain the loss value. In even-numbered iterations, "query request-intent object" paired data is sampled, the query requests in the paired data are input into the AI model, and the task-specific output branch is activated for forward computation to obtain the predicted label sequence and the corresponding predicted vector. The structured parsing loss between the predicted label sequence and the actual intent object's corresponding label sequence is calculated as the loss value. For the loss value obtained in each training iteration, the backpropagation algorithm is used to calculate the gradient of the loss value with respect to all learnable parameters in the AI model. Based on the gradient, the stochastic gradient descent optimizer is used to uniformly update the learnable parameters of the AI model. The alternating sampling, loss value calculation, and parameter update process is repeated until the maximum number of iterations is reached. In one implementation, the maximum number of iterations is set to 40 rounds, with general text participating in 20 rounds and "query request-intent object" paired data participating in 20 rounds.
[0058] Furthermore, the predicted label sequence refers to the label sequence formed by arranging the field category labels predicted by the AI large model for each word segmentation unit according to the original order of each word segmentation unit in the natural language query request; the labels in the predicted label sequence are used to identify whether the corresponding word segmentation unit belongs to the project entity, time condition, status attribute or other field category.
[0059] The maximum number of iterations is set to 40 rounds, with general text participating in 20 rounds and "query request - intent object" paired data participating in 20 rounds. This round setting serves as an example training parameter, enabling the large AI model to learn general semantic features and engineering project query parsing features more thoroughly, thereby improving the accuracy of natural language query request parsing while balancing training stability and cost.
[0060] S1.3. It should be noted that the sequence of word segmentation units is input into the first input embedding layer of the trained AI model. The input embedding layer maps each word segmentation unit to a word embedding vector through the word embedding matrix. Simultaneously, the input embedding layer calculates the positional encoding vector for each position in the word segmentation unit sequence using a learnable positional embedding matrix. Each word embedding vector is element-wise added to its corresponding positional encoding vector to form an input vector sequence containing positional information. The first Transformer layer performs multi-head self-attention calculation on the input vector sequence. The calculation process involves linearly projecting the input vector sequence into a query matrix, a key matrix, and a value matrix. The transpose of the query matrix and the key matrix is then multiplied by a dot product. After scaling, the attention weights are calculated using the softmax function and then weighted and summed with the value matrix to obtain the output vector sequence. The output vector sequence is then residually concatenated with the input vector sequence, and layer normalization is performed to obtain a layer-normalized vector sequence. This layer-normalized vector sequence is then input into a feedforward neural network for nonlinear mapping to obtain the output vector sequence of the feedforward neural network. The output vector sequence of the feedforward neural network is residually concatenated with the normalized vector sequence, and normalization is performed again to obtain the output vector sequence of the first Transformer layer. The output vector sequence of the first Transformer layer is used as the input vector sequence of the next Transformer layer, and this process is repeated through all Transformer layers to obtain the final output vector sequence (composed of multiple position vectors arranged in sequence). The AI large model performs specific task head calculations on the final output vector sequence. Specifically, a fully connected linear layer maps the position vectors in the final output vector sequence to logical score vectors. A conditional random field layer receives the logical score vectors corresponding to all positions and, combined with the transition probabilities between adjacent labels, calculates the optimal label sequence. Based on the label content corresponding to each field in the optimal label sequence, the query intent object is determined. The query intent object is a set of key-value pairs containing multiple fields, including intent category, item entity, time condition, and state attribute. For the intent vector generation task, a pooling projection layer performs mean pooling on the final output vector sequence, calculating the arithmetic mean of all position vectors to obtain a pooled vector. A fully connected linear layer performs a linear transformation on the pooled vector to obtain the query intent vector. The query intent vector is used to characterize the overall semantic features of a natural language query request, which can be used for subsequent candidate data filtering, relevance calculation and reordering.
[0061] The specific construction process of the word segmentation dictionary is as follows: A large amount of text data related to the field of engineering project management is collected. The text data sources include design specification documents, construction organization design plans, project progress reports, quality acceptance records, bidding documents, and industry standard manuals. A method based on word frequency statistics and mutual information calculation is used to identify and extract frequently occurring professional terms and fixed phrases from the text. Each term and phrase is assigned a unique entry identifier and organized and stored according to a hash table data structure to obtain the word segmentation dictionary.
[0062] S2. Collect multi-source heterogeneous data of engineering projects provided by users, divide it into data shards, attach corresponding metadata to each data shard, use an AI large model to map the data shards into semantic vectors, and associate and store the data shards, metadata and semantic vectors to form an engineering project database.
[0063] S2.1 It should be noted that multi-source heterogeneous data for engineering projects should be collected from users. The collected multi-source heterogeneous data should be processed according to type. For unstructured text data, such as design specifications and construction logs, it should be segmented based on natural paragraphs, chapter titles, or punctuation marks to ensure that each segment represents a relatively complete semantic unit, generating text data fragments. For unstructured image data, such as design drawings and site photos, it should be segmented based on independent components identified by the drawing frame and labeled areas, generating image data fragments. For structured tabular data, such as schedules and bills of materials, it should be divided by data rows, with each row constituting a tabular data fragment. For text data fragments, the text content is directly read as the fragment representation content, and entity information representing engineering components, materials, equipment, processes, personnel, organizational structures, task nodes, or spatial locations is identified from the text content. For image data slicing, textual and non-textual visual information are extracted from each slice. Textual information is obtained through optical character recognition (OCR), while non-textual visual information is obtained by recognizing component outlines, component categories, scene objects, annotation symbols, and spatial relationships within the image data slices. The textual and non-textual visual information are then organized into image description text, which serves as the slice representation for each image data slice. Entity information representing engineering components, materials, equipment, location areas, inspection objects, or work scenes is identified from this image description text. For tabular data slicing, the header fields of the corresponding data rows and the contents of the corresponding data cells are read and concatenated in key-value pairs ("header field: data cell content") to form table description text, which serves as the slice representation for each tabular data slice. Entity information representing engineering components, materials, equipment, task nodes, organizational structures, business attributes, or time nodes is identified from this table description text.
[0064] S2.2 It should be noted that for text data fragmentation, the text content is read and status descriptive words representing the progress status, approval status, quality status or safety status of the project are identified from the text content, such as "pending approval", "pending acceptance" and "unqualified".
[0065] For table data shards, read the table description text corresponding to the table data shard, or read the header fields and corresponding data cell contents, and extract status field values from the header fields or data cell contents. For example, for the table data shard corresponding to the schedule table, read the header fields "Task Name", "Planned Completion Time", "Actual Completion Time" and "Progress Status", and extract "In Progress", "Completed", or "Lagging" as status field values from the data cell contents corresponding to "Progress Status".
[0066] For image data segments, read the image description text corresponding to the image data segments, and identify status description words from the annotation text, inspection conclusion text, rectification explanation text, and scene recognition results in the image description text. For example, for the image data segments corresponding to on-site inspection photos, identify "under rectification", "rectified", or "to be rectified" as status description words from the image description text.
[0067] The extracted state descriptors or state-class field values are matched with a pre-established state identifier mapping table, and state information in different expressions is mapped to a unified standardized state identifier to obtain the state identifier corresponding to the data shard. The extracted entity information, state identifier, and generation time are associated with the unique identifier of the corresponding data shard and linked as the metadata of the data shard.
[0068] Furthermore, the construction process of the status identifier mapping table is as follows: Commonly used status descriptors and status class field values in project management are collected, and these descriptors and values are organized and categorized. Semantically consistent and similar status descriptors and status class field values are grouped into the same status category, and a standardized status identifier is pre-assigned to each status category. For example, "In Progress," "Under Construction," and "Processing" are grouped into the same status category, and "In Progress" is pre-assigned as the corresponding standardized status identifier. Similarly, "Completed," "Ended," and "Processing Completed" are grouped into the same status category, and "Completed" is pre-assigned as the corresponding standardized status identifier. A one-to-one correspondence is established between the status descriptors, status class field values, and corresponding standardized status identifiers in each status category, and this information is stored in tabular form to form the status identifier mapping table.
[0069] S2.3. It should be noted that the segment representation content corresponding to each data segment is read separately; where the segment representation content corresponding to the text data segment is the text content, the segment representation content corresponding to the image data segment is the image description text, and the segment representation content corresponding to the table data segment is the table description text. The segment representation content corresponding to each data segment is input into the trained AI model, and forward computation is performed sequentially through the input embedding layer, position encoding, and all Transformer layers of the AI model to obtain the high-level feature sequence corresponding to each data segment; the pooling projection layer in the multi-task output head of the AI model is activated, and the pooling projection layer performs pooling and projection operations on the high-level feature sequence of the data segment to output the semantic vector corresponding to the data segment. Since the text data segment, image data segment, and table data segment are all first converted into their corresponding textual segment representation content before being input into the same trained AI model, the semantic vectors output by the text data segment, image data segment, and table data segment are in the same semantic vector space, which can be used to perform unified semantic relevance calculation with the query intent vector.
[0070] In the storage medium, a storage record is created for each data shard. In the storage record, an index and association relationship are established between the data shards, metadata, and corresponding semantic vectors to form the project database.
[0071] S3. Filter the metadata of the project database to form a candidate dataset. For the semantic vector of each data segment in the candidate dataset, calculate the semantic relevance with the query intent vector to obtain the semantic relevance score.
[0072] S3.1 It should be noted that the data structure of the query intent object is read, including the "Project Entity," "Time Condition," and "Status Attribute" fields; each field of the query intent object is accessed sequentially. The "Project Entity" field is accessed to extract the specific engineering component identifier, task node number, or geolocation code as entity constraints. The "Time Condition" field is accessed to extract the explicit time point, time period, or relative time description, and converted into a unified start and end timestamp format as time range constraints. The "Status Attribute" field is accessed to extract the status field, such as "In Progress," "Completed," "Lagging," or "Pending Approval," as status constraints. The entity constraints, time range constraints, and status constraints extracted from the query intent object are collectively summarized into key constraints for subsequent metadata filtering of the engineering project database.
[0073] Starting from the beginning of the project database, each stored record is accessed sequentially. For the currently accessed stored record, the metadata associated with the data shard is read. Metadata includes fields such as "entity information field," "timestamp field," and "status identifier field." The entity information field in the metadata is matched and compared with the entity constraints. If the entity information field completely matches the entity constraints, or if the entity information field is a subordinate object corresponding to the entity constraints, the current stored record is deemed to meet the basic filtering conditions. If the query intent object contains time range constraints and the current stored record contains a timestamp field, it is further determined whether the timestamp field falls within the start and end time interval defined by the time range constraints. If the current stored record lacks a timestamp field, it is not directly excluded due to the missing timestamp field. If the query intent object contains status constraints and the current stored record contains a status identifier field, it is further verified whether the status identifier field matches the status field specified by the status constraints. If the current stored record lacks a status identifier field, it is not directly excluded due to the missing status field. Data shards that meet the basic filtering criteria are merged into the candidate dataset. After traversing all stored records in the project database, all data shards that meet the basic filtering criteria are aggregated to form the candidate dataset.
[0074] S3.2. It should be noted that each data fragment in the candidate dataset is read, and the corresponding semantic vector is extracted; the semantic relevance score between the semantic vector and the query intent vector is calculated using the cosine similarity formula, expressed as follows:
[0075] ;
[0076] in, Indicates semantic relevance score, Represents the query intent vector. A semantic vector representing data sharding.
[0077] S4. Calculate the business matching degree between the metadata of each data shard in the candidate dataset and the query intent object to obtain the business matching degree score. After merging the semantic relevance score and the business matching degree score, re-rank the candidate dataset and select the top K data shards.
[0078] S4.1 It should be noted that the query intent object is read sequentially, and the specific engineering component identifier, task node number or spatial location code is extracted from the "Project Entity" field to determine the core business elements. The specific time point or time period is extracted from the "Time Condition" field, and the specific status description (such as "in progress", "delayed", "pending acceptance") is extracted from the "Status Attribute" field. The extracted time conditions and status descriptions together constitute the auxiliary business elements.
[0079] Each data shard in the candidate dataset is accessed sequentially, and the metadata associated with the data shard is read. For the current data shard, the entity matching score, time matching score, and status matching score are calculated respectively. For the entity matching score, if the entity information field in the metadata is completely consistent with the core business element, the entity matching score is recorded as 1; if the entity information field in the metadata has a hierarchical or synonymous relationship with the core business element, the entity matching score is recorded as 0.7; if there is only an association within the same business domain, the entity matching score is recorded as 0.4; if there is no entity association, the entity matching score is recorded as 0. For the time matching score, if the timestamp field in the metadata falls completely within the time interval defined by the time condition, the time matching score is recorded as 1; if the timestamp field in the metadata falls within the adjacent buffer range of the time interval corresponding to the time condition, the time matching score is calculated by decreasing the time deviation ratio; if the current data shard is missing a timestamp field, the time matching score is recorded as the preset default score. For the status matching score, if the status identifier field in the metadata is completely consistent with the status condition, the status matching score is recorded as 1; if the status identifier field in the metadata belongs to the same status category or adjacent status stage as the status condition, the status matching score is recorded as 0.6; if the current data shard is missing a status identifier field, the status matching score is recorded as the preset default score. This assignment is to distinguish the matching strength between data shards and query targets. Data shards that are completely consistent with the query target have the highest degree of correspondence and are therefore assigned a high score; data shards that are partially related to the query target still have some reference value and are therefore assigned a middle score; data shards that are clearly not consistent with the query target have low relevance and are therefore assigned a low score or zero score; for cases where the timestamp field or status identifier field is missing, a preset default score is assigned to avoid directly excluding potentially valid data.
[0080] The entity matching score, time matching score, and status matching score are weighted and summed according to preset weights to obtain the business matching score. In one embodiment, since the project entity represents the core business object corresponding to the query request and has the greatest impact on the relevance of the search results, the entity matching score is given a higher weight of 0.5; the time condition is used to limit the recentity and timeliness range of the data, so the time matching score is given the second highest weight of 0.3; the status attribute is mainly used to refine and distinguish the data differences of the same business object at different stages, so the status matching score is given the lowest weight of 0.2.
[0081] The default score can be set to 0.3. This ensures that the corresponding data shards are not directly judged as completely irrelevant due to missing time or status fields, and that no excessively high scores are given due to missing fields, thereby weakening the sorting advantage of data shards with complete metadata.
[0082] For each data slice in the candidate dataset, the corresponding semantic relevance score and business matching score are weighted and summed to generate a comprehensive relevance score, as shown in the formula:
[0083] ;
[0084] in, This represents the overall relevance score. The weighting coefficients represent the semantic relevance scores. Indicates semantic relevance score, The weighting coefficients representing the business matching score. This indicates the business matching score.
[0085] The weighting coefficients are set to adjust the influence of semantic relevance score and business matching score on the overall relevance score. The semantic relevance score characterizes the overall semantic consistency between the data shards and the query intent vector, covering the implicit semantic relationships in natural language query requests. The business matching score characterizes the degree to which the data shards satisfy explicit business constraints such as project entities, time ranges, and state conditions. Because overall semantic consistency plays a more fundamental role in judging the relevance of candidate data shards, the weighting coefficient for the semantic relevance score is set larger (e.g., 0.6), while the weighting coefficient for the business matching score is smaller (e.g., 0.4).
[0086] Sort the data fragments in the candidate dataset according to the comprehensive relevance score from high to low, and select the top K data fragments (e.g., 10). Setting the K value to 10 can keep the number of data fragments entering the subsequent processing flow within a moderate range, which can retain the core evidence that is highly relevant to the query intent object, and also cover a certain amount of supplementary evidence, thereby helping to improve the completeness, relevance and processing efficiency of the query report.
[0087] S5. Extract engineering entities from K data shards, link them with nodes in the engineering project knowledge graph, and extract subgraphs associated with the query intent object.
[0088] S5.1 It should be noted that historical multi-source heterogeneous data for engineering projects should be collected, and engineering entities should be extracted accordingly. Based on the business logic recorded in the historical multi-source heterogeneous data of engineering projects, causal relationships, temporal relationships, dependency relationships, compositional relationships, and reference relationships between engineering entities should be identified. For example, from the quality accident report, the causal relationship of "not pouring in layers according to the plan" leading to "temperature cracks in large-volume concrete" should be identified; from the construction log, the temporal relationship of "wall and column reinforcement binding" preceding "formwork erection" should be identified; from the technical requirements, the dependency relationship of "cooling tower hoisting" depending on "area closure and safety permit" should be identified; from the project work breakdown structure, the compositional relationship of "pipeline installation" and other components belonging to "water supply and drainage engineering" should be identified; and from the design change order, the reference relationship of "this change" referring to "detailed design drawings" should be identified. The engineering entities are used as nodes in the engineering project knowledge graph, and the causal relationships, temporal relationships, dependency relationships, composition relationships, and reference relationships between nodes are used as relationship edges. The nodes and edges are organized and persistently stored according to the graph data structure to form an engineering project knowledge graph with engineering entities as nodes and business logic relationships as edges.
[0089] S5.2 It should be noted that engineering entities are extracted from the entity information corresponding to the K data shards. The names and identifiers of each node in the engineering project knowledge graph are read; the engineering entities are compared one by one with each node in the engineering project knowledge graph. When the engineering entity and node names are completely identical, or the engineering entity and node names are different expressions but point to the same object, the engineering entity is considered to have successfully matched the corresponding node; for engineering entities that have successfully matched a node, the association information between the corresponding data shard identifier and the node identifier is recorded, establishing a link relationship between the engineering entity and the node; the comparison is performed sequentially for all engineering entities in the K data shards.
[0090] S5.3. It should be noted that all nodes linked to the data sharding project entity are extracted as starting nodes, forming a set of starting nodes. Starting from the first node in the starting node set, a graph traversal is performed in the project knowledge graph. Specifically, starting from the first node, the nodes move along the causal, temporal, dependency, composition, and reference edges originating from the first node to the next directly connected node. The first node, the visited edges, and the next reached node are recorded as visited. The next node is then used as the new node, and the operation of expanding along the relation edges is repeated. When the expansion from any node reaches the preset maximum hop depth (e.g., 3 hops), the node stops expanding outward (the hop count increases by 1 each time a node completes a move along a relation edge to an unvisited node). For all nodes in the starting node set, the operation of expanding along relation edges is performed sequentially. All visited nodes during the traversal, along with the relation edges connecting these nodes, together constitute a subgraph associated with the query intent object. The subgraph consists of nodes and the causal, dependency, temporal, composition, and reference edges connecting the nodes.
[0091] Furthermore, the maximum hop depth refers to the maximum number of relation edges that can be traversed when accessing a knowledge graph of an engineering project, starting from the initial node and extending outwards along the relation edges.
[0092] Setting the maximum hop depth to 3 hops preserves direct and nearest neighbor information related to the query intent object, while limiting excessive expansion of the traversal range, thus balancing subgraph integrity, relevance, and processing efficiency.
[0093] S6. After associating and aggregating the K data shards based on the subgraph, expand them according to the result organization rules and generate a query report.
[0094] S6.1 It should be noted that when reading the subgraph extracted from the engineering project knowledge graph, if the relation edge in the subgraph is a causal relation edge, a dependency relation edge, or a temporal relation edge, the engineering entities corresponding to both ends of the relation edge are extracted, the data fragments containing the corresponding engineering entities are found, and the corresponding data fragments are arranged according to the order represented by the relation edge. Specifically, the data fragments corresponding to the causal relation edge are arranged in the order of "cause first, result second", the data fragments corresponding to the dependency relation edge are arranged in the order of "dependent item first, dependent item second", and the data fragments corresponding to the temporal relation edge are arranged in the order of time occurrence. The arranged data fragments are then linked together to form an ordered chain of evidence.
[0095] When the relation edge in the subgraph is a component relation edge, extract the engineering entities corresponding to both ends of the component relation edge, find the data fragments containing the corresponding engineering entities (including the whole engineering entity and the part engineering entity, such as "concrete construction" and "formwork support"), and merge the corresponding data fragments according to the hierarchical relationship between the whole engineering entity and the part engineering entity to form a hierarchical evidence group.
[0096] When the relationship edge in the subgraph is a reference relationship edge, extract the engineering entities corresponding to both ends of the reference relationship edge, find the data fragments containing the corresponding engineering entities (including the reference party engineering entity and the referenced party engineering entity, such as "concrete strength acceptance record" as the reference party and "concrete quality acceptance specification" as the referenced party); and associate and arrange the data fragments describing the reference party engineering entity and the data fragments describing the referenced party engineering entity to form an associated evidence pair.
[0097] When multiple relational edges in a subgraph point to the same engineering entity, find all data fragments that contain the corresponding engineering entity, and merge the data fragments that describe different attributes, different states, or different stages of the same engineering entity to form an evidence group.
[0098] The orderly chain of evidence, hierarchical evidence groups, evidence groups and related evidence pairs are summarized and integrated to form a set of related evidence.
[0099] S6.2 It should be noted that the value of the "Intent Category" field in the query intent object is read. Intent categories include "Progress Analysis," "Cost Accounting," "Risk Assessment," "Quality Review," and "Resource Traceability," etc. The predefined result organization rule base is accessed. This base is a data collection storing the mapping relationships between various intent categories and result organization rules. Within the result organization rule base, the identified intent category is used as the query key to locate a result organization rule record that matches the intent category. From the matching record, the complete definition of the result organization rule is extracted. The definition includes the chapter framework of the query report, the key indicators to be filled in each chapter, and the chart templates used for visualization.
[0100] The system reads the query report chapter framework defined in the result organization rules. This framework consists of multiple chapter titles and a list of key indicators under each title. It iterates through each evidence item and evidence group in the associated evidence set, searching for matching key indicators within the chapter framework of the result organization rules based on the engineering entity type, status attributes, and logical relationships described by the evidence item and evidence group. The content of the evidence item and evidence group, such as specific entity attribute values, status description text, time points, or quantity information, is then filled into the data positions corresponding to the matching key indicators. After mapping and filling all evidence items and evidence groups, the system selects the corresponding chart template for the key indicators specified in the result organization rules that require visualization. Based on the data filled into the key indicators, the chart template is used to draw the corresponding charts. Finally, the system assembles the completed chapter content and the generated charts to output the query report.
[0101] Furthermore, the process of constructing the results organization rule base involves: collecting historical high-quality engineering project management reports and decision analysis documents, and summarizing typical report structures for different management intentions. A standardized chapter framework is defined for each management intention. For example, for the "schedule analysis" intention, a chapter framework including "Overall Schedule Overview," "Milestone Completion Status," "Schedule Deviation Analysis," and "Subsequent Forecast Recommendations" is defined; for the "risk assessment" intention, a chapter framework including "Overall Risk Situation," "Detailed Analysis of High-Risk Items," "Risk Correlation Network," and "Response Strategies" is defined; and for the "cost accounting" intention, a chapter framework including "Overall Cost Execution Status," "Key Item Analysis," "Change Impact Analysis," and "Control Recommendations and Early Warnings" is defined. The chapter framework clearly defines the components of the report, the titles of each part, the order of description, and the logical relationships. Simultaneously, key indicators are identified and defined for each chapter. Key indicators are structured fields used to carry specific evidence and data. Chart templates, such as Gantt charts, burn-down charts, and bar charts, are designed or selected for key indicators that require visual visualization. The chapter framework, key indicators, and chart templates defined above for various management intentions are encoded and stored in the form of key-value pairs of "intention category - rule content" to form a result organization rule library that can be queried and called programmatically.
[0102] This embodiment also provides a computer device applicable to the engineering project data query method based on AI large model, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the engineering project data query method based on AI large model as proposed in the above embodiment.
[0103] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0104] This embodiment also provides a storage medium storing a computer program. When executed by a processor, the program implements the method for querying engineering project data based on an AI large model as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0105] In summary, this invention employs entity-constrained candidate recall and a joint re-ranking mechanism based on semantic relevance and business matching. This ensures the business relevance of candidate data while retaining semantically relevant data fragments with incomplete metadata, thereby balancing query recall and ranking accuracy and improving the relevance of report content. Furthermore, it utilizes the topological logic of knowledge graphs to automatically aggregate fragmented data into sets of related evidence such as causal chains and temporal chains, and automatically generates structured query reports according to preset templates. This not only significantly reduces the time required for manual writing, formatting, and verification, but also enhances the professionalism and decision-making reference value of the reports through the presentation of visualized logical relationships.
[0106] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for querying engineering project data based on an AI large-scale model, characterized in that: include, Receive users' natural language query requests and parse them using a large AI model to obtain the query intent object and query intent vector; Collect multi-source heterogeneous data of engineering projects provided by users, divide it into data shards, attach corresponding metadata to each data shard, use an AI big model to map the data shards into semantic vectors, and associate and store the data shards, metadata and semantic vectors to form an engineering project database. Metadata filtering is performed on the engineering project database to form candidate datasets. For the semantic vectors of each data fragment in the candidate datasets, semantic relevance is calculated with the query intent vector to obtain semantic relevance scores. The metadata of each data shard in the candidate dataset is used to calculate the business matching degree with the query intent object to obtain the business matching degree score. After fusing the semantic relevance score and the business matching degree score, the candidate dataset is re-ranked and the top K data shards are selected. Extract engineering entities from K data shards, link them with nodes in the engineering project knowledge graph, and extract subgraphs associated with the query intent object. After the K data pieces are joined and aggregated according to the subgraph, they are expanded according to the result organization rules to generate a query report.
2. The method for querying engineering project data based on an AI large model as described in claim 1, characterized in that: The process of obtaining the query intent object and query intent vector refers to calling the AI big model to perform deep semantic understanding and structured parsing on the natural language query request, identifying and extracting the query intent object, while the AI big model extracts the query intent vector through pooling.
3. The method for querying engineering project data based on an AI large model as described in claim 2, characterized in that: The process of associating and storing data fragments, metadata, and semantic vectors to form an engineering project database specifically involves: Multi-source heterogeneous data is segmented based on data type and semantic boundaries to generate data fragments with independent semantics, and corresponding metadata is attached to each data fragment; The AI large model is used to extract and encode features for each data slice to obtain semantic vectors; In the storage medium, a storage record is created for each data shard. In the storage record, an index and association relationship are established between the data shards, metadata, and corresponding semantic vectors to form the project database.
4. The method for querying engineering project data based on a large AI model as described in claim 3, characterized in that: The process of filtering metadata in the project database to form a candidate dataset specifically involves: Parse the content of the query intent object and extract key constraints; Traverse each storage record in the project database, read the metadata of the data shards attached to the storage record, match and compare the fields in the metadata with the key constraints one by one, and obtain the storage records that meet the filtering conditions. For storage records that meet the filtering criteria, the corresponding data shards are identified as candidate data shards, and all candidate data shards are aggregated to form a candidate dataset.
5. The method for querying engineering project data based on a large AI model as described in claim 4, characterized in that: The acquisition of semantic relevance score specifically involves: Read each data slice in the candidate dataset and extract the corresponding semantic vector; The semantic relevance score between the semantic vector and the query intent vector is calculated using the cosine similarity formula.
6. The method for querying engineering project data based on an AI large model as described in claim 5, characterized in that: The selection of the first K data shards specifically involves: Identify explicitly specified business elements within the query intent object; Read the metadata attached to each data shard in the candidate dataset, calculate the entity matching score, time matching score and status matching score based on the metadata, and then perform a weighted sum to obtain the business matching score. For each data slice in the candidate dataset, the corresponding semantic relevance score and business matching score are weighted and summed to generate a comprehensive relevance score; The data segments in the candidate dataset are sorted in descending order of their comprehensive relevance scores, and the top K data segments are selected.
7. The method for querying engineering project data based on an AI large model as described in claim 6, characterized in that: The extraction of the subgraph associated with the query intent object specifically includes: The engineering entities in the K data shards are compared and linked with the nodes in the engineering project knowledge graph. When an engineering entity is successfully matched with a node in the engineering project knowledge graph, a link relationship between the engineering entity and the node is established. Starting from all successfully linked nodes, the topology of the project knowledge graph is traversed. The traversal process expands along the relationship edges between nodes until the preset hop depth is met. The nodes and edges visited during the traversal together form a subgraph associated with the query intent object.
8. The method for querying engineering project data based on a large AI model as described in claim 7, characterized in that: The generation of the query report specifically includes: Based on the logical relationships revealed by the subgraphs, construct a set of related evidence; Based on the intent category identified in the query intent object, the corresponding result organization rule is selected from the predefined result organization rule library; After mapping and filling the evidence items and evidence groups in the associated evidence set according to the chapter framework and indicator items defined by the result organization rules, they are transformed into charts to obtain the query report.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the engineering project data query method based on any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the engineering project data query method based on the AI large model as described in any one of claims 1 to 8.