Nuclear magnetic resonance spectrum processing method and system based on spectrum fingerprint hash, and computer readable storage medium
By employing a spectral fingerprint hash-based processing method, the problems of high computational overhead and privacy leakage in nuclear magnetic resonance spectral similarity comparison are solved, achieving efficient and secure spectral matching and cross-institutional sharing, which is applicable to a variety of medical application scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies suffer from high computational overhead and slow response speed in nuclear magnetic resonance spectral similarity comparisons. They are also sensitive to chemical shifts and instrument drift, making it impossible to support approximate matching. Furthermore, the transmission of raw spectra across institutions poses a risk of privacy breaches.
We employ a spectral fingerprint hashing-based processing method, which combines segmentation and feature embedding, fingerprint hash generation, index construction, and individual follow-up with consortium blockchain for privacy-preserving longitudinal tracking and group drift monitoring. We use anchor peak alignment, adaptive segmentation, pre-trained encoder, and deep hashing network to generate fixed-length binary spectral fingerprint hash values and construct an approximate nearest neighbor index structure for fast retrieval.
It achieves highly robust and high compression ratio spectral matching, supports approximate retrieval, has privacy protection capabilities, is suitable for cross-institutional sharing and multi-center collaborative analysis, and meets the needs of clinical follow-up, laboratory quality control and other scenarios.
Smart Images

