Industrial process online prediction model construction method based on self-attention manifold learning
By employing an online prediction model based on self-attention manifold learning, and utilizing low-field pulsed NMR acquisition and multi-entropy weighted manifold embedding technology, the problem of real-time wax content monitoring was solved, achieving high-precision, real-time wax content prediction and improving the safety and intelligence level of industrial processes.
Patent Information
- Application Number
- CN202511259820.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-09-04
AI Technical Summary
Existing technologies cannot achieve real-time and accurate monitoring of the component content in industrial fluids, especially lacking the ability to provide early warning of wax content, leading to potential production safety hazards and economic losses.
An online prediction model for industrial processes based on self-attention manifold learning is adopted. The original relaxation spectrum signal is obtained by low-field pulse NMR acquisition with a ten-second cycle. A multi-entropy weighted manifold embedding prediction model is constructed. Combined with information entropy analysis and self-attention mechanism, the wax content can be predicted in real time.
It achieves online monitoring of wax content with high real-time performance, high sensitivity, and strong generalization ability, meeting the process control requirements under complex oil transportation conditions, improving prediction accuracy and robustness, reducing manual intervention, and enhancing the level of intelligent process control.
Smart Images

Figure CN121051445B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, and further to the field of self-attention manifold learning technology, specifically to a method for constructing online prediction models of industrial processes based on self-attention manifold learning, which is particularly suitable for the measurement of phase or impulse characteristics. Background Technology
[0002] In many industrial production processes, such as petrochemicals, fine chemicals, biopharmaceuticals, and new material preparation, real-time and accurate monitoring and prediction of the content or properties of key components in fluid or mixture systems are crucial for ensuring production safety, optimizing process parameters, improving product quality, and reducing energy consumption. Taking the petroleum industry as an example, during crude oil extraction and pipeline transportation, changes in temperature and pressure cause waxy components to crystallize and precipitate. These precipitated wax crystals deposit on the inner walls of pipelines, gradually reducing the flow cross-section, increasing transport resistance, and in severe cases, even causing pipeline blockage, leading to production interruptions and significant economic losses. Therefore, real-time online monitoring of the wax content in crude oil is a core prerequisite for achieving pipeline flow assurance and developing effective wax removal and prevention measures (such as adding chemical agents and optimizing heating schemes).
[0003] Currently, methods for detecting component content in industrial fluids are mainly divided into two categories: offline laboratory analysis and online sensor monitoring. Offline laboratory analysis methods, such as differential scanning calorimetry (DSC), gas chromatography (GC), and solvent extraction gravimetric analysis, while providing high-precision measurement results, generally suffer from inherent drawbacks such as complex sample preparation, long analysis cycles (usually requiring hours or even days), and the inability to provide real-time feedback. This severe "time lag" limits their analytical results to post-event verification or long-term evaluation, completely failing to meet the needs of real-time control of production processes. To overcome the shortcomings of offline analysis, various online sensor monitoring technologies have emerged, such as online instruments based on physical parameters like turbidity, viscosity, and density. However, these methods are mostly indirect measurements, and their readings are easily affected by cross-interference from other components in the fluid (such as moisture, bubbles, and different oil types), leading to insufficient measurement accuracy and selectivity. Furthermore, these sensors typically only respond after significant changes in macroscopic physical properties, exhibiting weak early warning capabilities for processes such as crystallization. Summary of the Invention
[0004] The purpose of this invention is to provide a method for constructing an online prediction model for industrial processes based on self-attention manifold learning. This method acquires the raw relaxation spectrum signal through low-field pulsed NMR acquisition with a ten-second cycle, generates a feature vector set through unified preprocessing, and constructs a multi-entropy-weighted manifold embedding prediction model to achieve real-time prediction of wax content. This method integrates information entropy analysis, self-attention mechanism, and residual iterative optimization, possessing high-dimensional feature recognition capability and manifold structure preservation capability, significantly improving prediction accuracy and robustness. It also exhibits adaptive, automated, and high-frequency response characteristics, meeting the practical needs of continuous wax content monitoring and process control under complex oil transportation conditions.
[0005] To address the aforementioned technical problems, this invention provides a method for constructing an online prediction model for industrial processes based on self-attention manifold learning. The method includes:
[0006] Step 1: Perform pulsed NMR acquisition on the crude oil sideflow sample at a 10-second cycle, and write the original relaxation spectrum signal sequence covering the solid and liquid phase regions into the buffer queue in real time;
[0007] Step 2: Preprocess the original signal sequence of relaxation spectrum in the buffer queue to obtain a set of feature vectors of uniform dimension; take the set of all feature vectors before the current measurement time as the historical feature vector set;
[0008] Step 3: Calculate information entropy based on the historical feature vector set using a deep learning model to generate an initial entropy weight sequence; construct a manifold adjacency graph according to the initial entropy weight sequence, and form the first version of the manifold embedding matrix using Euclidean proximity; iteratively perform self-attention mapping, residual correction, and weight agglomeration operations on the first version of the manifold embedding matrix to synchronize weight allocation and embedding mapping, detect the residual convergence during the iteration process, and integrate the weights at each level and the embedding results when the convergence condition is met to output a multi-entropy weight manifold embedding prediction model;
[0009] Step 4: Input the feature vector of the current measurement time into the multi-entropy weighted manifold embedding prediction model to generate the real-time wax content prediction result, and send the real-time wax content prediction result to the control terminal.
[0010] Further, step 1 specifically includes: starting the measurement sequence with a 10-second cycle timer; taking a 30 ml sample of crude oil sideflow from the sideflow pipeline; maintaining a constant temperature of 60 degrees Celsius within the measurement chamber to stabilize the temperature of the crude oil sideflow sample within the target temperature fluctuation range of ±0.2 degrees Celsius; after the temperature stabilizes, applying a 14-microsecond 90-degree pulse within the same cycle timer, and then acquiring no less than 8,000 echo signals at an echo interval of 200 microseconds to form a raw relaxation spectrum signal sequence covering the solid and liquid phase regions; during the echo train acquisition process, performing analog-to-digital conversion with 16-bit quantization precision, and writing the raw relaxation spectrum signal sequence into the buffer queue in real time at a sampling interval of 1 microsecond; after the raw relaxation spectrum signal sequence is completely written into the buffer queue, completing the data integrity check before the end of the same cycle timer, and triggering the next 10-second cycle timer measurement sequence after the check passes.
[0011] Furthermore, in step 2, the preprocessing of the original relaxation spectrum signal sequence in the buffer queue includes: performing background subtraction, lateral smoothing, temporal alignment, and energy normalization on the original relaxation spectrum signal sequence in sequence to obtain a set of feature vectors with a unified dimension.
[0012] Furthermore, step 3 specifically includes: calculating information entropy based on the feature vector set to generate an initial entropy weight sequence; constructing a manifold adjacency graph according to the initial entropy weight sequence, and forming a first-version manifold embedding matrix using Euclidean proximity relations; performing a first self-attention mapping on the first-version manifold embedding matrix to obtain a first-level self-attention weight spectrum; calculating a first-level residual field using the difference between the first-level self-attention weight spectrum and the initial entropy weight sequence; injecting the first-level residual field into the manifold adjacency graph to generate a residual correction graph, thereby generating a second-version manifold embedding matrix; and performing a second self-attention mapping on the second-version manifold embedding matrix to obtain a second-level self-attention weight. The system performs a re-evaluation of the weight spectrum, simultaneously accumulating the increasing trajectory of the weight spectrum. Based on the increasing trajectory of the weight spectrum, a hierarchical agglomeration mechanism is triggered, and agglomeration gradient sequence is output. The agglomeration gradient sequence is back-projected onto the manifold adjacency graph to generate a manifold remapping matrix, which is then fused with the second-order self-attention weight spectrum to obtain a comprehensive embedding map. The convergence of the comprehensive embedding map is checked. If the convergence condition is not met, the system returns to recalculate the first-order residual field and completes the remaining steps, incrementing the iteration counter. When the convergence condition is met, all self-attention weight spectra, agglomeration gradient sequences, and comprehensive embedding maps are integrated to output the final multi-entropy weighted manifold embedding prediction model.
[0013] Furthermore, in step 3, the process of generating the initial entropy weight sequence includes: within the historical feature vector set, counting the number of times each feature unit takes a value to obtain a frequency distribution table with a total number of samples of no less than 1000; based on the frequency distribution table, calculating the information entropy value for each feature unit to obtain an entropy value sequence with a length equal to the number of feature units; and synchronously linearly normalizing all entropy values in the entropy value sequence to the interval between 0 and 1 to generate the initial entropy weight sequence.
[0014] Furthermore, in step 3, the process of forming the first version of the manifold embedding matrix includes: arranging all feature units from largest to smallest according to the numerical value of each entropy weight in the initial entropy weight sequence to obtain a sorted feature index list; calculating the Euclidean proximity relationship row by row for the historical feature vector set using the sorted feature index list as the order, with the proximity judgment threshold set as the average Euclidean distance of 5 adjacent samples; establishing undirected edges between sample pairs whose Euclidean proximity relationship meets the threshold condition, with the edge weight set as the arithmetic mean of the corresponding entropy weights, generating a manifold adjacency graph; converting the manifold adjacency graph into an adjacency matrix, with the matrix dimension consistent with the number of samples in the historical feature vector set, the diagonal elements uniformly set to zero, and the remaining elements filled with the edge weights; performing a classic multidimensional scaling operation on the adjacency matrix, with the target dimension set to 3 dimensions, and outputting a coordinate matrix as the first version of the manifold embedding matrix.
[0015] Furthermore, in step 3, the process of obtaining the second version of the manifold embedding matrix includes: performing zero-mean normalization on each row of coordinate vectors in the first version of the manifold embedding matrix to eliminate coordinate scale differences; after the normalization process, calculating the similarity matrix according to the inner product relationship between the row vectors, normalizing the similarity sequence corresponding to each row by the maximum value to form a first-level self-attention weight spectrum; constructing a first-level residual field based on the difference between the corresponding element of the first-level self-attention weight spectrum and the corresponding element of the initial entropy weight sequence, setting elements with an absolute difference value less than 0.01 to zero; and then... Non-zero elements in the first-order residual field are mapped back to their corresponding edges in the manifold adjacency graph according to their original indices. The edge weights are then weighted and adjusted to the arithmetic mean of the original edge weights and the corresponding elements in the first-order residual field, generating a residual correction graph. Based on the residual correction graph, a new adjacency matrix is generated with the same dimensions as the first version of the manifold embedding matrix. The diagonal elements are uniformly set to zero, and the remaining elements are filled with the weighted edge weights. The classic multidimensional scaling operation is performed again on the regenerated adjacency matrix, with the target dimension still set to 3 dimensions. The output coordinate matrix is used as the second version of the manifold embedding matrix.
[0016] Furthermore, in step 3, the process of obtaining the comprehensive embedding map includes: applying zero-mean normalization to the coordinate vectors of each row in the second version of the manifold embedding matrix to ensure consistent coordinate scales; calculating the similarity matrix according to the inner product relationship between the row vectors, normalizing the similarity sequence corresponding to each row by the maximum value to form a second-level self-attention weight spectrum; constructing an increasing trajectory of the weight spectrum by subtracting the corresponding element of the first-level self-attention weight spectrum from the element at the corresponding position in the second-level self-attention weight spectrum, setting elements with an absolute value of difference less than 0.02 to zero; and triggering hierarchical agglomeration when there are no less than 3 non-zero peaks in the increasing trajectory of the weight spectrum. The mechanism is as follows: non-zero peak values are divided into three levels—upper, middle, and lower—according to their range from largest to smallest, and agglomerative gradient sequence is output. Within the agglomerative gradient sequence, the order of elements in the upper region remains unchanged, the elements in the middle region are rearranged in descending order, and the elements in the lower region are rearranged in ascending order. The agglomerative gradient sequence is mapped back to the corresponding edges in the manifold adjacency graph according to the element index, and the edge weights are replaced with the values of the corresponding elements in the agglomerative gradient sequence to generate a manifold remapping matrix. In the manifold remapping matrix, the arithmetic mean of the weights of each non-zero edge and the corresponding elements of the second-order self-attention weight spectrum is taken and written to the same position to obtain the comprehensive embedding mapping.
[0017] Furthermore, in step 3, at the end of the nth iteration, the absolute differences between the corresponding elements of the nth synthesized embedding map and the n-1th synthesized embedding map are compared, and the arithmetic mean of all differences is taken to obtain the convergence index; the preset convergence threshold is 0.005, and the preset minimum number of iterations is 3; when the convergence index is greater than 0.005 or the number of iterations is less than 3, it is determined that the convergence condition has not been met, and the process returns to recalculate the first-level residual field, complete the remaining steps, and increment the iteration counter; when the convergence index is less than or equal to 0.005 and the number of iterations is not less than 3, it is determined that the convergence condition is met, and the following operation is performed: collect the iteration process. All first-level, second-level, and higher-level self-attention weight spectra generated during the process are merged into a self-attention weight spectrum summary table in chronological order; all condensation gradient sequences generated during the iteration process are collected and sequentially assembled into a condensation gradient sequence summary table according to the iteration number; the final integrated embedding mapping is subjected to element-wise weighted balancing with the self-attention weight spectrum summary table and the condensation gradient sequence summary table, with the weight ratios set to 0.4, 0.35, and 0.25 respectively, generating a joint output matrix; the joint output matrix is labeled as a multi-entropy weighted manifold embedding prediction model and stored as the final result, ending the entire iteration process.
[0018] The method for constructing an online prediction model for industrial processes based on self-attention manifold learning, as described in this invention, has the following beneficial effects:
[0019] This invention provides a method for constructing an online prediction model for industrial processes based on self-attention manifold learning, which has significant advantages over existing technologies. By performing pulsed NMR acquisition on crude oil sidestream samples at ten-second intervals, this invention can capture the original relaxation spectrum signal sequence covering both the solid and liquid phases in real time, ensuring the timeliness and completeness of the data and providing a solid data foundation for subsequent high-frequency predictions.
[0020] Meanwhile, this invention introduces a unified-dimensional feature vector set in the signal processing stage, which not only solves the comparison difficulties caused by spectral differences during different acquisition cycles, but also ensures the comparability of each feature unit in statistical analysis. The core technical step involves constructing a multi-entropy-weighted manifold embedding prediction model. This model integrates information entropy distribution characteristics, the feature sensitivity of the self-attention mechanism, and the residual iterative optimization mechanism, achieving globally robust embedding mapping updates under local perturbations in the feature space. This significantly improves the model's adaptability to complex input patterns and its prediction accuracy.
[0021] During the construction of the prediction model, the orderly dimensionality reduction and structure preservation of high-dimensional feature vectors were achieved through the adaptive evolution of the manifold structure and hierarchical agglomeration operation. This allows the online prediction of wax content to no longer rely on a fixed regression model, but instead constructs a stable mapping relationship in the dynamic data space. Furthermore, the final prediction results are sent to the control end through a streamlined path, realizing an automated closed-loop process from data acquisition to prediction release. This significantly reduces manual intervention and improves the overall intelligence level of process control.
[0022] Therefore, this invention can operate continuously and stably in high-throughput oil pipelines, with high real-time performance, high sensitivity and strong generalization ability, meeting the urgent need for online monitoring of wax content in modern oil transportation and processing processes, and promoting the application of deep integration of NMR signal intelligent analysis and chemometrics in industrial processes. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0024] Figure 1 A schematic diagram of the method flow for constructing an online prediction model for industrial processes based on self-attention manifold learning, as provided in an embodiment of the present invention;
[0025] Figure 2Experimental curves of the original signal sequence of relaxation spectra covering the solid and liquid phase regions in the method for constructing an online prediction model of industrial processes based on self-attention manifold learning provided in the embodiments of the present invention;
[0026] Figure 3 The graph shows the evolution curve of the iterative convergence process of the multi-entropy weighted manifold embedding prediction model in the online prediction model construction method for industrial processes based on self-attention manifold learning provided in the embodiments of the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] To better illustrate the technical solution of this invention, a specific application scenario will be used for detailed explanation below. It should be emphasized that the "method for constructing an online prediction model for industrial processes based on self-attention manifold learning" proposed in this invention has broad applicability and is not limited to the following embodiments. The online prediction of crude oil wax content in the petroleum industry will be used as a preferred embodiment for explanation, but this should not be construed as a limitation on the scope of protection of this invention. Those skilled in the art will understand that the core of this invention is a general prediction model construction method based on artificial intelligence algorithms. This method is also applicable to other scenarios requiring modeling and online prediction of time-series data of complex industrial fluids or mixture systems, such as in the chemical, pharmaceutical, or environmental monitoring fields.
[0029] refer to Figure 1 A method for constructing online prediction models for industrial processes based on self-attention manifold learning, the method includes:
[0030] Step 1: Perform pulsed NMR acquisition on the crude oil sideflow sample at a 10-second cycle, and write the original relaxation spectrum signal sequence covering the solid and liquid phase regions into the buffer queue in real time;
[0031] A side-flow pipeline, maintaining a constant pressure differential with the main pipeline, is installed outside the oil pipeline. A 30 ml sample of crude oil from the side-flow is collected at the beginning of each 10-second cycle using an electric sampling valve. This ensures sample representativeness while avoiding disturbance to the main pipeline flow. The collected crude oil side-flow sample enters the measurement chamber via a thermostatic preheating tube. The measurement chamber contains a built-in feedback heating element and a fully enclosed thermal insulation layer, continuously maintaining a constant temperature of 60 degrees Celsius. The sample temperature is monitored by a bidirectional platinum resistance thermometer, keeping temperature fluctuations within ±0.2 degrees Celsius. This temperature control precision is used to suppress measurement errors caused by differences in relaxation behavior between different batches of crude oil in the solid and liquid phases. Once the temperature stabilizes, the system clock triggers a pulse sequence controller, applying a 14-microsecond, 90-degree pulse to the measurement chamber within the same 10-second cycle, subsequently initiating echo sequence acquisition.
[0032] To comprehensively cover the characteristic relaxation behaviors of both the solid and liquid phases, the echo interval is set to 200 microseconds, with at least 8000 echoes. The acquisition window length ensures complete attenuation of the solid phase signal while maintaining a resolvable amplitude in the liquid phase. All echo signals undergo analog-to-digital conversion using 16-bit quantization precision, with a fixed sampling interval of 1 microsecond, ensuring that the original relaxation spectrum signal sequence has equidistant sampling characteristics on the time axis. To ensure real-time data writing and seamless integration with subsequent steps, a circular buffer queue is constructed within the field-programmable logic device (FPGA). Each echo signal, after quantization, is immediately appended with a timestamp, sampling sequence number, and cycle timer identifier before being written to the buffer queue. The circular structure prevents overflow in high-throughput mode and supports concurrent read and write operations. During the writing process, a cyclic redundancy check is performed on each frame of signal. If the check passes, the buffer queue write pointer is updated; if the check fails, a resampling mechanism is immediately triggered without affecting the progress of the current 10-second cycle, ensuring continuity. Due to the short relaxation time in the solid phase and the long relaxation time in the liquid phase, the original relaxation spectrum signal sequence naturally exhibits a dual-domain attenuation characteristic, which provides sufficient information for subsequent chemometric preprocessing. To reduce external electromagnetic disturbances, multiple layers of soft magnetic shielding are installed around the measurement cavity and signal link, and grounding is maintained in tandem. To avoid additional errors introduced by shear heating, the flow velocity in the side flow pipeline is limited by a precision throttling plate, ensuring that the Reynolds number of the sample before entering the measurement cavity remains in the laminar flow range. Before the end of the entire 10-second cycle, the system completes the writing and integrity verification of the entire original relaxation spectrum signal sequence, and simultaneously reports a "cycle completed" flag to the host time synchronization service, providing a reference time base for the next cycle sampling. At this point, the original relaxation spectrum signal sequence covering both the solid and liquid phases is formed and stored in real time in the buffer queue for use as preprocessing input in step 2.
[0033] Step 2: Preprocess the original signal sequence of relaxation spectrum in the buffer queue to obtain a set of feature vectors of uniform dimension; take the set of all feature vectors before the current measurement time as the historical feature vector set;
[0034] Step 2 is responsible for converting the raw relaxation spectrum signal sequences in the buffer queue into a unified-dimensional feature vector set that can be used for subsequent chemometric processing, and dynamically updating the historical feature vector set within the same process. This step first sets a synchronization trigger flag in the central processing unit. When the "This cycle is complete" flag from Step 1 arrives, the read pointer of the current buffer queue is immediately locked to prevent timing jitter caused by concurrent writes. The system extracts all raw relaxation spectrum signal sequences within the cycle in timestamp order and calls the static baseline template to perform background subtraction. The static baseline template selects the average noise waveform collected during the previous 24-hour period under no-pulse excitation conditions. External field noise and instrument zero drift are removed from the raw relaxation spectrum signal sequences through point-by-point differentiation, ensuring that the remaining signal originates entirely from the relaxation behavior of the solid and liquid phases within the sample. After background subtraction, a lateral smoothing stage is entered. The system uses a moving average window with a length of 5 sampling points to perform unidirectional iterative smoothing of the signal. After each iteration, the maximum amplitude difference index is used to check whether there are still spike noises. If the index is higher than a preset threshold, the iteration continues until smoothing is complete. The system then uses the echo sequence number to locate the pulse excitation start marker corresponding to each relaxation spectrum original signal sequence. It corrects the sampling shift caused by quantization delay and clock drift using a cross-correlation comparison method, achieving time-domain alignment. If the cross-correlation peak position deviates from the theoretical position by more than two sampling points, the processing engine automatically inserts linear interpolation points forward or backward, ensuring that the corrected sequence start point is strictly located at the first sampling interval after pulse excitation, thus guaranteeing the homogeneity of data from different periods on the time axis.
[0035] After time-domain alignment, the system calculates the total energy of the entire residual signal, normalizes this energy by comparing it to the global reference energy, obtaining an energy normalization factor, and then scales the entire sequence according to this factor to make the relaxation spectra of all periods comparable in absolute amplitude. Next, the system extracts fixed-length partitions according to a predetermined feature extraction template, dividing the rapidly decaying solid-phase region, the slowly decaying liquid-phase region, and the residual noise segment at the end of the decay phase into partitions. For each partition, it calculates statistics such as average amplitude, decay slope, decay area, and energy percentage, and concatenates these statistics in the order of solid-phase features first, liquid-phase features second, and end-noise features last, forming a feature vector of length 64. To ensure a constant dimension of the feature vector set, the system fills missing segments with zeros in the template and truncates excessively long segments. The above feature extraction operation is performed sequentially on all original relaxation spectrum signal sequences acquired in the current period, ultimately forming a feature vector set, and marking the generation time of this set as the current measurement time.
[0036] After the feature vector set is generated, the system aggregates all feature vector sets prior to the measurement time according to the time axis to construct a historical feature vector set. If the number of historical stored entries exceeds 20,000, the system discards the oldest entries using a first-in-first-out strategy to maintain a constant capacity of the historical feature vector set, preventing storage overflow and ensuring computational efficiency. Simultaneously, the system records the feature vector index number at the current measurement time point for reference by subsequent model training and prediction modules. The entire processing chain in step 2 runs with a fixed priority in a single-threaded pipelined engine, with an average processing time of less than 1.5 seconds. Therefore, it ensures that all preprocessing is completed before the arrival of the original relaxation spectrum signal sequence in the next cycle, achieving real-time linearity. Through rigorous background subtraction, lateral smoothing, temporal alignment, and energy normalization, this invention significantly improves the signal-to-noise ratio of the relaxation spectrum data without relying on any additional hardware compensation. It also provides a consistent and reliable input foundation for subsequent information entropy-based weight allocation, manifold adjacency graph construction, and self-attention mapping, ensuring that the multi-entropy weighted manifold embedding prediction model can accurately reflect the true proportions of the solid and liquid phases in the crude oil sample.
[0037] Step 3: Calculate information entropy based on the historical feature vector set using a deep learning model to generate an initial entropy weight sequence; construct a manifold adjacency graph according to the initial entropy weight sequence, and form the first version of the manifold embedding matrix using Euclidean proximity; iteratively perform self-attention mapping, residual correction, and weight agglomeration operations on the first version of the manifold embedding matrix to synchronize weight allocation and embedding mapping, detect the residual convergence during the iteration process, and integrate the weights at each level and the embedding results when the convergence condition is met to output a multi-entropy weight manifold embedding prediction model;
[0038] In step 3 of this invention, the core idea is to map the set of historical feature vectors accumulated over a continuous time axis to a unified low-dimensional space that can simultaneously express local geometric structure and global information value. Within this space, an adaptive multi-entropy-weighted manifold embedding prediction model is constructed to reveal the differences in relaxation behavior between the solid and liquid phases caused by changes in operating conditions such as temperature and shear. First, the distribution uncertainty of each feature unit in the set of historical feature vectors is evaluated using information entropy. Higher uncertainty indicates greater value for distinguishing different rheological states. Therefore, the system generates an initial entropy weight sequence using information entropy as a metric, thus quantifying the contribution of different signal components in principle. Subsequently, the initial entropy weight sequence is used to establish a manifold adjacency graph among samples. Euclidean proximity ensures that geometrically similar samples remain close in the graph structure, while the edge weights express the degree of information value sharing using the arithmetic mean of the entropy weights, thereby simultaneously preserving local geometric and global information weights in the topology. After obtaining the initial manifold embedding matrix by classical multidimensional scaling and dimensionality reduction of the graph, a self-attention mapping mechanism is introduced. The principle is to use the inner product of row vectors to calculate similarity to capture hidden nonlinear correlations, and then normalize it to form a first-level self-attention weight spectrum. There is a natural difference between the self-attention weight spectrum and the initial entropy weight sequence; this difference is the first-level residual field. From an information theory perspective, the residual field reflects the shift in graph structure towards feature value estimation.
[0039] The system injects the residual field into the manifold adjacency graph and performs residual correction on the edge weights, which is equivalent to compensating for errors at the topological level. The corrected graph is then dimensionality-reduced again to generate a second version of the manifold embedding matrix. Repeating self-attention mapping on the second version of the manifold embedding matrix yields a finer-grained second-order self-attention weight spectrum. The difference between the second-order and first-order self-attention weight spectra constitutes the weight spectrum increment trajectory, reflecting the direction and magnitude of weight evolution during iteration. When a significant peak appears on the increment trajectory, it indicates that some samples or features have accumulated high importance during iteration. Based on this, the system triggers a hierarchical agglomeration mechanism, dividing the weight peaks into three levels: upper, middle, and lower. The upper region retains its order to maintain the distinctiveness of the weight peaks, while the middle and lower regions are rearranged to enhance the weight sparsity effect. This operation essentially performs gradient compression on the weight distribution, concentrating the information density towards the most representative samples. The condensed gradient sequence is back-projected onto the manifold adjacency graph to obtain the manifold remapping matrix, which is then fused with the second-order self-attention weight spectrum to generate a comprehensive embedding map. This comprehensive embedding map not only inherits the topological consistency after multiple residual corrections but also incorporates the sparse and efficient feature distribution brought about by weight condensation. The system averages the difference between the comprehensive embedding map and the previous round's result to obtain a convergence index. If the index is not lower than a set threshold or the number of iterations is insufficient, it indicates that the graph structure, weight allocation, and embedding space are not yet stable, and it is necessary to return and recalculate the first-order residual field to continue iteration.
[0040] Theoretically, this loop is a dual adaptive process of external iteration and internal weight reorganization, which can dynamically correct the signal deviation caused by the superposition of rapid decay in the solid phase region and slow decay in the liquid phase region. When the convergence index reaches the threshold and the number of iterations meets the minimum requirement, it indicates that the weight distribution, residual correction, and embedding mapping have reached a steady state. At this time, the system collects all self-attention weight spectra to form a summary table of self-attention weight spectra that can describe the strength of multi-level correlations between samples; at the same time, it collects all condensed gradient sequences generated by the iterations to form the corresponding gradient evolution history. Finally, the final integrated embedding mapping and the two summary tables are subjected to element-wise weighted equilibrium, with the weight ratios set to 0.4, 0.35, and 0.25. This allocation method highlights the immediate contribution of the latest embedding result to the prediction while retaining the stable structure and weight evolution law identified in the historical iteration process. Therefore, the generated joint output matrix is mathematically a low-dimensional projection that retains multi-scale information but has sparse expression. This matrix is defined as the multi-entropy weighted manifold embedding prediction model. The model can quickly determine the ratio of solid to liquid phase regions and output wax content prediction results when new feature vectors are input in real time. Its efficiency comes from the ability of self-attention mapping to amplify local correlations, its stability comes from the immediate compensation of iteration errors by residual correction, and its interpretability depends on the intuitive measurement of the contribution of information entropy and condensed gradient sequence to features.
[0041] Step 4: Input the feature vector of the current measurement time into the multi-entropy weighted manifold embedding prediction model to generate the real-time wax content prediction result, and send the real-time wax content prediction result to the control terminal.
[0042] In step 4, the system first locks the feature vector output from step 2 at the current measurement time point, copies it completely to the high-speed buffer, and immediately calls the multi-entropy weighted manifold embedding prediction model generated in step 3 and stored in the local register. Since the model has achieved weight sparsity through multiple rounds of self-attention mapping and residual correction, there is no need to load redundant coefficients during the inference stage. Therefore, the entire mapping operation can be completed in a single thread within approximately 0.8 seconds. Specifically, the system reads the 64 elements of the feature vector sequentially, performs element-wise mapping with the model weights using floating-point multiply-accumulate instruction streams, and obtains the projected coordinates of the solid and liquid phase regions in low-dimensional space. Subsequently, the solid phase proportion coefficient is obtained through a lookup table in the model's output layer. The system then calculates the wax content value based on the solid phase proportion coefficient and a predetermined conversion coefficient. This value is then identified as the real-time wax content prediction result.
[0043] To ensure millisecond-level response, the system immediately encapsulates the real-time wax content prediction result into a message based on the User Datagram Protocol (UDP) after calculation. The message header includes the current measurement timestamp, cycle number, and prediction accuracy flag. The message is sent to the control terminal via a dedicated local area network line. Upon receiving the message, the control terminal refreshes the visualization interface and alarm logic in chronological order. If the real-time wax content prediction result exceeds the set upper threshold, the control terminal triggers a linkage strategy of reducing the oil delivery temperature or increasing the wax-reducing agent injection amount using a flow regulating valve. If the prediction result is below the lower threshold, the existing operating conditions are maintained, thereby dynamically suppressing the risk of petroleum wax deposition without affecting delivery efficiency. After the message is sent, the system writes the feature vector and the real-time wax content prediction result into long-term storage for subsequent model accuracy backtracking and production auditing, while resetting the buffer pointer to await the next round of sampling. Through the above-mentioned seamlessly connected inference, communication, and execution links, this invention can achieve online closed-loop monitoring with a time limit of ten seconds, enabling on-site operators to grasp the changing trend of crude oil wax content in real time, providing a reliable decision-making basis for the safe and economical operation of oil pipelines.
[0044] Furthermore, in the method for constructing an online prediction model for industrial processes based on self-attention manifold learning in this invention, step 1 ensures the comparability and representativeness of the original relaxation spectrum signal sequence through strict timing control and thermal management. An isobaric side-flow pipeline is installed alongside the main oil pipeline. At the beginning of each 10-second cycle, a high-precision real-time clock triggers the measurement sequence, simultaneously opening the electric valve and completing its full stroke positioning within 0.2 seconds. A 30 ml sample of crude oil is collected from the side-flow pipeline. Because the side-flow pipeline is isobaric with the main pipeline, the sample flow rate is constant and independent of main pipeline flow fluctuations, thus ensuring that no additional shear stress is generated during the sampling process. The sample enters the measurement chamber directly through a short-distance insulated tube. The periphery of the measurement chamber is arranged with multi-segmented heating wires and a vacuum insulation layer. The core area inside is controlled in a closed loop by a platinum resistance thermometer and a proportional-integral regulator, maintaining the temperature inside the chamber at a constant 60 degrees Celsius. A bidirectional feedback algorithm is used to suppress temperature fluctuations within the target temperature fluctuation range of ±0.2 degrees Celsius. The physical significance of this temperature control precision lies in the fact that the relaxation time of the solid phase region and the liquid phase region are extremely sensitive to temperature changes. If the temperature drifts, it will cause the relaxation peak to shift, thereby introducing artifact signals. Therefore, temperature stability is a key prerequisite for distinguishing between the solid phase region and the liquid phase region.
[0045] Once the temperature stabilization flag is set, the system immediately applies a 14-microsecond, 90-degree pulse to the measurement chamber within the same cycle. This pulse flips the entire hydrogen nucleus magnetization vector in the sample to the lateral plane, subsequently inducing free-induction decay through spin-spin interactions. To obtain high signal-to-noise ratio and complete coverage of the characteristic relaxation behavior in both the solid and liquid phases under low-field conditions, the system employs an echo sequence acquisition scheme. An echo interval of 200 microseconds is set after the initial pulse, generating a series of structurally symmetrical echo signals through a coherent repolymerization process. The solid phase exhibits extremely rapid lateral relaxation due to lattice confinement, typically decaying within the first few hundred microseconds, while the liquid phase relaxes more slowly, lasting for tens of milliseconds or even longer. The system is configured to generate at least 8000 echoes, with a total echo time window of several seconds, to ensure complete sampling of the decay at the tail end of the liquid phase. All echoes are first pre-amplified and low-pass filtered in the RF receiving channel, and then enter the analog-to-digital converter (ADC). The ADC quantization precision is set to 16 bits, and the sampling interval is fixed at 1 microsecond, so that the original relaxation spectrum signal sequence has equidistant and high-resolution sampling grids on the time axis. The back end of the data channel integrates a circular buffer queue. Each time an echo sample is acquired, a timestamp, sampling sequence number, and current cycle tick identifier are immediately appended and written to the buffer queue. This circular structure adopts a design of physical isolation between write pointers and read pointers, which can prevent data misalignment caused by buffer contention under high throughput conditions.
[0046] To ensure data integrity, the system synchronously calculates a 16-bit cyclic redundancy check (CRC) value during the writing process. Immediately after the entire raw relaxation spectrum signal sequence is written to the buffer queue, the system calls the verification logic to perform integrity checks on each data block. Only when the verification passes does the system write the "cycle complete" flag to the status register and send a trigger signal to the clock management unit before the end of the same cycle, providing a stable time base for the measurement sequence of the next 10-second cycle. If the verification fails, the system automatically activates a lossless resampling strategy, repeating sampling and updating the buffer queue without affecting the start of the next cycle, thus ensuring that any raw relaxation spectrum signal sequence entering the subsequent chemometric processing chain is complete and valid data. Through such precise sampling control and data writing mechanisms, this invention not only efficiently utilizes the 10-second cycle window in the time dimension but also comprehensively covers all relaxation spectrum information in the solid and liquid phase regions in the spatial dimension, laying a high signal-to-noise ratio, high precision, and high repeatability raw data foundation for the subsequent preprocessing in step 2 and the information entropy-driven manifold analysis.
[0047] Furthermore, in the implementation of this invention, after receiving the original relaxation spectrum signal sequence, the system enters the data preprocessing link. To ensure the robustness and consistency of subsequent chemometric analysis, the system first calls a historical pulse-free noise-free template to perform background subtraction. Radio frequency baseline drift and environmental electromagnetic spurious components are removed by point-by-point interpolation, ensuring that the remaining waveform retains only the true attenuation information generated in the solid and liquid phases. After background subtraction, the system uses a 5-sampling-point moving average window to perform transverse smoothing of the signal. The number of iterations is automatically determined by peak amplitude monitoring. Iteration is terminated when the peak amplitude is below a set threshold, thereby suppressing quantization jitter and transient amplification noise. After transverse smoothing, the system enters the time-domain alignment stage. The system uses a cross-correlation function to calculate the phase shift between the current relaxation spectrum original signal sequence and the ideal impulse response. When the phase shift is... If the shift exceeds two sampling intervals, interpolation compensation or truncation adjustment is used to ensure that the starting point of all cycles falls precisely at the first sampling interval after pulse excitation, guaranteeing waveform time base consistency. After time-domain alignment, the system calculates the total energy of the entire signal, compares this energy with the global reference energy to obtain an energy normalization factor, and then scales the sequence amplitude according to this factor to make the original signal sequences of relaxation spectra from different sampling periods comparable in absolute amplitude. Finally, statistical features, including average amplitude, attenuation slope, and energy percentage, are extracted according to partition templates for the solid phase region, liquid phase region, and tail noise region. These features are then concatenated into a 64-length vector under the rules of filling missing segments with zeros and truncating excessively long segments. A set of feature vectors with a unified dimension is generated for all samples using the same template, providing a complete and consistent data input basis for information entropy assessment and manifold analysis.
[0048] Furthermore, in the method for constructing an online prediction model for industrial processes based on self-attention manifold learning in this invention, the core objective of step 3 is to transform the continuously accumulated set of feature vectors into a multi-entropy weighted manifold embedding prediction model capable of sensitively capturing subtle fluctuations in the ratio of the solid and liquid phases. First, the system loads a historical set of feature vectors into the server memory and generates an information entropy sequence by statistically analyzing the probability distribution of each column of feature units. Higher information entropy indicates more significant differences in the value of the feature unit under different operating conditions, contributing more to distinguishing relaxation behavior. To avoid weight bias introduced by dimensional differences, the system performs linear normalization on the information entropy sequence. The normalization result is recognized as the initial entropy weight sequence, which assigns interpretable and stable weights to each feature unit from an information theory perspective. Subsequently, the system assigns weights to the Euclidean distance between samples based on the initial entropy weight sequence, constructing a manifold adjacency graph. Euclidean proximity ensures that similar samples with local geometric structures remain close together in the graph, while the setting of edge weights reflects the global information value through the average entropy weight, enabling the topology to have a unified weight measurement while considering both local and global factors. The graph is transformed into an adjacency matrix and then subjected to classical multidimensional scaling to reduce the dimensionality to three-dimensional coordinate space, resulting in the first version of the manifold embedding matrix.
[0049] At this point, the nonlinear relationships of the high-dimensional features are not fully developed. To further improve discriminative power, the system performs a first self-attention mapping on the initial manifold embedding matrix. The self-attention mapping generates a similarity distribution by performing an inner product operation between each row's coordinate vector and all other rows, and then normalizes to the maximum value to form a first-level self-attention weight spectrum. This weight spectrum estimates sample importance independently of external labels and can adaptively highlight samples with discriminative power at the boundary between the solid and liquid phases. The first-level self-attention weight spectrum is then element-wise subtracted from the initial entropy weight sequence to obtain a first-level residual field. This residual field reflects the offset between information entropy weighting and self-attention weighting. The system writes the non-zero residuals back to the manifold adjacency graph, performs an arithmetic mean correction on the corresponding edge weights, generates a residual correction graph, and further reduces the dimensionality to obtain the second version of the manifold embedding matrix. With the introduction of residual correction, the graph structure is closer to the distribution of the real relaxation features in a topological sense, but there may still be problems with insufficient local connectivity. Therefore, the system performs a second self-attention mapping on the second version of the manifold embedding matrix to obtain the second-level self-attention weight spectrum, and calculates the difference between the second-level self-attention weight spectrum and the first-level self-attention weight spectrum to generate the weight spectrum incrementing trajectory.
[0050] Significant peaks in the increasing weight spectrum trajectory represent samples whose information value rapidly increases during iteration. The system utilizes these peaks to trigger a hierarchical agglomeration mechanism: first, the system divides the samples into upper, middle, and lower layers based on peak size; then, the middle layer is rearranged in descending order, the lower layer in ascending order, and the upper layer retains its original order. This reduces redundancy in the weight distribution while increasing the weight proportion of high-value samples in the overall model. The agglomeration gradient sequence is then back-projected onto the manifold adjacency graph, replacing the corresponding edge weights with the agglomerated weights to obtain the manifold remapping matrix. In the manifold remapping matrix, the system takes the arithmetic mean of the non-zero edge weights and the corresponding elements of the second-order self-attention weight spectrum and writes it back into the matrix, thereby generating a comprehensive embedding map. The comprehensive embedding map incorporates the global value of information entropy distribution, the local correlation of self-attention mapping, and the sparse structure of the agglomeration mechanism, thus maintaining the integrity of the graph structure while possessing a highly concise weight expression. To verify the algorithm's stability, the system subtracts the current integrated embedding map from the previous round's result element-wise, takes the absolute value, and averages the results to obtain a convergence index. If the convergence index exceeds a threshold or the number of iterations does not meet the minimum requirement, it indicates that the weights and embeddings have not converged synchronously. The system then returns to recalculate the first-level residual field and enters the next loop, while incrementing the iteration counter. Theoretically, this loop is a dual self-correction process involving external entropy weight updates and internal self-attention mapping, which can dynamically correct sample distribution drift caused by operating condition disturbances such as temperature fluctuations and shear changes. When the convergence index drops below the threshold and the number of iterations is not less than the preset minimum, the system stops looping and begins model generation. The system summarizes all self-attention weight spectra generated by all iterations, concatenating them in chronological order to form a self-attention weight spectrum summary table; simultaneously, it summarizes all agglomerative gradient sequences to form a agglomerative gradient sequence summary table. Finally, the system performs element-wise weighted equilibrium on the latest integrated embedding map, the self-attention weight spectrum summary table, and the agglomerative gradient sequence summary table with weight ratios of 0.4, 0.35, and 0.25 to obtain a joint output matrix. The joint output matrix is mathematically a low-dimensional sparse projection that preserves the key differences between rapid decay in the solid phase and slow decay in the liquid phase. Supported by a multi-scale weighting mechanism, it exhibits inherent robustness against noise and abnormal operating conditions. Therefore, the system labels the joint output matrix as a multi-entropy weighted manifold embedded prediction model and writes it into memory cache and persistent storage for real-time invocation in step 4, thereby achieving rapid and accurate prediction of petroleum wax content.
[0051] Furthermore, in generating the initial entropy weight sequence, this invention first calls the historical feature vector set cached in chronological order and traverses this set column by column in memory, establishing a counter for each feature unit to count the frequency of its value occurrences until the total number of samples is no less than 1000, at which point the current round of statistics stops. The raw counting results obtained from the statistics form a frequency distribution table with column indices as keys and value ranges as rows. This frequency distribution table fully reflects the dispersion of the values of each feature unit under different operating conditions. The system then calculates the information entropy value for each feature unit based on the frequency distribution table. The larger the information entropy value, the more complex the distribution pattern of the feature unit in the historical samples, and the more sensitive its changes are to the differentiation of relaxation behavior; the smaller the information entropy value, the more concentrated the distribution of the feature unit, and the limited contribution to sample differences. All information entropy values are sequentially written into an entropy value sequence of length equal to the number of feature units, and the maximum and minimum entropy values are recorded simultaneously for subsequent normalization operations. After generating the entropy sequence, the system performs synchronous linear normalization on it, mapping all entropy values to 0 based on the minimum entropy value and 1 based on the maximum entropy value. The remaining elements are proportionally placed within the 0-1 range, resulting in the initial entropy weight sequence. Because the normalization operation maintains the relative proportions between the entropy values, the initial entropy weight sequence not only provides a uniform and unsigned weight benchmark but also avoids the risk of high-entropy features dominating excessively. This allows subsequent manifold adjacency graph construction to comprehensively consider the information richness differences between the solid and liquid phases on a fair scale. The final generated initial entropy weight sequence is written to shared memory and timestamped to ensure that it maintains a consistent weight reference with the historical feature vector set throughout subsequent self-attention mapping iterations, further improving the stability and interpretability of the multi-entropy weighted manifold embedding prediction model.
[0052] Furthermore, in the process of forming the initial manifold embedding matrix, the system first calls the already generated initial entropy weight sequence, compares the values of each entropy weight in the sequence, and rearranges all feature units in descending order to obtain a sorted feature index list. The purpose of this descending sort is to allow the feature units with the most information to participate in the distance measurement in the calculation of Euclidean proximity, thereby amplifying the influence of high-information dimensions in the spatial configuration. Subsequently, the system rearranges the historical feature vector set according to the sorted feature index list, ensuring that the order of all samples in the vector dimension is strictly consistent with the entropy weight. After completing the dimensional rearrangement, the system calculates the Euclidean proximity for each row of the historical feature vector set and defines whether each pair of samples is connected using a proximity determination threshold. This threshold is obtained by averaging the Euclidean distances of the current sample to its five neighboring samples in the sorted space. This ensures that the threshold has local adaptive characteristics while avoiding overly dense or sparse connections caused by a globally fixed threshold. When the Euclidean distance between any two samples is less than or equal to a threshold, the system establishes an undirected edge between them and sets the edge weight to the arithmetic mean of the entropy weights of the feature units contained in the two samples, thus embedding the information value into the graph structure in the form of weights. As all sample pairs are traversed, the system gradually generates a manifold adjacency graph containing nodes, undirected edges, and weight information. To facilitate subsequent matrix operations, the system transforms the manifold adjacency graph into an adjacency matrix. The matrix's row and column dimensions are consistent with the number of samples in the historical feature vector set. All diagonal elements are uniformly set to zero to eliminate interference from self-connections, and the remaining elements are filled with edge weights. Unconnected sample pairs are represented by zero values. After the adjacency matrix is established, the system performs classical multidimensional scaling operations on this matrix. Classical multidimensional scaling maps the weighted distance structure between high-dimensional samples to a low-dimensional Euclidean space by doubly centering the weighted distance and solving the eigenvalue decomposition. Considering the balance between subsequent visualization and computational complexity, the target dimension is fixed at 3 dimensions. After the computation is complete, the three columns of coordinates output by the system together form a coordinate matrix. Each row of coordinates corresponds to a sample in the set of historical feature vectors. The three-dimensional coordinates preserve local adjacency relationships while also embedding the global information abundance represented by entropy weights. This coordinate matrix is defined as the first-version manifold embedding matrix. Geometrically, it projects the relaxation behavior of the solid and liquid phases onto three-dimensional space through information-theoretic weighting, laying the initial structure for subsequent iterative steps such as self-attention mapping, residual correction, and weight condensation, which takes into account both information value and spatial connectivity.
[0053] Furthermore, in the process of obtaining the second version of the manifold embedding matrix, the system first subtracts the row mean from each element of the coordinate vector in the first version of the manifold embedding matrix and scales it according to the row standard deviation to achieve zero-mean normalization. The physical significance of this step is to unify the coordinate scale of different samples within the first version of the manifold embedding matrix to a comparable range, avoiding the amplification of unstructured noise due to amplitude differences in subsequent similarity calculations. After the zero-mean normalization is completed, the system calculates the similarity matrix using the inner product relationship between row vectors as a metric. The inner product can simultaneously capture the coupling characteristics of the three-dimensional coordinate direction and length distribution in the solid and liquid phase regions, and is therefore more suitable than simple Euclidean distance for expressing the similarity of potential relaxation modes. Subsequently, the system performs maximum value normalization on the similarity matrix row by row, mapping the maximum element in each row to 1, and scaling the remaining elements proportionally to obtain the first-level self-attention weight spectrum. The first-level self-attention weight spectrum reflects the attention allocation of each sample to other samples in the space of the first version of the manifold embedding matrix, where a larger attention intensity indicates a higher coupling degree in the mixing and decay behavior in the solid and liquid phase regions. The system constructs a first-level residual field by subtracting the corresponding position element of the first-level self-attention weight spectrum from the corresponding position element of the initial entropy weight sequence. A threshold of 0.01 is used to filter out weak differences, and elements below the threshold are set to zero to highlight important error components. The first-level residual field essentially represents the coordinate dimension in which the self-attention mechanism has a bias in the evaluation of information entropy.
[0054] Next, the system maps non-zero elements in the first-level residual field back to their corresponding edges in the manifold adjacency graph based on element indices. It then takes the arithmetic mean of the original edge weights and the corresponding elements in the first-level residual field to generate a revised residual graph. This weighted adjustment integrates the global value of information entropy assessment and the local importance of self-attention inference into the topological weights, narrowing the gap between the two evaluation systems. Based on the revised residual graph, the system regenerates the adjacency matrix with the same dimensions as the initial manifold embedding matrix. Diagonal elements are uniformly set to zero, and the remaining elements are filled with the weighted edge weights. Unconnected sample pairs retain their zero values. After the new adjacency matrix is completed, the system performs a classic multidimensional scaling operation again, mapping the adjusted weighted distance structure to three-dimensional Euclidean space. The target dimension is still set to 3 dimensions to maintain the same spatial dimension as the initial manifold embedding matrix, facilitating subsequent residual comparison and weighted incremental evaluation. The three columns of coordinates output by the multidimensional scaling operation together form a coordinate matrix. Geometrically, this coordinate matrix inherits the initial distribution description of the relaxation characteristics of the solid and liquid phase regions from the first version of the manifold embedding matrix. It also introduces the compensation effect of the weight information after self-attention mechanism correction and the entropy weight evaluation difference. Therefore, the system names this coordinate matrix as the second version of the manifold embedding matrix and marks the iteration round in memory for use in subsequent weight spectrum incremental trajectory analysis, hierarchical condensation mechanism triggering, and comprehensive embedding map generation. This completes the first closed-loop harmonization among information entropy, Euclidean proximity, and self-attention feedback, laying a consistent low-dimensional representation foundation for subsequent iterations to build a highly robust multi-entropy weighted manifold embedding prediction model.
[0055] Furthermore, in the process of obtaining the comprehensive embedding map, the system first re-performs zero-mean normalization on each row of coordinate vectors in the second version of the manifold embedding matrix to ensure that each coordinate component remains within the same scale range after iterative updates, thereby avoiding new amplitude imbalances caused by cumulative drift. After normalization, the system calculates the similarity matrix based on the inner product relationship between row vectors. The inner product result can simultaneously reflect the consistency of coordinate direction and the degree of length coordination, thus better fitting the potential coupling mode of the mixing and attenuation characteristics of the solid and liquid phase regions. After normalizing the similarity matrix by the maximum value of each row, the second-level self-attention weight spectrum is obtained. This weight spectrum performs a second estimation of the attention strength between samples, and compared with the first-level self-attention weight spectrum, it already contains the weight fine-tuning information brought about by residual correction. The system then subtracts the first-level self-attention weight spectrum from the second-level self-attention weight spectrum by element-wise subtraction, and the difference vector is defined as the weight spectrum increasing trajectory; elements with an absolute value less than 0.02 in the increasing trajectory are set to zero to mask numerical jitter and highlight significant weight changes. When the weight spectrum increasing trajectory contains no less than 3 non-zero peaks, the system triggers a hierarchical agglomeration mechanism, which divides these non-zero peaks into three levels—upper, middle, and lower—according to their value range from large to small, and outputs the agglomeration gradient sequence.
[0056] The agglomerative gradient sequence maintains its original order in the upper region to avoid disrupting the relative positions of the most discriminative samples. Elements in the middle region are rearranged in descending order to compress information density, while elements in the lower region are rearranged in ascending order to increase the distance between low-weight samples, thus forming a sparse structure with decreasing gradients in the overall weight distribution. Subsequently, the system maps the agglomerative gradient sequence back to the corresponding edges in the manifold adjacency graph based on the element indices, replacing the edge weights with the values from the agglomerative gradient sequence, thereby constructing the manifold remapping matrix. In the manifold remapping matrix, the system calculates the arithmetic mean of the weight of each non-zero edge and the corresponding element in the second-order self-attention weight spectrum, and writes this mean back to the same position. This integrates the weight compression effect after hierarchical agglomeration and the local correlation estimation of the self-attention mechanism at the topological level, and the final output matrix is considered the comprehensive embedding map. The integrated embedding mapping preserves the connectivity of the manifold structure in geometric space and strengthens the dominant role of a few high-value samples in the overall prediction through gradient processing. This further improves the model's sensitivity to the boundary changes between rapidly decaying signals in the solid phase region and slowly decaying signals in the liquid phase region, laying a stable and efficient feature representation foundation for subsequent convergence testing and the formation of the final multi-entropy weighted manifold embedding prediction model.
[0057] Furthermore, in the iterative solution process of the online prediction model construction method for industrial processes based on self-attention manifold learning, the system evaluates the accuracy of the comprehensive embedding map generated in each iteration at the end of each cycle. To do this, the system first performs an absolute difference calculation between the nth and (n-1)th comprehensive embedding maps according to their element indices, and then takes the arithmetic mean of all differences to obtain the convergence index. The convergence index essentially measures the magnitude of change in the weight distribution and low-dimensional coordinates in the overall space between two consecutive iterations; the smaller the value, the more stable the model tends to be in continuous iterations. The system compares this convergence index with a pre-set convergence threshold of 0.005, while simultaneously monitoring whether the number of iterations recorded by the iteration counter is not less than the minimum number of iterations (3). This dual condition ensures that the system neither gives false signals of premature convergence nor allows the algorithm to fall into an infinite iteration oscillation zone. When the convergence index is higher than 0.005 or the number of iterations has not reached 3, the algorithm is judged to have failed to meet the convergence condition. At this time, the system increments the iteration counter by one and then backtracks to the step of recalculating the first-level residual field. It then re-enters the complete process of constructing the residual correction graph, generating the second version of the manifold embedding matrix, calculating the second-level self-attention weight spectrum, and triggering the condensed gradient sequence, in order to further compress information redundancy and correct the weight bias.
[0058] When the convergence index is less than or equal to 0.005 and the number of iterations is no less than 3, the algorithm is determined to meet the convergence condition and enters the result summary stage. The system first collects and merges all historically generated first-level self-attention weight spectra, second-level self-attention weight spectra, and any higher-level self-attention weight spectra if they exist, in the order of iteration, to form a summary table of self-attention weight spectra. This summary table completely preserves the dynamic evaluation trajectory of the self-attention mechanism on the relevance of samples at different iteration levels. Subsequently, the system also collects all agglomerative gradient sequences in accordance with the iteration sequence and splices them sequentially to generate a summary table of agglomerative gradient sequences, which is used to present the hierarchical aggregation pattern in the process of weight compression and sparsification. Next, the system performs element-wise weighted balancing on the integrated embedding map obtained from the last iteration, the self-attention weight spectrum summary table, and the condensed gradient sequence summary table. Based on empirical experiments and cross-validation, the weight ratios of the three are set to 0.4, 0.35, and 0.25, respectively. The integrated embedding map, which is responsible for the immediate response to real-time conditions, has the highest weight; the self-attention weight spectrum summary table, which records long-term stable associations in the multi-layer attention structure, has the second highest weight; and the condensed gradient sequence summary table, which emphasizes the contribution of weight gradient evolution to sparse representation, has the lowest weight. The joint output matrix of the weighted balancing operation numerically integrates the immediate feature map, historical correlation structure, and gradient sparsity information, thus ensuring both high model sensitivity and long-term stability and interpretability. The system officially labels the joint output matrix as a multi-entropy weighted manifold embedding prediction model and writes it to both cache and persistent storage to ensure low latency for subsequent real-time calls and traceability for long-term auditing. At this point, the entire iterative process ends, and the newly generated multi-entropy weighted manifold embedding prediction model will be directly used for real-time wax content prediction in the next sampling cycle, achieving a high-accuracy online monitoring closed loop based on the relaxation characteristics of the solid and liquid phase regions.
[0059] This example uses continuous online monitoring of an oil pipeline starting at 00:00:00 as a scenario to fully demonstrate the execution process of an online prediction method for petroleum wax content based on pulsed NMR-chemimetric fusion: When the system clock points to 00:00:00, the side flow valve opens within 0.2 seconds and isobarically intercepts the volume. crude oil side-flow sample ( (This indicates the volume of a single sampling). The sample enters the measuring chamber along a 12 cm long, 6 mm inner diameter stainless steel insulated tube.
[0060] The measuring chamber is kept at a constant temperature by a ring-shaped heating wire. ( (For temperature measurement), temperature fluctuations are maintained through closed-loop control. The temperature stability flag is set when the RTD feedback error is below 0.2 degrees Celsius. The system applies a width of [value missing] to the sample at 00:00:00.8 seconds. 90-degree pulse ( (Indicates the RF pulse width), flipping the hydrogen nucleus magnetization vector in the sample.
[0061] Then according to the echo interval ( Echo acquisition is triggered at the interval between adjacent echoes, and the number of echoes is set. ( (Number of echoes collected). Receiver path with quantization precision. Bit( (Indicates analog-to-digital conversion bit depth) and sampling interval ( This represents a point-by-point digitization of the freely inductively attenuated signal (indicating continuous sampling intervals). The system constructs a circular buffer within the FPGA, acquiring each amplitude point... ( For the first Immediately attach a timestamp to each sampling amplitude. With sampling number Write to the buffer until After the data acquisition is completed, the CRC checksum is calculated for the entire sequence; if the checksum is successful, a "This cycle is complete" flag is written at exactly 10 seconds and the next cycle is triggered.
[0062] During preprocessing, the impulse-free noise template is called first. ( (for baseline noise), perform background subtraction at each point, for example, the original amplitude. baseline After processing Then, using the sliding window length point( Perform mean filtering (for horizontally smoothed window length); sample points Smoothed to The system uses a cross-correlation function to confirm the offset between the sample pulse start point and the theoretical template. point( (Indicates time-domain offset), inserted at the beginning of the sequence. Time-domain alignment is completed using zero values. Then, the sequence energy is calculated. , and reference energy ( To obtain the normalization factor by comparing the system calibration energy. Thus, the normalized amplitude is obtained. According to the fixed template Set as solid phase window Set as the liquid phase window, and calculate the average amplitude separately. , ( (Average amplitude of solid phase and liquid phase) and attenuation slope , ( (For the corresponding decay slope). The above statistics, along with other window statistics and zero-filled terms, are concatenated into a dimension. eigenvectors As of now, the system has accumulated [data / data / information]. historical feature vectors .
[0063] When entering information entropy analysis, for each dimension Statistical frequency ( For the first Vidi Box frequency), normalized to probability .by Taking a bin of equal width as an example, information entropy If the first Dimensional calculation Maximum entropy minimum entropy Then the normalized entropy weight The initial entropy weight sequence is obtained for all dimensions. The feature index is obtained by sorting in descending order. .by After rearranging the history vectors, the system calculates the samples. European distance .
[0064] Let the sample Average distance of the five most recent samples Take the threshold .like Then in the sample pair Add undirected edges between them, with weights ,in It is a sample The most salient dimension after sorting. Adjacency matrix By all Fill, set diagonal elements to zero. Classic multidimensional scaling will... After decomposing the eigenvalues by bicentering the distance and truncating the first three principal components, the first version of the manifold embedding matrix is generated. To eliminate coordinate scale differences, for row vector Perform zero-mean normalization, then calculate the inner product. .
[0065] Then, by normalizing the maximum value of each row, the first-order self-attention weight spectrum is obtained. Difference ,like Set to zero, otherwise set to zero. Write back the corresponding edges and average them with the original weights to obtain the residual correction graph, then reduce the dimensionality to get... .right Repeat the above process to obtain the second-order self-attention weight spectrum. Increasing trajectory ;like Set to zero. Three non-zero peaks in the increasing trajectory. In sequence Triggering hierarchical agglomeration: Elements in the upper layer maintain their order, those in the middle layer are in descending order, and those in the lower layer are in ascending order, forming an agglomeration gradient sequence. .Will Map back the edges, replace the weights to generate the manifold remapping matrix, and then apply the non-zero edge weights to... Averaging yields the comprehensive embedding map. .
[0066] First convergence index ,because And the number of iterations The algorithm returns and recalculates the first-level residual field, repeating the entire process. After the second round... The threshold has not yet been reached. The third round yielded... satisfy And the number of iterations Convergence is determined. The system will... Concatenate into a summary table of self-attention weight spectra At the same time, the three-round condensation gradient sequence spliced as The final joint output matrix That is, to generate a multi-entropy weighted manifold embedding prediction model.
[0067] Current measurement time Corresponding feature vector Input model, let the mapping function be Its first dimension result This indicates the proportion of the solid phase region. Based on experimental calibration coefficients. ( (This is the linear amplification factor from the solid phase ratio to the wax content), real-time wax content prediction value. The system is in The value is sent to the control terminal every second. The message, and Store in persistent storage to complete the full example process.
[0068] Figure 2This paper presents experimental curves of the original relaxation spectrum signal sequence covering both the solid and liquid phases in a method for constructing an online prediction model for industrial processes based on self-attention manifold learning. The figure details the key technical features and signal response characteristics during the NMR signal acquisition process. In the pulse sequence excitation stage, the system first applies a 14-microsecond-wide 90-degree pulse as the excitation signal to initiate the NMR process. Subsequently, the system continuously acquires no less than 8,000 echo signals at a 200-microsecond echo interval, forming a complete original relaxation spectrum signal sequence. The entire acquisition process employs 16-bit quantization precision for analog-to-digital conversion and writes the original relaxation spectrum signal sequence into a buffer queue in real time with a high-precision time resolution of 1 microsecond sampling interval. Analysis of the signal response characteristics reveals two distinct regional features in the original relaxation spectrum signal sequence. In the solid phase region, where the relaxation time is relatively short, the signal intensity is relatively stable, maintaining a high numerical level, reflecting the NMR relaxation behavior of solid paraffin molecules in crude oil. The signal curve in this region exhibits a gentle decay trend, indicating that the transverse relaxation time of the solid phase components is relatively short. When the relaxation time extends into the liquid phase, the signal intensity exhibits a significant exponential decay characteristic. The signal in the liquid phase drops sharply from the solid-liquid phase boundary, reflecting the longer transverse relaxation time and different molecular motion states of liquid hydrocarbon molecules. This significant signal difference provides a reliable physical basis for subsequent chemometric analysis. The horizontal axis, relaxation time, is expressed in milliseconds, covering a wide range from 0.1 ms to 50,000 ms, ensuring complete coverage of both the solid and liquid phases. The vertical axis, signal intensity, is expressed in arbitrary units, ranging from 10 to 100, fully reflecting the differences in signal response between different phase components. The solid-liquid phase boundary line in the figure clearly marks the transition point between the two regions, laying the data foundation for feature vector extraction and the construction of a multi-entropy weighted manifold embedding prediction model.
[0069] Figure 3This figure illustrates the detailed evolution curves of the iterative convergence process of the multi-entropy weighted manifold embedding prediction model. The figure clearly depicts the changing patterns of the convergence index during the iterative optimization process, providing important theoretical basis for model stability and prediction accuracy. In the initial stage of the iteration process, the convergence index exhibits a high value, reaching 0.095 in the first iteration, indicating a significant difference between the integrated embedding mapping and the previous mapping. With increasing iterations, the convergence index shows a clear decreasing trend. In the second iteration, the convergence index drops to 0.072, and in the third iteration, it further decreases to 0.058, reflecting the synergistic optimization effect of self-attention mapping, residual correction, and weight agglomeration operations. When the iteration reaches the fourth iteration, the convergence index drops to 0.048, approaching the preset convergence threshold of 0.005. After the fifth iteration, the convergence index significantly decreases to 0.034, entering the rapid convergence stage. A key feature of this stage is that elements with an absolute difference value below 0.01 are set to zero during residual correction, effectively eliminating noise interference and improving model stability. Starting from the sixth iteration, the convergence index decreased to 0.021, reaching 0.012 in the seventh iteration and 0.008 in the eighth iteration, all meeting the convergence threshold of 0.005. However, according to the algorithm design, the system needs to simultaneously meet the dual conditions of a convergence index less than or equal to 0.005 and at least 3 iterations. Therefore, the eighth iteration is the first node to meet the complete convergence conditions. In the ninth iteration, the convergence index further decreased to 0.004, at which point the system fully entered the convergence state. At this convergence point, weight allocation and embedding mapping were fully synchronized, and the self-attention weight spectrum, agglomerative gradient sequence, and integrated embedding mapping reached a stable equilibrium. The system then performed the final model integration operation, performing element-wise weighted balancing according to weight ratios of 0.4, 0.35, and 0.25, generating a joint output matrix as the final form of the multi-entropy weighted manifold embedding prediction model. The entire iterative convergence process fully demonstrated the algorithm's adaptive optimization capability, and the reliability and prediction accuracy of the model were ensured through residual convergence testing.
[0070] The present invention has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A method for constructing an online prediction model for industrial processes based on self-attention manifold learning, characterized in that, The method includes: Step 1: Perform pulsed NMR acquisition on the crude oil sideflow sample at a 10-second cycle, and write the original relaxation spectrum signal sequence covering the solid and liquid phase regions into the buffer queue in real time; Step 2: Preprocess the original signal sequence of relaxation spectrum in the buffer queue to obtain a set of feature vectors of uniform dimension; take the set of all feature vectors before the current measurement time as the historical feature vector set; Step 3: Calculate information entropy based on the historical feature vector set using a deep learning model to generate an initial entropy weight sequence; construct a manifold adjacency graph according to the initial entropy weight sequence, and form the first version of the manifold embedding matrix using Euclidean proximity; iteratively perform self-attention mapping, residual correction, and weight agglomeration operations on the first version of the manifold embedding matrix to synchronize weight allocation and embedding mapping, detect the residual convergence during the iteration process, and integrate the weights at each level and the embedding results when the convergence condition is met to output a multi-entropy weight manifold embedding prediction model; Step 4: Input the feature vector of the current measurement time into the multi-entropy weighted manifold embedding prediction model to generate the real-time wax content prediction result, and send the real-time wax content prediction result to the control terminal.
2. The method for constructing an online prediction model for industrial processes based on self-attention manifold learning as described in claim 1, characterized in that, Step 1 specifically includes: starting the measurement sequence with a 10-second cycle timer; taking a 30 ml sample of crude oil sideflow from the sideflow pipeline; maintaining a constant temperature of 60 degrees Celsius within the measurement chamber to stabilize the temperature of the crude oil sideflow sample within the target temperature fluctuation range of ±0.2 degrees Celsius; after temperature stabilization, applying a 14-microsecond 90-degree pulse within the same cycle timer, and then acquiring no less than 8,000 echo signals at an echo interval of 200 microseconds to form a raw relaxation spectrum signal sequence covering the solid and liquid phase regions; during echo train acquisition, performing analog-to-digital conversion with 16-bit quantization precision, and writing the raw relaxation spectrum signal sequence into the buffer queue in real time at a sampling interval of 1 microsecond; after the raw relaxation spectrum signal sequence is completely written into the buffer queue, completing data integrity verification before the end of the same cycle timer, and triggering the next 10-second cycle timer measurement sequence after successful verification.
3. The method for constructing an online prediction model for industrial processes based on self-attention manifold learning as described in claim 2, characterized in that, In step 2, the preprocessing of the original relaxation spectrum signal sequence in the buffer queue includes: performing background subtraction, lateral smoothing, temporal alignment and energy normalization on the original relaxation spectrum signal sequence in sequence to obtain a set of feature vectors of uniform dimension.
4. The method for constructing an online prediction model for industrial processes based on self-attention manifold learning as described in claim 3, characterized in that, Step 3 specifically includes: calculating information entropy based on the feature vector set to generate an initial entropy weight sequence; constructing a manifold adjacency graph according to the initial entropy weight sequence, and forming a first-version manifold embedding matrix using Euclidean proximity relations; performing a first self-attention mapping on the first-version manifold embedding matrix to obtain a first-level self-attention weight spectrum; calculating a first-level residual field using the difference between the first-level self-attention weight spectrum and the initial entropy weight sequence; injecting the first-level residual field into the manifold adjacency graph to generate a residual correction graph, thereby generating a second-version manifold embedding matrix; and performing a second self-attention mapping on the second-version manifold embedding matrix to obtain a second-level self-attention weight spectrum. Simultaneously, the weight spectrum is accumulated along an increasing trajectory; a hierarchical agglomeration mechanism is triggered based on the weight spectrum increasing trajectory to output an agglomeration gradient sequence; the agglomeration gradient sequence is back-projected onto the manifold adjacency graph to generate a manifold remapping matrix, which is then fused with the second-level self-attention weight spectrum to obtain a comprehensive embedding map; the convergence of the comprehensive embedding map is checked; if the convergence condition is not met, the first-level residual field is recalculated, and the remaining steps are completed, with the iteration counter incremented; when the convergence condition is met, all self-attention weight spectra, agglomeration gradient sequences, and comprehensive embedding maps are integrated to output the final multi-entropy weighted manifold embedding prediction model.
5. The method for constructing an online prediction model for industrial processes based on self-attention manifold learning as described in claim 4, characterized in that, In step 3, the process of generating the initial entropy weight sequence includes: within the historical feature vector set, counting the number of times each feature unit takes a value to obtain a frequency distribution table with a total number of samples of no less than 1000; based on the frequency distribution table, calculating the information entropy value for each feature unit to obtain an entropy value sequence with a length equal to the number of feature units; and synchronously linearly normalizing all entropy values in the entropy value sequence to the interval between 0 and 1 to generate the initial entropy weight sequence.
6. The method for constructing an online prediction model for industrial processes based on self-attention manifold learning as described in claim 5, characterized in that, Step 3, the process of forming the first version of the manifold embedding matrix includes: arranging all feature units from largest to smallest according to the numerical value of each entropy weight in the initial entropy weight sequence to obtain a sorted feature index list; calculating the Euclidean proximity relationship row by row in the historical feature vector set based on the sorted feature index list, with the proximity judgment threshold set as the average Euclidean distance of 5 adjacent samples; establishing undirected edges between sample pairs whose Euclidean proximity relationship meets the threshold condition, with the edge weight set as the arithmetic mean of the corresponding entropy weights, generating a manifold adjacency graph; converting the manifold adjacency graph into an adjacency matrix, with the matrix dimension consistent with the number of samples in the historical feature vector set, setting the diagonal elements to zero, and filling the remaining elements with the edge weights; performing a classic multidimensional scaling operation on the adjacency matrix, setting the target dimension to 3 dimensions, and outputting a coordinate matrix as the first version of the manifold embedding matrix.
7. The method for constructing an online prediction model for industrial processes based on self-attention manifold learning as described in claim 6, characterized in that, Step 3, the process of obtaining the second version of the manifold embedding matrix, includes: performing zero-mean normalization on each row of the coordinate vectors in the first version of the manifold embedding matrix to eliminate coordinate scale differences; after the normalization is completed, calculating the similarity matrix according to the inner product relationship between the row vectors, normalizing the similarity sequence corresponding to each row by the maximum value to form a first-level self-attention weight spectrum; constructing a first-level residual field based on the difference between the corresponding element of the first-level self-attention weight spectrum and the corresponding element of the initial entropy weight sequence, setting elements with an absolute difference value less than 0.01 to zero; and then... Non-zero elements in the difference field are mapped back to their corresponding edges in the manifold adjacency graph according to their original indices. The edge weights are then weighted and adjusted to the arithmetic mean of the original edge weights and the corresponding elements in the first-level residual field, generating a residual correction graph. Based on the residual correction graph, a new adjacency matrix is generated with the same dimensions as the first version of the manifold embedding matrix. The diagonal elements are uniformly set to zero, and the remaining elements are filled with the weighted edge weights. The classic multidimensional scaling operation is performed again on the regenerated adjacency matrix, with the target dimension still set to 3 dimensions. The output coordinate matrix is used as the second version of the manifold embedding matrix.
8. The method for constructing an online prediction model for industrial processes based on self-attention manifold learning as described in claim 7, characterized in that, Step 3, the process of obtaining the comprehensive embedding map includes: applying zero-mean normalization to the coordinate vectors of each row in the second version of the manifold embedding matrix to ensure consistent coordinate scale; calculating the similarity matrix according to the inner product relationship between the row vectors, normalizing the similarity sequence corresponding to each row to form a second-level self-attention weight spectrum; constructing an increasing trajectory of the weight spectrum by subtracting the corresponding element of the first-level self-attention weight spectrum from the element at the corresponding position in the second-level self-attention weight spectrum, setting elements with an absolute difference less than 0.02 to zero; triggering a hierarchical agglomeration mechanism when there are at least 3 non-zero peaks in the increasing trajectory of the weight spectrum. Specifically, the non-zero peak values are divided into three levels—upper, middle, and lower—according to their range from largest to smallest, and agglomerative gradient sequences are output. Within the agglomerative gradient sequences, the order of elements in the upper region remains unchanged, the elements in the middle region are rearranged in descending order, and the elements in the lower region are rearranged in ascending order. The agglomerative gradient sequences are mapped back to the corresponding edges in the manifold adjacency graph according to their element indices, and the edge weights are replaced with the values of the corresponding elements in the agglomerative gradient sequences to generate a manifold remapping matrix. In the manifold remapping matrix, the arithmetic mean of the weights of each non-zero edge and the corresponding elements of the second-order self-attention weight spectrum is taken and written to the same position to obtain the comprehensive embedding mapping.
9. The method for constructing an online prediction model for industrial processes based on self-attention manifold learning as described in claim 8, characterized in that, In step 3, at the end of the nth iteration, the absolute difference between the corresponding elements of the nth integrated embedding map and the n-1th integrated embedding map is compared, and the arithmetic mean of all differences is taken to obtain the convergence index. The preset convergence threshold is 0.005, and the preset minimum number of iterations is 3. When the convergence index is greater than 0.005 or the number of iterations is less than 3, it is determined that the convergence condition has not been met, and the process returns to recalculate the first-level residual field, completes the remaining steps, and increments the iteration counter. When the convergence index is less than or equal to 0.005 and the number of iterations is not less than 3, it is determined that the convergence condition is met, and the following operation is performed: collect all first-level self-attention weight spectra, second-level self-attention weight spectra, and higher-level self-attention weight spectra generated during the iteration process, and merge them into a self-attention weight spectrum summary table in chronological order. Collect all condensation gradient sequences generated during the iteration process and concatenate them sequentially according to the iteration number to form a summary table of condensation gradient sequences. The final integrated embedding map is subjected to element-wise weighted equilibrium with the self-attention weight spectrum summary table and the condensed gradient sequence summary table, with the weight ratios set to 0.4, 0.35 and 0.25 respectively, to generate a joint output matrix. The joint output matrix is labeled as a multi-entropy weighted manifold embedding prediction model and stored as the final result, thus ending the entire iteration process.
Citation Information
Patent Citations
Diabetic retinopathy recognition method based on manifold learning, medium and system
CN117936079A
Domain speech recognition method and system based on RAG
CN119296516A