AI-based large-scale model interaction and knowledge base methods for fire inspection
By establishing dynamic association paths and fusing speech semantics with water pressure signals, the problem of insufficient semantic capture in traditional fire inspections has been solved, enabling efficient and accurate retrieval and verification in fuzzy contexts.
Patent Information
- Application Number
- CN202611238519.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-15
- Publication Date
- 2026-11-17
AI Technical Summary
Traditional fire inspection methods rely on manual rule entry and static synonym mapping, which makes it difficult to accurately capture deep semantic relationships. When faced with fuzzy semantic scenarios, the retrieval accuracy is low, and it cannot guarantee the accurate matching of fire protection clauses and the accurate execution of business verification operations.
Dynamic association paths are established based on conditional probability inversion logic. The query vector is formed by integrating speech semantics and water pressure signals. Similarity is extracted from the association paths to generate interactive instructions. Words are rearranged and redundancy is removed based on syntactic distance. This breaks through the limitations of static comparison and integrates multi-dimensional on-site information to carry out dynamic calculations.
To ensure the efficient and accurate execution of fire safety retrieval and verification operations in complex and ambiguous contexts, it directly breaks through the limitations of conventional fixed scripts and static comparisons, and deeply integrates multi-dimensional on-site information to perform dynamic feature calculations.
Smart Images

