Intelligent question and answer and scheme recommendation system based on fire-fighting toughness knowledge graph
By using an intelligent question-answering and solution recommendation system based on a fire resilience knowledge graph, adaptive parsing and dynamic relationship reasoning of multi-source data are achieved. This solves the problem of real-time fusion and consistency maintenance of multi-source heterogeneous data in the fire protection field, improves the accuracy and real-time performance of the knowledge graph, and supports efficient intelligent question-answering and solution recommendation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING SCI & TECH PATENT OFFICE
- Filing Date
- 2026-01-04
- Publication Date
- 2026-04-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies struggle to effectively handle the real-time fusion and consistency maintenance of multi-source heterogeneous data in the fire protection field, resulting in insufficient accuracy and reliability of knowledge graphs. In particular, they are inefficient when processing unstructured text data and are prone to introducing human error.
An intelligent question-answering and solution recommendation system based on fire resilience knowledge graph is adopted. Through data processing module, relationship reasoning module, graph update module and optimization verification module, it realizes adaptive parsing, dynamic relationship reasoning and incremental update of multi-source data. Combined with graph neural network and logical rule verification, a closed-loop optimization mechanism is formed.
It significantly improves the real-time performance and accuracy of knowledge graphs, enhances the reliability of intelligent question answering and solution recommendation, and improves the decision-making efficiency of fire emergency command.
Smart Images

