A Data Storage and Retrieval Method Based on Blockchain Hash Algorithm Technology
By using a data storage and retrieval method based on blockchain hash algorithms, the problem of insufficient semantic intent understanding in existing technologies is solved, enabling efficient and reliable fire data retrieval and improving fire rescue efficiency.
Patent Information
- Application Number
- CN202611320109.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-11-10
AI Technical Summary
Existing technologies cannot accurately understand semantic intent, resulting in a large number of irrelevant records or omission of key hidden dangers, low effective results, and response time extended from seconds to minutes, severely compressing the golden rescue time.
A data storage and retrieval method based on blockchain hash algorithm is adopted. Through multi-dimensional feature vector sets, dynamic salted hyperplane transfer coding, dynamic anchored index packages, and multiple hash verification, semantic verification and trusted retrieval are achieved, reducing hash calculation and shortening response time.
It improves the semantic relevance and data credibility of fire data retrieval, shortens response time from tens of minutes to several minutes, and significantly improves fire rescue efficiency.
Smart Images

Figure CN123068424A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning technology, and in particular to a data storage and retrieval method based on blockchain hash algorithm technology. Background Technology
[0002] Machine learning is a technology that enables computers to automatically discover patterns and make predictive decisions through data training. Current technologies generally divide the data into blocks, calculate hash values using a fixed hash algorithm, and construct a Merkle tree. The root hash is uploaded to the chain, while the original data is stored off-chain. The on-chain mapping table is traversed using precise keywords for matching. If a match is found, the hash is recalculated and compared with the on-chain data for verification. The retrieval is then performed serially.
[0003] Existing technologies cannot accurately understand semantic intent, leading to the omission of key hidden dangers and a low effective result rate requiring secondary screening. Once verification fails, a new search is needed, increasing response time from seconds to minutes, severely compressing the golden rescue time. In practice, in special scenarios where fires break out suddenly and commanders need to frequently and quickly search, existing methods suffer from serious semantic understanding deviations. They may either omit relevant information such as the trend of smoke concentration changes and the rate of temperature rise on adjacent floors, resulting in incomplete situation assessment; or, due to the large amount of data retrieved, the golden rescue time is severely compressed. Especially in special cases where search requests are frequent, multi-round, and time-sensitive, semantic deviations accumulate and amplify, leading to the continuous omission of key related data or the continuous accumulation of search delays, ultimately seriously affecting fire rescue. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a data storage and retrieval method based on blockchain hash algorithm technology. This method solves the technical problems of existing technologies failing to accurately understand semantic intent, resulting in a large number of irrelevant records or omissions of key hidden dangers, low effective results requiring secondary screening, and the need for re-retrieval once verification fails, which increases the response time from seconds to minutes and severely compresses the golden rescue time.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: The steps of a data storage and retrieval method based on blockchain hash algorithm technology are as follows: collect the original dataset of the target data, and obtain a multi-dimensional feature vector set by statistical threshold denoising and dual-stream feature fusion processing based on the original dataset; Multi-classification strategy mapping and dynamic salting hyperplane transfer coding are performed based on multi-dimensional feature vector sets to obtain feature hash value sets and content hash value sets. Key-value pair cross-indexing driven parameter correction is performed on the content hash value sets and feature hash value sets to obtain dynamic anchored index packages. File addressing hash anchoring is performed on the dynamic anchored index package and the multidimensional feature vector set to obtain the on-chain mapping record table and the model evidence extension table. The user's original query string is obtained. Based on the user's original query string, the on-chain mapping record table, and the model evidence extension table, an initial similarity candidate set is generated through dynamic encoding and dynamic adjustment with nearest neighbors. Based on the initial similarity candidate set, multiple hash verification and feedback generation processing are performed to obtain the semantic verification candidate set and the relevance ranking result. The semantic verification candidate set and relevance ranking results are subjected to credible verification and incremental learning feedback processing to obtain credible retrieval feedback logs.
[0006] Preferably, the dual-stream feature fusion processing based on statistical threshold noise reduction of the original dataset includes: performing statistical threshold noise suppression processing on the original dataset to generate a cleaned and standardized dataset; Based on the cleaned and standardized dataset, the data is dynamically segmented by content length to obtain standardized data blocks and metadata tags; The standardized data blocks and metadata tags are subjected to parallel dual-stream feature fusion processing to obtain a multi-dimensional feature vector set.
[0007] Preferably, the process of performing multi-classification strategy mapping and dynamic salting hyperplane transfer coding based on a multi-dimensional feature vector set includes: performing multi-classification strategy mapping based on a multi-dimensional feature vector set to generate a hash strategy label set; A multi-dimensional feature vector set and a hash strategy label set are subjected to round-number dynamic salting hashing to obtain a content hash value set. The feature hash value set is obtained by processing the multidimensional feature vector set through random hyperplane transfer coding.
[0008] Preferably, the key-value pair cross-indexing driven parameter correction process for the content hash set and the feature hash set includes: performing key-value pair cross-indexing based on the content hash set and the feature hash set to generate a dual-track association mapping tuple set; Deep reinforcement learning adaptive threshold clustering is performed on the feature hash value set and the dual-track association mapping tuple set to obtain the feature similarity clustering group set. Based on the feature similarity clustering group set and the content hash value set, a dynamic anchored index package is obtained through a second feedback correction process of hash aggregation.
[0009] Preferably, the clustering of groups based on feature similarity and the content hash value set is corrected by a second feedback process through hash aggregation, including: the clustering of groups based on feature similarity and the content hash value set is processed by depth-adjustable hash aggregation to obtain a hierarchical hash tree structure; Lightweight Merkle root compression is performed based on a hierarchical hash tree structure to generate a compressed root hash. A secondary feedback reward-driven parameter correction process is applied to the hierarchical hash tree structure, compressed root hash, and feature similarity clustering group sets to obtain a dynamic anchored index package.
[0010] Preferably, the file addressing hash anchoring process for the dynamic anchoring index package and the multidimensional feature vector set includes: obtaining the set of off-chain storage content identifiers by performing file system content addressing processing based on the dynamic anchoring index package and the multidimensional feature vector set; Based on the off-chain storage content identifier set and the dynamic anchored index package, a multi-key-value hash index mapping process is performed to generate an on-chain mapping record table. The on-chain mapping record table is subjected to model snapshot hash anchoring to obtain the model evidence extension table.
[0011] Preferably, the user's original query string, the on-chain mapping record table, and the model evidence extension table are dynamically adjusted through dynamic encoding and nearest neighbor, including: performing dynamic mask semantic encoding on the user's original query string to obtain a query semantic feature vector; Based on the query semantic feature vector, the model evidence expansion table, and the on-chain mapping record table, a product quantization approximate nearest neighbor search and dynamic threshold adjustment are performed to generate an initial similarity candidate set.
[0012] Preferably, the process of performing multiple hash verification and feedback generation based on the initial similar candidate set includes: performing multiple hash verification through a Bloom filter based on the initial similar candidate set to obtain the Bloom verification pass set within the block; Real-time option hash recalculation is performed on the Bloom check pass set within the block to obtain the recalculated content hash set and the recalculated feature hash set. A dual-track hash feedback generation process is performed based on the recalculated content hash set, the recalculated feature hash set, and the on-chain mapping record table to generate a semantic verification candidate set and a relevance ranking result.
[0013] Preferably, the dual-track hash feedback generation process based on the recalculated content hash set, the recalculated feature hash set, and the on-chain mapping record table includes: performing dual-track hash XOR comparison processing based on the recalculated content hash set, the recalculated feature hash set, and the on-chain mapping record table to generate a hash consistency verification result set; Based on the hash consistency verification result set and the on-chain mapping record table, a complete and reliable candidate set of paths is obtained by comparing the sparse Merkle tree multi-path verification with the model version. A two-factor sorting threshold truncation feedback process is applied to the complete and reliable candidate set of paths, the query semantic feature vector, and the hash consistency verification result set to generate a semantic verification candidate set and a relevance ranking result.
[0014] Preferably, a two-factor sorting threshold truncation feedback process is performed on the complete and trustworthy candidate set of paths, the query semantic feature vector, and the hash consistency verification result set, including: performing two-factor perceptual sorting on the complete and trustworthy candidate set of paths, the query semantic feature vector, and the hash consistency verification result set to obtain a comprehensive score feature vector set; Based on the comprehensive scoring feature vector set, stable sorting, threshold truncation, and feedback generation processes are performed to generate a semantic verification candidate set and relevance ranking results.
[0015] By employing the above technical solution, the present invention provides a data storage and retrieval method based on blockchain hash algorithm technology, which has at least the following beneficial effects: This invention uses a machine learning classifier to identify different types of fire-related data and dynamically selects hash algorithm parameters. Large-volume video and thermal imaging data achieve higher compression rates, while lightweight numerical data uses fast hashing to save computing power. At the same time, the reinforcement learning model dynamically adjusts the clustering threshold and tree depth based on the real-time collision rate and storage overhead feedback, keeping the tree structure as flat as possible under the premise of controllable collision rate. This improves storage efficiency, reduces hash calculations, and shortens the verification path. When there is a surge in fire-related data, it avoids data loss caused by a spike in processor utilization and ensures that the perception data of each area is completely stored on the blockchain.
[0016] Furthermore, based on a semantic encoder, natural language queries are transformed into semantic feature vectors, enabling semantic retrieval capabilities that search for data based on meaning. This allows the retrieval of semantically relevant data that does not match the keywords. At the same time, the trust flag generated by hash verification is used as the core input of the ranking model. Samples that pass verification gain a ranking advantage, while samples that fail are automatically downweighted. This not only solves the problem that keyword retrieval cannot understand semantic intent and misses key risks, but also makes the retrieval results not only semantically relevant but also data reliable, avoiding the dilemma of finding something that is not reliable or reliable but not searchable.
[0017] Meanwhile, Bloom filter verification, dual-track hash comparison, and Merkel path verification are embedded in the middle of the retrieval process, allowing verification and retrieval to proceed in parallel. Furthermore, through a two-layer screening process of initial recall and secondary fine sorting, and dynamic adjustment of the retrieval threshold by returning the average score, a progressive retrieval with broad entry and strict exit is achieved. This ensures a high proportion of effective results while significantly shortening the response time. In specific fire situations, the comprehensive retrieval of all data is reduced from tens of minutes to several minutes, resulting in a significant improvement in fire rescue efficiency. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1This is a flowchart illustrating a data storage and retrieval method based on blockchain hash algorithm technology according to the present invention; Figure 2 This is a comparison chart of CPU peak values for a data storage and retrieval method based on blockchain hash algorithm technology according to the present invention. Figure 3 This is a performance comparison chart of a data storage and retrieval method based on blockchain hash algorithm technology according to the present invention. Detailed Implementation
[0019] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. This will allow for a full understanding of how the present application uses technical means to solve technical problems and achieve technical effects, and to facilitate its implementation.
[0020] Example: Due to the inability of existing technologies to accurately understand semantic intent, massive amounts of irrelevant records or key hidden dangers are missed, and the effective results are low, requiring secondary screening. Once verification fails, a new search is needed, increasing response time from seconds to minutes, severely compressing the golden rescue time. Please refer to [the relevant documentation / reference]. Figure 1 This embodiment provides a data storage and retrieval method based on blockchain hash algorithm technology, which can avoid overlooking key hidden dangers, reduce response time, and provide sufficient time for fire rescue. The method includes the following steps: S1. Collect the original dataset of the target data. Based on the original dataset, perform statistical threshold noise reduction and dual-stream feature fusion processing to obtain a multi-dimensional feature vector set. Existing technologies rely on single hash comparisons and lack a systematic implementation of Merkel full-path verification, which makes it impossible to accurately locate data corruption. To solve the above problems, the specific implementation steps are as follows: S11. Perform statistical threshold noise suppression processing on the original dataset to generate a cleaned and standardized dataset. In this step, the mean is obtained through the mean formula and the standard deviation is obtained through the standard deviation formula. Outliers in the original data that exceed the range of plus or minus three times the mean standard deviation are removed. The data is mapped to the normalized range through the maximum and minimum normalization method to form a cleaned and standardized dataset. This invention takes the intelligent fire protection system of a large commercial complex as an example. The signals collected by smoke detectors and heat detectors contain impulse noise. The standard deviation calculation window is set to 100 to 500 sampling points, and the outlier removal threshold coefficient is set to 2.0 to 4.0. Normalization processing ensures that the multi-source heterogeneous fire protection data are in the same dimension space to ensure the consistency of subsequent feature extraction. The input raw dataset contains smoke concentration signal, temperature signal, flame infrared data and combustible gas concentration data, and the output is a cleaned and standardized dataset.
[0021] S12. Based on the cleaned and standardized dataset, the data is dynamically segmented by content length to obtain standardized data blocks and metadata tags. In this step, the content complexity of the data is calculated by the information entropy formula. The dynamic block length is obtained by multiplying the baseline block length by the adjustment coefficient and adding the entropy value. The data is then segmented into data blocks according to the dynamic block length. An identifier, timestamp, and type label are generated for each data block to form standardized data blocks and metadata tags. Because smoke concentration data and temperature data have different length requirements, dynamic segmentation can adapt to the block length requirements of different fire sensor data types. In this step, the baseline block length is 256 to 1024 bytes, and the adjustment coefficient is 0.1 to 1.0. Data segments with high information entropy are allocated longer block lengths to retain early fire characteristics, while data segments with low information entropy are allocated shorter block lengths to improve compression ratio. Standardized data blocks and metadata tags are used.
[0022] S13. Perform parallel dual-stream feature fusion processing on standardized data blocks and metadata tags to obtain a multi-dimensional feature vector set; extract local features of data blocks through a convolutional neural network, extract global context features through a self-attention encoder, and dynamically weight and fuse local features and global features into a multi-dimensional feature vector set through an attention mechanism. Flame infrared data possesses both local time-frequency features and global trend features; the convolutional neural network adopts a 5-layer convolutional and 2-layer fully connected structure, the self-attention encoder adopts a 4-layer 6-head attention structure, the hidden layer dimension is 768, and the mask ratio is 15%; the model is iteratively optimized through backpropagation, and training is terminated when the validation set loss does not decrease for 10 consecutive rounds; the input is a standardized data block and metadata labels, and the output is a multi-dimensional feature vector set.
[0023] This invention achieves a credible and evolutionary closed loop for search results through Merkel path integrity verification and incremental learning based on user feedback. Full-path hash verification can accurately locate the position of damaged data blocks, avoiding erroneous lawsuits caused by accepting untrusted data. User feedback-driven incremental learning of the model improves the team's search efficiency several times over. The credible search feedback log provides complete verification path evidence, elevating blockchain-based evidence from reference level to adjudicative level in judicial proceedings.
[0024] S2. Based on standardized data blocks and multi-dimensional feature vector sets, multi-classification strategy mapping and dynamic salting hyperplane transfer coding are performed to obtain feature hash value sets and content hash value sets. Key-value pair cross-indexing driven parameter correction is then performed on the content hash value sets and feature hash value sets to obtain dynamic anchored index packages. Existing technologies use the same algorithm for all data, resulting in large-volume videos and lightweight numerical data occupying the same storage space, edge storage being exhausted in a few months, and key videos being deleted, making it impossible to trace fires. Fixed-depth tree structures continuously extend the verification path as data grows, and it takes a very long time for managers to retrieve historical records for verification. In emergency situations, verification is generally abandoned and data is directly accepted, which easily leads to inefficiency and incorrect results. To address the above problems, the implementation steps of this invention are as follows: S21. Based on the standardized data blocks and multi-dimensional feature vector sets, perform multi-classification strategy mapping processing to generate a hash strategy label set. In this step, a lightweight gradient booster is used to perform multi-classification prediction on the multi-dimensional feature vectors. The category with the highest prediction probability is selected as the modality label of the data block. The hash strategy is mapped according to the modality label to form a hash strategy label set. Since different hash strategies are required for smoke concentration waveforms, flame infrared images, combustible gas signals, and temperature values to balance safety and efficiency, the lightweight gradient booster employs a leaf order growth strategy and a histogram acceleration algorithm. The maximum depth of each decision tree is 3 to 7, the number of decision trees is 50 to 200, and the learning rate is 0.01 to 0.1. The model is iteratively optimized through gradient boosting, and training is terminated when the log loss on the validation set does not decrease for 10 consecutive rounds. The input consists of standardized data blocks and a multidimensional feature vector set, and the output is a hash strategy label set. The multidimensional feature vector set includes a set of numerical vectors formed by extracting semantic features from each standardized data block. Each vector uniquely corresponds to a data block and is the digital representation of that data block in the semantic space. Its specific content varies depending on the data type: image data such as video and infrared thermal imaging are extracted into spatial feature vectors such as flame outline and temperature gradient; time-series data such as smoke concentration and water pressure are extracted into contextual feature vectors such as rate of change and peak shape; and text logs are extracted into keyword association and event sequence feature vectors. All vectors are fused into a unified dimension through an attention mechanism, enabling heterogeneous data such as video, temperature, smoke, and electrical parameters to be mapped to the same semantic space for similarity comparison, and carrying block identifiers and timestamps to associate them with their source data. The hash policy label set is a set of policy labels output after modality identification for each standardized data block. It includes the data block type label, the corresponding hash strength level, and the hash parameter configuration identifier. The type label indicates the modality category to which the data block belongs. The hash strength level is dynamically assigned according to the type label and is used to indicate whether the data block should be protected by high, medium, or low hash strength. The hash parameter configuration identifier points to the specific combination of hash algorithm parameters.
[0025] S22. Perform round-number dynamic salted hashing on the standardized data block, multidimensional feature vector set, and hash strategy label set to obtain the content hash value set. In this step, the first sixteen dimensions of the multidimensional feature vector are extracted as the salt value. The number of iteration rounds is determined according to the hash strategy label. The data block is concatenated with the salt value and the number of iteration rounds and then iteratively calculated using a secure hashing algorithm to obtain the content hash value set. Highly sensitive flame infrared data requires stronger hash protection to reduce the collision rate; the number of iteration rounds is determined according to the strategy label, with 1500 rounds for flame infrared and smoke concentration classes, 1000 rounds for combustible gas classes, and 500 rounds for temperature value classes; the salt value is generated by extracting feature vectors to enhance the correlation between hash and fire protection data content; The content hash value set includes a set formed by calculating the hash value of the data ontology for each standardized data block, including the cryptographic digest value of the data block itself, the corresponding block identifier, and the data type label; Among them, the cryptographic digest value is a fixed-length hash value obtained by hashing the data block content with a dynamic salt value and a differentiated number of iteration rounds; the block identifier is used to uniquely index the data block; and the data type label records the modality category to which the block belongs.
[0026] S23. Based on the multidimensional feature vector set, a feature hash value set is obtained by processing it through random hyperplane transfer coding. In this step, a random orthogonal projection matrix and a random bias term are generated. The multidimensional feature vector and the projection matrix are multiplied together and then the bias term is added. The result is mapped to a binary hash code through a sign function to form a feature hash value set. Mainstream methods for generating random orthogonal projection matrices and random bias terms include orthogonalization methods based on Gaussian distributions and uniform sampling methods based on Haar measures. Feature hashing is used for fast similarity retrieval rather than integrity verification. Random hyperplane projection compresses high-dimensional features into binary codes to reduce storage and computational overhead, with projection matrix dimensions ranging from 16 to 64 bits. The sign function maps the inner product result to positive or negative 1 and then converts it into binary code. The feature hash value set includes the binary hash code, block identifier, and feature vector data type label corresponding to each data block. The binary hash code is a fixed-length binary code generated by multiplying the feature vector with a random orthogonal projection matrix, adding a random bias term, and then taking the sign function. The block identifier is used to uniquely associate the original data block corresponding to the feature hash value. The data type label records the modality category to which the data block belongs, and is used to trace the source of the hash value.
[0027] S24. Based on the content hash value set and the feature hash value set, perform key-value pair cross-indexing to generate a dual-track association mapping tuple set. In this step, the data block identifier, content hash and feature hash are combined into a key-value triplet. The content hash and feature hash are XORed to generate a check flag. The four are combined into a mapping tuple to form a dual-track association mapping tuple set. The dual-track hash association table supports rapid verification of fire data integrity. The XOR check flag is used to quickly detect whether the content hash and feature hash are consistent. If the check flag is zero, it means that the two are the same. The output is a set of dual-track association mapping tuples, which includes data block identifier, content hash, feature hash and XOR check flag.
[0028] S25. Perform deep reinforcement learning adaptive threshold clustering on the feature hash value set and the dual-track association mapping tuple set to obtain the feature similarity clustering group set. In this step, the first step is: Hamming distance = the sum of the number of bits with different values in the corresponding bits of the feature hash code and the cluster center hash code; the second step is: dynamic threshold = the action value output by the deep reinforcement learning network based on the current average distance within the group and the minimum distance between groups; the third step is: when the Hamming distance is less than or equal to the dynamic threshold, the feature hash code is assigned to the corresponding cluster group to form the feature similarity clustering group set. Similarity clustering of smoke data and temperature data can group fire sensor data of the same area and working conditions; the deep reinforcement learning network adopts a 3-layer fully connected network structure, the input is a 2-dimensional state vector composed of the average distance within the group and the minimum distance between the groups, and the output is a dynamic threshold selected in the discrete action space. The network is updated iteratively through experience replay pool sampling and mini-batch gradient descent. The update is terminated when the cumulative reward has not improved for 20 consecutive rounds. The dynamic threshold ranges from 4 to 16. The feature similarity clustering group set includes several similarity groups, a cluster center hash code for each group, and a dynamic clustering threshold. Each similarity group contains several data block tuples with similar feature hash values. Data blocks within the same group are highly similar in semantic features. The cluster center hash code is the representative feature hash value of the group, used to identify the centroid position of the group. The dynamic clustering threshold is adjusted in real time by the reinforcement learning model based on the collision rate and storage overhead feedback, determining the similarity judgment boundary for feature hash values falling into the group.
[0029] S26. Based on the feature similarity clustering group set and the content hash value set, a layered hash tree structure is obtained by depth-adjustable hash aggregation. The content hash of each cluster group is used as the leaf node. The number of branches is determined according to the clustering threshold. The child nodes are concatenated according to the number of branches and hash aggregation is used to form internal nodes. The structure is recursively built to the root node to obtain the layered hash tree structure. The hierarchical hash tree dynamically adjusts its depth based on the clustering quality of fire data to balance storage and verification efficiency; the number of branches is dynamically determined by the clustering threshold, ranging from 2 to 8, and the maximum tree depth ranges from 3 to 7 levels; the total number of leaf nodes determines the lower limit of the tree depth; the output is a hierarchical hash tree structure.
[0030] S27. Perform lightweight Merkle root compression based on the hierarchical hash tree structure to generate compressed root hash and auxiliary verification path; after concatenating the subroot hashes of each subtree, perform hash aggregation to obtain the global root hash, and record the sibling hash sequence from each leaf node to the root node as the verification path to form compressed root hash and auxiliary verification path. Compressed root hashes are stored on-chain to save on-chain space, and verification paths are used to quickly verify the integrity of fire data during subsequent retrieval. The number of top-level child roots ranges from 4 to 16; the output is a compressed root hash and an auxiliary verification path.
[0031] S28. Perform secondary feedback reward-driven parameter correction on the hierarchical hash tree structure, compressed root hash, and feature similarity clustering group sets to obtain the dynamic anchored index package. In this step, the first step is: basic reward JL_jc = collision rate weight w × (1 - collision rate P_pz) - storage weight u × storage overhead KX_cc; the second step is: average distance within a group PJ_zn = sum of Hamming distances within each group JL_hm, (number of groups M × number of samples within a group N); the third step is: if the average distance within a group PJ_zn is greater than the density upper limit JM_ds, then the correction threshold YZ_xz = original threshold YZ_y × shrinkage coefficient S, and the final reward JL_zz = basic reward JL_jc - distance weight QZ_jl × (average distance within a group PJ_zn - density upper limit JM_ds). The secondary feedback closed loop enables simultaneous optimization of fire data collision rate and storage overhead; The deep reinforcement learning network adopts a 3-layer fully connected structure, with an experience replay pool capacity of 10,000 to 50,000 entries, a learning rate of 0.001 to 0.01, collision rate weights of 0.3 to 0.5, storage weights of 0.3 to 0.5, distance weights of 0.1 to 0.3, a density limit of 2 to 8, and a shrinkage coefficient of 0.7 to 0.9. The update will terminate when the final reward does not increase for 20 consecutive rounds; the dynamic anchoring index package is used to record the dynamic mapping relationship between the hierarchical hash tree and the feature similarity grouping, providing index support for subsequent blockchain anchoring and intelligent retrieval, including dynamic clustering threshold mapping table, tree depth correction record and reinforcement learning model update parameters; The dynamic clustering threshold mapping table records the optimal clustering threshold and its correction history for each similarity group, used to trace the threshold adjustment process; the tree depth correction record records the maximum depth and branch number adjustment log of each branch of the hierarchical hash tree, used to verify the compression effect of the tree structure; the reinforcement learning model update parameters include the weight coefficients of the reward function and the updated model parameters, used to ensure the continuous optimization of the hierarchical strategy in the next round.
[0032] Experimental data analysis: Taking a smart fire protection system of a commercial complex as the test object, the system is equipped with more than 500 sensors and monitoring devices of various types, generating about 2 million evidence records every day. During the second step of the main process, a simulated fire data outbreak scenario is injected, and 500,000 highly similar temperature and smoke concentration data are continuously injected within 30 seconds. Comparative experiments are conducted using a fixed hash scheme without clustering, a static clustering scheme with a fixed threshold, and the DQN dynamic threshold clustering scheme of this invention. Experimental data shows that in the non-clustering fixed hash scheme, 500,000 data points need to be fully hashed one by one using SHA-256. The CPU utilization of the edge server increased from 35% to 99% within 60 seconds, and only about 40,000 data points were actually hashed. The remaining 460,000 data points were discarded due to system timeout, resulting in a broken chain of evidence for fire tracing. The fixed threshold clustering scheme clusters all data according to a fixed Hamming distance threshold of 5, forming about 3,800 groups. The number of hash calculations is reduced to 38,000, and the peak CPU usage drops to 78%. However, the collision rate increases to 2.7%, and the average Hamming distance within a group is as high as 4.3. The poor grouping quality causes some dissimilar data to be forcibly grouped into the same group, resulting in a large number of false positives during retrieval. In the DQN dynamic threshold clustering scheme of this invention, the reinforcement learning model dynamically adjusts the threshold of each group based on real-time collision rate feedback, so that the threshold adaptively changes between 1.5 and 6, ultimately forming 4200 groups. The number of hash calculations is 42,000, the peak CPU usage is controlled within 55%, the collision rate is only 0.4%, and the average Hamming distance within the group is 2.1. The key comparison is that the fixed threshold scheme causes dissimilar data to be mixed into the same group due to overly coarse grouping, resulting in a collision rate nearly 7 times higher than that of this invention. Moreover, when the average distance within the group exceeds the standard, there is no secondary feedback correction mechanism, and the clustering quality cannot be self-optimized. This invention utilizes secondary feedback to automatically shrink the threshold of a group when the average Hamming distance within that group exceeds the upper limit threshold of 2.5, continuously optimizing the cluster boundaries. This reduces the threshold for abnormally close groups from 5.0 to 3.0, effectively eliminating misclassified samples at the boundaries and avoiding the problem of "dissimilar data mixed in with highly similar groups" in fixed-threshold schemes. The results of the 30 repeated experiments show that, while ensuring a collision rate below 0.5%, this invention reduces peak CPU utilization to below 55% and reduces redundant data storage by approximately 60% compared to fixed-threshold clustering. This verifies the dynamic threshold clustering and secondary feedback mechanism of DQN, effectively achieving a dynamic balance between storage compression and collision rate control in data burst scenarios.
[0033] This invention solves the problem that fixed hash algorithms calculate hash values for all data in the same way, and cannot differentiate data based on its own characteristics. In practice, smart fire protection systems receive multiple types of data, such as smoke concentration values, water pressure values, infrared thermal images, video surveillance images, and electrical parameters. However, existing technologies use the same hash calculation process and storage space for all data, resulting in large volumes of video and thermal image data occupying excessive storage, while lightweight numerical data also consumes the same hash calculation resources. Ultimately, the system's edge storage devices run out of space within a few months. This invention uses a machine learning classifier to identify different data types and dynamically select hash algorithm parameters. This not only enables high-compression hash processing for large-volume data such as videos and thermal images, but also allows lightweight numerical data such as smoke concentration and water pressure to be hashed quickly to save computing power. It not only realizes the on-demand allocation of hash strategies to improve overall storage efficiency, but also enables the verification flag jointly generated by content hashing and feature hashing to be used for both fast verification of dual-track consistency and as an input factor for collision rate calculation in reinforcement learning reward function, thus achieving efficient reuse of the same hash value.
[0034] By dynamically adjusting the clustering threshold and tree depth based on real-time collision rate and storage overhead feedback using a reinforcement learning model, the tree structure is kept as flat as possible while maintaining a controllable collision rate. This significantly reduces storage overhead compared to a fixed-depth Merkle tree. Furthermore, it achieves adaptive compression of the hash tree structure, reducing storage pressure, and generates shorter verification paths based on the flatter tree structure. This significantly improves the Merkle path verification speed for fire management personnel retrieving historical data, further optimizing the retrieval response experience. Fixed-depth construction solves the problems of increasingly longer verification paths and expanded storage overhead. In practice, as the smart fire protection system continuously collects data for months, the tree depth continues to grow. Verifying a single historical alarm data point requires reading a large number of sibling hashes, making the retrieval and verification process increasingly slow.
[0035] Specifically, the above solution can solve the special technical problem in practice when a real fire occurs in a commercial complex, a large number of detectors trigger alarms at the same time, the sensed data surges explosively in a very short time, and the edge processor needs to continuously calculate massive hash values under a fixed hash strategy. This causes the processor utilization rate to soar, resulting in system response timeouts. Smoke concentration and thermal imaging data of some key areas are discarded due to insufficient processing, and the evidence records of the fire spread path are missing. Ultimately, this leads to a broken chain of evidence in the post-fire investigation and determination of responsibility. This invention not only significantly reduces the number of hash calculations for redundant data through cluster compression, but also continuously optimizes clustering accuracy through a secondary feedback mechanism, avoiding excessive clustering that leads to an increased collision rate, thereby achieving a dynamic balance between storage compression and collision rate control. More importantly, the reduction in hash calculations directly reduces the data transmission load, ensuring the complete on-chain storage of sensing data from each area in the event of a fire, and preventing the inability to trace the cause of the fire due to data loss.
[0036] S3. File addressing hash anchoring processing is performed on the hierarchical hash tree, dynamic anchored index package, standardized data block and multidimensional feature vector set to obtain the on-chain mapping record table and model evidence extension table. Due to the single on-chain mapping in the existing technology, it is necessary to traverse the entire table to check the smoke data on the third floor. The inspection time is too long and the detector sensitivity drift is missed. In the end, the detector did not alarm during the fire. Based on the above technical issues, the specific implementation steps are as follows: S31. Based on the hierarchical hash tree, dynamic anchored index package, standardized data block and multidimensional feature vector set, the off-chain storage content identifier set is obtained through file system content addressing; the data block and feature vector are concatenated and the content identifier is calculated by a secure hash algorithm, and submitted to the InterPlanetary File System for distributed storage. The system returns a unique content identifier, which constitutes the off-chain storage content identifier set. Since the original fire sensor data is too large to be directly uploaded to the blockchain, off-chain storage relieves the pressure on the blockchain; the file system uses a content addressing mechanism to ensure that the fire data is tamper-proof; the off-chain storage content identifier set includes the content identifier, block identifier and storage location metadata corresponding to each data block; The content identifier is a unique address string generated by combining the data block content with the corresponding feature vector through hashing. It is used to locate and retrieve the data block in the IPFS network. The block identifier is the internal number of the data block in the system of this invention. It is used to associate the content identifier with other hash values in the on-chain mapping record. The storage location metadata records the specific node routing information and replica distribution status of the content identifier in the IPFS network to ensure that off-chain data can be accessed stably.
[0037] S32. Based on the off-chain storage content identifier set, hierarchical hash tree, and dynamic anchored index package, perform multi-key-value hash index mapping to generate an on-chain mapping record table; combine the data block identifier, root hash, content hash, feature hash, off-chain content identifier, and off-chain position pointer into a mapping record, and all records constitute the on-chain mapping record table. The on-chain mapping table records the hash fingerprint and storage location of each fire protection data entry to support trusted retrieval; each mapping record contains 6 fields to establish the correspondence between on-chain hashes and off-chain fire protection data; the on-chain mapping record table includes block identifier, root hash, content hash, feature hash, content identifier, and storage location pointer, and the content hash includes on-chain anchored content hash; Among them, the block identifier is the unique internal number of the data block in the system, used to associate the record with the original data block; the root hash is the top-level hash value of the hierarchical hash tree, used to verify the integrity of the entire tree; the content hash is the cryptographic digest value of the data block body, used to verify whether the content of the data block has been tampered with; the feature hash is the binary encoding of the multidimensional feature vector of the data block, used to verify whether the semantic features are consistent with those at storage; the content identifier is the address string returned by the off-chain storage system, used to locate and obtain the original data block and its feature vector from the IPFS network; and the storage location pointer records the specific storage path and node information of the data in the off-chain database, serving as a supplementary location method to the content identifier.
[0038] S33. Perform model snapshot hash anchoring processing on the on-chain mapping record table to obtain the model evidence extension table; concatenate the current model version number and each model parameter, calculate the model hash value through a secure hash algorithm, attach the current timestamp, and associate the model evidence record with the global root hash of the on-chain mapping record table to form the model evidence extension table. The parameters of the fire protection feature extraction model are stored on the blockchain to ensure the traceability of the feature extraction process. The model parameters include the weights of the convolutional neural network, the weights of the self-attention encoder, the parameters of the lightweight gradient booster, and the parameters of the deep reinforcement learning network. The output is a model storage extension table, which includes the off-chain storage locator, model version, model hash, and timestamp, to facilitate data retrieval in subsequent steps.
[0039] This invention solves the problems of existing technologies that do not perform on-chain evidence storage, resulting in weakened evidentiary value, limited on-chain mapping, the need to traverse the entire table to retrieve data, missed detection sensitivity drift during inspections, and detectors failing to alarm during fires, leading to rapid fire spread and difficulty in timely alarms. This invention ensures effective evidence storage and accountability by storing model parameters on the blockchain, uses a multi-key value mapping table to directly locate combined conditions, completes all equipment sampling inspections within half a day, and promptly detects and handles slow drift anomalies, achieving dual protection of data credibility and algorithm credibility.
[0040] S4. Obtain the user's original query string. Based on the user's original query string, the on-chain mapping record table, and the model evidence extension table, generate an initial similarity candidate set through dynamic encoding and dynamic adjustment with nearest neighbors. Based on the initial similarity candidate set, perform multiple hash verification and feedback generation processing to generate a semantic verification candidate set and relevance ranking results. Existing technologies cannot accurately understand semantic intent, resulting in a large number of irrelevant records or omission of key hidden dangers. Pure semantic retrieval without hash verification results in a low number of effective results that require secondary screening. The retrieval and verification are not closely related, and verification failures require re-retrieval. The response time is extended from seconds to minutes, severely compressing the golden rescue time. To address the above problems, the implementation steps of this invention are as follows: S41. Perform dynamic mask semantic encoding on the user's original query string to obtain the query semantic feature vector. In this step, the query string is semantically encoded by a bidirectional dynamic mask encoder. The encoder outputs a dense vector of fixed dimensions, which is aligned with the dimension of the feature vector on the storage side to obtain the query semantic feature vector. Fire management personnel need semantic matching rather than literal matching to query historical fire incident records using natural language; the bidirectional dynamic mask encoder adopts a 12-layer, 6-head attention structure with a hidden layer dimension of 768 and a mask ratio of 15%. The model is pre-trained and fine-tuned iteratively optimized through the masked language model task. Training is terminated when the perplexity of the validation set does not decrease for 10 consecutive rounds. The user's original query string is a natural language query statement directly entered by the user in the system's search interface when the search process is triggered. Specifically, when users (such as fire management personnel, auditors, or commanders) need to use this method for data retrieval, they can submit their query content in real time through the interactive interface provided by the system (such as a search box, voice-to-text input, etc.). The query string directly enters the retrieval process for semantic encoding and conversion, unaffected by any processing results in the preceding steps, and the output is a query semantic feature vector.
[0041] S42. Based on the query semantic feature vector, the model evidence expansion table, and the on-chain mapping record table, perform product quantization approximate nearest neighbor search and dynamic threshold adjustment to generate an initial similarity candidate set. In this step, the first step is: cosine similarity COS_SI = inner product of query semantic feature vector QU_VE and feature vector FE_VE DO_PR / (query vector magnitude QU_NO × feature vector magnitude FE_NO); the second step is: dynamic threshold DY_TH = baseline threshold BA_TH + feedback coefficient FA_CO × (baseline score BA_SC - average feedback score AV_FB from the previous round); the third step is: records RECO with cosine similarity COS_SI greater than dynamic threshold DY_TH constitute the initial similarity candidate set IN_SE. Fire safety managers use natural language to perform fuzzy queries on historical fire safety records, which need to be recalled through semantic matching. The baseline threshold is set to 0.75, the feedback coefficient is set to 0.1 to 0.5, and the dynamic retention coefficient is set to 0.2 to 0.5. Product quantization divides the feature vector into several subspaces and encodes them separately to accelerate nearest neighbor search. When the average feedback score of the previous round of retrieval is lower than the baseline score, the dynamic threshold is lowered to expand the recall, and vice versa to refine the candidates. The input is generally the query semantic feature vector, the on-chain mapping record table, the model storage extension table, and the average feedback score of the previous round. The query semantic feature vector is generated in real time by the query string input by the user. The dynamic threshold, the baseline threshold, the feedback coefficient, the baseline score, and the average feedback score of the previous round are all algorithm parameters or feedback values. The inner product, the query vector magnitude, and the feature vector magnitude are all directly calculated from the corresponding vectors. The feature vector magnitude depends on the value of the feature vector, and the feature vector comes from off-chain location. Therefore, the feature vector magnitude also indirectly depends on the off-chain storage locator of the model evidence extension table. The record RECO comes from the on-chain mapping record table, and the feature vector is stored in the off-chain storage system. The initial similarity candidate set includes on-chain mapping records that meet the similarity threshold, the semantic similarity score corresponding to each record, and the storage location information of the data block.
[0042] S43. Based on the initial similar candidate set, the Bloom filter is used for multiple hash verification to obtain the block-wide Bloom verification pass set. In this step, the data identifier of each record in the candidate set is calculated by multiple independent hash functions, and each bit of the corresponding block Bloom filter is verified to see if it is hit. The records that pass the verification constitute the block-wide Bloom verification pass set. Because the Bloom filter enables fast existence verification across blocks to filter irrelevant fire candidate records; the number of hash functions ranges from 3 to 10, and the length of the Bloom filter bit array ranges from 1024 to 8192 bits; there may be a false positive rate but no false negatives. The Bloom check pass set within a block includes candidate records that have passed the Bloom filter verification, the corresponding block location information, and the Bloom hit flag; The candidate records include the block identifier, content hash, feature hash, storage content identifier, and storage location pointer of each data block that meets the initial similarity conditions. These records are confirmed to exist in the corresponding blocks. The block location information includes the block number to which each candidate record belongs and its offset within the block, which is used for subsequent rapid location and verification. The Bloom hit flag records the hit result of the record in the Bloom filter multi-hash verification. If it passes, it is marked as valid.
[0043] S44. Perform real-time option hash recalculation on the Bloom check pass set within the block to obtain the recalculated content hash set and the recalculated feature hash set. In this step, extract the data blocks and feature vectors that pass the Bloom check from off-chain storage, recalculate the content hash of the data blocks using a secure hash algorithm, and recalculate the feature hash of the feature vectors using random hyperplane encoding to form the recalculated content hash set and the recalculated feature hash set. Off-chain real-time recalculation hashes are used to compare with on-chain anchored hashes to detect whether fire data has been tampered with; the recalculation uses the same hash algorithm and parameters as the generation stage to ensure comparability; the output is a recalculated content hash set and a recalculated feature hash set.
[0044] S45. Based on the recalculated content hash set, the recalculated feature hash set, the on-chain mapping record table, and the off-chain storage locator, perform a dual-track hash XOR comparison to generate a hash consistency verification result set. In this step, the recalculated content hash is compared with the on-chain anchored content hash, and the recalculated feature hash is compared with the on-chain anchored feature hash. If both are consistent, the trust flag is set to 1; otherwise, it is set to 0. The comparison is accelerated by using the XOR check flag, thus forming the hash consistency verification result set. Dual-track hash verification ensures that fire retrieval results data has not been tampered with. A trust flag of 1 indicates that both content hash and feature hash verifications have passed, while 0 indicates that at least one track verification has failed. The XOR check flag is used to quickly locate inconsistencies. The hash consistency verification result set includes records that have passed the content hash comparison, records that have passed the feature hash comparison, and a trust flag indicating that both tracks have passed. The on-chain anchored feature hash comes from the feature hash.
[0045] S46. Based on the hash consistency verification result set, the on-chain mapping record table, and the off-chain storage locator, a complete and trustworthy candidate set of paths is obtained through sparse Merkle tree multi-path verification and model version comparison. In this step, for records with a trust flag of 1, the root value is calculated by hash aggregation level by level along the Merkle verification path. If the recalculated root value is consistent with the on-chain root hash, the path verification is passed. At the same time, when reading the evidence from the model evidence extension table, the model hash is compared with the currently retrieved model hash. If they are consistent, the model matching flag is set to 1, thus forming a complete and trustworthy candidate set of paths. Merkel path verification ensures that the position of the fire data block in the hash tree structure has not been tampered with; model version verification ensures that the semantic encoder used during retrieval is consistent with the feature extraction model version used during evidence storage. If the versions are inconsistent, the semantic similarity score is multiplied by a decay coefficient of 0.3 as a penalty; the decay coefficient is 0.3; the output is a complete and reliable candidate set of paths, including model matching flags.
[0046] S47. Perform two-factor perceptual ranking processing on the complete and reliable candidate set of paths, the query semantic feature vector, and the hash consistency verification result set to obtain the comprehensive score feature vector set. In this step, the first step is: the comprehensive score CO_SC = the joint mapping output value JO_OU of the ranking network RA_NET on cosine similarity COS_SI, credibility flag TR_FL, model matching flag MO_FL, inverse distance DI_RE, and access frequency AC_FR; the second step is: if the credibility flag TR_FL is zero, then the comprehensive score CO_SC = comprehensive score CO_SC × weighting coefficient PE_CO; the third step is: if the model matching flag MO_FL is zero, then the comprehensive score CO_SC = comprehensive score CO_SC × attenuation coefficient DE_CO, which constitutes the comprehensive score feature vector set CO_SE. Fire safety retrieval results need to take into account semantic relevance, data credibility, and model consistency. The list ranking network adopts a 3-layer fully connected structure, with a 5-dimensional feature vector as input and a ranking score as output. The network is iteratively optimized using a pairwise loss function. Training is terminated when the cumulative gain of the validation set normalization loss does not improve for 10 consecutive rounds. The forced weighting coefficient is set to 0.05, and the version decay coefficient is set to 0.3. The comprehensive scoring feature vector set includes candidate record identification information, comprehensive score value, and the numerical values of various features involved in the scoring. The candidate record identification information includes the block identifier, content hash, feature hash, and storage location information of each data block, which is used to uniquely index the record and support the subsequent retrieval result output; the comprehensive score is the final score output by the ranking network after jointly mapping cosine similarity, credibility flag, model matching flag, inverse distance, and access frequency, which serves as the sole basis for ranking; the feature values involved in the scoring include the specific values of cosine similarity, credibility flag, model matching flag, inverse distance, and access frequency, which are used to trace the source of the scoring and support subsequent feature analysis.
[0047] S48. Based on the comprehensive score feature vector set, perform stable sorting, threshold truncation and feedback generation to generate a semantic verification candidate set and relevance ranking results. In this step, all candidate records are sorted in descending order of comprehensive score. The first few records are truncated according to the dynamic retention coefficient as the final output results. The average comprehensive score of the output results is calculated as a feedback signal and sent back to the retrieval threshold adjustment stage to form a semantic verification candidate set and relevance ranking results. Sorting and truncation ensure that the quality and quantity of fire safety search results are appropriate, and the dynamic retention coefficient ranges from 0.2 to 0.5. The average comprehensive score serves as a feedback signal. When the score is lower than the preset level, the threshold is lowered in the next round of search to expand the recall, and vice versa to reduce the number of candidates. The semantic verification candidate set and relevance ranking results include a ranked list of candidate records, a comprehensive score and feature contribution details for each record, and the corresponding on-chain evidence information. The sorted candidate record list includes the identifiers of the top-ranked data blocks after truncation, the data block storage location information, and the acquisition path of the original data content, used to directly display the search results to users. The comprehensive score and feature contribution details of each record include the comprehensive score value and the specific values of various features such as cosine similarity, credibility flag, model matching flag, inverse distance, and access frequency, used to explain the scoring basis to users and support their independent judgment of the credibility of the results. The corresponding on-chain evidence information includes the content hash and feature hash of each record, used to provide a hash verification entry while displaying the results, enabling users to verify the completeness and authenticity of the search results with one click.
[0048] Experimental Data Analysis: Taking the intelligent fire protection system of a commercial complex as the test object, a test set was constructed using 1,000 evidence records of three types of events from the past five years: real fires, electrical hazards, and false alarms / interference. Fire protection experts preset standard relevance labels for each record. Comparative experiments were conducted using a pure semantic retrieval scheme without hash verification (relying only on cosine similarity), a two-stage scheme of retrieval followed by verification (first semantic recall and then hash verification), and the ListNet fusion sorting scheme of this invention. Each scheme was executed 30 times. Experimental data shows that the pure semantic retrieval scheme performs well in terms of recall rate, reaching 92%, but the proportion of hash verification failures in the output results is as high as 38%, and administrators still need to manually remove untrusted data, so the actual usable effective result rate is only 57%. The two-stage scheme of retrieval followed by verification can increase the final effective result rate to 90%, but because the verification is embedded in the sorting, the retrieval response time increases from an average of 2.1 seconds to 8.7 seconds, and the response time increases by more than four times. The ListNet fusion ranking scheme of this invention uses the trust flag generated by hash verification as one of the core input features of the ranking model. Samples that pass verification gain a ranking advantage, while samples that fail verification are automatically downweighted. This results in a valid result ratio of 91% while the retrieval response time is only 3.2 seconds. In comparison, the response time is reduced by more than 60%, and the valid result ratio is basically the same as that of the two-stage scheme and much higher than that of the pure semantic retrieval scheme. The above experimental results show that this invention embeds hash verification results in the ranking stage, which avoids the problem of a large amount of untrusted data output by pure semantic retrieval, leading to secondary manual screening, and overcomes the response delay caused by the serial retrieval and verification of the two-stage scheme. It achieves a balance between high reliability and high efficiency in smart fire emergency scenarios.
[0049] This invention addresses the problem of existing blockchain retrieval methods failing to understand the natural language query intent of fire safety managers. In practice, when a fire safety manager inputs "Check if there were any cases of overheating electrical wiring on the third floor of the shopping mall last month," the system typically only matches the keyword "third floor," failing to understand that "overheating electrical wiring" implies the need to search for data related to abnormal residual current or excessive cable temperatures. This results in either returning a massive amount of irrelevant records or missing crucial overheating hazard data. This invention transforms natural language queries into semantic feature vectors using a semantic encoder, and then calculates similarity between these vectors and the stored feature vectors. This not only achieves semantic retrieval capabilities based on intent but also recalls data that is semantically relevant to the query but whose keywords do not match. This leap from precise matching to semantic understanding improves retrieval accuracy. Furthermore, the candidate set of semantically recalled data, after subsequent hash verification, is ranked using a sorting model that integrates semantic similarity and credibility, ensuring that the retrieval results are both semantically relevant and data-credible. This avoids the dilemma of finding results that are not credible or credible but not searchable.
[0050] By embedding cross-block existence verification using Bloom filters, precise comparison using dual-track hashes, and Merkel path integrity verification into the intermediate stages of the retrieval process, verification and retrieval can proceed in parallel. This not only achieves an integrated process of retrieval and verification, significantly reducing the overhead of repeated retrieval, but also enables verification results to influence the ranking weight in real time through the forced deweighting effect of verification flags in the ranking process. This ensures that the final output results naturally possess high credibility attributes, further improving the reliability of fire protection data retrieval for managers. It also solves the problem of complete decoupling between retrieval and verification in actual fire protection work. In practice, when managers retrieve historical alarm data for a certain area, after the retrieval returns a large number of candidate records, they find that a significant portion of them have failed hash verification. Users have to re-initiate the retrieval, which multiplies the overhead of repeated retrieval and extends the response time from seconds to minutes.
[0051] Specifically, the above solution addresses the practical issue of fire commanders needing to retrieve all relevant data from several hours before and after a fire for situational assessment within a very short timeframe. In situations where commanders frequently search for data, such as "view all alarms and video feeds from the fire floor in the last half hour," existing methods suffer from severe deviations in interpretation. They either rely on precise matching based on device numbers and timestamps for rapid results, but miss related information like smoke concentration trends and temperature rise rates on adjacent floors, leading to incomplete situational assessments; or they retrieve all relevant data and then filter it one by one, but the sheer volume of data makes the retrieval extremely time-consuming, severely compressing precious golden rescue time. This invention employs a two-layer screening mechanism of initial recall and secondary refinement, along with dynamic adjustment of the retrieval threshold based on average score feedback, to achieve a progressive retrieval strategy of broad entry and strict exit. The broad threshold of the initial recall ensures a high recall rate, including relevant data from different modalities such as smoke, temperature, video, and water pressure, preventing the omission of early warning information from the surrounding area of a fire. Furthermore, the rigorous secondary scoring and dynamic adjustment guarantee high accuracy. In frequent retrieval scenarios, the retrieval threshold is continuously optimized based on the average score, giving the retrieval system an adaptive capability that becomes more accurate with use. In specific fire scenarios, after adopting this solution, the comprehensive data retrieval that originally took tens of minutes was shortened to within a few minutes, and all types of sensory data around the burning floor were completely recalled. Commanders were able to accurately determine the fire spread path based on this, significantly improving fire rescue efficiency.
[0052] S5. Perform credible verification and incremental learning feedback processing on the semantic verification candidate set and relevance ranking results to obtain credible retrieval feedback log; verify the integrity of the retrieval results through Merkle tree verification path, compare the on-chain hash with the actual hash of the retrieval data to confirm that it has not been tampered with, and feed user retrieval behavior and feedback evaluation as training data into the model for incremental learning to form credible retrieval feedback log. This step involves fire management personnel clicking on the search results and continuously optimizing the satisfaction evaluation model. Incremental learning uses the online gradient descent method, and the model structure is a single-layer logistic regression classifier. The input is the user feedback feature vector, and the output is the optimized model parameters. The learning rate is between 0.001 and 0.01. A model update is triggered when the cumulative number of new training samples reaches 100 to 500. Incremental learning is terminated when the accuracy of the model on the test set does not improve for 5 consecutive rounds. The trusted retrieval feedback log includes retrieval request information, trusted verification records of the result set, and user feedback and model update data. The retrieval request information includes user identification, query timestamp, and original query statement, used to trace the source and content of each retrieval; the trusted verification record of the result set includes the block identifier, content hash comparison result, feature hash comparison result, Merkel path verification result, and verification timestamp for each returned result, used to prove the data integrity and authenticity of the retrieval results; user feedback and model update data includes user relevance ratings, satisfaction evaluations, and click behavior records for the retrieval results, used to drive incremental learning of the subsequent retrieval model and dynamic optimization and adjustment of the retrieval threshold.
[0053] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code, including but not limited to disk storage, CD-ROM, optical storage, etc.
[0054] The above embodiments provide a detailed description of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A data storage and retrieval method based on blockchain hash algorithm technology, characterized in that, The steps of this method are as follows: collect the original dataset of the target data, and obtain a multi-dimensional feature vector set by performing statistical threshold denoising and dual-stream feature fusion based on the original dataset; Multi-classification strategy mapping and dynamic salting hyperplane transfer coding are performed based on multi-dimensional feature vector sets to obtain feature hash value sets and content hash value sets. Key-value pair cross-indexing driven parameter correction is performed on the content hash value sets and feature hash value sets to obtain dynamic anchored index packages. File addressing hash anchoring is performed on the dynamic anchored index package and the multidimensional feature vector set to obtain the on-chain mapping record table and the model evidence extension table. The user's original query string is obtained. Based on the user's original query string, the on-chain mapping record table, and the model evidence extension table, an initial similarity candidate set is generated through dynamic encoding and dynamic adjustment with nearest neighbors. Based on the initial similarity candidate set, multiple hash verification and feedback generation processing are performed to obtain the semantic verification candidate set and the relevance ranking result. The semantic verification candidate set and relevance ranking results are subjected to credible verification and incremental learning feedback processing to obtain credible retrieval feedback logs.
2. The data storage and retrieval method based on blockchain hash algorithm technology according to claim 1, characterized in that, Based on the original dataset, dual-stream feature fusion processing with statistical threshold denoising is performed, including: statistical threshold noise suppression processing based on the original dataset to generate a cleaned and standardized dataset; Based on the cleaned and standardized dataset, the data is dynamically segmented by content length to obtain standardized data blocks and metadata tags; The standardized data blocks and metadata tags are subjected to parallel dual-stream feature fusion processing to obtain a multi-dimensional feature vector set.
3. The data storage and retrieval method based on blockchain hash algorithm technology according to claim 1, characterized in that, Multi-classification strategy mapping and dynamic salting hyperplane transfer coding based on multi-dimensional feature vector sets include: multi-classification strategy mapping based on multi-dimensional feature vector sets to generate hash strategy label sets; A multi-dimensional feature vector set and a hash strategy label set are subjected to round-number dynamic salting hashing to obtain a content hash value set. The feature hash value set is obtained by processing the multidimensional feature vector set through random hyperplane transfer coding.
4. The data storage and retrieval method based on blockchain hash algorithm technology according to claim 1, characterized in that, The key-value pair cross-indexing driven parameter correction process is performed on the content hash set and the feature hash set, including: performing key-value pair cross-indexing based on the content hash set and the feature hash set to generate a dual-track association mapping tuple set; Deep reinforcement learning adaptive threshold clustering is performed on the feature hash value set and the dual-track association mapping tuple set to obtain the feature similarity clustering group set. Based on the feature similarity clustering group set and the content hash value set, a dynamic anchored index package is obtained through a second feedback correction process of hash aggregation.
5. The data storage and retrieval method based on blockchain hash algorithm technology according to claim 4, characterized in that, The clustering of groups based on feature similarity and the content hash value set are subjected to a secondary feedback correction process through hash aggregation, including: the clustering of groups based on feature similarity and the content hash value set are subjected to depth-adjustable hash aggregation to obtain a hierarchical hash tree structure; Lightweight Merkle root compression is performed based on a hierarchical hash tree structure to generate a compressed root hash. A secondary feedback reward-driven parameter correction process is applied to the hierarchical hash tree structure, compressed root hash, and feature similarity clustering group sets to obtain a dynamic anchored index package.
6. The data storage and retrieval method based on blockchain hash algorithm technology according to claim 1, characterized in that, File addressing hash anchoring processing is performed on the dynamic anchoring index package and the multidimensional feature vector set, including: obtaining the set of off-chain storage content identifiers by performing file system content addressing processing based on the dynamic anchoring index package and the multidimensional feature vector set; Based on the off-chain storage content identifier set and the dynamic anchored index package, a multi-key-value hash index mapping process is performed to generate an on-chain mapping record table. The on-chain mapping record table is subjected to model snapshot hash anchoring to obtain the model evidence extension table.
7. The data storage and retrieval method based on blockchain hash algorithm technology according to claim 1, characterized in that, Based on the user's original query string, the on-chain mapping record table, and the model evidence extension table, dynamic encoding and nearest neighbor dynamic adjustment are performed, including: dynamic mask semantic encoding processing of the user's original query string to obtain the query semantic feature vector; Based on the query semantic feature vector, the model evidence expansion table, and the on-chain mapping record table, a product quantization approximate nearest neighbor search and dynamic threshold adjustment are performed to generate an initial similarity candidate set.
8. The data storage and retrieval method based on blockchain hash algorithm technology according to claim 1, characterized in that, The process of performing multi-hash verification and feedback generation based on the initial similar candidate set includes: performing multi-hash verification through a Bloom filter based on the initial similar candidate set to obtain the Bloom verification pass set within the block; Real-time option hash recalculation is performed on the Bloom check pass set within the block to obtain the recalculated content hash set and the recalculated feature hash set. A dual-track hash feedback generation process is performed based on the recalculated content hash set, the recalculated feature hash set, and the on-chain mapping record table to generate a semantic verification candidate set and a relevance ranking result.
9. A data storage and retrieval method based on blockchain hash algorithm technology according to claim 8, characterized in that, The dual-track hash feedback generation process is based on the recalculated content hash set, the recalculated feature hash set, and the on-chain mapping record table. This includes: performing dual-track hash XOR comparison processing based on the recalculated content hash set, the recalculated feature hash set, and the on-chain mapping record table to generate a hash consistency verification result set. Based on the hash consistency verification result set and the on-chain mapping record table, a complete and reliable candidate set of paths is obtained by comparing the sparse Merkle tree multi-path verification with the model version. A two-factor sorting threshold truncation feedback process is applied to the complete and reliable candidate set of paths, the query semantic feature vector, and the hash consistency verification result set to generate a semantic verification candidate set and a relevance ranking result.
10. A data storage and retrieval method based on blockchain hash algorithm technology according to claim 9, characterized in that, A two-factor sorting threshold truncation feedback process is performed on the complete and trustworthy candidate set of paths, the query semantic feature vector, and the hash consistency verification result set. This includes: performing two-factor perceptual sorting on the complete and trustworthy candidate set of paths, the query semantic feature vector, and the hash consistency verification result set to obtain a comprehensive score feature vector set. Based on the comprehensive scoring feature vector set, stable sorting, threshold truncation, and feedback generation processes are performed to generate a semantic verification candidate set and relevance ranking results.