Figure CN123115377A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and in particular to an AI large-scale model interaction and knowledge base method for fire inspection. Background Technology
[0002] The field of natural language processing technology mainly involves the interactive parsing operations between computers and human natural language. Its core aspects include vocabulary segmentation, part-of-speech tagging, syntactic tree construction, and contextual semantic parsing. Overall, it transforms unstructured text into machine-readable structured representations based on predetermined grammatical rules and corpus statistical information to complete entity recognition and intent classification of text information.
[0003] Among them, the traditional AI big model interaction and knowledge base method for fire inspection refers to the operation of retrieving normative clauses and verifying business rules in the scenario of fire facility inspection. It usually involves business personnel manually extracting fire law and regulation texts and entering them into a two-dimensional relational data table segment by segment. A static synonym mapping table based on industry-specific terms is established. After receiving the inspection question text, the corresponding text paragraph is found in the above two-dimensional relational data table through an inverted index and string exact matching mechanism. Static options are issued according to a pre-written fixed judgment tree branch script. Finally, a specific database query command is used to directly compare the fire facility parameters filled in by the inspectors with the pre-set standard threshold limits in the relational data table.
[0004] Traditional fire inspection interaction relies on manually entering rules into relational data tables. During the retrieval stage, it excessively depends on static synonym mapping and string precision matching. It relies solely on fixed rules for mechanical correspondence, making it difficult to accurately capture deep semantic relationships when faced with on-site natural language questions. Furthermore, it blindly compares on-site facility parameters with fixed judgment scripts and static thresholds, lacking the ability to dynamically integrate multi-dimensional inspection features. As a result, the retrieval accuracy is prone to deviation when facing ambiguous semantic scenarios, making it impossible to guarantee the accurate matching of fire protection clauses and business verification operations. Summary of the Invention
[0005] The technical problem to be solved by this invention is to provide an AI large-scale model interaction and knowledge base method for fire inspection. This invention establishes dynamic association paths based on conditional probability inversion logic to enhance semantic capture, integrates speech semantics and water pressure signals to form query vectors, extracts similarity to generate instructions based on association paths, rearranges words according to syntactic distance and removes redundancy, breaks through the limitations of static comparison, integrates multi-dimensional on-site information to carry out dynamic calculations, and ensures accurate fire retrieval and verification in fuzzy contexts.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: The AI-powered large-scale model interaction and knowledge base approach for fire inspection includes the following steps: S1: Obtain the original text of the fire protection code and perform word segmentation and sentence segmentation. Input the word segmentation and sentence segmentation results into the Transformer model for feature parsing, extract lexical feature vectors and count the frequency of words. Based on the frequency of words, perform feature mapping to output condition and action attribute words and combine them to generate a fire protection knowledge sequence. S2: Extract vocabulary feature vectors based on fire safety knowledge sequences and calculate conditional probabilities. When the conditional probability of a later position exceeds the conditional probability of a previous position, reverse the sequence position and assign a reversal label to generate a knowledge association path. S3: Acquire the on-site inspection voice sound wave electrical signal and extract the natural language text word vector. Combine the knowledge association path space mapping to analyze the semantic feature vector. Collect the simulated electrical signal of the fire pipeline pressure sensor. Obtain the current water pressure and convert it into a water pressure feature vector. Then, concatenate it with the semantic feature vector to generate an interactive query vector. S4: Extract the lexical feature vectors corresponding to the conditional attribute words based on the knowledge association path, calculate the feature similarity by combining the interactive query vector and sort them in descending order, extract the action attribute words corresponding to the first and second feature similarity and the connected entity words and concatenate the text to generate fire inspection interactive instructions.
[0007] The following are further optimizations of the above technical solution by the present invention: The fire safety knowledge sequence includes lexical feature vectors, lexical frequency statistics, and combinations of conditional and action attribute words. The knowledge association path includes lexical feature vectors, conditional probability calculation results, and sequence reversal identifiers. The interactive query vector includes natural language text lexical vectors, semantic feature vectors, and water pressure results. The fire safety inspection interactive instructions include action attribute words, connected entity words, and text splicing results.
[0008] Further optimization: The specific steps for S1 are as follows: S101: Obtain the original text of the fire protection code and perform word segmentation and sentence segmentation. Extract the corresponding word identifiers for word segmentation and sentence segmentation. Perform lexical attribute annotation on the word identifiers to extract the corresponding morpheme tags. Input the morpheme tags and word identifiers into the Transformer model for feature parsing and establish the word sequence of the code text. S102: Based on the standard text word sequence, self-attention dot product calculation is performed on the internal elements of the standard text word sequence. Based on the dot product calculation value, the internal elements are linearly transformed to extract the word feature vector. The frequency feature encoding set is obtained by summing the number of times the word feature vector appears in the context. S103: Perform feature mapping operation on the frequency feature encoding set, compare the calculated value with the preset classification benchmark value, and extract the corresponding condition attribute words and action attribute words when the calculated value exceeds the preset classification benchmark value, and then concatenate and aggregate them to generate a fire protection knowledge sequence. The Transformer model consists of a sequence feature embedding layer, a position encoder, a multi-head self-attention network, a fully connected feedforward network, a data normalization module, and a residual connection path.
[0009] Further optimization: The classification benchmark value is determined by obtaining the benchmark word frequency data in the underlying knowledge base, extracting the feature statistics in the frequency feature encoding set, concatenating the benchmark word frequency data and the feature statistics, performing dimensionality reduction operation to extract the expected distribution center term, and multiplying the expected distribution center term with a preset deviation coefficient.
[0010] Further optimization: The specific steps for S2 are as follows: S201: Extract the corresponding word feature vectors based on the fire knowledge sequence, perform conditional probability summation on the co-occurrence frequency distribution of word feature vectors in the continuous sequence space, summarize the corresponding network quantization mapping values of continuous probability calculation, and establish the probability sequence of adjacent words. S202: Call the adjacent word probability sequence, compare the corresponding conditional probability values of adjacent positions, and reverse the order of the current mapping position when the conditional probability of the later position exceeds the conditional probability of the earlier position. Assign reverse label codes to the swapped word items to obtain the reverse label state set. S203: Reconstruct and arrange the distributed vocabulary items in the inverted identifier state set according to their dependency hierarchy, extract the topological coefficients of the corresponding connection edges for the vocabulary item reconstruction, and perform hierarchical serialization association splicing and aggregation on the reconstructed vocabulary items based on the topological coefficients of the connection edges to generate knowledge association paths.
[0011] Further optimization: The specific steps for S3 are as follows: S301: Acquire the on-site inspection voice acoustic signal through the on-site microphone and perform multimodal feature conversion, extract natural language text word vectors and perform dot product operation in combination with knowledge association paths, extract projection mapping coefficients and perform semantic space projection transformation on the text word vectors to obtain semantic feature vectors. S302: The analog electrical signal is collected by the on-site fire pipeline pressure sensor and the amplitude is limited and filtered. The smoothing level parameter is extracted and the quantization step size is set. The analog electrical signal is converted from analog to digital to extract discrete data points. The discrete data points are scaled and multiplied to extract the corresponding water pipe operating pressure, and the current water pressure data is obtained. S303: Call the current water pressure data, expand the current water pressure with scalar dimension to extract the extended water pressure component, and concatenate it with the semantic feature vector along the preset sequence channel to extract joint data elements. Perform format conversion and rearrangement on the joint data elements to generate an interactive query vector.
[0012] Further optimization: The specific steps for S4 are as follows: S401: Extract the lexical feature vectors corresponding to the conditional attribute words based on the knowledge association path, and combine them with the semantic feature vectors in the interactive query vector to perform element-wise multiplication and summation. Based on the summation value and the corresponding vector norm, perform quotient division to obtain the inner product association value term, and establish a feature similarity set. S402: Perform bubble sort comparison on the numerical values of multiple elements within the feature similarity set, rearrange the corresponding index identifiers of the elements according to the decreasing numerical order, extract the action attribute words and connected entity words corresponding to the first numerical value, collect the text data corresponding to the words, and obtain the array of the first entity words. S403: Perform character encoding extraction on the action attribute words and connected entity words within the first entity word array to extract the associated string sequence. Then, perform end-to-end concatenation and aggregation on the associated string sequence according to the preset splicing template to generate fire inspection interaction instructions.
[0013] Further optimization: The method also includes: S5: Calculate the dependency syntactic distance between multiple connected entity words and action attribute words in the fire inspection interaction command, rearrange the positions of connected entity words whose dependency syntactic distance does not reach the preset distance threshold and remove redundant words, and generate the fire inspection interaction command text. The fire inspection interactive command text includes dependency syntactic distance, positional rearrangement results, and redundant word removal.
[0014] Further optimization: The specific steps for S5 are as follows: S501: Call multiple connected entity words and action attribute words in the fire inspection interaction command and perform statistical summation calculation on the position span distributed within the sequence association hierarchical structure. Extract the position span statistical value and quantize the mapping to obtain the hierarchical path length parameter, and establish a dependency syntax distance set. S502: Compare the length parameter in the dependency syntax distance set with the preset hierarchical distance threshold. If the length parameter does not reach the preset hierarchical distance threshold, extract the related connected entity words. Perform descending shift, replacement and recombination on the sequence dimension for the connected entity words to obtain the rearranged entity word sequence. S503: Compare the character feature overlap of the vocabulary elements within the rearranged entity vocabulary sequence. If the character feature overlap reaches the preset overlap benchmark value, delete the vocabulary elements, extract the associated characters of the retained vocabulary elements, and perform end-to-end splicing and combination to generate the fire inspection interactive instruction text.
[0015] Further optimization: The hierarchical distance threshold is determined by obtaining standard sentence sequences from the benchmark fire corpus, performing dependency parsing on the standard sentence sequences to extract standard path span values, calculating the average of the standard path span values to obtain the distance parameter, and multiplying the distance parameter with a preset distribution scaling factor to determine the distance.
[0016] The present invention, by adopting the above technical solution, has at least the following beneficial effects: 1. This invention establishes dynamic association paths based on the inverted logic of word frequency and conditional probability to enhance the efficiency of deep semantic capture. It integrates on-site voice semantic features with real-time signals from water pressure sensors to form an interactive query vector. It extracts feature similarity based on the above association paths and generates interactive instructions. It rearranges the positions of entity words and removes redundancy based on dependency syntactic distance. It directly breaks through the limitations of conventional fixed scripts and static comparisons, deeply integrates multi-dimensional on-site information and performs dynamic feature calculations, effectively ensuring the efficient and accurate execution of fire protection code retrieval and business verification operations in complex and fuzzy contexts. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the steps of the present invention; Figure 2 This is a detailed schematic diagram of S1 of the present invention; Figure 3 This is a detailed schematic diagram of S2 of the present invention; Figure 4 This is a detailed schematic diagram of S3 of the present invention; Figure 5 This is a detailed schematic diagram of S4 of the present invention; Figure 6 This is a detailed schematic diagram of S5 of the present invention. Detailed Implementation
[0019] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0020] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0021] Please see Figure 1 This invention provides an AI large-scale model interaction and knowledge base method for fire inspection, including the following steps: S1: Obtain the original text of the fire protection code and perform word segmentation and sentence segmentation. Input the word segmentation and sentence segmentation results into the Transformer model for feature parsing, extract lexical feature vectors and count the frequency of words. Based on the frequency of words, perform feature mapping to output condition and action attribute words and combine them to generate a fire protection knowledge sequence. S2: Extract vocabulary feature vectors based on fire safety knowledge sequences and calculate conditional probabilities. When the conditional probability of a later position exceeds the conditional probability of a previous position, reverse the sequence position and assign a reversal label to generate a knowledge association path. S3: Acquire the on-site inspection voice sound wave electrical signal and extract the natural language text word vector. Combine the knowledge association path space mapping to analyze the semantic feature vector. Collect the simulated electrical signal of the fire pipeline pressure sensor. Obtain the current water pressure and convert it into a water pressure feature vector. Then, concatenate it with the semantic feature vector to generate an interactive query vector. S4: Extract the lexical feature vectors corresponding to the conditional attribute words based on the knowledge association path, calculate the feature similarity by combining the interactive query vector and sort them in descending order, extract the action attribute words and connected entity words corresponding to the first and second feature similarity and perform text concatenation to generate fire inspection interactive instructions. S5: Calculate the dependency syntactic distance between multiple connected entity words and action attribute words in the fire inspection interaction command, rearrange the positions of connected entity words whose dependency syntactic distance does not reach the preset distance threshold, and remove redundant words to generate the fire inspection interaction command text.
[0022] The fire safety knowledge sequence includes lexical feature vectors, lexical frequency statistics, and combinations of conditional and action attribute words. The knowledge association path includes lexical feature vectors, conditional probability calculation results, and sequence reversal identifiers. The interactive query vector includes natural language text lexical vectors, semantic feature vectors, and water pressure results. The fire safety inspection interactive instructions include action attribute words, connected entity words, and text splicing results. The fire safety inspection interactive instruction text includes dependency syntactic distance, position rearrangement results, and redundant word removal.
[0023] Please see Figure 2 The specific steps of S1 are as follows: S101: Obtain the original text of the fire protection code and perform word and sentence segmentation. Extract the corresponding word identifiers for word and sentence segmentation. Perform lexical attribute annotation on the word identifiers to extract the corresponding morpheme tags. Input the morpheme tags and word identifiers into the Transformer model for feature parsing and establish the word sequence of the code text.
[0024] The original text of fire safety regulations in document format is obtained from a fire and rescue database. Whitespace characters and special garbled characters are removed, and non-standard invisible characters are filtered using regular expressions. English characters are uniformly lowercase. The cleaned text is then segmented into words and sentences, cut into independent short sentences according to punctuation marks, and word segments are obtained for each word. Lexical attribute annotation is performed on each word identifier, assigning a corresponding morpheme label. Non-numerical morpheme labels are quantized, with nouns quantized to a label value of 1 and verbs to a label value of 2. The word identifier encoding value and the morpheme label label value are added together and multiplied by an input compensation coefficient. The input compensation coefficient is a fixed value of 2.5, determined by statistical variance analysis of 100 sets of regular text. The word identifier encoding value 102 and the morpheme label label value 2 are extracted. The sum of 102 and 2 is calculated to obtain 104. This sum is multiplied by the input compensation coefficient 2.5 to obtain the input feature value 260. As the foundational data, this data is input into the feature parsing model. The input layer of this model receives a 512-dimensional vector matrix, and the hidden layer consists of six encoder blocks stacked in series. Each encoder block contains a multi-head attention mechanism with eight attention heads and a 2048-dimensional feedforward neural network. Data is transferred between layers via residual connections. The hidden layer uses a linear rectified function as the activation function, and the output layer contains a linear mapping layer. During model training, the cross-entropy loss function is used to measure the error between the predicted and true distributions. The negative average value of the true label log probability is calculated to reflect the error magnitude. An adaptive moment estimation optimization algorithm is used to update the model parameters with an initial learning rate of 0.001, a batch size of 32, and 100 iterations. The trained model is then used to perform feature parsing on morpheme labels and lexical identifiers, extracting deep feature representations that imply contextual semantic relationships. The parsed feature vectors are arranged in word order to establish a standardized text lexical sequence.
[0025] S102: Based on the standard text lexical sequence, perform self-attention dot product calculation on the internal elements of the standard text lexical sequence, extract lexical feature vectors by linear transformation of the internal elements according to the dot product calculation value, and sum the frequency feature encoding set by accumulating the number of times the lexical feature vectors appear in the context.
[0026] Self-attention dot product calculation is performed based on the internal elements of the established standard text word sequence. For each element within the sequence, a query vector, key vector, and value vector are generated. The first and second digits of the query vector and key vector are extracted. The dot product of the first digit of the query vector and the first digits of all key vectors is calculated to obtain the attention score. The feature value of the first element passed down from the previous feature parsing process is processed by layer normalization to extract the first digit of the query vector as 2.60, and the first digit of the key vector of the second element as 1.50. The dot product is obtained by multiplying the first digit of the query vector and the first digit of the key vector to obtain the base value of the dot product, resulting in a product of 3.90. The calculated product value is processed by a scaling exponential normalization function to transform the probability distribution, mapping the value to the interval between 0 and 1, resulting in a specific attention weight allocation value of 0.85. Based on the attention weight allocation value, the value vector of the internal element of the sequence is... A weighted summation linear transformation operation is performed; the attention weight allocation value of 0.85 is multiplied by the first value of the value vector, 10, to obtain a weighted feature value of 8.5. A lexical feature vector aggregating global context information is extracted through multiple accumulations; for the obtained lexical feature vector, the frequency of its occurrence within the context window is counted; the context window size is set to 50 words, and the number of matches between the current lexical feature vector and the same feature vector within the window is counted, and all match counts are summed; for a certain alarm lexical feature vector, within a consecutive 50-word window, the number of matches in the first paragraph is extracted as 2, and the number of matches in the second paragraph is extracted as 3. The number of matches in the first paragraph and the number of matches in the second paragraph are summed to obtain a total frequency value of 5; the lexical feature vector and the total frequency value are combined and concatenated to obtain the final frequency feature encoding set.
[0027] Table 1. Lexical Feature Frequency Statistics:
[0028] Table 1 lists some statistics for this step, showing the number of times the feature vector is accumulated within the window.
[0029] S103: Perform feature mapping operation on the frequency feature encoding set, compare the calculated value with the preset classification benchmark value, and extract the corresponding condition attribute words and action attribute words when the calculated value exceeds the preset classification benchmark value, and then concatenate and aggregate them to generate a fire protection knowledge sequence.
[0030] The Transformer model consists of a sequence feature embedding layer, a position encoder, a multi-head self-attention network, a fully connected feedforward network, a data normalization module, and a residual connection path.
[0031] The system receives the generated frequency feature code set and performs feature mapping operations. For each set of joint coded data in the frequency feature code set, it obtains the feature frequency value and the basic code value, multiplies the feature frequency value by a feature scaling factor, and sums the product with the basic code value to obtain the final feature mapping operation value. The feature scaling factor is selected based on the optimal mapping slope obtained after linear regression analysis of the text data of 100 fire drill reports from previous years, and is set to 1.5. Substituting the total occurrence frequency value of 5 obtained in the previous steps as the feature frequency value, and obtaining the basic code value of 20.0 through the word vector matrix, the system multiplies the feature frequency value of 5 by the feature scaling factor of 1.5 to obtain the preliminary product value of 7.5. The system adds the preliminary product value of 7.5 to the basic code value of 20.0 to obtain the final feature mapping operation value of 27.5. The system then compares the obtained feature mapping operation value with the preset classification benchmark value. The preset classification benchmark value is obtained by extracting the mandatory values from 150 revisions of fire protection codes from previous years. The feature value of the clause, after being smoothed by mean, is set to 25.0. This value defines the data boundary of the term sequence belonging to the strongly normative constraint term category. The feature mapping operation value of 27.5 is directly compared with the preset classification benchmark value of 25.0 to determine whether the feature mapping operation value is greater than the preset classification benchmark value. Since the feature mapping operation value of 27.5 exceeds the preset classification benchmark value of 25.0, it is determined that the current feature data meets the extraction conditions of strongly normative constraints. When it is determined that the operation value exceeds the preset classification benchmark value, conditional attribute words representing the triggering environment and action attribute words representing the specific execution operation are extracted from the normative text fragment. The extracted conditional attribute words and action attribute words are concatenated and aggregated. The conditional attribute words are placed at the front end with a connector, and the action attribute words are placed at the back end for string merging processing to generate a fire protection knowledge sequence with conditional triggering logic. The extracted conditional attribute word is "fire occurred" and the extracted action attribute word is "sprinkler activation". After the concatenation and aggregation operation, the complete fire protection knowledge sequence "fire occurred and sprinkler activation" is obtained.
[0032] Please see Figure 3 The specific steps of S2 are as follows: S201: Extract the corresponding word feature vectors based on the fire safety knowledge sequence, perform conditional probability summation on the co-occurrence frequency distribution of word feature vectors in the continuous sequence space, summarize the continuous probability calculation corresponding to the network quantization mapping value, and establish the probability sequence of adjacent words.
[0033] The generated fire safety knowledge sequence is obtained, and the specific words contained in the sequence are extracted and input into a feature retrieval database to obtain the corresponding word feature vector data. The feature retrieval database is constructed from 3,000 fire accident investigation reports from the past 5 years. For the extracted word feature vectors, a statistical operation is performed on the co-occurrence frequency distribution within a continuous sequence space, with the sliding window spanning 5 words. The number of times the target conditional attribute word and action attribute word co-occur within the sliding window is counted as the co-occurrence frequency. The co-occurrence frequency value is divided by the total number of independent occurrences of the conditional attribute word in the entire text to obtain the single-occurrence conditional probability value. For example, if the total number of independent occurrences of the conditional attribute word is 200, and the co-occurrence frequency with the action attribute word within the sliding window is 160, dividing 160 by 200 yields a single-occurrence conditional probability value of 0.80. The single-occurrence conditional probability values are calculated in 5 consecutive segments of the space, yielding 5 single-occurrence conditional probability values of 0.80, 0.75, 0.85, 0.90, and 0.70 respectively. The summation of individual conditional probability values yields a continuous probability sum of 4.00. This continuous probability sum is then input into a mapping parsing network to calculate the network quantization mapping value. This network consists of one input layer, two fully connected hidden layers, and one output layer. The input layer receives continuous probability data with dimension 1. The first hidden layer contains 128 neurons, and the second hidden layer contains 64 neurons. Data is transferred between layers using fully connected logic. The hidden layers use a linear rectified function as the activation function, and the output layer uses a logistic B-type activation function. During network training, the mean squared error loss function is used to measure the squared difference between the predicted mapping value and the true value. An adaptive moment estimation algorithm is used to update parameters with a learning rate of 0.005, a batch size of 32, and 150 iterations. The continuous probability sum of 4.00 is input into the trained network, and the output network quantization mapping value is 0.82. The network quantization mapping values corresponding to each word are associated and recorded according to the text sequence to establish a probability sequence of adjacent words.
[0034] S202: Call the probability sequence of adjacent words, compare the corresponding conditional probability values of adjacent positions, and reverse the order of the current mapping position if the conditional probability of the later position exceeds the conditional probability of the earlier position. Assign a reverse label code to the word item that has been swapped to obtain the reverse label state set.
[0035] The system calls the established adjacent word probability sequence and extracts the network quantization mapping values corresponding to each word node in the sequence as conditional probability values. Within the current sequence, it performs a comparison operation on the corresponding conditional probability values of adjacent positions, selects the word in the preceding position as the preceding mapping node, extracts the corresponding preceding conditional probability, and selects the word immediately following it as the following mapping node, extracts the corresponding following conditional probability. The system then calculates the difference between the following and preceding conditional probabilities and determines whether the obtained probability difference exceeds the preset inversion tolerance benchmark value. The preset inversion tolerance baseline value is set with reference to the probability deviation statistics of inverted sentence structures in the previous 200 knowledge graph constructions. The mean deviation is selected as the baseline, and the inversion tolerance baseline value is set to 0.15. Substituting the conditional probability value corresponding to the preceding mapping node as 0.65 and the conditional probability value corresponding to the following mapping node as 0.85, the following conditional probability value of 0.85 is subtracted from the preceding conditional probability value of 0.65 to calculate the probability difference value of 0.20. The calculated probability difference value of 0.20 is then compared with the preset inversion tolerance baseline value of 0.15. The value comparison determines that the current probability difference of 0.20 exceeds the inversion tolerance baseline value of 0.15, indicating that the execution condition dependency of the subsequent action word is higher than that of the preceding condition word, triggering the judgment mechanism that the subsequent conditional probability exceeds the preceding conditional probability. If the judgment passes, a reverse swap adjustment operation is performed on the current mapping position, moving the word node in the later position to the earlier position in the sequence, and simultaneously moving the word node in the original earlier position to the later position, completing the physical word order reversal. For the word items that have undergone position swap adjustment, a feature assignment operation is performed, assigning a specific inversion annotation code for state tracking. For non-numerical inversion state attributes, a quantization conversion rule is formulated, stipulating that if a word item has undergone a reverse swap, its inversion state is quantized and converted into an annotation code integer value of 1, and if a word item maintains its original order and has not undergone a swap, its inversion state is quantized and converted into an annotation code integer value of 0. The swapped word items are assigned an inversion annotation code of 1, and the unswapped word items are assigned an inversion annotation code of 0. The annotation code records of all word items are summarized, and the set of nodes with inversion annotation features is output to obtain the inversion label state set.
[0036] S203: Reconstruct and arrange the distributed vocabulary items in the inverted identifier state set according to their dependency hierarchy, extract the topological coefficients of the corresponding connection edges for the vocabulary item reconstruction, and perform hierarchical serialization association splicing and aggregation on the reconstructed vocabulary items based on the topological coefficients of the connection edges to generate knowledge association paths.
[0037] Obtain the generated inverted label state set, extract the distributed vocabulary items deployed in the set and their corresponding inverted label codes, and perform dependency-level reconstruction and arrangement operations on the distributed vocabulary items; divide the vocabulary items into different levels according to the inverted label codes, place the vocabulary items with a label code of 1 in the basic logic trigger layer, and place the vocabulary items with a label code of 0 in the subsequent extended action layer; extract the corresponding connection edge weight topology coefficients for the reconstructed vocabulary items; obtain the total number of association connections between a single vocabulary item and other vocabulary items in the entire knowledge sequence as the basic connectivity value, extract the network quantization mapping value obtained by the vocabulary item in the aforementioned calculation, multiply the basic connectivity value by the network quantization mapping value, and superimpose the product result onto the preset topology compensation coefficient to obtain the connection edge weight topology coefficients; the preset topology compensation coefficient is set based on the statistical evaluation of the edge connection loss of 150 manually constructed knowledge networks, and the compensation benchmark value is set to 1.25; substitute the target vocabulary item in the basic logic trigger layer, and count the total number of association connections between it and other vocabulary items. The baseline connectivity score was 8, and its corresponding network quantization mapping value was 0.82. Multiplying the baseline connectivity score of 8 by the network quantization mapping value of 0.82 yielded an intermediate product value of 6.56. Adding the intermediate product value of 6.56 to the preset topology compensation coefficient of 1.25, the topology coefficient of the connection edge weight of the target term was calculated to be 7.81. The obtained topology coefficient of 7.81 was compared with the preset connection strength threshold of 5.00. Since 7.81 is higher than 5.00, it indicates that the current term has a high-priority connection status. Based on the obtained topology coefficient of the connection edge weight, a hierarchical serialization association splicing and aggregation operation was performed on the reconstructed term. According to the descending order of the topology coefficient of the connection edge weight, the reconstructed term was used as the first and last knowledge nodes for splicing. The term node with the larger coefficient is closer to the beginning of the association path. The directed edge symbols were used to perform chain-like connection aggregation of each knowledge node, and finally a knowledge association path covering the coherent association relationship between triggering conditions and response actions was generated.
[0038] Please see Figure 4 The specific steps of S3 are as follows: S301: Acquire the on-site inspection voice acoustic signal through the on-site microphone and perform multimodal feature conversion, extract natural language text word vectors and perform dot product operation in combination with knowledge association paths, extract projection mapping coefficients and perform semantic space projection transformation on the text word vectors to obtain semantic feature vectors.
[0039] The voice acoustic signals of on-site inspection personnel were acquired using electret microphones deployed at the inspection site at a sampling rate of 16000 Hz. Pre-emphasis and windowing framing were performed on the voice acoustic signals to extract Mel-frequency cepstral coefficient features containing 39 dimensions. These Mel-frequency cepstral coefficient features were then input into a multimodal feature transformation model. This model's input layer receives a 39-dimensional sequence, and its hidden layers consist of three cascaded long short-term memory (LSTM) network layers, each with 256 neurons, using the hyperbolic tangent function as the activation function. The output layer uses a fully connected mapping. Model training employed a cross-entropy loss function to measure probability distribution error, and an adaptive moment estimation optimization algorithm was used to update parameters with an initial learning rate of 0.001, a batch size of 64, and 200 iterations. The model output a natural language text word sequence, and 512-dimensional natural language text word vectors were extracted using a word embedding matrix. The aforementioned feature transformation algorithm was then used... The knowledge association paths are formed and quantified into path feature vectors. A dot product operation is performed on the text word vectors and path feature vectors. The first value of the text word vector is extracted as 2.50, and the first value of the path feature vector is extracted as 1.40. The two are multiplied to obtain a product value of 3.50. The product value of 3.50 is divided by the square root constant of the dimension, 22.62, to calculate the projection mapping coefficient of 0.15. The baseline mapping coefficient is set to 0.10, which is based on the deviation statistics of 500 sets of verification dialogues. The projection mapping coefficient of 0.15 is compared with the baseline mapping coefficient of 0.10. A value greater than the baseline indicates a strong correlation between context and knowledge. Based on the projection mapping coefficient, a semantic space projection transformation operation is performed on the text word vectors. The first value of the text word vector, 2.50, is multiplied by the projection mapping coefficient of 0.15 to obtain the first feature value after projection, which is 0.375. All values are aggregated to obtain the semantic feature vector.
[0040] S302: The analog electrical signal is collected by the on-site fire pipeline pressure sensor and subjected to amplitude limiting filtering. The smoothing level parameter is extracted and the quantization step size is set. The analog electrical signal is converted from analog to digital to extract discrete data points. The discrete data points are scaled and multiplied to extract the corresponding water pipe operating pressure, thus obtaining the current water pressure data.
[0041] Continuous analog voltage signals were acquired using a piezoresistive pressure sensor installed on the main fire-fighting pipeline. The signal amplitude ranged from 0 to 5 volts. Amplitude limiting and filtering were performed on the acquired analog signals. Voltage amplitude data for three consecutive cycles was read, and it was determined whether the difference between adjacent voltages exceeded the 0.5-volt interference threshold. If not, the arithmetic mean was taken. The voltage amplitudes for the three cycles were extracted as 2.3 volts, 2.4 volts, and 2.5 volts, respectively. These were summed to obtain 7.2 volts, which was then divided by 3 to obtain a smoothed level parameter of 2.4 volts. A quantization step size was set for the analog-to-digital conversion. Using a 12-bit precision analog-to-digital converter, the 5-volt reference voltage was divided by the total number of conversion levels (4096), resulting in a quantization step size of 0.0012 volts. The analog signal was then processed using this quantization step size to achieve a smoothed level parameter of 2.4 volts. Divide by the quantization step size of 0.0012 volts and round down to obtain a discrete data point value of 2000. Perform scaling multiplication and addition operations on the discrete data point, setting the pressure scaling factor to 0.0005 MPa per unit and the initial zero-point offset to 0.10 MPa. These parameters are obtained by averaging 100 calibration experiments under no-load conditions in the pipeline network. Multiply the discrete data point value of 2000 by the pressure scaling factor of 0.0005 to obtain an initial pressure increment of 1.00 MPa. Add the initial pressure increment of 1.00 MPa to the initial zero-point offset of 0.10 MPa to convert and extract the corresponding water pipe operating pressure of 1.10 MPa, thus obtaining the current water pressure data. The preset normal pressure range is 0.80 to 1.20 MPa. Compare the water pressure data of 1.10 MPa with this range. If it is within the range, it means that the pipeline water pressure is compliant.
[0042] S303: Call the current water pressure data, expand the current water pressure with scalar dimension to extract the extended water pressure component, and concatenate it with the semantic feature vector along the preset sequence channel to extract joint data elements. Perform format conversion and rearrangement on the joint data elements to generate an interactive query vector.
[0043] The generated current water pressure data is retrieved, and its value of 1.10 MPa is extracted. A scalar dimension expansion operation is then performed on this water pressure value. The single-dimensional water pressure value of 1.10 is used as a basic element and mapped to a multi-dimensional feature space, constructing a blank matrix of dimension 512. The water pressure value of 1.10 is then filled into the first element position of the matrix, and the remaining 511 elements are all assigned the constant value of 0, thus extracting an extended water pressure component of length 512. The semantic feature vector generated in the previous steps is then extracted, with its first feature value being 0.375 and its total dimension also being 5. 12. Perform tensor concatenation operation on the extended water pressure component and semantic feature vector along the depth direction of the preset sequence channel; following the order of semantics first and then physical features, concatenate the 512-dimensional semantic feature vector with the 512-dimensional extended water pressure component head-to-tail, aggregating and extracting a joint data element with a total dimension of 1024. In this joint data element, the value of the first bit is 0.375, and the value of the 513th bit is 1.10; perform format transformation and rearrangement operation on the obtained joint data element, and input the 1024-dimensional joint data element into the rearranged feature network. The network consists of one input layer and two fully connected layers; the first fully connected layer has 512 neurons, and the second fully connected layer has 256 neurons. A linear rectified activation function is used within each layer to suppress negative responses. During network training, the root mean square error loss function is used to evaluate the rearrangement bias, and a stochastic gradient descent algorithm is used to iteratively update the network weight matrix with a learning rate of 0.002. During the rearrangement calculation, the mapping weight coefficient of the first fully connected layer is extracted as 1.2, and the bias constant is 0.05. This weight coefficient is derived from the previous 600 sets of multimodal joint retrieval data. Convergence is determined in the propagation; the first value of the joint data element, 0.375, is multiplied by the weight coefficient 1.2 to obtain 0.450, and the bias constant 0.05 is added to calculate the first response value after the rearrangement transformation as 0.50; the preset feature activation benchmark value is 0.30, and the response value 0.50 is compared with the benchmark value 0.30. Since 0.50 is greater than 0.30, it is determined that the rearranged feature meets the saliency expression requirement; all 256 valid feature values output by the network rearrangement are collected to generate an interactive query vector with a unified dimensional structure.
[0044] Please see Figure 5 The specific steps of S4 are as follows: S401: Extract the lexical feature vectors corresponding to the conditional attribute words based on the knowledge association path, and combine them with the semantic feature vectors in the interactive query vector to perform element-wise multiplication and summation. Based on the summation value and the product of the corresponding vector norm, perform quotient division to obtain the inner product association value term, and establish a feature similarity set.
[0045] The generated interactive query vector, containing 1024-dimensional joint data elements, is obtained. The corresponding knowledge association path is retrieved, and conditional attribute words contained in the knowledge association path are read from a database of 5000 fire inspection records from the past three years. Text data cleaning is performed on the conditional attribute words, removing whitespace characters and special punctuation marks. Z-score standardization is used to map the word frequency data to a standard normal distribution interval. The cleaned conditional attribute words are then input into a multilayer perceptron network to extract lexical feature vectors. This multilayer perceptron network consists of one input layer, three hidden layers, and one output layer. The input layer receives an initial word frequency encoding sequence with a dimension of 256, and the first hidden layer is configured with… The network has 512 neurons in each of its two hidden layers, with 1024 neurons in each of the second and third hidden layers. Fully connected logic is used between hidden layers to pass values. Each hidden layer uses a linear rectified activation function to filter negative signals. The output layer uses fully connected logic and outputs a 1024-dimensional vocabulary feature vector. During network training, the mean squared error loss function is used to quantify the sum of squared deviations between the predicted and true vectors. An adaptive moment estimation algorithm is used to iteratively update the connection weights with an initial learning rate of 0.001. The batch size is set to 32, and the total number of iterations is set to 200. Element-wise multiplication is performed on the interactive query vector and the vocabulary feature vector to extract the interactive query vector. The first value of the quantity (0.50) and the first value of the word feature vector (0.40) are multiplied together to obtain a first product value of 0.20. The same multiplication operation is performed on the remaining 1023 dimensions of data, and all product values are summed to obtain a sum of 15.60. The first vector norm (4.00) is obtained by taking the square root of the sum of squares of all elements in the interactive query vector, and the second vector norm (5.00) is obtained by taking the square root of the sum of squares of all elements in the word feature vector. The first vector norm (4.00) and the second vector norm (5.00) are multiplied together to obtain a vector norm product of 20.00. The sum of 15.60 is then divided by the vector norm product. At 20.00, the inner product correlation value obtained by performing a quotient division operation is 0.78; the preset similarity significance benchmark value is 0.60, which is set by statistically analyzing the inner product correlation of 1000 synonym pairs and taking the lower quartile of the average distribution; the calculated inner product correlation value of 0.78 is compared with the similarity significance benchmark value of 0.60. If the inner product correlation value is greater than the benchmark value, it means that there is a high semantic matching correspondence between the current interactive query vector and the conditional attribute words; according to the text order of the conditional attribute words, all inner product correlation values greater than the benchmark value are bound and combined with their corresponding word index identifiers as key-value pairs to establish a feature similarity set.
[0046] S402: Perform bubble sort comparison on the numerical values of multiple elements within the feature similarity set, rearrange the corresponding index identifiers of the elements in descending order of numerical values, extract the action attribute words and connected entity words corresponding to the first numerical value, collect the text data corresponding to the words, and obtain the array of the first entity words.
[0047] The generated feature similarity set is retrieved, and five inner product correlation values and their corresponding word index identifiers are extracted from the set. The five inner product correlation values are 0.78, 0.65, 0.85, 0.92, and 0.71. A bubble sort comparison operation is performed on these values. In the first loop, the first value 0.78 is compared with the second value 0.65, and 0.78 is determined to be greater than 0.65. The two values are kept in their original positions. Then, 0.65 in the second position is compared with 0.85 in the third position, and 0.65 is determined to be less than 0.85. The process involves swapping 0.65 and 0.85, then comparing and swapping 0.65 (located in the third position) with 0.92 (located in the fourth position), until the smallest value is pushed to the end of the sequence. After repeated iterations of adjacent position comparisons and shift adjustments, the sequence is rearranged in descending order of value, resulting in the rearranged sequence: 0.92, 0.85, 0.78, 0.71, 0.65. For the rearranged sequence, the corresponding index is extracted and simultaneously rearranged. The largest inner product associated value, 0.92, located at the beginning of the sequence, is extracted and read. The target index identifier 105 is bound to the value; based on the target index identifier 105, the knowledge association path is entered for targeted location retrieval, extracting the action attribute words of the node corresponding to the target index identifier, and extracting the entity words with the shortest distance among the connected nodes. The obtained action attribute word is "on", and the connected entity word is "sprinkler pump"; quantization conversion rules are formulated for the extracted non-numerical word elements for text data aggregation processing, specifying that the action attribute word is quantized to the category code value 1, and the entity word is quantized to the category code value 2; combined with the natural language processing dictionary, the action attribute word "on" is mapped to a feature dimension of... A sequence of 128 action vectors maps the entity word "sprinkler pump" to a sequence of entity vectors with a feature dimension of 128. The first value of the action vector sequence, 0.15, is extracted and multiplied by the category code value 1 to obtain a weighted feature value of 0.15. The first value of the entity vector sequence, 0.22, is extracted and multiplied by the category code value 2 to obtain a weighted feature value of 0.44. All feature dimension data are processed, and the processed word-corresponding text data is matrix-concatenated and merged. The extracted text data sequence with the highest feature relevance attribute is encapsulated into the same data structure for unified storage and management, and the first entity word array is obtained.
[0048] S403: Perform character encoding extraction on the action attribute words and connected entity words within the first entity word array to extract the associated string sequence. Then, perform end-to-end concatenation and aggregation on the associated string sequence according to the preset splicing template to generate fire inspection interaction instructions.
[0049] Obtain the generated first-order entity word array, extract the action vector sequences corresponding to the action attribute words within the array and the entity vector sequences corresponding to the connected entity words, and perform character encoding extraction on the above vector sequences; retrieve the Standard American Information Interchange (SAIE) code font library, convert the floating-point features within the action vector sequences into 16-bit discrete integer format, read the discrete integer sequence, and extract the corresponding decimal character codes by dividing it into 8-bit segments; after segmenting the discrete integer corresponding to the first-order action vector feature, the character code is obtained as 215, and the character code corresponding to the first-order entity vector feature is extracted. After segmentation, the scattered integers are encoded as 108. All extracted numeric character codes are aggregated into a one-dimensional array according to the original vector dimension order to generate a sequence of associated strings. This sequence contains a total length of 256 encoded values. A preset splicing template stored in the control terminal memory is retrieved. This template specifies the instruction structure layout logic, setting the instruction header identification bit length to 4 bits, the instruction body mounting bit length to 256 bits, and the checksum bit length to 3 bits. End-to-end concatenation and aggregation processing is performed on the associated string sequence according to the preset splicing template, converting the numerical scalar 10... 01 is inserted as a fixed value in the instruction header at the very beginning of the concatenated sequence. The previously extracted associated string sequence of length 256 is sequentially written into the instruction body mounting area. Redundancy loop verification calculation is performed on the aggregated sequence. The first three character codes 215, 108, and 099 in the associated string sequence are extracted and summed to obtain the intermediate verification base of 422. The verification modulus constant is set to 256. This modulus constant comes from the extreme value statistical results of the hardware buffer tolerance experiment of the 8-bit microcontroller. The intermediate verification base of 422 is divided by the verification modulus constant of 256 and the remainder is taken to extract... The remainder 166 is used as the fixed feature value corresponding to the check tail bit alignment; the generated instruction header fixed value 1001, the associated string sequence, and the check tail bit alignment value 166 are seamlessly connected and merged according to the data flow, and the finally concatenated mixed character sequence is converted into a binary level signal set that can be directly read and executed by the underlying hardware device to generate a fire inspection interaction instruction; the generated fire inspection interaction instruction is sent to the drive control terminal of the field equipment, and the first and second action codes inside the instruction are mapped to the closed level trigger signal of the relay and the corresponding physical response operation is executed.
[0050] Please see Figure 6 The specific steps of S5 are as follows: S501: Call multiple connected entity words and action attribute words in the fire inspection interaction command, and perform statistical summation calculation on the position span distributed within the sequence association hierarchical structure. Extract the position span statistical value and quantize the mapping to obtain the hierarchical path length parameter, and establish a dependency syntactic distance set.
[0051] The algorithm retrieves multiple connected entity words and corresponding action attribute words from the generated instruction mount point; it extracts syntactic dependency tree data from 8000 fire-related corpora from the past 3 years and cleans up missing values, mapping the relevant words into a 128-dimensional initial sequence input syntactic analysis network; this network contains one input layer, one hidden layer, and one output layer. The hidden layer is equipped with 256 long short-term memory units, and a hyperbolic tangent activation function is used to control the temporal signal range. The output layer performs a fully connected transformation to obtain the node position index; the network training uses the root mean square error loss function to measure the deviation between the predicted level and the true level, and calls the stochastic gradient descent optimization algorithm to iterate 100 times with a learning rate of 0.002 to update the weight parameters; it obtains the distribution position information of words within the sequence association hierarchy, extracts the tree node index value of the action attribute word as 2, and extracts the tree node index value of the first connected entity word. The index value of the tree node of the second connected entity word is 5, and the index value of the second connected entity word is 8. The above position index information is statistically summed. The first position span is 3, calculated by subtracting the action attribute word index value 2 from the first connected entity word index value 5 and taking the absolute value. The second position span is 3, calculated by subtracting the first connected entity word index value 5 from the second connected entity word index value 8 and taking the absolute value. The first position span 3 and the second position span 3 are summed to extract the final position span statistical value of 6. A quantization mapping operation is performed on the span statistical value, setting the hierarchical depth compensation coefficient to 1.5. This coefficient is determined by deep experimental fitting of 500 sets of nested long sentence grammars. The position span statistical value 6 is multiplied by the hierarchical depth compensation coefficient 1.5, and the quantization mapping yields a hierarchical path length parameter of 9.0. This parameter is recorded and paired with the corresponding word tag for packaging to establish a dependency syntactic distance set.
[0052] S502: Compare the length parameter in the dependency syntax distance set with the preset hierarchical distance threshold. If the length parameter does not reach the preset hierarchical distance threshold, extract the related connected entity words. Perform descending shift, replacement and recombination on the sequence dimension for the connected entity words to obtain the rearranged entity word sequence.
[0053] Retrieve the generated dependency syntactic distance set and extract the hierarchical path length parameter data from the internal records; substitute the hierarchical path length parameter value of 9.0 obtained in the previous steps, and perform a numerical comparison operation between this length parameter and the preset hierarchical distance threshold; set the preset hierarchical distance threshold to 12.0, which is established by verifying the normal distribution of the maximum effective syntactic association span in 3000 standard fire operation procedure texts and extracting the lower quantile; strictly compare the input hierarchical path length parameter 9.0 with the preset hierarchical distance threshold 12.0. Since the length parameter 9.0 is significantly lower than the threshold 12.0, it is determined that the current lexical syntactic dependency state is in the close interval, thus satisfying the condition that the length parameter has not reached the preset hierarchical distance threshold; under the above comparison condition, extract the first connected entity word "sprinkler pipe" and the second connected entity word "sprinkler pump" bound to this parameter; retrieve the historical reports of the above words in the fire equipment maintenance database for the past 6 months. The frequency records are modified. The frequency of the first connected entity word is read as 150 times, and the frequency of the second connected entity word is read as 450 times. The frequency normalization constant is set to 500. The frequency of the first connected entity word (150) is divided by the normalization constant 500 to calculate the first entity ranking weight as 0.30. The frequency of the second connected entity word (450) is divided by the normalization constant 500 to calculate the second entity ranking weight as 0.90. For the related connected entity words, a descending shift and replacement recombination operation is performed on the sequence dimension. The second ranking weight 0.90 is compared with the first ranking weight 0.30. Based on the judgment that 0.90 is greater than 0.30, the second connected entity word, which was originally in a later sequence position, is shifted to the left and directly replaces it with the first dominant position in the sequence. At the same time, the first connected entity word, which was originally in the first position, is shifted to the right to the second position, completing the descending swap of the physical order of the entity words. The rearranged combination data is stored in the stack space to obtain the rearranged entity word sequence.
[0054] S503: Compare the character feature overlap of the vocabulary elements within the rearranged entity vocabulary sequence. If the character feature overlap reaches the preset overlap benchmark value, delete the vocabulary elements, extract the associated characters of the retained vocabulary elements, and perform end-to-end splicing and combination to generate the fire inspection interactive instruction text.
[0055] The reordered entity word sequence is obtained through processing. The first word item element, "spray pump," and the second word item element, "spray pipe," are extracted. A character feature overlap comparison operation is performed on the word items within the reordered entity word sequence, decomposing each word item into an independent character set composed of single characters. The total number of characters in the first word item is 3, and the total number of characters in the second word item is also 3. The two sets of character sets are cross-compared, and the completely identical shared overlapping feature characters "spray" and "spray" are extracted, with a total of 2 shared characters identified. The total number of shared characters (2) is multiplied by the amplification constant coefficient (2.0) to obtain an overlap product of 4.0. The base number of the two word items is added to obtain a total base of 6.0. The overlap product of 4.0 is divided by the total base of 6.0 for quotient conversion, and the actual character feature overlap is calculated to be 0.66. A preset overlap benchmark value of 0.50 is set, which requires the average cross-over overlap value based on 1000 sets of abbreviation texts from similar devices. Statistical data is collected; the actual character feature overlap of 0.66 is compared with the preset overlap benchmark value of 0.50, and it is concluded that 0.66 is greater than 0.50, which satisfies the condition that the character feature overlap reaches the preset overlap benchmark value; after this condition is met, the word element with redundant features is deleted, and the redundant overlapping character "sprinkler" in the next word element is directly stripped and removed. After the next word element is deleted, only a single suffix character "tube" is retained, and the first word element remains unchanged; the action attribute word "open" is retrieved from the previous parsing step, the associated characters of the retained word element are extracted and end-to-end splicing and combination processing is performed; according to the standard grammatical structure ordering rules, the action attribute word "open" is set as the head of the starting sequence, the first word element "sprinkler pump" is spliced and fixed after it, and the associated single character "tube" of the next word element after deleting redundancy is seamlessly connected and placed at the end; all character fragments are merged into a single continuous string in sequence to generate the final fire inspection interaction command text "open sprinkler pump pipe".
[0056] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of protection of the claims.
Claims
1. An AI-based large-scale model interaction and knowledge base method for fire inspection, characterized in that, Includes the following steps: S1: Obtain the original text of the fire protection code and perform word segmentation and sentence segmentation. Input the word segmentation and sentence segmentation results into the Transformer model for feature parsing, extract lexical feature vectors and count the frequency of words. Based on the frequency of words, perform feature mapping to output condition and action attribute words and combine them to generate a fire protection knowledge sequence. S2: Extract vocabulary feature vectors based on fire safety knowledge sequences and calculate conditional probabilities. When the conditional probability of a later position exceeds the conditional probability of a previous position, reverse the sequence position and assign a reversal label to generate a knowledge association path. S3: Acquire the on-site inspection voice sound wave electrical signal and extract the natural language text word vector. Combine the knowledge association path space mapping to analyze the semantic feature vector. Collect the simulated electrical signal of the fire pipeline pressure sensor. Obtain the current water pressure and convert it into a water pressure feature vector. Then, concatenate it with the semantic feature vector to generate an interactive query vector. S4: Extract the lexical feature vectors corresponding to the conditional attribute words based on the knowledge association path, calculate the feature similarity by combining the interactive query vector and sort them in descending order, extract the action attribute words corresponding to the first and second feature similarity and the connected entity words and concatenate the text to generate fire inspection interactive instructions.
2. The AI large-scale model interaction and knowledge base method for fire inspection as described in claim 1, characterized in that, The fire safety knowledge sequence includes lexical feature vectors, lexical frequency statistics, and combinations of conditional and action attribute words. The knowledge association path includes lexical feature vectors, conditional probability calculation results, and sequence reversal identifiers. The interactive query vector includes natural language text lexical vectors, semantic feature vectors, and water pressure results. The fire safety inspection interactive instructions include action attribute words, connected entity words, and text splicing results.
3. The AI large-scale model interaction and knowledge base method for fire inspection as described in claim 1, characterized in that, The specific steps of S1 are as follows: S101: Obtain the original text of the fire protection code and perform word segmentation and sentence segmentation. Extract the corresponding word identifiers for word segmentation and sentence segmentation. Perform lexical attribute annotation on the word identifiers to extract the corresponding morpheme tags. Input the morpheme tags and word identifiers into the Transformer model for feature parsing and establish the word sequence of the code text. S102: Based on the standard text word sequence, self-attention dot product calculation is performed on the internal elements of the standard text word sequence. Based on the dot product calculation value, the internal elements are linearly transformed to extract the word feature vector. The frequency feature encoding set is obtained by summing the number of times the word feature vector appears in the context. S103: Perform feature mapping operation on the frequency feature encoding set, compare the calculated value with the preset classification benchmark value, and extract the corresponding condition attribute words and action attribute words when the calculated value exceeds the preset classification benchmark value, and then concatenate and aggregate them to generate a fire protection knowledge sequence. The Transformer model consists of a sequence feature embedding layer, a position encoder, a multi-head self-attention network, a fully connected feedforward network, a data normalization module, and a residual connection path.
4. The AI large-scale model interaction and knowledge base method for fire inspection as described in claim 3, characterized in that, The classification benchmark value is determined by obtaining the frequency data of benchmark words in the underlying knowledge base, extracting the feature statistics in the frequency feature encoding set, concatenating the benchmark word frequency data and the feature statistics, performing dimensionality reduction operation to extract the expected distribution center term, and multiplying the expected distribution center term with a preset deviation coefficient.
5. The AI large-scale model interaction and knowledge base method for fire inspection as described in claim 1, characterized in that, The specific steps of S2 are as follows: S201: Extract the corresponding word feature vectors based on the fire knowledge sequence, perform conditional probability summation on the co-occurrence frequency distribution of word feature vectors in the continuous sequence space, summarize the corresponding network quantization mapping values of continuous probability calculation, and establish the probability sequence of adjacent words. S202: Call the adjacent word probability sequence, compare the corresponding conditional probability values of adjacent positions, and reverse the order of the current mapping position when the conditional probability of the later position exceeds the conditional probability of the earlier position. Assign reverse label codes to the swapped word items to obtain the reverse label state set. S203: Reconstruct and arrange the distributed vocabulary items in the inverted identifier state set according to their dependency hierarchy, extract the topological coefficients of the corresponding connection edges for the vocabulary item reconstruction, and perform hierarchical serialization association splicing and aggregation on the reconstructed vocabulary items based on the topological coefficients of the connection edges to generate knowledge association paths.
6. The AI large-scale model interaction and knowledge base method for fire inspection as described in claim 1, characterized in that, The specific steps for S3 are as follows: S301: Acquire the on-site inspection voice acoustic signal through the on-site microphone and perform multimodal feature conversion, extract natural language text word vectors and perform dot product operation in combination with knowledge association paths, extract projection mapping coefficients and perform semantic space projection transformation on the text word vectors to obtain semantic feature vectors. S302: The analog electrical signal is collected by the on-site fire pipeline pressure sensor and the amplitude is limited and filtered. The smoothing level parameter is extracted and the quantization step size is set. The analog electrical signal is converted from analog to digital to extract discrete data points. The discrete data points are scaled and multiplied to extract the corresponding water pipe operating pressure, and the current water pressure data is obtained. S303: Call the current water pressure data, expand the current water pressure with scalar dimension to extract the extended water pressure component, and concatenate it with the semantic feature vector along the preset sequence channel to extract joint data elements. Perform format conversion and rearrangement on the joint data elements to generate an interactive query vector.
7. The AI large-scale model interaction and knowledge base method for fire inspection as described in claim 1, characterized in that, The specific steps of S4 are as follows: S401: Extract the lexical feature vectors corresponding to the conditional attribute words based on the knowledge association path, and combine them with the semantic feature vectors in the interactive query vector to perform element-wise multiplication and summation. Based on the summation value and the corresponding vector norm, perform quotient division to obtain the inner product association value term, and establish a feature similarity set. S402: Perform bubble sort comparison on the numerical values of multiple elements within the feature similarity set, rearrange the corresponding index identifiers of the elements according to the decreasing numerical order, extract the action attribute words and connected entity words corresponding to the first numerical value, collect the text data corresponding to the words, and obtain the first entity word array. S403: Perform character encoding extraction on the action attribute words and connected entity words within the first entity word array to extract the associated string sequence. Then, perform end-to-end concatenation and aggregation on the associated string sequence according to the preset splicing template to generate fire inspection interaction instructions.
8. The AI large-scale model interaction and knowledge base method for fire inspection as described in claim 1, characterized in that, The method further includes: S5: Calculate the dependency syntactic distance between multiple connected entity words and action attribute words in the fire inspection interaction command, rearrange the positions of connected entity words whose dependency syntactic distance does not reach the preset distance threshold and remove redundant words, and generate the fire inspection interaction command text. The fire inspection interactive command text includes dependency syntactic distance, positional rearrangement results, and redundant word removal.
9. The AI large-scale model interaction and knowledge base method for fire inspection according to claim 8, characterized in that, The specific steps of S5 are as follows: S501: Call multiple connected entity words and action attribute words in the fire inspection interaction command and perform statistical summation calculation on the position span distributed within the sequence association hierarchical structure. Extract the position span statistical value and quantize the mapping to obtain the hierarchical path length parameter, and establish a dependency syntax distance set. S502: Compare the length parameter in the dependency syntax distance set with the preset hierarchical distance threshold. If the length parameter does not reach the preset hierarchical distance threshold, extract the related connected entity words. Perform descending shift, replacement and recombination on the sequence dimension for the connected entity words to obtain the rearranged entity word sequence. S503: Compare the character feature overlap of the vocabulary elements within the rearranged entity vocabulary sequence. If the character feature overlap reaches the preset overlap benchmark value, delete the vocabulary element, extract the associated characters of the retained vocabulary element, and perform end-to-end splicing and combination to generate the fire inspection interactive instruction text.
10. The AI large-scale model interaction and knowledge base method for fire inspection according to claim 9, characterized in that, The hierarchical distance threshold is determined by obtaining standard sentence sequences from the benchmark fire protection corpus, performing dependency parsing on the standard sentence sequences to extract standard path span values, calculating the average of the standard path span values to obtain the distance parameter, and multiplying the distance parameter with a preset distribution scaling factor to determine the distance.