Figure CN121902984A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graphs, and more specifically, to an intelligent question-answering and solution recommendation system based on a fire resilience knowledge graph. Background Technology
[0002] In a modern fire emergency command system, the efficient integration and utilization of multi-source information is key to improving disaster response capabilities. Fire command centers need to process massive amounts of heterogeneous data, including real-time monitoring data generated by smoke and heat sensors deployed inside various buildings, public meteorological information and building structural drawings from government departments, historical fire case reports stored in unstructured text format, and real-time dynamic information from social media obtained through internet platforms. These data vary significantly in format, encompassing structured database records, semi-structured documents, and continuous data streams. In addition, external environmental factors such as sudden weather changes and the promulgation of new fire safety regulations require the system to have the ability to respond quickly and integrate new knowledge. In practical application scenarios, command centers need to build and maintain a knowledge graph that can comprehensively and accurately reflect the fire situation based on the above multi-source data to support subsequent intelligent analysis and decision-making. However, the diversity, heterogeneity, and dynamic evolution characteristics of data sources bring huge challenges to the construction and consistent maintenance of the knowledge graph.
[0003] Currently, in terms of knowledge graph data fusion and consistency maintenance, the industry typically uses data extraction, transformation, and loading tools based on predefined rules, or relies on static knowledge graph frameworks for data processing. These traditional methods are based on the assumption that the data source structure is relatively stable and the update frequency is low, making it difficult to adapt to the highly dynamic needs of the fire protection field. Specifically, existing technologies lack real-time detection and resolution mechanisms for potential contradictions in multi-source data, often requiring manual intervention to maintain the consistency of the knowledge graph, which is inefficient and prone to introducing human error. Especially when processing unstructured text data, such as extracting key entities and relationships from historical fire reports, traditional methods suffer from slow processing speed and insufficient accuracy. The core problem is that the existing technology system cannot effectively support the incremental and adaptive evolution of knowledge graphs, leading to data redundancy, information conflicts, and even knowledge obsolescence when facing real-time inflows of fire protection data with varying standards. This severely restricts the accuracy and reliability of intelligent question answering and solution recommendation systems based on the graph. Summary of the Invention
[0004] This invention addresses the technical problems existing in the prior art by providing an intelligent question-answering and solution recommendation system based on a fire resilience knowledge graph. The system utilizes a data processing module, a relationship reasoning module, a graph update module, and an optimization and verification module to solve the problems mentioned in the background.
[0005] The technical solution of this invention to solve the above-mentioned technical problems is as follows: it specifically includes a data processing module, a relation reasoning module, a graph update module, and an optimization verification module, wherein; Data processing module: Used to receive real-time data streams from multiple heterogeneous data sources, and use an adaptive parser based on a dynamic mode registry to parse and normalize the real-time data streams. The adaptive parser operates according to predefined parsing rules, converts the real-time data streams into triples of a unified graph data model, adds timestamps and data source metadata, and outputs a standardized knowledge unit data stream. Relationship Reasoning Module: Used to receive the standardized knowledge unit data stream and use a graph neural network model to perform embedding vector calculation and dynamic relationship reasoning on entities and relationships in the knowledge unit data stream. The graph neural network model includes adjustable model parameters and performs conflict detection based on similarity comparison and confidence weighting strategy of embedding vectors, and outputs a knowledge subgraph with conflict markers and confidence scores. The knowledge graph update module is used to monitor the conflict events indicated by the conflict markers and the data freshness events indicated by the data timestamps in the knowledge subgraph output by the relation reasoning module, and to trigger the corresponding fusion strategy to incrementally update the knowledge graph according to the event type. At the same time, it combines the prediction model based on historical event sequences to pre-adjust the structure of the knowledge graph and output the updated knowledge graph fragment to the knowledge graph. The optimization verification module is used to perform consistency verification on the updated knowledge graph based on logical rules and statistical tests, and to send the inconsistencies found in the verification as feedback signals to the data processing module and the relation reasoning module respectively, so as to adaptively adjust the parsing rules of the data processing module and the model parameters of the relation reasoning module, forming a closed-loop optimization. In a preferred embodiment, the specific process of receiving real-time data streams from multiple heterogeneous data sources in the data processing module includes: A distributed message queue is constructed to receive and buffer real-time data streams from various heterogeneous data sources, including smoke sensor data streams, meteorological application programming interface data streams, historical report text data streams, and social media data streams. The real-time data streams are transmitted in raw formats, including structured data formats, semi-structured data formats, or unstructured text formats. The real-time data stream consists of multiple raw data units, each of which is appended with a data source identifier and a raw timestamp upon arrival, forming the raw real-time data stream.
[0006] In a preferred embodiment, the specific process of using an adaptive parser based on a dynamic mode registry for parsing and normalization includes: The system queries the dynamic pattern registry based on the data source identifier to obtain the corresponding data pattern definition, and calls the predefined parsing rule set to parse the raw data units in the raw real-time data stream, extracting entity and relationship information. Each parsing rule in the parsing rule set has a rule weight, which is used to indicate the relative importance of the rule in the parsing process. The parsing rule set includes path query rules for processing structured data and entity recognition rules for processing unstructured text. During the parsing process, the confidence score of each original data unit is calculated synchronously. The confidence score is calculated by weighted summation, and the weighted summation items include the data source reliability score, the time freshness function value, and the original data unit parsing success rate. Among them, the data source reliability score is a value between zero and one obtained from the historical accuracy statistics of the data source corresponding to the data source identifier; the time freshness function value is the result of an exponential function calculated with the natural constant as the base and a negative decay factor multiplied by the difference between the current time and the original timestamp as the exponent; the original data unit parsing success rate is a value between zero and one obtained from the parser's entity recognition completeness of the original data unit; the weight coefficients used in the weighted summation include the first weight coefficient, the second weight coefficient, and the third weight coefficient; the preliminary normalized stream output after parsing consists of a series of triples with a uniform format, each triple containing a subject, a predicate, and an object, and associated with its data source identifier, the original timestamp, and the calculated confidence score.
[0007] In a preferred embodiment, the specific process of converting the real-time data stream into a triplet form of a unified graph data model and attaching metadata includes: Each triple in the initial normalized stream is assigned a globally unified standardized timestamp and its corresponding data source metadata is encapsulated. The data source metadata includes data source type, version number, and geographic coordinate information. This metadata can be used for spatial range limitation or device tracing in subsequent map construction and path reasoning. The triples, standardized timestamps, data source metadata, and confidence scores are encapsulated together into standardized knowledge units. Each knowledge unit consists of a subject, predicate, object, standardized timestamp, data source metadata, and confidence score. The final output is a standardized knowledge unit data stream composed of multiple knowledge units in sequence.
[0008] In a preferred embodiment, the specific process of using a graph neural network model for embedding vector calculation and dynamic relation reasoning in the relation reasoning module is as follows: It receives standardized knowledge unit data streams and dynamically constructs dynamic knowledge subgraphs based on preset time windows. Nodes in the dynamic knowledge subgraph correspond to the subjects and objects in the knowledge units, collectively referred to as entities. Edges correspond to the predicates in the knowledge units, collectively referred to as relations. Each node in the dynamic knowledge subgraph has an initial feature vector, which is obtained by encoding the entity type and attributes. The spatiotemporal semantic association strength is calculated for each edge in the dynamic knowledge subgraph. The calculation process for this spatiotemporal semantic association strength is as follows: First, calculate the time proximity factor, which is one divided by the product of the time decay coefficient and the standardized timestamp difference between the two related knowledge units plus one. Next, the spatial proximity factor is calculated, which is the product of the negative spatial decay coefficient of the natural constant and the square of the difference between the geographic coordinates of the two associated entities. The semantic similarity factor is obtained again, and its value is the cosine similarity calculated based on the entity name or type using a pre-trained domain word vector model. Finally, the temporal proximity factor, spatial proximity factor, and semantic similarity factor are multiplied together to obtain the spatiotemporal semantic association strength. The spatiotemporal semantic association strength and the original confidence score of the knowledge unit are used together as edge attributes and input into the improved graph attention network model. The improved graph attention network model is a graph neural network model based on the attention mechanism. The improved graph attention network model is trained using the gradient descent algorithm, where the gradient of the loss function with respect to the model parameters is calculated, called the original gradient, which is used to update the model parameters. The specific process for calculating the attention coefficients between nodes is as follows: A1. For the current node and any of its neighboring nodes, first multiply the initial feature vector of the current node with the trainable parameter weight matrix to obtain the transformed feature vector of the current node, and then multiply the initial feature vector of the neighboring node with the same parameter weight matrix to obtain the transformed feature vector of the neighboring node. A2. Next, the transformed feature vector of the current node, the transformed feature vector of the neighboring nodes, the confidence score associated with the edge connecting the current node and the neighboring nodes, and the spatiotemporal semantic association strength are concatenated to form a concatenated vector. A3. Next, perform a dot product operation between the concatenated vector and the trainable attention vector to obtain the dot product result; process the dot product result through a non-linear activation function to output the activation value; perform an exponential calculation on the activation value to obtain the unnormalized attention score for the neighbor node. A4. Repeat the above steps for all neighboring nodes of the current node to calculate the unnormalized attention score for each neighboring node. A5. Sum the unnormalized attention scores of all neighboring nodes to obtain the normalized denominator; A6. Divide the unnormalized attention score of each neighboring node by the normalized denominator to obtain the final attention coefficient of the current node to each neighboring node. This then generates deep embedding vectors for nodes and edges.
[0009] In a preferred embodiment, the specific process of conflict detection based on similarity comparison and confidence weighting strategy using embedded vectors is as follows: Using the generated deep embedding vectors, semantic conflict detection and association conflict detection are performed; Semantic conflict detection targets multiple entity nodes in a dynamic knowledge subgraph that are determined to point to the same real-world object. Entity nodes are considered as different descriptions of the same entity. The cosine similarity of the deep embedding vectors of any two such entity nodes is calculated and recorded as the semantic similarity value. Then, the semantic inconsistency score is obtained by subtracting the semantic similarity value from one. If the semantic inconsistency score is higher than a first preset threshold, the entity nodes involved are marked as having semantic conflicts. Association conflict detection targets multiple relation edges between the same pair of entity nodes in a dynamic knowledge subgraph. It calculates the cosine similarity of the deep embedding vectors of any two such relation edges, denoted as the relation similarity value. It then combines this with predefined logical opposition rules for judgment. The logical opposition rules are implemented through a logical opposition function, which judges based on a predefined knowledge base. If two relations are logically opposed, the logical opposition function returns one; otherwise, it returns zero. If the logical opposition function returns a value of one, then the relational logical conflict score is calculated. This score is the product of the relational similarity value and the return value of the logical opposition function. If the relational logical conflict score is higher than the second preset threshold, then the relational edges involved are marked as having an association conflict. Finally, each node and edge in the dynamic knowledge subgraph is assigned a comprehensive conflict label. This label is a discrete state identifier obtained by combining semantic inconsistency score, relational logic conflict score and knowledge unit original confidence score, and determined according to a preset multi-level judgment rule. The multi-level judgment rules include: if the semantic inconsistency score or the relational logical conflict score is higher than its respective threshold, it is marked as a mild conflict or a severe conflict according to the degree of excess; If none of them exceed the threshold, they are marked as conflict-free. Finally, the output is a knowledge subgraph with conflict markers and confidence scores.
[0010] In a preferred embodiment, the specific process of monitoring the conflict events indicated by conflict markers in the knowledge subgraph output by the relation reasoning module and the data freshness events indicated by data timestamps in the graph update module is as follows: In real time, each node and edge in the knowledge subgraph is scanned to extract its conflict markers and standardized timestamps. For conflict events, the discrete values of the conflict markers are mapped to numerical conflict levels, with zero corresponding to no conflict, 0.5 corresponding to mild conflict, and 1 corresponding to severe conflict. Then, combining the confidence score corresponding to the node or edge, the conflict severity score is calculated by multiplying the conflict level value by the difference obtained after subtracting the confidence score from one. For data freshness events, calculate the time difference between the standardized timestamp and the current system time, and calculate the freshness score using an exponential function with the natural constant as the base and the negative decay coefficient multiplied by the time difference as the exponent. Then, subtract the freshness score from one to obtain the urgency level. If the freshness score is lower than the preset freshness threshold, a data freshness event is generated. All detected events are scored or stored in the event queue according to type, associated entity or relationship, conflict severity, or urgency.
[0011] In a preferred embodiment, the specific process of incrementally updating the knowledge graph by triggering the corresponding fusion strategy according to the event type, and pre-adjusting the structure of the knowledge graph by combining a prediction model based on historical event sequences, is as follows: Calculate a comprehensive priority score for each event in the event queue. For conflicting events, the formula for calculating the comprehensive priority score is as follows: The severity score of the conflict is multiplied by a first weighting coefficient, and the urgency of the data freshness is multiplied by a second weighting coefficient. For data freshness events, the comprehensive priority score is calculated as: urgency of data freshness multiplied by a third weighting coefficient. Event queues are sorted from highest to lowest comprehensive priority score. Corresponding fusion strategies are triggered based on event type. Semantic conflicts trigger entity parsing strategies, association conflicts trigger relationship resolution strategies, and data freshness events trigger data update strategies. For the entity resolution strategy, the fusion score between two entity descriptions pointing to the same real-world object, i.e., the first entity node and the second entity node, is calculated; the calculation process of the fusion score is as follows: First, the cosine similarity between the deep embedding vectors of the first entity node and the second entity node is calculated. Second, the arithmetic mean of the sum of the first fusion weight and the second fusion weight is calculated. The first fusion weight is the product of the confidence score of the first entity node and the first time decay factor. The second fusion weight is the product of the confidence score of the second entity node and the second time decay factor. The first time decay factor is the exponential function value of the product obtained by multiplying a negative decay coefficient with a base of natural constant by the first time difference. The second time decay factor is the exponential function value of the product obtained by multiplying a negative decay coefficient with a base of natural constant by the second time difference. The first time difference is the difference between the current time and the standardized timestamp of the knowledge unit corresponding to the first entity node. The second time difference is the difference between the current time and the standardized timestamp of the knowledge unit corresponding to the second entity node. The decay coefficient and the decay coefficient used in the freshness score calculation are the same parameter. Finally, the cosine similarity is multiplied by the arithmetic mean to obtain the fusion score. If the fusion score is higher than the preset fusion threshold, the first entity node and the second entity node are merged; the embedding vector calculation process for the new entity generated after merging is as follows: The product of the first fusion weight and the deep embedding vector of the first entity node is added to the product of the second fusion weight and the deep embedding vector of the second entity node to obtain a weighted sum vector. The weighted sum vector is then divided by the sum of the first fusion weight and the second fusion weight to obtain the embedding vector of the merged new entity. For the relation resolution strategy, for logically contradictory relation conflicts, the cosine similarity between the relation embedding vectors of the conflicting first relation and second relation is calculated, and a weighted vote is performed by combining the confidence scores of the first relation and the second relation. Relationships with higher confidence scores are retained. For data update strategies, for data freshness events, the corresponding data is directly marked as expired; After executing any of the above fusion strategies, an updated knowledge sub-image segment will be generated; Meanwhile, a prediction model constructed using a long short-term memory network is used to analyze historical event sequences. These sequences include the event types, associated entity identifiers, and timestamps of all events recorded within a past period. The prediction model learns the sequence patterns of historical events through training. Its input is a chronologically ordered sequence of historical events, and its output is a prediction score for the occurrence of different types of events on different entities within a future period. When the prediction score is higher than a preset prediction threshold, a pre-adjustment operation on the knowledge graph structure is triggered. Finally, the updated knowledge sub-image segments are output to the knowledge graph. The updated knowledge sub-image segments include new entities merged through entity parsing strategy, relations resolved through relation resolution strategy, data updated through data update strategy, and knowledge graph structure changes generated after prediction and pre-adjustment through prediction model.
[0012] In a preferred embodiment, the specific process of performing consistency verification on the updated knowledge graph based on logical rules and statistical tests in the optimization verification module is as follows: First, the knowledge graph fragments are validated using logical rules. This validation uses a predefined set of rules for the fire protection domain ontology, which includes constraints on fire equipment layout specifications, building safety standards, and disaster response procedures. The logical rule verification automatically checks for violations in entities and relations within the knowledge graph using a theorem prover, and calculates a logical consistency score. The calculation process for this logical consistency score is as follows: The total number of rules is calculated, which is the total number of rules contained in the predefined rule set. For each rule, an indicator function is used to determine whether the rule has been violated. The indicator function takes a value of one when the rule is violated, and a value of zero otherwise. The importance weight of each rule is multiplied by the corresponding indicator function value to obtain the violation contribution value of that rule. The violation contribution values of all rules are summed to obtain the weighted violation count. The weighted violation count is incremented by one and the reciprocal is taken to obtain the logical consistency score. Secondly, a statistical verification is performed in parallel. This verification is based on the anomaly detection method of graph structure entropy. Specifically, it calculates the KL divergence between the degree distribution of the knowledge graph fragment and the degree distribution of the global knowledge graph, combines the entropy value of the confidence score of all nodes in the knowledge graph fragment, and then introduces an adjustment coefficient for weighted summation to obtain the statistical anomaly degree. Finally, the logical consistency score and statistical anomaly score are combined into a verification result vector, and specific abnormal entities and relationships are marked.
[0013] In a preferred embodiment, the specific process of sending the inconsistency results discovered during verification as feedback signals to the data processing module and the relational reasoning module is as follows: An adaptive feedback signal is generated based on the verification result vector. For the data processing module, an analytical rule adjustment signal is generated. The calculation process of this signal is as follows: For each parsing rule, determine the set of data units processed by that rule, i.e., the set of all knowledge units generated by that rule. Count the number of anomalous data units in the set processed by that rule and calculate the proportion of these anomalous data units. Simultaneously, extract the confidence score for each anomalous data unit and calculate the difference between 1 and the confidence score. Sum the differences between 1 and the confidence score for each anomalous data unit and divide by the total number of data units in the set to obtain the base adjustment amount. Finally, multiply the base adjustment amount by the learning rate parameter to obtain the parsing rule adjustment amount. The parsing rule adjustment amount is used to dynamically modify the rule weights of the parsing rule. The rule weight update process is as follows: The updated rule weight is calculated by multiplying the original rule weight by one and subtracting the adjustment amount of the parsing rule; For the relational reasoning module, a model parameter optimization signal is generated. The calculation process for this signal is as follows: The logical consistency score is compared with a preset target threshold to obtain a deviation value. The partial derivative of the statistical anomaly with respect to the parameters of the graph neural network model in the relational reasoning module is obtained. The deviation value is processed by the hyperbolic tangent function to obtain the standardized deviation. The partial derivative is multiplied by the standardized deviation and then multiplied by the reinforcement coefficient. The product result is added to the original gradient during the training process of the relational reasoning module to obtain the corrected gradient. Subsequently, multi-module parameter collaborative adjustment is performed. In the data processing module, the rule weights of the parsing rules and the contents of the dynamic pattern registry are updated according to the parsing rule adjustment signal. In the relational reasoning module, online learning is performed using the corrected gradient, and a consistency constraint term is added to the loss function. The loss function is the total loss function, which consists of the original task loss function, the difference between the first trade-off parameter multiplied by one and the logical consistency score, and the second trade-off parameter multiplied by the smaller of the statistical anomaly degree and the statistical anomaly tolerance threshold. Ultimately, a closed-loop optimization is formed, enabling the data processing module and the relational reasoning module to adaptively adjust and continuously improve.
[0014] The beneficial effects of this invention are as follows: This solution achieves full-process optimization of fire protection knowledge from collection to application through multi-module collaboration. The data processing module transforms heterogeneous data into standardized knowledge units, effectively solving the problem of multi-source data fusion. The relation reasoning module significantly improves knowledge quality through dynamic relation reasoning and conflict detection. The knowledge graph update module realizes real-time evolution of the knowledge graph based on an event-driven mechanism, ensuring the timeliness of information. The closed-loop optimization mechanism formed by the optimization and verification module continuously improves the processing accuracy of each module. The overall solution effectively enhances the consistency, accuracy, and real-time nature of knowledge, providing reliable knowledge support for intelligent question answering and solution recommendation, and significantly improving the decision-making efficiency of fire emergency command. Attached Figure Description
[0015] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a block diagram of the system structure of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0018] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0019] Example 1 This embodiment provides, for example Figure 1-2 The system shown is an intelligent question-answering and solution recommendation system based on a fire resilience knowledge graph, specifically including: a data processing module, a relationship reasoning module, a graph update module, and an optimization and verification module, wherein; Data processing module: It is used to receive real-time data streams from multiple heterogeneous data sources and use an adaptive parser based on a dynamic mode registry to parse and normalize the real-time data streams. The adaptive parser operates according to predefined parsing rules, converts the real-time data streams into triples of a unified graph data model, adds timestamps and data source metadata, and outputs standardized knowledge unit data streams. The relation reasoning module receives standardized knowledge unit data streams and uses a graph neural network model to perform embedding vector calculations and dynamic relation reasoning on entities and relations in the knowledge unit data streams. The graph neural network model contains adjustable model parameters and performs conflict detection based on similarity comparison and confidence weighting strategies of the embedding vectors, outputting a knowledge subgraph with conflict labels and confidence scores. The knowledge graph update module is used to monitor the conflict events indicated by the conflict markers and the data freshness events indicated by the data timestamps in the knowledge subgraphs output by the relation reasoning module. It triggers the corresponding fusion strategy to incrementally update the knowledge graph according to the event type. At the same time, it combines the prediction model based on historical event sequences to pre-adjust the structure of the knowledge graph and outputs the updated knowledge graph fragments to the knowledge graph. The optimization and verification module is used to perform consistency verification on the updated knowledge graph based on logical rules and statistical tests. The inconsistencies found during the verification are sent as feedback signals to the data processing module and the relational reasoning module, respectively, so as to adaptively adjust the parsing rules of the data processing module and the model parameters of the relational reasoning module, forming a closed-loop optimization.
[0020] In this embodiment, the specific process of receiving real-time data streams from multiple heterogeneous data sources in the data processing module includes: A distributed message queue is constructed to receive and buffer real-time data streams from various heterogeneous data sources. The distributed message queue is preferably implemented using the Apache Kafka framework. An independent topic is created for each type of data source to receive data; for example, a "sensor_topic" is created for smoke sensor data streams, and a "weather_topic" is created for weather API data streams. Heterogeneous data sources include smoke sensor data streams, weather application programming interface data streams, historical report text data streams, and social media data streams. Real-time data streams are transmitted in raw formats, including structured data formats, semi-structured data formats, or unstructured text formats. Each real-time data stream consists of multiple raw data units, and each raw data unit is appended with a data source identifier and a raw timestamp upon arrival, forming a raw data stream. The system initiates a real-time data stream; the data source identifier is used to uniquely identify the corresponding heterogeneous data source. This identifier can be designed as a string format of "source type: unique ID", such as "sensor:buildingA_floor1_unit201"; the data processing module performs buffering operations on the raw real-time data stream to ensure system stability when high-concurrency data floods in, and to provide time-ordered data input for subsequent parsing steps. The buffering operation addresses different data throughput requirements by setting the number of partitions and the replication factor of the message queue. When the system detects that the instantaneous data inflow rate exceeds a preset threshold (e.g., 10,000 messages per second), it automatically triggers the flow control mechanism to temporarily store excess data and consume it according to processing capacity, thereby avoiding data loss or system overload. The specific process of parsing and normalization using an adaptive parser based on a dynamic mode registry includes: The system queries a dynamic schema registry based on the data source identifier to obtain the corresponding data schema definition. This dynamic schema registry is a centrally updated repository that stores schema definitions for each data source identifier. For example, for smoke sensor data streams, the schema definition includes field names, data types, and value ranges; for historical report text, the schema includes key entity types and relationship templates. When a new data source is added or the format of an existing data source changes, the registry is updated via the management interface without modifying the parsing code. A predefined set of parsing rules is then invoked to parse the raw data units in the original real-time data stream, extracting entity and relationship information. Each parsing rule in the set has a rule weight, indicating its relative importance in the parsing process. The parsing rule set includes path query rules for processing structured data and entity recognition rules for processing unstructured text. Path query rules include XPath for XML data and JSONPath for JSON data. The entity recognition rules integrate a BERT-based named entity recognition model, specifically trained for firefighting terminology (such as "ammonium nitrate" and "high-pressure water gun") to accurately extract entities from text. During the parsing process, the confidence score of each original data unit is calculated synchronously. The confidence score is calculated by weighted summation, and the weighted summation items include the data source reliability score, the time freshness function value, and the original data unit parsing success rate. The data source reliability score is a value between zero and one, calculated based on the historical accuracy of the data source corresponding to the data source identifier. Its specific calculation can be based on the ratio of the number of accurate data provided by the data source to the total number of accurate data provided over a past period (e.g., 30 days). The time freshness function value is calculated using an exponential function with a natural constant as the base and a negative decay factor multiplied by the difference between the current time and the original timestamp as the exponent. The decay factor defaults to 0.01. This function ensures that the freshness score of the data decays exponentially over time. For example, data differing by 100 seconds will have a freshness score of approximately 0.37 of the original value, thus giving higher weight to updated data during fusion. The original data unit parsing success rate is a value between zero and one, calculated based on the parser's completeness of entity recognition of the original data unit. For example, if an original data unit is expected to parse 5 entities but actually successfully parses 4, the parsing success rate is 0.8. Weighted The weighting coefficients used for summation include a first weighting coefficient, a second weighting coefficient, and a third weighting coefficient. The first weighting coefficient defaults to 0.5, the second weighting coefficient defaults to 0.3, and the third weighting coefficient defaults to 0.2. The sum of the first, second, and third weighting coefficients is one. These weighting coefficients can be adjusted through configuration according to specific application scenarios. For example, in the early stages of a fire alarm where real-time performance is emphasized, the proportion of the second weighting coefficient (time freshness) can be appropriately increased. The initial normalized stream output after parsing consists of a series of triples with a unified format. Each triple contains a subject, a predicate, and an object, and is associated with its data source identifier, original timestamp, and calculated confidence score. The triples are represented using the Resource Description Framework (RDF) standard, for example (sensor 001, detected, smoke concentration exceeds the standard). This step transforms the completely heterogeneous raw data into an intermediate representation that is semantically clear, formatted uniformly, and includes quality assessment. The specific process of converting real-time data streams into triplet form of a unified graph data model and attaching metadata includes: Each triple in the initial normalized flow is assigned a globally unified standardized timestamp in ISO 8601 format, such as "2023-10-27T14:30:00Z", to eliminate ambiguity caused by differences in timestamp formats from different data sources. Corresponding data source metadata is also encapsulated, including data source type, version number, and geographic coordinate information, such as {Type: "Smoke Sensor", Version: "v2.1", Coordinates: "Longitude 116.3, Latitude 39.9"}. This metadata can be used for spatial range limitation or device tracing in subsequent map construction and path inference. The triples, standardized timestamps, data source metadata, and confidence scores are collectively encapsulated into a standardized knowledge unit. The knowledge unit consists of a subject, predicate, object, standardized timestamp, data source metadata, and confidence score. This knowledge unit constitutes the smallest logical unit for updating the downstream knowledge graph, and its structured format facilitates efficient storage and retrieval. The final output is a standardized knowledge unit data stream composed of multiple knowledge units in sequence. This data stream provides downstream modules with a data foundation that is structurally unified, semantically clear, and includes quality assessment indicators. The downstream relational reasoning module can directly use the standardized timestamps in this knowledge unit data stream for time-series analysis, use the data source metadata for context-aware reasoning, and use the confidence score for weight allocation during conflict resolution. This achieves seamless and efficient integration between the data processing flow and subsequent knowledge fusion and reasoning stages.
[0021] In this embodiment, it is necessary to specifically explain the process of embedding vector calculation and dynamic relation reasoning using the graph neural network model in the relation reasoning module as follows: It receives standardized knowledge unit data streams and dynamically constructs dynamic knowledge subgraphs based on preset time windows. Nodes in the dynamic knowledge subgraph correspond to the subjects and objects in the knowledge units, collectively referred to as entities. Edges correspond to the predicates in the knowledge units, collectively referred to as relations. Each node in the dynamic knowledge subgraph has an initial feature vector, which is obtained by encoding the entity type and attributes. The spatiotemporal semantic association strength is calculated for each edge in the dynamic knowledge subgraph. The calculation process for this spatiotemporal semantic association strength is as follows: First, calculate the time proximity factor, which is one divided by the product of the time decay coefficient and the standardized timestamp difference between the two related knowledge units plus one. Next, the spatial proximity factor is calculated, which is the product of the negative spatial decay coefficient of the natural constant and the square of the difference between the geographic coordinates of the two associated entities. The semantic similarity factor is obtained again, and its value is the cosine similarity calculated based on the entity name or type using a pre-trained domain word vector model. Finally, the spatiotemporal semantic association strength is obtained by multiplying the temporal proximity factor, spatial proximity factor, and semantic similarity factor. Among them, the temporal decay coefficient and spatial decay coefficient are adjustable positive real number parameters, the absolute value of the standardized timestamp difference is taken, the geographic coordinate difference is Euclidean distance, the value range of the temporal decay coefficient is 0.005 to 0.02, and the value range of the spatial decay coefficient is 0.001 to 0.01. The optimal values are determined through experiments. The pre-trained domain word vector model is trained based on professional corpus in the fire protection field and can accurately understand the semantics of fire protection terminology. The spatiotemporal semantic association strength and the original confidence score of the knowledge unit are used together as edge attributes and input into the improved graph attention network model. The improved graph attention network model is a graph neural network model based on the attention mechanism. The improved graph attention network model is trained using the gradient descent algorithm, where the gradient of the loss function with respect to the model parameters is calculated, called the original gradient, which is used to update the model parameters. The specific process for calculating the attention coefficients between nodes is as follows: A1. For the current node and any of its neighboring nodes, first multiply the initial feature vector of the current node with the trainable parameter weight matrix to obtain the transformed feature vector of the current node. Then multiply the initial feature vector of the neighboring node with the same parameter weight matrix to obtain the transformed feature vector of the neighboring node. The dimension of the parameter weight matrix is determined according to the dimension of the initial feature vector and the expected hidden layer dimension, and is optimized during training through the backpropagation algorithm. A2. Next, the transformed feature vector of the current node, the transformed feature vector of the neighboring nodes, the confidence score associated with the edge connecting the current node and the neighboring nodes, and the spatiotemporal semantic association strength are concatenated to form a concatenated vector. A3. Next, perform a dot product operation between the concatenated vector and the trainable attention vector to obtain the dot product result; process the dot product result through a non-linear activation function to output the activation value; perform an exponential calculation on the activation value to obtain the unnormalized attention score for the neighbor node. A4. Repeat the above steps for all neighboring nodes of the current node to calculate the unnormalized attention score for each neighboring node. The nonlinear activation function is the LeakyReLU function, and its negative slope coefficient is set to 0.2. Exponential calculation ensures that all attention scores are positive, which facilitates subsequent normalization processing. A5. Sum the unnormalized attention scores of all neighboring nodes to obtain the normalized denominator; A6. Divide the unnormalized attention score of each neighboring node by the normalized denominator to obtain the final attention coefficient of the current node to each neighboring node. Normalization ensures that the sum of the attention coefficients of the current node to all its neighboring nodes is one, which conforms to the characteristics of probability distribution. The parameter weight matrix, attention vector, and nonlinear activation function are all components of the improved graph attention network model and are optimized during model training. This generates deep embedding vectors for nodes and edges. The dimensions of the deep embedding vectors are set to 128 to 256, which can fully preserve the semantic information of entities and relationships. The specific process of conflict detection based on similarity comparison and confidence weighting strategy using embedded vectors is as follows: Using the generated deep embedding vectors, semantic conflict detection and association conflict detection are performed; Semantic conflict detection targets multiple entity nodes in a dynamic knowledge subgraph that are determined to point to the same real-world object. Entity nodes are considered different descriptions of the same entity. The cosine similarity of the deep embedding vectors of any two such entity nodes is calculated and recorded as the semantic similarity value. Then, the semantic similarity value is subtracted from the semantic similarity value to obtain a semantic inconsistency score used to quantify the degree of difference between their descriptions. If the semantic inconsistency score is higher than a first preset threshold, the entity nodes involved are marked as having a semantic conflict. The first preset threshold is set between 0.5 and 0.7, and the specific value is adjusted according to the fault tolerance requirements of the application scenario. When the semantic inconsistency score is greater than or equal to 0.7, it is marked as a serious conflict, and between 0.5 and 0.7, it is marked as a mild conflict. Association conflict detection targets multiple relation edges between the same pair of entity nodes in a dynamic knowledge subgraph. It calculates the cosine similarity of the deep embedding vectors of any two such relation edges, denoted as the relation similarity value. This is then combined with predefined logical opposition rules for judgment. These rules are implemented through a logical opposition function, which judges based on a predefined knowledge base. If two relations are logically opposed, the logical opposition function returns one; otherwise, it returns zero. The predefined knowledge base includes common logically opposed relation pairs in the fire protection field, including but not limited to "on" and "off", "normal" and "faulty", and "existent" and "non-existent". If the logical opposition function returns a value of one, then the relational logical conflict score is calculated. This score is the product of the relational similarity value and the return value of the logical opposition function (i.e., one). If the relational logical conflict score is higher than the second preset threshold, then the relational edges involved are marked as having an association conflict. The second preset threshold is set between 0.6 and 0.8. When the relational logical conflict score is greater than or equal to 0.8, it is marked as a serious conflict, and when it is between 0.6 and 0.8, it is marked as a mild conflict. Finally, each node and edge in the dynamic knowledge subgraph is assigned a comprehensive conflict label. This label is a discrete state identifier obtained by combining semantic inconsistency score, relational logic conflict score and knowledge unit original confidence score, and determined according to a preset multi-level judgment rule. The multi-level judgment rules include: if the semantic inconsistency score or the relational logical conflict score is higher than its respective threshold, it is marked as a mild conflict or a severe conflict according to the degree of excess; If none of them exceed the threshold, they are marked as conflict-free. The original confidence score is used to adjust the label level or as an auxiliary judgment factor when fine-tuning in the range near the threshold. When the semantic inconsistency score or relational logic conflict score is in the floating range near the threshold, if the original confidence score is lower than 0.3, the conflict level is increased by one level; if the original confidence score is higher than 0.7, the conflict level is decreased by one level. Finally, a knowledge subgraph with conflict markers and confidence scores is output. This knowledge subgraph is formed by adding a deep embedding vector and a comprehensive conflict marker to each node and edge on the basis of the original dynamic knowledge subgraph, while retaining the original confidence score of the knowledge unit. The knowledge subgraph with conflict markers and confidence scores provides accurate data fusion basis for the downstream graph update module, significantly improving the quality and reliability of the knowledge graph.
[0022] In this embodiment, it is specifically necessary to explain the specific process of the conflict events indicated by the conflict markers in the knowledge subgraph output by the monitoring relationship reasoning module and the data freshness events indicated by the data timestamps in the graph update module: In real time, each node and edge in the knowledge subgraph is scanned to extract its conflict markers and standardized timestamps. For conflict events, the discrete values of the conflict markers are mapped to numerical conflict levels, with zero corresponding to no conflict, 0.5 corresponding to mild conflict, and 1 corresponding to severe conflict. Then, combining the confidence score corresponding to the node or edge, the conflict severity score is calculated by multiplying the conflict level value by the difference obtained after subtracting the confidence score from one. For data freshness events, calculate the time difference between the standardized timestamp and the current system time, and calculate the freshness score using an exponential function with the natural constant as the base and the negative decay coefficient multiplied by the time difference as the exponent. Then, subtract the freshness score from one to obtain the urgency level. If the freshness score is lower than the preset freshness threshold, a data freshness event is generated. The decay coefficient is set to 0.01 by default, and the freshness threshold is set to 0.3 by default. Setting the freshness threshold to 0.3 can effectively filter out old data and ensure that update events are triggered only for significantly outdated information. All detected events are stored in the event queue according to type, associated entity or relationship, conflict severity score or urgency. The specific process of incrementally updating the knowledge graph by triggering corresponding fusion strategies based on event type, and pre-adjusting the structure of the knowledge graph by combining a prediction model based on historical event sequences, is as follows: Calculate a comprehensive priority score for each event in the event queue. For conflicting events, the formula for calculating the comprehensive priority score is as follows: The severity score of the conflict is multiplied by a first weighting coefficient, and the urgency of the data freshness is multiplied by a second weighting coefficient. For data freshness events, the comprehensive priority score is calculated as: urgency of data freshness multiplied by a third weighting coefficient. The first weighting coefficient defaults to 0.7, the second weighting coefficient defaults to 0.3, and the sum of the first and second weighting coefficients is 1. The third weighting coefficient defaults to 1. These weighting coefficient values reflect the system's strategy of prioritizing high-severity conflict events while also considering data timeliness requirements. Event queues are sorted from highest to lowest comprehensive priority score. Corresponding fusion strategies are triggered based on event type. Semantic conflicts trigger entity parsing strategies, association conflicts trigger relationship resolution strategies, and data freshness events trigger data update strategies. For the entity resolution strategy, the fusion score between two entity descriptions pointing to the same real-world object, i.e., the first entity node and the second entity node, is calculated; the calculation process of the fusion score is as follows: First, the cosine similarity between the deep embedding vectors of the first entity node and the second entity node is calculated. Second, the arithmetic mean of the sum of the first and second fusion weights is calculated. The first fusion weight is the product of the confidence score of the first entity node and the first time decay factor. The second fusion weight is the product of the confidence score of the second entity node and the second time decay factor. The first time decay factor is the exponential function value of the product of a negative decay coefficient with a base of natural constant multiplied by the first time difference. The second time decay factor is the exponential function value of the product of a negative decay coefficient with a base of natural constant multiplied by the second time difference. The first time difference is the difference between the current time and the standardized timestamp of the knowledge unit corresponding to the first entity node. The second time difference is the difference between the current time and the standardized timestamp of the knowledge unit corresponding to the second entity node. The decay coefficient and the decay coefficient used in the freshness score calculation use the same parameter, with a value of 0.01. Finally, the cosine similarity is multiplied by the arithmetic mean to obtain the fusion score. The fusion score calculation uses multi-dimensional weighting to ensure that only semantically similar entities with high data quality are merged, improving fusion accuracy. If the fusion score is higher than the preset fusion threshold, the first entity node and the second entity node are merged. The default fusion threshold is 0.7. This threshold setting effectively balances the accuracy and recall of fusion, avoiding over-fusion or under-fusion. The embedding vector calculation process for the new entity generated after fusion is as follows: The product of the first fusion weight and the deep embedding vector of the first entity node is added to the product of the second fusion weight and the deep embedding vector of the second entity node to obtain a weighted sum vector. The weighted sum vector is then divided by the sum of the first fusion weight and the second fusion weight to obtain the embedding vector of the merged new entity. This weighted average method ensures that high-quality data dominates after fusion and maintains the consistency of knowledge. For the relationship resolution strategy, for logically contradictory relationship conflicts, the cosine similarity between the relationship embedding vectors of the conflicting first and second relations is calculated, and a weighted vote is performed by combining the confidence scores of the first and second relations. Relationships with high confidence scores are retained. The weighted voting mechanism automatically resolves relationship conflicts through confidence weights, reducing the need for manual intervention. For data update strategies, in response to data freshness events, the corresponding data is directly marked as expired, or new knowledge units are generated based on the prediction model to replace the original data; After executing any of the above fusion strategies, an updated knowledge sub-image segment will be generated, which contains entities, relationships and their updated attribute information after conflict resolution or data refresh; Meanwhile, a prediction model constructed using a Long Short-Term Memory (LSTM) network analyzes historical event sequences. These sequences contain the event types, associated entity identifiers, and timestamps of all events recorded within a past period, such as the past 24 hours. The prediction model learns the sequence patterns of historical events through training. Its input is a chronologically ordered sequence of historical events, and its output is the prediction score for different types of events occurring on different entities within a future period, such as the next hour. When the prediction score exceeds a preset prediction threshold, such as 0.8, a pre-adjustment operation on the knowledge graph structure is triggered. Setting the prediction threshold to 0.8 ensures that adjustments are only made for high-probability predicted events, reducing the risk of false alarms. The pre-adjustment operation includes adding potential relationship connections to entities that may experience events in advance, or adjusting the embedding vectors of related entities to reflect changes in the predicted state. Finally, the updated knowledge sub-image segments are output to the knowledge graph. The updated knowledge sub-image segments include new entities merged through entity parsing strategy, relations resolved through relation resolution strategy, data updated through data update strategy, and knowledge graph structure changes generated by prediction and pre-adjustment through prediction model. The output process adopts incremental writing method, only modifying the affected nodes and edges in the knowledge graph, and feeding the update results back to the main storage of the knowledge graph.
[0023] In this embodiment, the specific process of performing consistency verification on the updated knowledge graph based on logical rules and statistical tests in the optimization verification module is as follows: First, the knowledge graph fragments are validated using logical rules. This validation uses a predefined set of rules for the fire protection domain ontology. The rule set includes constraints on fire equipment layout specifications, building safety standards, and disaster response procedures. The rule set is formalized through descriptive logic to ensure that it is machine-readable and can be automatically reasoned. The logical rule verification automatically checks for violations in entities and relations within the knowledge graph using a theorem prover, and calculates a logical consistency score. The calculation process for this logical consistency score is as follows: The total number of rules is calculated, i.e., the total number of rules contained in the predefined rule set. For each rule, an indicator function is used to determine whether the rule has been violated. The indicator function takes a value of one when the rule is violated, and zero otherwise. The importance weight of each rule is multiplied by the corresponding indicator function value to obtain the violation contribution value of that rule. The violation contribution values of all rules are summed to obtain the weighted violation count. The weighted violation count is then increased by one and the reciprocal is taken to obtain the logical consistency score. The importance weight of each rule is a positive real number set according to the fire protection code, and the sum of all weights is one. The importance weight of the rule is set based on the mandatory level of the fire protection code clauses. The weight of mandatory clauses is not less than 0.8, and the weight of recommended clauses is set between 0.3 and 0.6. The logical consistency score ranges from 0 to 1. The higher the score, the better the logical consistency. When the score is lower than 0.6, the knowledge graph is considered to have serious logical inconsistency problems. Secondly, a statistical verification is performed in parallel. This verification is based on an anomaly detection method using graph structure entropy. Specifically, it calculates the KL divergence between the degree distribution of a knowledge graph fragment and the degree distribution of the global knowledge graph, and combines this with the entropy values of the confidence scores of all nodes in the knowledge graph fragment. Then, an adjustment coefficient is introduced for weighted summation to obtain the statistical anomaly score. Here, the KL divergence is used to quantify the difference between the degree distribution of the subgraph and the global degree distribution, the entropy value of the confidence score is used to measure the dispersion of the node confidence, and the adjustment coefficient is used to balance the weight of the two in the anomaly score calculation. The default value is 0.1. An adjustment coefficient value of 0.1 indicates that more attention is paid to structural anomalies than confidence distribution anomalies. The higher the statistical anomaly score, the greater the possibility of data anomalies. When the statistical anomaly score exceeds 0.8, a high-level alarm is triggered. Finally, the logical consistency score and statistical anomaly score are combined into a verification result vector, and specific abnormal entities and relationships are marked. The verification result vector is used for subsequent feedback signal generation. The verification result vector is stored in a fixed-dimensional array structure to facilitate subsequent module parsing and processing. The specific process of sending the inconsistencies discovered during verification as feedback signals to the data processing module and the relational reasoning module is as follows: An adaptive feedback signal is generated based on the verification result vector. For the data processing module, an analytical rule adjustment signal is generated. The calculation process of this signal is as follows: For each parsing rule, determine the set of data units processed by that rule, i.e., the set of all knowledge units generated by that rule. Count the number of anomalous data units in the set processed by that rule and calculate the proportion of these anomalous data units. Simultaneously, extract the confidence score for each anomalous data unit and calculate the difference between 1 and the confidence score. Sum the differences between 1 and the confidence score for each anomalous data unit and divide by the total number of data units in the set to obtain the base adjustment amount. Finally, multiply the base adjustment amount by the learning rate parameter to obtain the parsing rule adjustment amount. The learning rate parameter is set to 0.05 by default to control the adjustment magnitude. Setting the learning rate parameter to 0.05 ensures smooth weight adjustment and avoids drastic fluctuations. The parsing rule adjustment amount is used to dynamically modify the rule weights of the parsing rule. The rule weight update process is as follows: The updated rule weight is calculated by multiplying the previous rule weight by one and subtracting the parsing rule adjustment amount. This update mechanism can effectively reduce the influence weight of parsing rules corresponding to low-quality data. For the relational reasoning module, a model parameter optimization signal is generated. The calculation process for this signal is as follows: The logical consistency score is compared with a preset target threshold to obtain the deviation value, which defaults to 0.9. This 0.9 target threshold reflects the system's high standard for logical consistency. The partial derivatives of the statistical anomaly with respect to the parameters of the graph neural network model in the relational reasoning module are obtained. The deviation value is then processed using the hyperbolic tangent function to obtain the standardized deviation. The partial derivative is multiplied by the standardized deviation, and then multiplied by a reinforcement coefficient, which defaults to 0.2. This product is added to the original gradient during the training process of the relational reasoning module to obtain the corrected gradient. The corrected gradient is used to guide the update of the graph neural network model parameters, enabling the model to prioritize consistency optimization during training. Gradient correction effectively enhances the model's focus on consistency issues. Subsequently, multi-module parameter collaborative adjustment is performed. In the data processing module, the rule weights of the parsing rules and the contents of the dynamic pattern registry are updated according to the parsing rule adjustment signal. In the relational reasoning module, online learning is performed using the corrected gradient, and a consistency constraint term is added to the loss function. The loss function is the total loss function, which consists of the original task loss function, the difference between the first trade-off parameter multiplied by one and the logical consistency score, and the second trade-off parameter multiplied by the smaller of the statistical anomaly degree and the statistical anomaly tolerance threshold. The default value of the first trade-off parameter is 0.3, the default value of the second trade-off parameter is 0.2, and the statistical anomaly tolerance threshold is a preset threshold. It is recommended to set the statistical anomaly tolerance threshold to 0.7 to filter minor anomalies and to control the maximum influence range of the statistical anomaly degree. The introduction of the consistency constraint term allows the model to consider both task accuracy and knowledge consistency during the optimization process. Ultimately, a closed-loop optimization is formed, enabling the data processing module and the relational reasoning module to adaptively adjust and continuously improve. The closed-loop optimization mechanism can significantly improve the stability and accuracy of the system when processing dynamic fire data.
[0024] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0025] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0026] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0027] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0028] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0029] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0030] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. An intelligent question-answering and solution recommendation system based on a fire resilience knowledge graph, characterized in that, Specifically, it includes: The module comprises a data processing module, a relational reasoning module, a graph update module, and an optimization and verification module; Data processing module: Used to receive real-time data streams from multiple heterogeneous data sources, and use an adaptive parser based on a dynamic mode registry to parse and normalize the real-time data streams. The adaptive parser operates according to predefined parsing rules, converts the real-time data streams into triples of a unified graph data model, adds timestamps and data source metadata, and outputs a standardized knowledge unit data stream. Relationship Reasoning Module: Used to receive the standardized knowledge unit data stream and use a graph neural network model to perform embedding vector calculation and dynamic relationship reasoning on entities and relationships in the knowledge unit data stream. The graph neural network model includes adjustable model parameters and performs conflict detection based on similarity comparison and confidence weighting strategy of embedding vectors, and outputs a knowledge subgraph with conflict markers and confidence scores. The knowledge graph update module is used to monitor the conflict events indicated by the conflict markers and the data freshness events indicated by the data timestamps in the knowledge subgraph output by the relation reasoning module, and to trigger the corresponding fusion strategy to incrementally update the knowledge graph according to the event type. At the same time, it combines the prediction model based on historical event sequences to pre-adjust the structure of the knowledge graph and output the updated knowledge graph fragment to the knowledge graph. The optimization verification module is used to perform consistency verification on the updated knowledge graph based on logical rules and statistical tests. The inconsistencies found during the verification are sent as feedback signals to the data processing module and the relation reasoning module, respectively, so as to adaptively adjust the parsing rules of the data processing module and the model parameters of the relation reasoning module, forming a closed-loop optimization.
2. The intelligent question-answering and solution recommendation system based on fire resilience knowledge graph according to claim 1, characterized in that: The specific process of receiving real-time data streams from multiple heterogeneous data sources in the data processing module includes: A distributed message queue is constructed to receive and buffer real-time data streams from various heterogeneous data sources, including smoke sensor data streams, meteorological application programming interface data streams, historical report text data streams, and social media data streams. The real-time data streams are transmitted in raw formats, including structured data formats, semi-structured data formats, or unstructured text formats. The real-time data stream consists of multiple raw data units, each of which is appended with a data source identifier and a raw timestamp upon arrival, forming the raw real-time data stream.
3. The intelligent question-answering and solution recommendation system based on fire resilience knowledge graph according to claim 2, characterized in that: The specific process of parsing and normalizing using an adaptive parser based on a dynamic mode registry includes: The system queries the dynamic pattern registry based on the data source identifier to obtain the corresponding data pattern definition, and calls the predefined parsing rule set to parse the raw data units in the raw real-time data stream, extracting entity and relationship information. Each parsing rule in the parsing rule set has a rule weight, which is used to indicate the relative importance of the rule in the parsing process. The parsing rule set includes path query rules for processing structured data and entity recognition rules for processing unstructured text. During the parsing process, the confidence score of each original data unit is calculated synchronously. The confidence score is calculated by weighted summation, and the weighted summation items include the data source reliability score, the time freshness function value, and the original data unit parsing success rate. Among them, the data source reliability score is a value between zero and one obtained from the historical accuracy statistics of the data source corresponding to the data source identifier; the time freshness function value is the result of an exponential function calculated with the natural constant as the base and a negative decay factor multiplied by the difference between the current time and the original timestamp as the exponent; the original data unit parsing success rate is a value between zero and one obtained from the parser's entity recognition completeness of the original data unit; the weight coefficients used in the weighted summation include the first weight coefficient, the second weight coefficient, and the third weight coefficient; the preliminary normalized stream output after parsing consists of a series of triples with a uniform format, each triple containing a subject, a predicate, and an object, and associated with its data source identifier, the original timestamp, and the calculated confidence score.
4. The intelligent question-answering and solution recommendation system based on fire resilience knowledge graph according to claim 3, characterized in that: The specific process of converting real-time data streams into triplet form of a unified graph data model and attaching metadata includes: Each triple in the initial normalized stream is assigned a globally unified standardized timestamp and its corresponding data source metadata is encapsulated. The data source metadata includes data source type, version number, and geographic coordinate information. This metadata can be used for spatial range limitation or device tracing in subsequent map construction and path reasoning. The triples, standardized timestamps, data source metadata, and confidence scores are encapsulated together into standardized knowledge units. Each knowledge unit consists of a subject, predicate, object, standardized timestamp, data source metadata, and confidence score. The final output is a standardized knowledge unit data stream composed of multiple knowledge units in sequence.
5. The intelligent question-answering and solution recommendation system based on fire resilience knowledge graph according to claim 4, characterized in that: In the relation reasoning module, the specific process of using a graph neural network model for embedding vector calculation and dynamic relation reasoning is as follows: It receives standardized knowledge unit data streams and dynamically constructs dynamic knowledge subgraphs based on preset time windows. Nodes in the dynamic knowledge subgraph correspond to the subjects and objects in the knowledge units, collectively referred to as entities. Edges correspond to the predicates in the knowledge units, collectively referred to as relations. Each node in the dynamic knowledge subgraph has an initial feature vector, which is obtained by encoding the entity type and attributes. The spatiotemporal semantic association strength is calculated for each edge in the dynamic knowledge subgraph. The calculation process for this spatiotemporal semantic association strength is as follows: First, calculate the time proximity factor, which is one divided by the product of the time decay coefficient and the standardized timestamp difference between the two related knowledge units plus one. Next, the spatial proximity factor is calculated, which is the product of the negative spatial decay coefficient of the natural constant and the square of the difference between the geographic coordinates of the two associated entities. The semantic similarity factor is obtained again, and its value is the cosine similarity calculated based on the entity name or type using a pre-trained domain word vector model. Finally, the temporal proximity factor, spatial proximity factor, and semantic similarity factor are multiplied together to obtain the spatiotemporal semantic association strength. The spatiotemporal semantic association strength and the original confidence score of the knowledge unit are used together as edge attributes and input into the improved graph attention network model. The improved graph attention network model is a graph neural network model based on the attention mechanism. The improved graph attention network model is trained using the gradient descent algorithm, where the gradient of the loss function with respect to the model parameters is calculated, called the original gradient, which is used to update the model parameters. The specific process for calculating the attention coefficients between nodes is as follows: A1. For the current node and any of its neighboring nodes, first multiply the initial feature vector of the current node with the trainable parameter weight matrix to obtain the transformed feature vector of the current node, and then multiply the initial feature vector of the neighboring node with the same parameter weight matrix to obtain the transformed feature vector of the neighboring node. A2. Next, the transformed feature vector of the current node, the transformed feature vector of the neighboring nodes, the confidence score associated with the edge connecting the current node and the neighboring nodes, and the spatiotemporal semantic association strength are concatenated to form a concatenated vector. A3. Then, perform a dot product operation between the concatenated vector and the trainable attention vector to obtain the dot product result; The dot product result is processed by a non-linear activation function to output the activation value; The activation value is then exponentially calculated to obtain the unnormalized attention score for that neighboring node. A4. Repeat the above steps for all neighboring nodes of the current node to calculate the unnormalized attention score for each neighboring node. A5. Sum the unnormalized attention scores of all neighboring nodes to obtain the normalized denominator; A6. Divide the unnormalized attention score of each neighboring node by the normalized denominator to obtain the final attention coefficient of the current node to each neighboring node. This then generates deep embedding vectors for nodes and edges.
6. The intelligent question-answering and solution recommendation system based on fire resilience knowledge graph according to claim 5, characterized in that: The specific process of conflict detection based on similarity comparison and confidence weighting strategy using embedded vectors is as follows: Using the generated deep embedding vectors, semantic conflict detection and association conflict detection are performed; Semantic conflict detection targets multiple entity nodes in a dynamic knowledge subgraph that are determined to point to the same real-world object. Entity nodes are considered as different descriptions of the same entity. The cosine similarity of the deep embedding vectors of any two such entity nodes is calculated and recorded as the semantic similarity value. Then, the semantic inconsistency score is obtained by subtracting the semantic similarity value from one. If the semantic inconsistency score is higher than a first preset threshold, the entity nodes involved are marked as having semantic conflicts. Association conflict detection targets multiple relation edges between the same pair of entity nodes in a dynamic knowledge subgraph. It calculates the cosine similarity of the deep embedding vectors of any two such relation edges, denoted as the relation similarity value. It then combines this with predefined logical opposition rules for judgment. The logical opposition rules are implemented through a logical opposition function, which judges based on a predefined knowledge base. If two relations are logically opposed, the logical opposition function returns one; otherwise, it returns zero. If the logical opposition function returns a value of one, then the relational logical conflict score is calculated. This score is the product of the relational similarity value and the return value of the logical opposition function. If the relational logical conflict score is higher than the second preset threshold, then the relational edges involved are marked as having an association conflict. Finally, each node and edge in the dynamic knowledge subgraph is assigned a comprehensive conflict label. This label is a discrete state identifier obtained by combining semantic inconsistency score, relational logic conflict score and knowledge unit original confidence score, and determined according to a preset multi-level judgment rule. The multi-level judgment rules include: if the semantic inconsistency score or the relational logical conflict score is higher than its respective threshold, it is marked as a mild conflict or a severe conflict according to the degree of excess; If none of them exceed the threshold, they are marked as conflict-free. Finally, the output is a knowledge subgraph with conflict markers and confidence scores.
7. The intelligent question-answering and solution recommendation system based on fire resilience knowledge graph according to claim 6, characterized in that: In the graph update module, the specific process of conflict events indicated by conflict markers in the knowledge subgraph output by the monitoring relationship reasoning module and data freshness events indicated by data timestamps is as follows: In real time, each node and edge in the knowledge subgraph is scanned to extract its conflict markers and standardized timestamps. For conflict events, the discrete values of the conflict markers are mapped to numerical conflict levels, with zero corresponding to no conflict, 0.5 corresponding to mild conflict, and 1 corresponding to severe conflict. Then, combining the confidence score corresponding to the node or edge, the conflict severity score is calculated by multiplying the conflict level value by the difference obtained after subtracting the confidence score from one. For data freshness events, calculate the time difference between the standardized timestamp and the current system time, and calculate the freshness score using an exponential function with the natural constant as the base and the negative decay coefficient multiplied by the time difference as the exponent. Then, subtract the freshness score from one to obtain the urgency level. If the freshness score is lower than the preset freshness threshold, a data freshness event is generated. All detected events are scored or stored in the event queue according to type, associated entity or relationship, conflict severity, or urgency.
8. The intelligent question-answering and solution recommendation system based on fire resilience knowledge graph according to claim 7, characterized in that: The specific process of incrementally updating the knowledge graph by triggering corresponding fusion strategies based on event types, and pre-adjusting the structure of the knowledge graph by combining a prediction model based on historical event sequences, is as follows: Calculate a comprehensive priority score for each event in the event queue. For conflicting events, the formula for calculating the comprehensive priority score is as follows: The severity score of the conflict is multiplied by a first weighting coefficient, and the urgency of the data freshness is multiplied by a second weighting coefficient. For data freshness events, the comprehensive priority score is calculated as: urgency of data freshness multiplied by a third weighting coefficient. Event queues are sorted from highest to lowest comprehensive priority score. Corresponding fusion strategies are triggered based on event type. Semantic conflicts trigger entity parsing strategies, association conflicts trigger relationship resolution strategies, and data freshness events trigger data update strategies. For the entity resolution strategy, the fusion score between two entity descriptions that point to the same real-world object is calculated, namely the first entity node and the second entity node. The calculation process for the fusion score is as follows: First, the cosine similarity between the deep embedding vectors of the first entity node and the second entity node is calculated. Second, the arithmetic mean of the sum of the first fusion weight and the second fusion weight is calculated. The first fusion weight is the product of the confidence score of the first entity node and the first time decay factor. The second fusion weight is the product of the confidence score of the second entity node and the second time decay factor. The first time decay factor is the exponential function value of the product obtained by multiplying a negative decay coefficient with a base of natural constant by the first time difference. The second time decay factor is the exponential function value of the product obtained by multiplying a negative decay coefficient with a base of natural constant by the second time difference. The first time difference is the difference between the current time and the standardized timestamp of the knowledge unit corresponding to the first entity node. The second time difference is the difference between the current time and the standardized timestamp of the knowledge unit corresponding to the second entity node. The decay coefficient and the decay coefficient used in the freshness score calculation are the same parameter. Finally, the cosine similarity is multiplied by the arithmetic mean to obtain the fusion score. If the fusion score is higher than the preset fusion threshold, the first entity node and the second entity node are merged; the embedding vector calculation process for the new entity generated after merging is as follows: The product of the first fusion weight and the deep embedding vector of the first entity node is added to the product of the second fusion weight and the deep embedding vector of the second entity node to obtain a weighted sum vector. The weighted sum vector is then divided by the sum of the first fusion weight and the second fusion weight to obtain the embedding vector of the merged new entity. For the relation resolution strategy, for logically contradictory relation conflicts, the cosine similarity between the relation embedding vectors of the conflicting first relation and second relation is calculated, and a weighted vote is performed by combining the confidence scores of the first relation and the second relation. Relationships with higher confidence scores are retained. For data update strategies, for data freshness events, the corresponding data is directly marked as expired; After executing any of the above fusion strategies, an updated knowledge sub-image segment will be generated; Meanwhile, a prediction model constructed using a long short-term memory network is used to analyze historical event sequences. These sequences include the event types, associated entity identifiers, and timestamps of all events recorded within a past period. The prediction model learns the sequence patterns of historical events through training. Its input is a chronologically ordered sequence of historical events, and its output is a prediction score for the occurrence of different types of events on different entities within a future period. When the prediction score is higher than a preset prediction threshold, a pre-adjustment operation on the knowledge graph structure is triggered. Finally, the updated knowledge sub-image segments are output to the knowledge graph. The updated knowledge sub-image segments include new entities merged through entity parsing strategy, relations resolved through relation resolution strategy, data updated through data update strategy, and knowledge graph structure changes generated after prediction and pre-adjustment through prediction model.
9. The intelligent question-answering and solution recommendation system based on fire resilience knowledge graph according to claim 8, characterized in that: The specific process of performing consistency verification on the updated knowledge graph based on logical rules and statistical tests in the optimization verification module is as follows: First, the knowledge graph fragments are validated using logical rules. This validation uses a predefined set of rules for the fire protection domain ontology, which includes constraints on fire equipment layout specifications, building safety standards, and disaster response procedures. The logical rule verification automatically checks for violations in entities and relations within the knowledge graph using a theorem prover, and calculates a logical consistency score. The calculation process for this logical consistency score is as follows: The total number of rules is the total number of rules contained in a predefined rule set. For each rule, an indicator function is used to determine whether the rule has been violated. The indicator function takes a value of one when the rule is violated, and a value of zero otherwise. The importance weight of each rule is multiplied by the corresponding indicator function value to obtain the violation contribution value of that rule. The violation contribution values of all rules are summed to obtain the weighted violation count. The weighted violation count is incremented by one and the reciprocal is taken to obtain the logical consistency score. Secondly, a statistical verification is performed in parallel. This verification is based on the anomaly detection method of graph structure entropy. Specifically, it calculates the KL divergence between the degree distribution of the knowledge graph fragment and the degree distribution of the global knowledge graph, combines the entropy value of the confidence score of all nodes in the knowledge graph fragment, and then introduces an adjustment coefficient for weighted summation to obtain the statistical anomaly degree. Finally, the logical consistency score and statistical anomaly score are combined into a verification result vector, and specific abnormal entities and relationships are marked.
10. The intelligent question-answering and solution recommendation system based on fire resilience knowledge graph according to claim 9, characterized in that: The specific process of sending the inconsistencies discovered during verification as feedback signals to the data processing module and the relational reasoning module is as follows: An adaptive feedback signal is generated based on the verification result vector. For the data processing module, an analytical rule adjustment signal is generated. The calculation process of this signal is as follows: For each parsing rule, determine the set of data units processed by that parsing rule, that is, the set of all knowledge units generated by that parsing rule; count the number of anomalous data units in the set of data units processed by that parsing rule, and calculate the proportion of these anomalous data units; at the same time, extract the confidence score of each anomalous data unit, and calculate the difference between the confidence score and the score. The difference between the confidence scores and the base adjustment is calculated by summing the values of each outlier data unit and dividing by the total number of data units in the set. Finally, the base adjustment is multiplied by the learning rate parameter to obtain the parsing rule adjustment. The parsing rule adjustment is used to dynamically modify the rule weights of the parsing rules. The rule weight update process is as follows: The updated rule weight is calculated by multiplying the original rule weight by one and subtracting the adjustment amount of the parsing rule; For the relational reasoning module, a model parameter optimization signal is generated. The calculation process for this signal is as follows: The logical consistency score is compared with a preset target threshold to obtain a deviation value. The partial derivative of the statistical anomaly with respect to the parameters of the graph neural network model in the relational reasoning module is obtained. The deviation value is processed by the hyperbolic tangent function to obtain the standardized deviation. The partial derivative is multiplied by the standardized deviation and then multiplied by the reinforcement coefficient. The product result is added to the original gradient during the training process of the relational reasoning module to obtain the corrected gradient. Subsequently, multi-module parameter collaborative adjustment is performed. In the data processing module, the rule weights of the parsing rules and the contents of the dynamic mode registry are updated according to the parsing rule adjustment signal. In the relational reasoning module, online learning is performed using the modified gradient, and a consistency constraint term is added to the loss function. The loss function is the total loss function, which consists of the original task loss function, the difference between the first trade-off parameter multiplied by one and the logical consistency score, and the sum of the second trade-off parameter multiplied by the smaller of the statistical anomaly degree and the statistical anomaly tolerance threshold. Ultimately, a closed-loop optimization is formed, enabling the data processing module and the relational reasoning module to adaptively adjust and continuously improve.
Citation Information
Cited By
Low-code business data non-sensing automatic backflow and knowledge processing method
CN122198083A