Figure CN121786034A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of medical big data processing and information retrieval, and particularly relates to a nuclear magnetic resonance spectroscopy processing method, system and computer-readable storage medium based on spectral fingerprint hashing. Background Technology
[0002] In long-term clinical follow-up, cohort studies, and laboratory quality control, it is often necessary to perform rapid similarity comparisons and distribution monitoring of a large number of nuclear magnetic resonance (NMR) spectra. Traditional methods usually rely on full-spectrum data storage and similarity calculations between high-dimensional vectors (such as Euclidean distance and correlation coefficients), which suffers from high computational cost, slow response speed, and extreme sensitivity to slight chemical shifts, linewidth broadening, or instrument drift, leading to matching failures.
[0003] If a general cryptographic hash algorithm (such as MD5, SHA series) is used, the output will be completely different due to the small change in input, which makes it impossible to support the "approximate matching" function. Therefore, it is not suitable for the association identification of samples from different time points of the same subject.
[0004] While existing dimensionality reduction methods (such as principal component analysis (PCA) and metabolite integral characterization) can compress data, their feature stability decreases when peak positions shift slightly, making it difficult to balance compression ratio, robustness, privacy, and retrievability. Furthermore, the raw spectra contain individual biological information, and direct inter-institutional transmission poses privacy and compliance risks.
[0005] Therefore, there is an urgent need for a method that possesses high robustness, high compression ratio, supports approximate retrieval, and is conducive to privacy protection. NMR A spectral "fingerprint" representation method, along with corresponding longitudinal tracking and population drift monitoring mechanisms. Summary of the Invention
[0006] Technical Solution: To solve the above-mentioned technical problems, this invention provides a nuclear magnetic resonance spectroscopy processing method based on spectral fingerprint hashing. The specific steps of the method include: Step 1: Segmentation and Feature Embedding: Anchor peak alignment is performed on the input standardized NMR spectrum, and adaptive segmentation is performed based on local peak density and signal-to-noise ratio to form structured spectral features. These features are then input into a pre-trained encoder to obtain low-dimensional continuous embedding vectors. Z ; Step 2: Fingerprint Hash Generation: Project the embedding vector Z onto the target dimension space and binarize it using a sign function or a learned network to generate a fixed-length binary spectral fingerprint hash value. H ; Step 3: Index Construction and Individual Follow-up: Based on the index structure, a historical fingerprint database is constructed. For new sample fingerprints, a fast nearest neighbor search is performed to calculate the minimum Hamming distance between the fingerprint and the historical fingerprint set. The individual longitudinal change index is then obtained by combining the time decay weight. Used for deviation assessment and early warning determination; Step 4: Population Distribution Drift Monitoring: Analyze the fingerprint distribution characteristics within a recent time window, compare them with the baseline distribution, calculate the statistical distance or change point detection index, and obtain the population drift index. When the preset threshold is exceeded, an alarm is triggered and the quality control process is activated.
[0007] As an improvement, a consortium blockchain is also included for storing encrypted values, including fingerprint hashes. H Collection time, institution ID And digital signatures.
[0008] As an improvement, in step one, anchor peak alignment identifies at least two stable inner standard peaks, calculates their offset relative to the standard position, and uses linear interpolation to perform the entire process. ppm The axis is translated for correction; during adaptive segmentation, non-uniform intervals are divided along the chemical displacement axis, and a narrow or wide bucket segmentation strategy is selected, taking the average or maximum value of the signal in each bucket as the representative value of that segment.
[0009] As an improvement, in step two, the fingerprint hash value is 128 to 512 bits long, and the encoding setting also includes an error correction code; the binarization process uses random projection combined with a sign function, or the binary code is directly output by a deep hash network trained end-to-end.
[0010] As an improvement, in step three, the index structure is an approximate nearest neighbor index structure, including a hierarchical navigable small-world graph. HNSW Locality-sensitive hashing LSH or multiple tables LSH At least one of the following; individual longitudinal variation index The calculation is as follows: (1) in This is the spectral fingerprint hash value of the current sample. This is the collection of fingerprints from the subject's historical samples; Indicates Hamming distance; It is the time difference between the current sample and the historical sample being compared, in days; The time decay constant; Calculate the time decay weight by combining the time difference Δt. The change index is finally obtained. ;when When the minimum threshold is reached, a follow-up reminder will be triggered.
[0011] As an improvement, the calculation of the minimum Hamming distance also includes the introduction of a bit-level optimization strategy, the specific steps of which are: firstly, using bitwise XOR... XOR The operation obtains the difference bitmap between the current fingerprint and historical fingerprints, where XOR The position where the result is 1 indicates that there is a difference between the two fingerprints at that position; then, the difference positions are quickly accumulated using hardware-accelerated bit counting instructions to obtain the standard Hamming distance. ; Secondly, we introduce a weighted Hamming distance to divide each bit Assign weights The distance metric is obtained: (2) in, = Current sample ( t The first fingerprint i Bit bit , =historical samples ( h The first fingerprint i Bit bit ; Finally, an exponential function is used when calculating the time decay weight. = exp(-Δt / τ) The final longitudinal variation index is obtained by combining it with the above distance. = · .
[0012] As an improvement, step four sets the scrolling window to include recent windows as past windows. m The baseline window is the previous day. n Over several months, the frequency of fingerprint occurrences within two windows was statistically analyzed. The recent window and the baseline window were then normalized to obtain probability distributions. 、 Through calculation Jensen-Shannon Divergence: (3) (4) D KL express Kullback–Leibler Divergence is used to measure the difference between two probability distributions. M This refers to the average probability distribution; when When this happens, a device calibration reminder is triggered, and the quality control process is linked, which includes batch verification and instrument compensation.
[0013] As a specific embodiment of the present invention, the present invention also provides a nuclear magnetic resonance spectroscopy processing system based on spectral fingerprint hashing, including a segmentation and feature embedding module, a fingerprint hash generation module, a fingerprint indexing and retrieval module, a longitudinal change evaluation module, a population drift monitoring module, and a sharing and evidence storage module; The segmentation and feature embedding module is used to perform anchor alignment, adaptive segmentation and generate embedding vectors, and transmit the embedding vectors to the fingerprint hash generation module. The fingerprint hash generation module projects and binarizes the embedded vector to generate a fixed-length fingerprint hash value. The fingerprint indexing and retrieval module is used to build a historical fingerprint database, update fingerprints for new samples, and query the similarity retrieval index structure. The longitudinal change assessment module calculates an individual's longitudinal change index and sets a minimum threshold to assess the degree of deviation and issue early warnings. The group drift monitoring module calculates the drift index and sets a minimum threshold to trigger an alarm.
[0014] As an improvement, a sharing and evidence storage module is also included, which is used to encrypt the fingerprints and statistics of the nuclear magnetic resonance spectroscopy processing system based on spectral fingerprint hashing and store them on the blockchain.
[0015] As another specific embodiment of the present invention, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the nuclear magnetic resonance spectroscopy processing method based on spectral fingerprint hashing as described above.
[0016] Beneficial effects: This invention proposes a nuclear magnetic resonance spectroscopy processing method and system based on spectral fingerprint hashing. Through this invention, the following can be achieved: (1) matching identification and change index calculation of homologous samples in individual longitudinal follow-up; (2) sensitive monitoring and threshold early warning of population-level distribution drift. The obtained fingerprint is robust to small chemical shifts, linewidth fluctuations and noise disturbances, and supports cross-center secure sharing and collaborative analysis without exposing the original spectral details. It is suitable for scenarios such as long-term clinical follow-up, laboratory quality control and large-scale population metabolic monitoring.
[0017] In addition, compared with the prior art, the present invention has the following advantages: (1) Good engineering feasibility: The modular design facilitates deployment and is applicable to various scenarios such as clinical follow-up, pharmacokinetic studies, biobank management, and large-scale epidemiological surveys. (2) Industrial applicability: The present invention can be used in scenarios such as clinical follow-up, laboratory quality control, cohort monitoring, and multi-center collaboration, and has good engineering feasibility and scalability. This proves that the present invention is not only theoretically innovative, but also feasible in practical applications, meeting the requirements of patent law for practicality. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the overall process of the nuclear magnetic resonance spectral fingerprint hash generation and monitoring method of the present invention.
[0019] Figure 2 This is a schematic diagram of the anchor peak alignment and adaptive segmentation of the present invention.
[0020] Figure 3 This is a schematic diagram of the fingerprint index structure of the present invention.
[0021] Figure 4 The individual longitudinal variation index of this invention Calculation flowchart.
[0022] Figure 5 This is a flowchart of the population distribution drift monitoring process of the present invention.
[0023] Figure 6 This is a diagram of the multi-center collaborative and blockchain-shared architecture of the present invention.
[0024] Figure 7 This is a flowchart of the remote follow-up application of the present invention.
[0025] Figure 8 This is a schematic diagram of the anchor peak alignment and adaptive segmentation of the present invention. Detailed Implementation
[0026] The technical solutions in the embodiments of the present invention will be clearly and completely described below, so that those skilled in the art can better understand the advantages and features of the present invention, thereby making a clearer definition of the scope of protection of the present invention. The embodiments described in this invention are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0027] See Figure 1 The diagram shown is an overall flowchart of the nuclear magnetic resonance spectroscopy processing method based on spectral fingerprint hashing according to the present invention. The specific steps are as follows: 1) Anchor peak alignment is performed on the input standardized nuclear magnetic resonance spectrum, and adaptive segmentation is performed based on local peak density and signal-to-noise ratio to obtain multiple spectral features; the influence of peak position shift is suppressed by anchor peak alignment and adaptive segmentation, and the tolerance to linewidth variation and noise interference is enhanced by combining pre-trained encoder, ensuring fingerprint consistency and improving robustness; 2) Input the spectral band features into a pre-trained deep neural network encoder to obtain a low-dimensional continuous embedding vector Z; 3) Perform linear projection and sign function binarization on the embedded vector Z to generate a fixed-length binary spectral fingerprint hash value.H The fingerprint hash value is a highly abstract, low-dimensional binary code, making it difficult to invert and reconstruct the original spectrum, which conforms to... GDPR, HIPAA In accordance with data privacy regulations, it facilitates cross-organizational sharing and is privacy-friendly; 4) Store or query the fingerprint hash value H in a pre-built similarity retrieval index structure to achieve rapid matching of historical samples of the same subject, and perform longitudinal change assessment and / or population distribution drift monitoring on the current sample based on the matching results.
[0028] In this invention, a method is adopted that simultaneously supports the assessment of individual longitudinal changes. Population distribution drift detection It covers multi-level monitoring needs from individuals to systems and has dual monitoring capabilities. Example 1
[0029] Step 1: Segmentation and Feature Embedding: By acquiring data from different medical institutions... 1H-NMR Spectral data should be uniformly processed using standardization methods, such as... TIC Normalization, solvent peak removal, phase correction, followed by: (1.1) Anchor peak alignment: Identify at least two stable internal standard peaks in the spectrum, preferably TSP Calculate the offsets of -d4 (δ=0.0ppm) and formic acid (δ=8.4ppm) relative to the standard position using linear interpolation. ppm The axis is translated for correction.
[0030] like Figure 2 As shown, the acquired spectral data is first preprocessed, including noise reduction and smoothing. Then, one or more known reference peaks are identified in the preprocessed spectrum. Based on the offset between the position of the reference peak and the theoretical value, the amount of frequency axis shift required is calculated. Finally, a linear shift correction is performed on the entire frequency axis. This process is accomplished by detecting the reference peak and performing a linear shift of the frequency axis.
[0031] For example, in NMR In the spectrum, the peak of tetramethylsilane (TMS) is usually used as a reference peak. If detected... TMS The peak position shifted by 0.02 from the theoretical position. ppm Then the entire frequency axis will be shifted 0.02 in the opposite direction. ppm Correction complete.
[0032] (1.2) Adaptive segmentation: Divide the region into non-uniform intervals along the chemical shift axis, and determine the peak value within each segment based on the number of peak values. SNR Dynamically set bucket width: SNR Regions with >10 peaks and ≥ 3 peaks are divided into 0.01 regions. ppmWidth, gradually widening to 0.05–0.1 in other areas. ppm Finally, the average or maximum value of the signal in each bucket is taken as the representative value of that segment.
[0033] like Figure 2 As shown, this system determines the spectral segmentation strategy based on local peak density and signal-to-noise ratio, preferably by selecting a narrow-barrel or wide-barrel partitioning strategy, and outputs the spectral segment vector.
[0034] Step 2: Embedding encoding and fingerprint generation.
[0035] (2.1) Encoder structure: Design a 4-layer encoder. D - CNN (Kernel size = 7, stride = 2) and 2 layers Transforme The hybrid model of the r encoder block uses the activation function. GELU Adding between layers LayerNorm and Dropout (p=0.1); (2.2) Pre-training strategy: In a dataset containing 10,000^1 H-NMR Public datasets of spectra (such as) HMDB5.0 Self-supervised training was performed on the following tasks: ① Masking and reconstruction task (randomly masking 15% of the spectral band and reconstructing the original signal); ② Contrastive learning task (different enhanced views of the same spectrum were used as positive sample pairs). InfoNCE Loss function, optimizer is AdamW (Learning rate 3e-4, batch size 64); (2.3) Hash generation: embedding the output Input a linear projection layer Then through the symbolic function sign(WZ) 256 fingerprints obtained H Further introduction is possible. BCH(256,191) Error correction codes improve noise resistance; this process involves generating a "fingerprint code" through "projection and binarization" from a "feature embedding encoder". H ".
[0036] Step 3: Indexing and Individual Follow-up.
[0037] Build HNSW Graph Index ( M=16, ef_construction =200), and maintain 5 sheets. LSH Tables (each with a 64-bit hash) are used for candidate expansion. For example... Figure 3 As shown, after a new sample fingerprint enters, it is first processed through multiple tables. LSH (HT1–HT3) Screening candidates ID Gather, and then HNSW The graph shows a nearest neighbor search that outputs a list of similar samples.
[0038] To improve multi-table LSH Recall rate and HNSW To improve retrieval efficiency, this invention further proposes a multi-table parallel candidate expansion mechanism, a hierarchical bucket selection strategy, and a two-stage... HNSW Refined Search: First, the fingerprint hash is split into multiple sub-blocks and searched in parallel across multiple tables to improve candidate coverage. Then, candidate filtering is performed based on bucket density to reduce redundant expansion. Finally, a two-stage search is executed in the HNSW using LSH candidates as the entry set, significantly improving the overall search stability and accuracy. These optimization strategies enable this invention to achieve a 2-5 times faster query speed than traditional HNSW under the same hardware conditions.
[0039] like Figure 4 As shown, in individual longitudinal follow-up, the system compares the current fingerprint with the historical fingerprint set, calculates the minimum Hamming distance, and combines it with the time difference ( Δt Calculate the time decay weight The change index is finally obtained. .like If the following is triggered, a follow-up reminder will be provided. To improve the accuracy of individual follow-up comparisons, this invention introduces a bit-level optimization strategy in the calculation of the minimum Hamming distance.
[0040] First, use bitwise XOR ( XOR The operation obtains the difference bitmap between the current fingerprint and historical fingerprints, where XOR A result of 1 indicates a difference between the two fingerprints at that position; subsequently, hardware-accelerated bit counting instructions, such as... POPCNT / AVX2 / NEON The standard Hamming distance is obtained by rapidly accumulating the difference bits. d_min .
[0041] In addition, to avoid all bit To address the insufficient sensitivity caused by treating all cases equally, this invention further introduces a weighted Hamming distance, which measures the sensitivity of each individual case. bit Assign weights (This can be determined based on segment importance, bit stability, or statistical confidence), thus yielding a more robust distance metric:
[0042] in, = The fingerprint of the current sample (t) i Bit bit , =historical samples ( h The first fingerprint i Bit bit .
[0043] In calculating the time decay weight, this invention employs an exponential function. = exp(-Δt / τ) The final longitudinal variation index is obtained by combining it with the above distance. = · This allows the distance to reflect both the differences in fingerprint structure and the impact of the follow-up interval on clinical significance.
[0044] Step 4: Group drift monitoring.
[0045] In this embodiment, a scrolling window is set: the recent window is the past 14 days, and the baseline window is the previous month. Then, the frequency of fingerprint occurrence within each window is counted and normalized to a probability distribution. .like Figure 5 As shown, the system calculates Jensen-Shannon Divergence:
[0046] In this embodiment, the minimum threshold is set to 0.05. The device will trigger a calibration reminder and link it to the quality control process, including batch verification and instrument compensation.
[0047] Step 5: Multi-center collaboration and on-chain evidence storage.
[0048] like Figure 6 As shown, each participating center ( Center 1–4) The generated fingerprint H Collection time, institution ID And uploaded after digital signature encryption. Hyperledger Fabric The consortium blockchain, with its central cloud platform, periodically aggregates the fingerprint distribution across various centers, performs cross-center drift analysis and retrieval routing, and can be extended to the consortium blockchain environment to achieve decentralized evidence storage and auditing. By uploading to the consortium blockchain, the invention achieves strong scalability and can support integration with hospitals. PACS Systems, laboratories LIS The system and quality control platform are seamlessly integrated.
[0049] like Figure 7 As shown, in a remote follow-up scenario, after the local laboratory uploads the fingerprints, cloud computing... The results are pushed to the doctor's end for alerts and trend monitoring, and can also be sent to the patient's end in the form of a report for comparison and use.
[0050] like Figure 8 As shown, users can enter a number through the mini-program, and the blockchain network will retrieve the stored records and return the verification results (time, institution, integrity), thus achieving auditable traceability. Example 2
[0051] This invention employs a fixed-length binary fingerprint hash, preferably 128 to 512 bits, to replace traditional high-dimensional hashes. NMR Spectral vectors, typically with dimensions up to Fixed-length encoding has the following significant advantages: (1) The number of dimensions is significantly reduced, improving retrieval speed. Traditional MR Spectra typically contain 1,024 to 16,384 sampling points. If Euclidean distance or correlation is used directly for calculation, the computational complexity of a single alignment is at least O(n log n). n This invention maps spectra of arbitrary length to fixed lengths. L ( L (Can be 128, 256, 384, or 512 bits), reducing the comparison complexity to O(n). L The computational workload is reduced by 30–300 times.
[0052] (2) Fixed-length fingerprints ensure constant and controllable storage and transmission costs. This applies regardless of the input spectral resolution of 0.1. ppm 0.01 ppm or higher, the corresponding fingerprints all remain at a fixed length. For example: original spectrum (8 k (Points) Approximately 64 KB The 256-bit fingerprint of this invention is only 32 bytes; the storage requirement is reduced by more than 2,000 times, and the cost can be significantly reduced for large-scale databases (millions of samples).
[0053] (3) The 128–512 bit range is the best compromise, which combines discrimination and efficiency.
[0054] This invention compares the impact of different hash lengths (64, 128, 256, 512, and 1024 bits) on retrieval performance through experiments, and obtains the following pattern: When <128 bits... bit Increased collision rate makes it difficult to distinguish between adjacent but different spectra, resulting in a 10%–20% decrease in recall; when 128–512 bit (Preferred): Achieves an optimal balance between distinguishability, collision rate, and storage cost; when >512 bit Limited improvement in search accuracy (<1%), but it brings additional storage and HNSW The edge memory overhead of the graph is no longer the most efficient solution. Therefore, this invention uses 128–512. bit The adjustable hash length can be optimized according to actual business needs: preferably, when the goal is "high-speed retrieval and large-scale data storage", 128-256 bits is recommended; if the goal is "extremely high precision and low collision rate", 384-512 bits is recommended.
[0055] (4) Fixed-length encoding allows similarity calculations to be accelerated using bitwise operations, and hash fingerprints can be used. XOR (Binary XOR) + bitcount Achieving Hamming distance, modern CPU / GPU / ARM All support POPCNT The command can complete a comparison in nanoseconds. Compared with traditional vector similarity (such as cosine distance or Euclidean distance), the speed improvement can be 50–200 times.
[0056] (5) Relying on fixed-length hashing, HNSW graph indexes are more efficient and robust. Fixed dimensions are used to construct... HNSW ( Hierarchical Navigable Small World Graph The ideal conditions ensure a stable hierarchical structure and uniform distance distribution in the graph. The hash fingerprint of this invention effectively reduces... HNSW The "curse of dimensionality" in high-dimensional space improves the recall rate and construction performance of near nearest neighbor retrieval.
[0057] In summary, fixed-length fingerprints demonstrate significant advantages over traditional high-dimensional spectral matching in terms of speed, storage, robustness, and retrieval scalability, meeting the practical engineering needs of large-scale, multi-center, and multi-time-point follow-up.
[0058] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A nuclear magnetic resonance spectroscopy processing method based on spectral fingerprint hashing, characterized in that, The specific steps of the method include: Step 1: Segmentation and Feature Embedding: Anchor peak alignment is performed on the input standardized NMR spectrum, and adaptive segmentation is performed based on local peak density and signal-to-noise ratio to form structured spectral features. These features are then input into a pre-trained encoder to obtain low-dimensional continuous embedding vectors. Z ; Step 2: Fingerprint Hash Generation: Project the embedding vector Z onto the target dimension space and binarize it using a sign function or a learned network to generate a fixed-length binary spectral fingerprint hash value. H ; Step 3: Index Construction and Individual Follow-up: Based on the index structure, a historical fingerprint database is constructed. For new sample fingerprints, a fast nearest neighbor search is performed to calculate the minimum Hamming distance between the fingerprint and the historical fingerprint set. The individual longitudinal change index is then obtained by combining the time decay weight. Used for deviation assessment and early warning determination; Step 4: Population Distribution Drift Monitoring: Analyze the fingerprint distribution characteristics within a recent time window, compare them with the baseline distribution, calculate the statistical distance or change point detection index, and obtain the population drift index. When the preset threshold is exceeded, an alarm is triggered and the quality control process is activated.
2. The nuclear magnetic resonance spectroscopy processing method based on spectral fingerprint hashing according to claim 1, characterized in that, It also includes a consortium blockchain for storing encrypted values, including fingerprint hashes. H Collection time, institution ID And digital signatures.
3. The nuclear magnetic resonance spectroscopy processing method based on spectral fingerprint hashing according to claim 1, characterized in that, In step one, anchor peak alignment identifies at least two stable inner standard peaks, calculates their offset relative to the standard position, and uses linear interpolation to align the entire inner standard peak. ppm The axis is translated for correction; during adaptive segmentation, non-uniform intervals are divided along the chemical displacement axis, and a narrow or wide bucket segmentation strategy is selected, taking the average or maximum value of the signal in each bucket as the representative value of that segment.
4. The nuclear magnetic resonance spectroscopy processing method based on spectral fingerprint hashing according to claim 1, characterized in that, In step two, the fingerprint hash value is 128 to 512 bits long, and the encoding setting also includes an error correction code; the binarization process uses random projection combined with a sign function, or the binary code is directly output by a deep hash network trained end-to-end.
5. The nuclear magnetic resonance spectroscopy processing method based on spectral fingerprint hashing according to claim 1, characterized in that, In step three, the index structure is an approximate nearest neighbor index structure, including a hierarchical navigable small-world graph. HNSW Locality-sensitive hashing LSH or multiple tables LSH At least one of the following; individual longitudinal variation index The calculation is as follows: (1) in This is the spectral fingerprint hash value of the current sample. This is the collection of fingerprints from the subject's historical samples; Indicates Hamming distance; It is the time difference between the current sample and the historical sample being compared, in days; The time decay constant; Calculate the time decay weight by combining the time difference Δt. The final change index is obtained. ;when When the minimum threshold is reached, a follow-up reminder will be triggered.
6. The nuclear magnetic resonance spectroscopy processing method based on spectral fingerprint hashing according to claim 1, characterized in that, The calculation of the minimum Hamming distance also includes introducing a bit-level optimization strategy. The specific steps are as follows: First, a bitwise XOR operation is used to obtain the difference bitmap between the current fingerprint and historical fingerprints, where... XOR A result of 1 indicates a difference between the two fingerprints at that location; subsequently, hardware-accelerated bit counting instructions are used to rapidly accumulate the difference bits to obtain the standard Hamming distance. ; Secondly, we introduce a weighted Hamming distance to divide each bit Assign weights The distance metric is obtained: (2) in, = Current sample ( t The first fingerprint i Bit bit , =historical samples ( h The first fingerprint i Bit bit ; Finally, an exponential function is used when calculating the time decay weight. = exp(-Δt / τ) The final longitudinal variation index is obtained by combining it with the above distance. = · .
7. The nuclear magnetic resonance spectroscopy processing method based on spectral fingerprint hashing according to claim 1, characterized in that, In step four, the scrolling window is set to include recent windows as past windows. m The baseline window is the previous day. n Over several months, the frequency of fingerprint occurrences within two windows was statistically analyzed. The recent window and the baseline window were then normalized to obtain probability distributions. 、 Through calculation Jensen-Shannon Divergence: (3) (4) D KL express Kullback–Leibler Divergence is used to measure the difference between two probability distributions. M This refers to the average probability distribution; when When this happens, a device calibration reminder is triggered, and the quality control process is linked, which includes batch verification and instrument compensation.
8. A nuclear magnetic resonance spectroscopy processing system based on spectral fingerprint hashing, characterized in that, It includes a segmentation and feature embedding module, a fingerprint hash generation module, a fingerprint indexing and retrieval module, a longitudinal change assessment module, a population drift monitoring module, and a sharing and evidence storage module; The segmentation and feature embedding module is used to perform anchor peak alignment, adaptive segmentation and generate embedding vectors, and then transmit the embedding vectors to the fingerprint hash generation module. The fingerprint hash generation module projects and binarizes the embedded vector to generate a fixed-length fingerprint hash value. The fingerprint indexing and retrieval module is used to build a historical fingerprint database, update fingerprints for new samples, and query the similarity retrieval index structure. The longitudinal change assessment module calculates an individual's longitudinal change index and sets a minimum threshold to assess the degree of deviation and issue early warnings. The group drift monitoring module calculates the drift index and sets a minimum threshold to trigger an alarm.
9. The nuclear magnetic resonance spectroscopy processing system based on spectral fingerprint hashing according to claim 8, characterized in that, It also includes a sharing and evidence storage module, which is used to encrypt the fingerprints and statistics of the nuclear magnetic resonance spectroscopy processing system based on spectral fingerprint hashing and store them on the blockchain.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the nuclear magnetic resonance spectroscopy processing method based on spectral fingerprint hashing as described in any one of claims 1-7.