A Spectral Analysis Method and System Based on Deep Belief Networks
By constructing triplet differences in the spectral matrix channel sequences and inversely accumulating the differences in the deep belief network, and combining this with freezing the minimum error node output in the residual network, the problem of undifferentiated channel differences in traditional spectral analysis is solved, thereby improving the stability of feature extraction and the ability to mine in-depth spectral data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2026-04-03
AI Technical Summary
Traditional spectral analysis methods fail to effectively distinguish channel differences when faced with complex spectral signals, resulting in the mixed processing of high-noise channels and low-response channels, which affects the stability of model learning. The error processing is not differentiated enough, leading to blurred response features and the omission of high-frequency information.
By constructing triplet pairs of spectral matrix channel sequences, extracting the maximum and minimum value difference vectors, performing difference merging and average response grouping, using a deep belief network to perform reverse accumulation and fusion of node differences, and combining the residual network to freeze the output of the node with the minimum error, the network training process and feature extraction are optimized.
It improves the differential representation ability and response balance of spectral data, optimizes the weight update path in the network training process, and enhances the deep mining capability and feature extraction stability of spectral data.
Smart Images

Figure CN120632412B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of spectral analysis technology, and in particular to a spectral analysis method and system based on deep belief networks. Background Technology
[0002] The field of spectroscopic analysis technology mainly involves obtaining information about the structure, composition and other relevant information of a substance by analyzing its absorption, reflection and emission characteristics to light of different wavelengths. This includes ultraviolet-visible spectroscopy, infrared spectroscopy and Raman spectroscopy, which can be used for qualitative and quantitative analysis.
[0003] Spectral analysis methods based on deep belief networks effectively extract important features from spectral data by training deep belief networks, and perform accurate classification and regression analysis. The goal is to improve the accuracy and efficiency of spectral data analysis. When faced with complex spectral signals, deep belief networks automatically identify and optimize potential patterns in spectral data through multi-level learning mechanisms, thereby achieving accurate identification and analysis of different substances.
[0004] Traditional spectral analysis methods treat the raw spectrum as a whole and rely on deep belief networks to automatically train and identify full-dimensional data. However, they fail to distinguish the intensity and trend of different responses between channels, resulting in the mixing of high-noise and low-response channels with effective response channels. This affects the stability of model learning, and redundant inputs interfere with the feature extraction performance of intermediate layers of the network, further affecting the discrimination boundary of classification and regression. In traditional methods, error handling is mostly done globally and uniformly, without performing differentiated feedback for different paths and nodes. This can easily lead to high-error paths being masked by averaging, and the error propagation path failing to truly reflect the direction of node contribution. Consequently, the network weight update process cannot effectively focus on key nodes, reducing training efficiency and causing structural instability. When faced with multi-peak and abrupt spectral responses, existing models often exhibit blurred response features and omission of high-frequency information. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and to propose a spectral analysis method and system based on deep belief networks.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a spectral analysis method based on deep belief networks, comprising the following steps:
[0007] S1: Based on the spectral matrix channel sequence, construct triplets from each channel group, extract the maximum and minimum value difference vectors, reconstruct and map the spectral channel group sequence according to the ten group mean, and simultaneously perform difference merging and average response grouping to obtain the channel difference structure set;
[0008] S2: Based on the channel difference structure set, a deep belief network is used to sort the columns by standard deviation to select columns and generate input value vectors. After mapping to a three-layer neural structure, node difference back accumulation is introduced, and the spectral response intensity curve is fused. At the same time, difference judgment and back mapping fusion are performed to generate a multi-layer structure output vector group.
[0009] S3: Based on the output vector group of the multi-layer structure, merge the node vectors to calculate the cosine distance sorting, construct the input and embed into an equal-dimensional space, and perform node filtering and output embedding reconstruction to obtain the target mapping embedding matrix.
[0010] S4: Based on the target mapping embedding matrix, determine the out-of-limit position according to the node and the squared value of the output error, construct a residual tree to update the output of the hidden layer weight fusion network, and perform error accumulation judgment and direction adjustment to obtain the residual weight feedback structure diagram.
[0011] S5: Based on the residual weight feedback structure diagram, a residual network is used to extract the connection edge weights and the Euclidean distance between labels, and to freeze the output value mapping of the structural node with the minimum error. An output cache is established, and error judgment and structure freezing matrix are constructed to obtain the spectral response feature output set.
[0012] As a further aspect of the present invention, the specific steps for generating the channel difference structure set are as follows:
[0013] S11: Based on the spectral matrix channel sequence, divide the channel groups and label the channel index, extract the extreme values of the response values in the channel, calculate the numerical difference of the extreme values of the channel response, divide the channel groups according to the channel number, calculate the mean of the values in the group difference vector, construct a set of mean expression based on the channel index sequence, and generate a channel difference mean sequence group.
[0014] S12: Based on the channel difference mean sequence group, perform sequence index mapping rearrangement, extract the arrangement order of the mean sequence as the index rearrangement standard, calculate the sequence difference between adjacent groups according to the change of the mean difference, filter adjacent channel groups with differences less than a set threshold, integrate the channel index sequence and merge and reconstruct, establish the mapping structure between the channel index and the mean difference, and obtain the channel mean sequence mapping structure.
[0015] S13: Based on the channel mean sequence mapping structure, determine the spectral channel corresponding to the channel index, extract the set of response values in the channel, perform summation of the response values within the group, divide by the number of channels to obtain the average value, perform structure filling and positional recombination on the average value, extract the difference term of the original extreme values to construct the inter-group difference relationship vector, and reconstruct the heterogeneous distribution structure between channels by combining the average response sequence to obtain the channel difference structure set.
[0016] As a further aspect of the present invention, the specific steps for generating the multi-layer structure output vector group are as follows:
[0017] S21: Based on the channel difference structure set, extract the response value set of the corresponding position in the channel, calculate the standard deviation and record the result, arrange the column indexes from high to low according to the calculation result, define the column index interval of the top 50% of the standard deviation values, read the original response value data of the corresponding channel in the interval, and concatenate them into a one-dimensional structure vector according to the column order to generate a standard deviation sorted input vector group.
[0018] S22: Based on the standard deviation sorted input vector group, a deep belief network is used to divide the vector into three segments and establish a hierarchical mapping relationship. The value order is filled into the input area of the three-layer node structure in sequence. The difference between two consecutive points in the segment is calculated and the difference is accumulated in reverse order. The accumulated difference value is classified according to the segment identifier. The accumulated value sequence in the structure is retained as an independent structural unit to obtain the node difference reverse accumulation structure set.
[0019] S23: Based on the node difference inverse cumulative structure set, match the spectral response intensity curves of the corresponding channels in the same layer and extract the numerical sequence, perform point-to-point weighted fusion of the two types of data, calculate the numerical difference between adjacent nodes in the fused sequence, identify jump points greater than a set threshold and mark the index position, map the position corresponding to the jump point to the original input channel index and extract the corresponding data, construct the structure sequence by layering according to the mapped position, and obtain the multi-layer structure output vector group.
[0020] As a further aspect of the present invention, the deep belief network is shown in the following formula:
[0021]
[0022] In the formula, C k ∑ is the inverse cumulative value of the structured differences in the k-th segment nodes, ∑ is the summation operator, i is the index number of the current node in the segment, n is the total number of nodes in the current segment, and ω is the summation value. i Let x be the local gradient change position weight coefficient of node i. i Input the value for the i-th node, x i-1 Input the value for the (i-1)th node, x i -x i-1 Let γ be the difference between the input value of node i and the previous node, and γ be the mean deviation sensitive adjustment factor. i -μ k | Input the value for node i and the mean of the current k-th segment μ k The absolute difference between them, μ k This is the mean of the input values for all nodes in the current k-th segment. This is the standardized difference expression, where β is the path depth position correction factor, and l i L is the path depth index of node i in the structure mapping path. k This represents the maximum path depth in the k-th segment. This represents the normalized depth-position ratio of a node within the path. This is the path location compensation factor.
[0023] As a further aspect of the present invention, the mapping to the original input channel index specifically involves: mapping the relative position of the jump point in the fusion sequence to the corresponding channel index position in the initial input vector group; establishing an index lookup table based on the original arrangement order of each node in the three-segment structure in the node difference reverse accumulation structure set, combined with the index position of the node in the fused sequence; recording the correspondence between the relative displacement of the jump point in the fusion path and the physical position of the initial channel; extracting the fusion index position of all jump points after identifying the jump point; obtaining the column position in the standard deviation sorted input vector group through the lookup table; and mapping the index to the corresponding channel number in the original channel difference structure set.
[0024] As a further aspect of the present invention, the specific steps for generating the target mapping embedding matrix are as follows:
[0025] S31: Based on the multi-layer structure output vector group, merge the channel dimension of the node output vectors in each layer to construct a combined vector of uniform length, calculate the pairwise cosine distance between the combined vectors, sort them in ascending order of distance value, retain the original vector index and corresponding sorting order, and generate a node similarity sorting matrix.
[0026] S32: Based on the node similarity sorting matrix, rearrange and number the node vectors according to the sorting order, set a uniform dimension length as the mapping basis, map the rearranged vectors to the corresponding coordinate positions in the same dimension space in sequence, record the coordinate index values of the vectors in the equal-dimensional space, establish the equal-length numerical structure after mapping, and obtain the equal-dimensional space vector mapping set.
[0027] S33: Based on the equal-dimensional space vector mapping set, threshold filtering is performed on the node vectors to remove nodes whose difference from the average cosine distance exceeds a set range. The mapping vectors corresponding to the index positions of the retained nodes are extracted, and the vectors are rearranged and merged according to the original numbering order to assemble a multi-channel vector matrix structure and obtain the target mapping embedding matrix.
[0028] As a further aspect of the present invention, the specific steps for generating the residual weight feedback structure diagram are as follows:
[0029] S41: Based on the target mapping embedding matrix, calculate the numerical difference between the actual output of the node and the expected value, perform error squaring operation and record the error values of all nodes, set a fixed threshold to filter out nodes that exceed the range, mark the index position of the nodes that exceed the limit according to matrix coordinates, extract the error value and structural information of the corresponding vector position and establish a node index list, and generate an error exceeding the limit node identifier set.
[0030] S42: Based on the error-exceeding node identifier set, extract the upstream and downstream connection indexes of the corresponding nodes in the output path, construct a branch structure starting from a single error-exceeding node, record the connection node index and form a path according to the sequence number, adjust the connection weight values of the nodes in the path, the adjustment value is related to the node's level and the direction of the propagation path, aggregate the adjusted connection weight values, and obtain residual fusion update weight reorganization. The aggregation process is as follows: construct a branch structure based on the error-exceeding node and complete the numerical adjustment of the connection weight values of each node in the path, perform unified numerical normalization of the adjusted weights according to the path structure, merge the local weight change results between each node during the propagation along the path, form an overall adjustment expression for the current network state, set a fusion factor based on the path length and node influence, perform weighted calculation on the weight adjustment values in the path according to the level depth of the node and the residual influence weight, generate normalized correction values, perform linear merging on the weighted adjustment values on the path and then perform segmented statistics according to structural units, and output a set of structured fusion update weight reorganization.
[0031] S43: Based on the residual fusion update weight reorganization, the output data after node fusion weight is collected using the residual network, the error change is calculated according to the node index order and the sign direction is recorded, the nodes with continuous error offset trend are extracted and their positions are marked, the connection path is constructed with the error offset direction, the weight feedback value is allocated to the corresponding node index along the path, the connection structure set containing node index, error direction and update weight is constructed, and the residual weight feedback structure diagram is obtained.
[0032] As a further aspect of the present invention, the residual network is shown in the following equation:
[0033]
[0034] In the formula, Δw j Let P be the feedback update value of the connection weight at node index j, η be the base learning rate coefficient, ∑ be the summation sign, i be the index number of the error source node in the feedback path, and P be the value of the connection weight at node index j. j Let λ be the set of indices of all error signal source nodes connected to node j. i The weighting coefficient sgn(e) is used to contribute error to the node with index i. i ) represents the error e i The sign function, ei For the output error value of the node with index i, F(x) i ,W) is the input value x i The residual transformation function value corresponding to the weighting parameter W. The residual function of node i with respect to weight w j The partial derivative of w j Let d be the connection weight for the target node index j, α be the path proximity adjustment factor, and d be the connection weight for the target node index j. i Let be the path distance from error source node i to target node j, and D be the maximum distance of the possible paths in the entire residual connection structure. Let be the normalized distance of node i relative to the maximum path depth. This is the path location adjustment factor used to weight the intensity of feedback influence.
[0035] As a further aspect of the present invention, the specific steps for generating the spectral response feature output set are as follows:
[0036] S51: Based on the residual weight feedback structure diagram, extract the numerical weights of the connecting edges between nodes and synchronously read the vector values of the corresponding labels of the nodes. Calculate and perform square sum processing on the coordinate differences between the node output values and label values, generate a list of Euclidean distances, and then arrange them in order according to the node index. Sort the edge traversal results in ascending order of distance, select the target node output value index position corresponding to the edge with the smallest error, and generate the mapping sequence of the node with the smallest error.
[0037] S52: Based on the minimum error node mapping sequence, extract the numerical position of the target node in the output structure and store the corresponding vector value. Establish a number mapping table according to the index order and initialize the buffer. Fill the output value of all target nodes into the buffer and record the position index. Set the frozen mark status for each output value and update the numbering relationship. Combine the nodes in order to form an ordered vector set and obtain the frozen node output buffer set.
[0038] S53: Based on the frozen node output cache set, read the current output value of the marked node and the error record value to calculate the absolute difference, set the error difference threshold as the screening criterion, determine whether the node meets the freezing condition and register the node position, generate a Boolean mark matrix according to the node number order, combine all the nodes that meet the conditions into a two-dimensional index array, and generate a spectral response feature output set.
[0039] This invention also provides a spectral analysis system based on deep belief networks for performing a spectral analysis method based on a deep belief network, the system comprising:
[0040] Channel difference construction module: Based on the spectral matrix channel sequence, triplet is constructed sequentially for each group of three channels. The maximum and minimum values in each triplet are extracted and the difference is calculated to form a difference vector. The difference vectors are grouped into ten groups and the mean is taken. The new spectral channel group sequence is reconstructed and mapped. At the same time, all difference vectors are merged and the mean difference of each group is calculated. The mean of each group is extracted and the average response group is constructed to establish the channel difference structure set.
[0041] Signal feature extraction module: Based on the channel difference structure set, a three-layer neural node structure is built using a deep belief network. The standard deviation of the channel difference vector is calculated column by column. The column with the largest standard deviation is extracted to construct the input value vector, which is then input into the input layer of the deep belief network. The number of nodes in the input layer is set to be the number of channels, the number of nodes in the hidden layer is half the number of input nodes, and the number of nodes in the output layer is the same as the number of input nodes. In the layer-by-layer transmission, the node value difference of each hidden node is calculated and back-accumulated. The spectral response intensity curve is fused, and the difference judgment is performed at the node connection. The back mapping is fused and a multi-layer feature output vector group is generated.
[0042] Vector embedding construction module: Based on the multi-layer feature output vector group, calculate the pairwise cosine distance of each node vector, arrange the node vector pairs in ascending order of distance value, combine the node input sequence and construct an equal-dimensional space in the vector combination space, set the dimension to be consistent with the original number of nodes, filter the node set that meets the minimum change of distance continuity, extract the node set and reconstruct the output sequence structure, and establish the target mapping embedding matrix;
[0043] The residual weight feedback module extracts the squared error between the node output value and the label output value based on the target mapping embedding matrix, identifies nodes that exceed the limit, constructs a node association graph, calls the residual network to set the weight of the connection edge, uses additive residual connection between hidden layers, extracts the error direction of the node that exceeds the limit and accumulates the error value, adjusts the weight value of the hidden layer to the residual path direction, merges it into the overall output of the network, and establishes a residual weight feedback structure graph.
[0044] Output feature generation module: Based on the residual weight feedback structure graph, extract all edge weights and calculate the Euclidean distance between the nodes at both ends of each connection path and the label. Traverse all paths to lock the frozen node with the smallest error. The output value of the frozen node is used as the cached output sequence. Extract the cached sequence nodes and perform error judgment. Construct a freezing matrix. Integrate the freezing matrix with the cached nodes to obtain the spectral response feature output set.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] 1. In this invention, by constructing channel triples based on the spectral matrix channel sequence, extracting the maximum and minimum value difference vectors and performing merging and grouping processing, the spectral channel group sequence is reconstructed, thereby improving the differential expression ability and response balance of the channel data.
[0047] 2. In this invention, a deep belief network is used to generate an input value vector sorted by column standard deviation. After mapping to a three-layer neural structure, the node difference is back-accumulated and the spectral response intensity curve is fused to enhance the back propagation of local node difference sensitivity, optimize the weight update path in the network training process, and enable the network to escape from local minima traps.
[0048] 3. In this invention, by using a residual network to extract the weights of the connecting edges and the Euclidean distance between the labels, the output values of the node with the smallest freezing error are mapped and a freezing matrix is constructed, which further improves the stability and feature preservation of the output results, and enhances the ability to deeply mine spectral data and the stability of spectral feature extraction. Attached Figure Description
[0049] 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 some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is a schematic diagram of the workflow of the present invention;
[0051] Figure 2 This is a system flowchart of the present invention. Detailed Implementation
[0052] 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, and 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.
[0053] Please see Figure 1 This invention provides a technical solution: a spectral analysis method based on deep belief networks, comprising the following steps:
[0054] S1: Based on the spectral matrix channel sequence, construct triplets from each channel group, extract the maximum and minimum value difference vectors, reconstruct and map the spectral channel group sequence according to the ten group mean, and simultaneously perform difference merging and average response grouping to obtain the channel difference structure set;
[0055] S2: Based on the channel difference structure set, a deep belief network is used to sort the columns by standard deviation to select columns and generate input value vectors. After mapping to a three-layer neural structure, node difference back accumulation is introduced and the spectral response intensity curve is fused. At the same time, difference judgment and back mapping are fused to generate a multi-layer structure output vector group.
[0056] S3: Based on the multi-layer structure output vector group, merge the node vectors to calculate the cosine distance sorting, construct the input and embed into an equal-dimensional space, and perform node filtering and output embedding reconstruction to obtain the target mapping embedding matrix;
[0057] S4: Based on the target mapping embedding matrix, determine the out-of-limit position according to the node and the squared value of the output error, construct the residual tree to update the hidden layer weight fusion network output, and perform error accumulation judgment and direction adjustment to obtain the residual weight feedback structure diagram.
[0058] S5: Based on the residual weight feedback structure graph, a residual network is used to extract the connection edge weights and the Euclidean distance between the labels, and to freeze the output value mapping of the structural node with the minimum error. An output cache is established, and error judgment and structure freezing matrix are constructed to obtain the spectral response feature output set.
[0059] In this application, the specific steps for generating the channel difference structure set are as follows:
[0060] S11: Based on the spectral matrix channel sequence, divide the channels into groups and label the channel indices, extract the extreme values of the response values in the channels, calculate the numerical difference of the extreme values of the channel responses, divide the channels into groups according to the channel number, calculate the mean of the values in the group difference vector, construct a set of mean expression based on the channel index sequence, and generate a group of channel difference mean sequence.
[0061] In this embodiment, based on the spectral matrix channel sequence, a channel grouping and sorting algorithm is used to linearly segment the spectral matrix according to the column index order. Each group contains 6 channels, and the channel group boundaries are determined using an equidistant segmentation method. The Python function `numpy.array_split` is executed for grouping, with the command `groups = np.array_split(channel_matrix, total_channels / / 6, axis = 1)`. Here, `channel_matrix` represents the original spectral matrix, `total_channels` is the total number of channels, and `axis = 1` specifies grouping by column. After grouping, the extreme values of the channel response are extracted, and the difference is calculated using the extreme value difference method. The extreme value difference of the channel response is obtained by the command `np.max(channel, axis = 0) - np.min(channel, axis = 0)`. The extreme value differences of all channels are counted according to the channel group order. The `np.mean` function is called to calculate the mean of the extreme value differences for each group, constructing a pairing relationship between the channel index and the mean difference, organizing it into an ordered structure, and generating a channel difference mean sequence group.
[0062] S12: Based on the channel difference mean sequence group, perform sequence index mapping rearrangement, extract the arrangement order of the mean sequence as the index rearrangement standard, calculate the sequence difference between adjacent groups according to the change of the mean difference, filter adjacent channel groups with differences less than a set threshold, integrate the channel index sequence and merge and reconstruct, establish the mapping structure between the channel index and the mean difference, and obtain the channel mean sequence mapping structure.
[0063] In this embodiment, based on the channel difference mean sequence group, a sequence rearrangement algorithm is used to extract the numerical values of the mean of each channel group to form a one-dimensional array. The numpy.argsort function in Python is called to perform the sorting operation, with the command sorted_indices = np.argsort(mean_diff_array). mean_diff_array represents the channel difference mean array, and sorted_indices is the index order after rearrangement. The channel group order is rearranged according to the index rearrangement result, and index records are made. The adjacent difference judgment method is used to calculate the difference between each pair of adjacent channel group means using the command np. abs(np.diff(mean_diff_array)) gets the absolute difference array, sets the difference threshold to 0.15, uses Boolean index to filter index pairs less than the threshold, the command is merge_indices=np.where(np.abs(np.diff(mean_diff_array))<0.15)[0], extracts the index numbers that meet the conditions, merges the channel indexes in adjacent channel groups, calls the np.concatenate function to concatenate the channel indexes, reconstructs the merged channel index sequence, establishes the correspondence structure between the channel index and the mean difference of the channel, and generates the channel mean sequence mapping structure.
[0064] S13: Based on the channel mean sequence mapping structure, determine the spectral channel corresponding to the channel index, extract the set of response values in the channel, perform summation of the response values within the group, divide by the number of channels to obtain the average value, perform structure filling and positional recombination on the average value, extract the difference term of the original extreme values to construct the inter-group difference relationship vector, combine the average response sequence to reconstruct the heterogeneous distribution structure between channels, and obtain the channel difference structure set.
[0065] In this embodiment, based on the channel mean sequence mapping structure, an intra-group response value aggregation and reconstruction algorithm is used. The set of response values for the corresponding channel in the spectral matrix is read according to the channel index list, with the command `response_values = channel_matrix[:, selected_indices]`, where `selected_indices` is the set of channel indices in the mapping structure. Addition is performed on the channel response values in the column direction, with the command `group_sum = np.sum(response_values, axis = 1)`. After obtaining the sum of intra-group responses, the average response value is obtained through channel number normalization, with the command `group_mean = group_sum / len(selected_indices)`. The code snippet describes a process that initializes a unified structure vector using `numpy.zeros`, fills in the mean value, aligns the fill positions, and uses `array[index_map] = group_mean` to fill in the response values in the structure. It then extracts the differences between the extreme values of each group's original channel response values and calls `np.ptp(response_values, axis=1)` to obtain the range sequence, which is used to construct the inter-group difference vector. Combined with the aforementioned mean response value sequence, a unified data structure is formed by concatenation using the command `np.stack([group_mean, group_diff], axis=1)`. Finally, it merges the response levels and difference vectors between the output channels to generate a channel difference structure set.
[0066] In this application, the specific steps for generating the multi-layer structure output vector group are as follows:
[0067] S21: Based on the channel difference structure set, extract the response value set of the corresponding position in the channel, calculate the standard deviation and record the result. Sort the column indexes from high to low according to the calculation result, define the column index interval of the top 50% of the standard deviation values, read the original response value data of the corresponding channel in the interval, and concatenate them into a one-dimensional structure vector in column order to generate a standard deviation sorted input vector group.
[0068] In this embodiment, based on the channel difference structure set, a standard deviation sorting algorithm is used. The `numpy.std` function from the NumPy library is used to calculate the standard deviation of each channel in the two-dimensional matrix. The command is `std_array = np.std(diff_matrix, axis = 0)`, where `diff_matrix` represents a two-dimensional array of the channel difference structure set, and `axis = 0` specifies that the standard deviation operation is performed column-wise. The `numpy.argsort` function is used to sort the standard deviation array in descending order. The command is `sorted_indices = np.argsort(-std_array)`. By taking the first 50% of the length of `sorted_indices` and using the slicing expression `selected_indices = ...`, the standard deviation is further sorted. The `sorted_indices[:len(sorted_indices) / / 2]` function extracts the index range of the high standard deviation channel. Then, the `numpy.take` function is used to read the selected column data from the original channel data, with the command `selected_data = np.take(original_matrix, selected_indices, axis = 1)`. Finally, the `numpy.concatenate` function is used to perform one-dimensional concatenation along the column direction, with the command `flattened_vector = selected_data.flatten(order = 'F')`, where `order = 'F'` indicates flattening according to column priority, generating a standard deviation sorted input vector group.
[0069] S22: Based on the standard deviation sorted input vector group, a deep belief network is used to divide the vector into three segments and establish a hierarchical mapping relationship. The value order is filled into the input area of the three-layer node structure in sequence. The difference between two consecutive points in the segment is calculated and the difference is accumulated in reverse order. The accumulated difference value is classified according to the segment identifier. The accumulated value sequence in the structure is retained as an independent structural unit to obtain the node difference reverse accumulation structure set.
[0070] In this embodiment, the input vector group is sorted based on standard deviation, and a segmented mapping method using a deep belief network structure is adopted. The length of the input vector is set to L, and the length of each segment is calculated as L / / 3 through integer division. The vector segmentation operation is performed using Python slicing, with the commands being segment_1 = input_vector[:L / / 3], segment_2 = input_vector[L / / 3:2*L / / 3], and segment_3 = input_vector[2*L / / 3:]. Subsequently, the numpy.diff function is used to calculate the difference sequence between two consecutive points within each segment, with the command being delta = np.diff(segment_1, segment_2, segment_3, segment_4, segment_5, segment_6, segment_7, segment_8, segment_9, segment_1, segment_2, segment_3 ... The difference sequence is reversed using Python slicing, with the command reversed_delta = delta[::-1]. Then, the reversed difference is accumulated using the numpy.cumsum function, with the command accumulated_diff = np.cumsum(reversed_delta). The accumulated results are then categorized into separate sequences based on the segment identifier. The dictionary structure in Python is used for segmentation and categorization, with the command segment_dict[k] = accumulated_diff. The accumulated difference of each segment is then organized and structured to generate a set of reversed accumulated node difference structures.
[0071] S23: Based on the node difference inverse cumulative structure set, match the spectral response intensity curves of corresponding channels in the same layer and extract the numerical sequence, perform point-to-point weighted fusion of the two types of data, calculate the numerical difference between adjacent nodes in the fused sequence, identify the jump points that are greater than the set threshold and mark the index position, map the position corresponding to the jump point to the original input channel index and extract the corresponding data, construct the structure sequence by layer combination according to the mapping position, and obtain the multi-layer structure output vector group.
[0072] In this embodiment, based on the node difference inverse cumulative structure set, a sequence fusion and jump detection algorithm is used to extract the node sequence from the three segments of the structure set. The original spectral response curve of the corresponding channel is used as the target fusion object, and the command is response_curve = spectral_matrix[:, channel_index]. Then, point-to-point weighted fusion is performed on the two types of data. The element-level fusion operation is performed using a linear weighting formula, and the command is fused = alpha * diff_sequence + (1-alpha) * response_curve, where alpha is the fusion coefficient and is preset to 0.6. Then, numpy.diff is used to calculate the difference between adjacent nodes in the fused sequence, and the command is fused_diff = np.diff(fus ed), the result is compared with the set jump threshold using the absolute value function, the command is jump_points=np.where(np.abs(fused_diff)>threshold)[0], where threshold is the jump threshold, which is set to 1.8 times the standard deviation of the response value by default. The jump point index is mapped to the original channel index through the mapping relationship table, the command is mapped_index=index_map[jump_points], and the hierarchical combination function is called to combine different jump channels into a new sequence according to the structural rules. The structure splicing command structured_output=np.stack([group_1,group_2,group_3],axis=0) is used to generate a multi-layer structured output vector group.
[0073] In this application, the deep belief network is shown in the following formula:
[0074]
[0075] In the formula, C k ∑ is the inverse cumulative value of the structured differences in the k-th segment nodes, ∑ is the summation operator, i is the index number of the current node in the segment, n is the total number of nodes in the current segment, and ω is the summation value. i Let x be the local gradient change position weight coefficient of node i. i Input the value for the i-th node, x i-1 Input the value for the (i-1)th node, x i -x i-1 Let γ be the difference between the input value of node i and the previous node, and γ be the mean deviation sensitive adjustment factor. i -μ k | Input the value for node i and the mean of the current k-th segment μ k The absolute difference between them, μ k This is the mean of the input values for all nodes in the current k-th segment. This is the standardized difference expression, where β is the path depth position correction factor, and l i L is the path depth index of node i in the structure mapping path. k This represents the maximum path depth in the k-th segment. This represents the normalized depth-position ratio of a node within the path. This is the path location compensation factor.
[0076] Execution process: The input vector group obtained after filtering the spectral data by standard deviation is divided into three segments according to index order, which are used as the input regions of the three-layer structure of the deep belief network. The node sequences within each segment are processed sequentially. For the node with index i, the current input value x is obtained. i and the previous node's input value x i-1 Calculate the numerical difference between the two and use it as the basis for local changes, while simultaneously calculating the mean μ of the current segment. k Combined with the parameter γ, a mean offset term 1 + γ·|x is constructed for normalization adjustment. i -μ k The difference is standardized by introducing a weighting coefficient ω. i Combined with the depth index of the node in the structural path i and the maximum depth L within the segment k The normalized path proportion is calculated and multiplied by the path correction factor β to form the weighted influence of the deep structure path. The above three factors are multiplied and summed to obtain the inverse cumulative difference result C of the k-th segment. k The C k It can be used as a structural response representation value of the segment to participate in subsequent feature fusion and spectral feature inference processing.
[0077] In this application, mapping to the original input channel index specifically involves: mapping the relative position of the jump point in the fusion sequence to the corresponding channel index position in the initial input vector set; establishing an index lookup table based on the original arrangement order of each node in the three-segment structure in the node difference back accumulation structure set, combined with the index position of the node in the fused sequence; recording the correspondence between the relative displacement of the jump point in the fusion path and the physical position of the initial channel; extracting the fusion index position of all jump points after identifying the jump point; obtaining the column position in the standard deviation sorted input vector set through the lookup table; and mapping the index to the corresponding channel number in the original channel difference structure set.
[0078] In this application, the specific steps for generating the mapping embedding matrix are as follows:
[0079] S31: Based on the multi-layer structure output vector group, merge the channel dimension of the node output vectors in each layer to construct a combined vector of uniform length, calculate the cosine distance between each pair of combined vectors, sort them in ascending order of distance value, retain the original vector index and corresponding sorting order, and generate a node similarity ranking matrix.
[0080] In this embodiment, based on a multi-layered output vector group, a vector merging and cosine similarity calculation method is used to perform channel-dimensional direction concatenation on the node output vectors. The `numpy.concatenate` function, commanded `merged_vector = np.concatenate([layer1, layer2, layer3], axis = 1)`, merges the vectors into a two-dimensional array of uniform length. The `sklearn.metrics.pairwise.cosine_distances` function is then called to perform cosine distance calculation on any two vectors, with the command `distance_matrix = cosine_...` The `distances(merged_vector)` function automatically calculates the cosine distance between each pair of vectors. `merged_vector` is the set of vectors after concatenating the nodes. The obtained `distance_matrix[i][j]` represents the cosine distance between the vectors of the i-th and j-th nodes. Then, the `numpy.argsort` function is used to sort the nodes in ascending order of distance values. The command is `sorted_idx = np.argsort(distance_matrix, axis = 1)`. The function records the new order of the original index numbers of the nodes in the sorting matrix, encapsulates it into a structured dictionary object, performs bidirectional lookup, and generates a node similarity sorting matrix.
[0081] S32: Based on the node similarity sorting matrix, rearrange the node vectors according to the sorting order and number them. Set a uniform dimension length as the mapping basis, and map the rearranged vectors to the corresponding coordinate positions in the same dimension space in sequence. Record the coordinate index values of the vectors in the equal-dimensional space, establish the equal-length numerical structure after mapping, and obtain the equal-dimensional space vector mapping set.
[0082] In this embodiment, based on the node similarity sorting matrix, a vector dimension mapping and coordinate encoding method is adopted. The node vectors are reordered using a rearranged index, with the command being `reordered_vectors = merged_vector[sorted_idx[:, 0]]`. The first column of the sorting result is taken as the arrangement standard for the similarity alignment vectors. The uniform dimension space length is set to 256. A two-dimensional coordinate matrix is initialized and an equidistant coordinate axis sequence is generated using `numpy.linspace`, with the command being `coordinates = np.linspace(0, 1, 256)`. Each rearranged vector is mapped to an equal-length space coordinate index in sequence, with the command being `mapped_coords[i] = coordinates[i]`. The correspondence between the index position and the coordinate point is recorded. The rearranged vector is then embedded into a preset structure matrix in the standard dimension space according to the mapping result, with the command being `mapped_space[i] = reordered_vectors[i]`. After execution, the coordinate index table is used as the primary key structure and the structured vectors are packaged and stored to generate an equal-dimensional space vector mapping set.
[0083] S33: Based on the equal-dimensional space vector mapping set, threshold filtering is performed on the node vectors to remove nodes whose difference from the average cosine distance exceeds the set range. The mapping vectors corresponding to the index positions of the retained nodes are extracted, and the vectors are rearranged and merged according to the original numbering order to assemble into a multi-channel vector matrix structure to obtain the target mapping embedding matrix.
[0084] In this embodiment, based on an equal-dimensional spatial vector mapping set, a cosine difference threshold filtering and vector reconstruction method is adopted. The `numpy.mean` function is called to take the average of the cosine distance matrix between nodes in the vector set as a comparison benchmark. The command is `mean_cosine = np.mean(distance_matrix)`. The difference threshold is set to 0.2. Vector nodes whose cosine distance exceeds the average ± threshold are filtered using a Boolean filtering method. The command is `filtered_indices = np.where(np.abs(distance_matrix-mean_cosine)<0.2)`. The index positions of nodes that meet the filtering conditions are extracted and recorded. The `numpy.mean` function is then called... The `py.take` function extracts the node vectors that meet the criteria to form a filtered vector set, with the command `filtered_vectors = np.take(mapped_space, filtered_indices, axis = 0)`. It then rearranges the vector set according to the original node numbers, calls `numpy.argsort` to sort the indices in ascending order, with the command `ordered = np.argsort(filtered_indices)`. Finally, it performs a merging operation, with the command `final_matrix = filtered_vectors[ordered]`, and outputs the result in a multi-channel matrix format, generating the target mapping embedding matrix.
[0085] In this application, the specific steps for generating the residual weight feedback structure diagram are as follows:
[0086] S41: Based on the target mapping embedding matrix, calculate the numerical difference between the actual output of the node and the expected value, perform error squaring operation and record the error values of all nodes, set a fixed threshold to filter out nodes that exceed the range, mark the index position of the nodes that exceed the limit according to matrix coordinates, extract the error value and structural information of the corresponding vector position and establish a node index list, and generate an error exceeding the limit node identifier set.
[0087] In this embodiment, based on the target mapping embedding matrix, the error squared calculation method is adopted. Vector interpolation is performed using the broadcast mechanism in NumPy, with the command `error = np.square(actual_output - expected_output)`. `actual_output` is the model output vector, and `expected_output` is the target output value vector in the mapping matrix. Both have the same dimension. The `np.square` function squares the error for each node. A Boolean index is used to set the error threshold, which is set to 0.25. The command `over_threshold_idx = np.where(e)` is used to calculate the error. (rror>0.25) Filter the index of the over-threshold node, obtain the row and column coordinates of the node in the target embedding matrix, use np.unravel_index(over_threshold_idx, matrix_shape) to perform coordinate transformation, extract the error value of the corresponding position of the over-threshold node and find the vector position index in the structure matrix, combine the structure information field to perform structured organization, use list parse to encapsulate the index and error information pair, the command is node_list=[(i, error[i], structure_map[i])foriinover_threshold_idx[0]], generate the error over-threshold node identifier set.
[0088] S42: Based on the error over-limit node identifier set, extract the upstream and downstream connection indexes of the corresponding nodes in the output path, construct a branch structure starting from a single over-limit node, record the connection node index and form a path according to the sequence number, adjust the connection weight value of the nodes in the path, the adjustment value is related to the node's level and the direction of the transmission path, aggregate the adjusted connection weight value, and obtain residual fusion update weight reorganization.
[0089] In this embodiment, based on the error-exceeding node identifier set, a node path tracing and branch path construction algorithm is adopted. According to the index recorded in the node identifier, the upstream and downstream connection relationships in the network topology are extracted. Using a preset connection table structure connection_map, the upstream and downstream connection node index sets of the current node are obtained by using the commands upstream_nodes = connection_map[i]['in'] and downstream_nodes = connection_map[i]['out']. Then, starting from a single error-exceeding node, a breadth-first search algorithm is used to construct the branch structure. The path traversal command is while queue: current = queue.pop(0); visited.append(current); queue.extend(connection_map[current]['out']); During path construction, the indices of the nodes visited are recorded in the order of access to form a path sequence. Then, the connection weights of the nodes in the path are adjusted. A fixed base value of 0.05 is used to construct the weight correction value by multiplying the layer coefficient and the direction factor. The direction factor d = +1 indicates forward propagation, and d = -1 indicates backward propagation. The layer coefficient is set as the layer number divided by the total number of layers. The weight adjustment command is adjusted_weight = original_weight + 0.05 * (layer / total_layers) * d. The updated weights in the path are stored in a list and recorded using path_weights.append(adjusted_weight). The numpy.mean function is called to perform weighted summation and aggregation of all correction values in the path. The command is final_weight = np.mean(path_weights). The residual fusion update weight reorganization is generated.
[0090] S43: Based on residual fusion update weight reorganization, the output data after node fusion weight is collected by residual network, the error change is calculated according to the node index order and the sign direction is recorded, the nodes with continuous error offset trend are extracted and the position is marked, the connection path is constructed according to the error offset direction, the weight feedback value is assigned to the corresponding node index along the path, the connection structure set containing node index, error direction and update weight is constructed, and the residual weight feedback structure diagram is obtained.
[0091] In this embodiment, based on residual fusion update weight reorganization, a residual network feedback path construction method is adopted to apply update weight reorganization to the current network structure. The model loading interface in the TensorFlow deep learning framework is called, and the fusion weights are mapped to the original network structure using the command `model.set_weights(updated_weights)`. Forward propagation is performed again to obtain node output data, with the command `output = model.predict(input_tensor)`. Then, the error change value is calculated according to the node index order, and the difference between the errors of the two propagation rounds is used, with the command `error_diff = new_error - old_error`. The direction of error change is marked using the `numpy.sign` function, with the command `direction_flag = np.sign(error_diff)`. Node indices with continuous and consistent directions are extracted, and a sliding window detection operation is performed, setting the window size to 3. The loop iterates through and records the persistent offset nodes, with the command `ifall(direction_flag[i:i+3]==direction_flag[i]): persistent_nodes.append(i)`. Starting from a node, a feedback connection path based on directional consistency is constructed. The path construction function `build_path(node, direction_flag[node])` is used to recursively perform directional path expansion. Feedback weight values are assigned to each node along the path, with the weight factor set to the reciprocal of the current path depth, and the command `feedback_weight=base_weight / depth`. The node number, direction flag, and feedback value are combined and encapsulated into a structure dictionary with the format `feedback_graph[node_id]={'direction':flag, 'weight':feedback_weight}`. The output is a residual weight feedback structure graph.
[0092] In this application, the residual network is shown in the following formula:
[0093]
[0094] In the formula, Δw j Let P be the feedback update value of the connection weight at node index j, η be the base learning rate coefficient, ∑ be the summation sign, i be the index number of the error source node in the feedback path, and P be the value of the connection weight at node index j. j Let λ be the set of indices of all error signal source nodes connected to node j. i The weighting coefficient sgn(e) is used to contribute error to the node with index i. i ) represents the error e iThe sign function, e i For the output error value of the node with index i, F(x) i ,W) is the input value x i The residual transformation function value corresponding to the weighting parameter W. The residual function of node i with respect to weight w j The partial derivative of w j Let d be the connection weight for the target node index j, α be the path proximity adjustment factor, and d be the connection weight for the target node index j. i Let be the path distance from error source node i to target node j, and D be the maximum distance of the possible paths in the entire residual connection structure. Let be the normalized distance of node i relative to the maximum path depth. This is the path location adjustment factor used to weight the intensity of feedback influence.
[0095] Execution process: First, based on the residual fusion update weight reorganization extracted from the previous stage, the output data of the node is extracted. Combined with the set supervision signal and the output result of the previous period, the output error value e of the node is calculated. i Then apply the sign function sgn(e) to the error result. i To obtain the offset direction, the cumulative error of nodes within a continuous period is calculated, and the error influence coefficient λ is obtained through normalization. i For the target weight w j In the associated feedback path set P j In the process, error source nodes i with connectivity are identified, and the corresponding residual transformation function F(x) is extracted. i W) relative to weight w j partial derivative terms This is used to measure the sensitivity of the weights to the propagation of error signals, and simultaneously obtain the path distance d between the source node i and the target node j. i The normalized distance ratio is formed with the maximum depth D of the entire path. The spatial influence in the feedback path is amplified by the path proximity adjustment coefficient α. The above four parameters are then weighted and summed node by node according to the structure defined in the formula, and multiplied by the base learning rate η to obtain the update value Δw for each weight. j This allows for the adjustment of connection weights under multi-path residual feedback, and the construction of a dynamic residual optimization mechanism oriented towards spectral features.
[0096] In this application, the aggregation process is as follows: a branch structure is constructed based on the error-exceeding nodes, and the connection weight values of each node in the path are numerically adjusted. The adjusted weights are uniformly normalized according to the path structure. The local weight changes between nodes during the propagation along the path are merged to form an overall adjustment expression for the current network state. At the same time, a fusion factor is set based on the path length and node influence. The weight adjustment values in the path are weighted according to the hierarchical depth and residual influence weight of the node to generate normalized correction values. The weighted adjustment values on the path are linearly merged and then segmented and statistically analyzed according to structural units to output a set of structured fusion update weight reorganization.
[0097] In this application, the specific steps for generating the spectral response feature output set are as follows:
[0098] S51: Based on the residual weight feedback structure graph, extract the numerical weights of the connecting edges between nodes and synchronously read the vector values of the corresponding labels of the nodes. Calculate and perform square sum processing on the coordinate differences between the node output values and label values, generate a list of Euclidean distances, and then arrange them in order according to the node index. Sort the edge traversal results in ascending order of distance, select the target node output value index position corresponding to the edge with the smallest error, and generate the mapping sequence of the node with the smallest error.
[0099] In this embodiment, based on the residual weighted feedback structure graph, the Euclidean distance calculation method is used. The edge weights are extracted by calling the `networkx.get_edge_attributes` function on the connected edges in the graph, with the command `edge_weights = nx.get_edge_attributes(graph, 'weight')`. Simultaneously, `node_labels = nx.get_node_attributes(graph, 'label')` is used to extract the node label vector values. For connected nodes, the coordinate difference is calculated using the node output value and the label vector, with the command `diff = np.array(output[i]) - np.array(label[i])`. This is then implemented using NumPy.su. The combination of m and numpy.square is used to perform the sum of squares and square root operations to obtain the Euclidean distance. A dictionary structure is constructed to record each edge and its corresponding node index and Euclidean distance value. Each edge is saved one by one using distance_list.append((node_idx, edge, distance)). The sorted() function is used to sort the nodes in ascending order by key = lambdax:x[2]. The nodes whose errors meet the set threshold are selected and the target node index is extracted. The command is min_error_nodes = [x[0] for x distance_list[: top_k]]. The output is the sequence of nodes with the minimum error.
[0100] S52: Based on the minimum error node mapping sequence, extract the numerical position of the target node in the output structure and store the corresponding vector value. Establish a number mapping table according to the index order and initialize the buffer. Fill the output value of all target nodes into the buffer and record the position index. Set the freeze mark state for each output value and update the numbering relationship. Combine the nodes in order to form an ordered vector set and obtain the frozen node output buffer set.
[0101] In this embodiment, based on the minimum error node mapping sequence, a vector buffer reconstruction method is used. The output vector of the corresponding node is extracted from the output structure matrix using the index in the sequence, with the command `selected_vectors = output_matrix[min_error_nodes]`. An index mapping table is constructed in the original order. The Python `enumerate` function is called with the command `index_map = {i: node for i, nodeinenumerate(min_error_nodes)}` to establish the mapping between the index and the node number. The cache is initialized by calling the `numpy.zeros` command: `cache = np.zeros((len(min_error_nodes))`. The buffer matrix is constructed using `nodes` and `vector_dim`, where `vector_dim` is the dimension of the output vector. The node output values are filled into the corresponding positions in the buffer using `cache[i] = selected_vectors[i]`. The list operation `freeze_flags = [True for_inrange(len(min_error_nodes))]` is called to initialize the freeze flags. `numpy.stack` is called to combine the number, freeze state, and vector value into a unified structure vector sequence. The command is `ordered_vector_set = np.stack([cache, freeze_flags], axis = 1)`, which generates the frozen node output buffer set.
[0102] S53: Based on the frozen node output cache set, read the current output value of the marked node and the error record value to calculate the absolute difference, set the error difference threshold as the screening criterion, determine whether the node meets the freezing condition and register the node position, generate a Boolean label matrix according to the node number order, combine all the nodes that meet the conditions into a two-dimensional index array, and generate a spectral response feature output set.
[0103] In this embodiment, based on the frozen node output cache set, an absolute error difference judgment and Boolean filtering method is used to read all marked node output values and historical error record values. The commands are current_errors = np.array(current_output[min_error_nodes]) and recorded_errors = np.array(stored_errors[min_error_nodes]) to obtain the error value and the original record error value respectively. The numpy.abs function is called to calculate the absolute difference between the two, with the command abs_diff = np.abs(current_errors-recorded_errors). The error threshold is set to 0.1, and the Boolean filtering statement val is used. id_nodes = np.where(abs_diff<0.1)[0] Extract the node indices that meet the freezing condition, use the index to generate a boolean label matrix with number order, call numpy.zeros(len(min_error_nodes), dtype = bool) to initialize the boolean matrix and assign values, the command is bool_mask[valid_nodes] = True, combine the node numbers and coordinate positions that meet the condition into a two-dimensional array, the command is filtered_structure = np.column_stack((min_error_nodes[valid_nodes], np.arange(len(valid_nodes)))), the output is the spectral response feature output set.
[0104] Please see Figure 2 This invention provides a spectral analysis system based on deep belief networks for performing the aforementioned spectral analysis method based on deep belief networks. The system includes:
[0105] Channel difference construction module: Based on the spectral matrix channel sequence, triplet is constructed sequentially for each group of three channels. The maximum and minimum values in each triplet are extracted and the difference is calculated to form a difference vector. The difference vectors are grouped into ten groups and the mean is taken. The new spectral channel group sequence is reconstructed and mapped. At the same time, all difference vectors are merged and the mean difference of each group is calculated. The mean of each group is extracted and the average response group is constructed to establish the channel difference structure set.
[0106] Signal feature extraction module: Based on the channel difference structure set, a three-layer neural node structure is built using a deep belief network. The standard deviation of the channel difference vector is calculated column by column. The column with the largest standard deviation is extracted to construct the input value vector, which is then input into the input layer of the deep belief network. The number of nodes in the input layer is set to be the number of channels, the number of nodes in the hidden layer is half the number of input nodes, and the number of nodes in the output layer is the same as the number of input nodes. In the layer-by-layer propagation, the node value difference of each hidden node is calculated and back-accumulated. The spectral response intensity curve is fused, and the difference judgment is performed at the node connection. The back mapping is fused and a multi-layer feature output vector group is generated.
[0107] Vector embedding construction module: Based on the multi-layer feature output vector group, calculate the pairwise cosine distance of each node vector, arrange the node vector pairs in ascending order of distance value, combine the node input sequence and construct an equal-dimensional space in the vector combination space, set the dimension to be consistent with the original number of nodes, select the node set that meets the minimum change of distance continuity, extract the node set and reconstruct the output sequence structure, and establish the target mapping embedding matrix;
[0108] The residual weight feedback module is based on the target mapping embedding matrix. It extracts the squared error between the node output value and the label output value, identifies nodes that exceed the limit, constructs a node association graph, calls the residual network to set the weight of the connection edge, uses additive residual connection between hidden layers, extracts the error direction of the node that exceeds the limit and accumulates the error value, adjusts the weight value of the hidden layer to the residual path direction, integrates it into the overall network output, and establishes the residual weight feedback structure graph.
[0109] Output feature generation module: Based on the residual weight feedback structure graph, extract the weights of all connecting edges and calculate the Euclidean distance between the nodes at both ends of each connecting path and the label. Traverse all paths to lock the frozen node with the smallest error. The output value of the frozen node is used as the cached output sequence. Extract the cached sequence nodes and perform error judgment. Construct a freezing matrix. Integrate the freezing matrix with the cached nodes to obtain the spectral response feature output set.
[0110] In this application, the channel difference construction module is specifically as follows: based on the spectral matrix channel sequence, the channel difference construction method is adopted. Each group of three channels is combined sequentially to form a triplet. The maximum and minimum values of the channel values in each triplet are extracted. The numerical difference between the maximum and minimum values is calculated as a single group difference. Ten groups of triplets are processed continuously to construct ten difference vectors. The average value of each group of ten difference vectors is calculated as a group result. After rearranging all groups, a new spectral channel group sequence is generated by corresponding mapping. Then, all difference vectors are uniformly merged and divided into groups of ten. The average difference of each group is calculated, and the obtained average value is extracted as the representative value of the group. The representative values of each group are summarized to form the average response group and generate the channel difference structure set.
[0111] In this application, the signal feature extraction module specifically works as follows: Based on the channel difference structure set, a three-layer node structure including an input layer, a hidden layer, and an output layer is established using a deep belief network. First, the numerical fluctuation degree of the difference vector of the spectral channels is calculated according to each column of the channel. The column with the largest fluctuation degree is selected as the main input item. The number of input layer nodes is set to be the same as the number of channels, the number of hidden layer nodes is set to half the number of input nodes, and the number of output layer nodes is the same as the number of input layers. During the network transmission process, the numerical difference between each hidden node is calculated layer by layer, and these differences are gradually accumulated into the overall node structure change trend. The change trend is fused with the original spectral response curve, the numerical difference between the connected nodes is compared, and a reverse mapping structure is constructed according to the change direction to generate a multi-layer feature output vector group.
[0112] In this application, the vector embedding construction module specifically involves: constructing the embedding structure based on multi-layer feature output vector groups using the cosine distance sorting method; calculating the angular similarity between each pair of node vectors; sorting all node combinations according to the order of closest angles; generating a complete list of node combinations; establishing a dimensional structure with the same number of original nodes in the node combination space; comparing the continuous similarity in each combination item by item; selecting the set of node combinations with the smallest change in similarity; using the nodes in the set as the core embedding content; reconstructing the arrangement structure of these nodes in the original node sequence based on these nodes; forming a complete output sorting; and establishing a target mapping embedding matrix.
[0113] In this application, the residual weight feedback module is specifically designed as follows: Based on the target mapping embedding matrix, a feedback structure is established using a residual connection graph construction method. First, the error difference between each output node value and the label is calculated. Then, it is determined whether the error exceeds a preset threshold, for example, a threshold of 15%. If it exceeds the threshold, it is marked as a node that needs adjustment. These nodes are connected to form a node graph, and the connection weights between each node are set. Additive residual connections are set between the hidden layers. The error direction of the node with the error exceeding the limit is further determined, and all error directions are accumulated one by one. The accumulated results are then applied to adjust the corresponding connection weights in the network, and finally, the feedback fusion of the overall network structure is completed to form a residual weight feedback structure graph.
[0114] In this application, the output feature generation module specifically works as follows: based on the residual weight feedback structure graph, the final output features are extracted using the frozen path error minimum search method. First, the weight information of all node connections in the network is extracted, and the numerical distance between the start and end nodes and the target label is calculated for each path. All connection paths are traversed to select the node corresponding to the path with the smallest error. The node is determined as the frozen node, and its output value is used as a temporary output sequence. Then, the error is judged again for all nodes in the temporary sequence, and nodes that meet the conditions are selected to construct a frozen node matrix. The matrix is merged with the original cached node sequence into a unified structure to obtain the spectral response feature output set.
[0115] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A spectral analysis method based on deep belief networks, characterized in that, Includes the following steps: S1: Based on the spectral matrix channel sequence, construct triplets from each channel group, extract the maximum and minimum value difference vectors, reconstruct and map the spectral channel group sequence according to the ten group mean, and simultaneously perform difference merging and average response grouping to obtain the channel difference structure set; S2: Based on the aforementioned channel difference structure set, a deep belief network is used to sort columns by standard deviation to select columns and generate input value vectors. After mapping to a three-layer neural structure, node difference back accumulation is introduced, and the spectral response intensity curve is fused. Simultaneously, difference judgment and back mapping are fused to generate a multi-layer structure output vector group, where the deep belief network is shown in the following formula: , In the formula, For the first The structured difference in the segment node is the reverse cumulative value. For the summation operator, This is the index number of the current node within the segment. This represents the total number of nodes contained in the current segment. For nodes The local gradient change location weight coefficient, For the first Each node input value For the first Each node input value For nodes The difference between the input value and the previous node. As a mean deviation sensitive adjustment factor, For nodes Input value and current number Segment mean The absolute difference between them For the current number The mean of all input values at all nodes in the segment. This is the standardized difference expression. This is a path depth location correction factor. For nodes The path depth index within the structure mapping path. For the first The maximum path depth in the segment. This represents the normalized depth-position ratio of a node within the path. This is the path location compensation factor; S3: Based on the output vector group of the multi-layer structure, merge the node vectors to calculate the cosine distance sorting, construct the input and embed into an equal-dimensional space, and perform node filtering and output embedding reconstruction to obtain the target mapping embedding matrix. S4: Based on the target mapping embedding matrix, determine the out-of-limit position according to the node and the squared value of the output error, construct a residual tree to update the output of the hidden layer weight fusion network, and perform error accumulation judgment and direction adjustment to obtain the residual weight feedback structure diagram. S5: Based on the residual weight feedback structure diagram, a residual network is used to extract the mapping between the connection edge weights and the Euclidean distance between labels, freeze the output values of the structural nodes with the minimum error, establish an output cache, and perform error judgment and structure freezing matrix construction to obtain the spectral response feature output set. The residual network is shown in the following equation: , In the formula, For node index The feedback update value of the connection weight. The base learning rate coefficient, For summation, This is the index number of the error source node in the feedback path. For all nodes connected The set of indexes of error signal source nodes. For index The error contribution weighting coefficient of the node. For error The sign function, For index The output error value of the node, For input values In weight parameters The corresponding residual transformation function value under control. For nodes The residual function with respect to weights The partial derivatives, The target node index is The connection weights, As a path distance adjustment factor, To start from the error source node To the target node Path distance, This represents the maximum distance of any possible path within the entire residual connection structure. For nodes The normalized distance relative to the maximum path depth This is the path location adjustment factor used to weight the intensity of feedback influence.
2. The spectral analysis method based on deep belief networks according to claim 1, characterized in that, The specific steps for generating the channel difference structure set are as follows: S11: Based on the spectral matrix channel sequence, divide the channel groups and label the channel index, extract the extreme values of the response values in the channel, calculate the numerical difference of the extreme values of the channel response, divide the channel groups according to the channel number, calculate the mean of the values in the group difference vector, construct a set of mean expression based on the channel index sequence, and generate a channel difference mean sequence group. S12: Based on the channel difference mean sequence group, perform sequence index mapping rearrangement, extract the arrangement order of the mean sequence as the index rearrangement standard, calculate the sequence difference between adjacent groups according to the change of the mean difference, filter adjacent channel groups with differences less than a set threshold, integrate the channel index sequence and merge and reconstruct, establish the mapping structure between the channel index and the mean difference, and obtain the channel mean sequence mapping structure. S13: Based on the channel mean sequence mapping structure, determine the spectral channel corresponding to the channel index, extract the set of response values in the channel, perform summation of the response values within the group, divide by the number of channels to obtain the average value, perform structure filling and positional recombination on the average value, extract the difference term of the original extreme values to construct the inter-group difference relationship vector, and reconstruct the heterogeneous distribution structure between channels by combining the average response sequence to obtain the channel difference structure set.
3. The spectral analysis method based on deep belief networks according to claim 1, characterized in that, The specific steps for generating the multi-layer structure output vector group are as follows: S21: Based on the channel difference structure set, extract the response value set of the corresponding position in the channel, calculate the standard deviation and record the result, arrange the column indexes from high to low according to the calculation result, define the column index interval of the top 50% of the standard deviation values, read the original response value data of the corresponding channel in the interval, and concatenate them into a one-dimensional structure vector according to the column order to generate a standard deviation sorted input vector group. S22: Based on the standard deviation sorted input vector group, a deep belief network is used to divide the vector into three segments and establish a hierarchical mapping relationship. The value order is filled into the input area of the three-layer node structure in sequence. The difference between two consecutive points in the segment is calculated and the difference is accumulated in reverse order. The accumulated difference value is classified according to the segment identifier. The accumulated value sequence in the structure is retained as an independent structural unit to obtain the node difference reverse accumulation structure set. S23: Based on the node difference inverse cumulative structure set, match the spectral response intensity curves of the corresponding channels in the same layer and extract the numerical sequence, perform point-to-point weighted fusion of the two types of data, calculate the numerical difference between adjacent nodes in the fused sequence, identify jump points greater than a set threshold and mark the index position, map the position corresponding to the jump point to the original input channel index and extract the corresponding data, construct the structure sequence by layering according to the mapped position, and obtain the multi-layer structure output vector group.
4. The spectral analysis method based on deep belief networks according to claim 3, characterized in that, The mapping to the original input channel index specifically involves: mapping the relative position of the jump point in the fusion sequence to the corresponding channel index position in the initial input vector group; establishing an index lookup table based on the original arrangement order of each node in the three-segment structure in the node difference back accumulation structure set, combined with the index position of the node in the fused sequence; recording the correspondence between the relative displacement of the jump point in the fusion path and the physical position of the initial channel; extracting the fusion index position of all jump points after identifying the jump point; obtaining the column position in the standard deviation sorted input vector group through the lookup table; and mapping the index to the corresponding channel number in the original channel difference structure set.
5. The spectral analysis method based on deep belief networks according to claim 1, characterized in that, The specific steps for generating the target mapping embedding matrix are as follows: S31: Based on the multi-layer structure output vector group, merge the channel dimension of the node output vectors in each layer to construct a combined vector of uniform length, calculate the pairwise cosine distance between the combined vectors, sort them in ascending order of distance value, retain the original vector index and corresponding sorting order, and generate a node similarity sorting matrix. S32: Based on the node similarity sorting matrix, rearrange and number the node vectors according to the sorting order, set a uniform dimension length as the mapping basis, map the rearranged vectors to the corresponding coordinate positions in the same dimension space in sequence, record the coordinate index values of the vectors in the equal-dimensional space, establish the equal-length numerical structure after mapping, and obtain the equal-dimensional space vector mapping set. S33: Based on the equal-dimensional space vector mapping set, threshold filtering is performed on the node vectors to remove nodes whose difference from the average cosine distance exceeds a set range. The mapping vectors corresponding to the index positions of the retained nodes are extracted, and the vectors are rearranged and merged according to the original numbering order to assemble a multi-channel vector matrix structure and obtain the target mapping embedding matrix.
6. The spectral analysis method based on deep belief networks according to claim 1, characterized in that, The specific steps for generating the residual weight feedback structure diagram are as follows: S41: Based on the target mapping embedding matrix, calculate the numerical difference between the actual output of the node and the expected value, perform error squaring operation and record the error values of all nodes, set a fixed threshold to filter out nodes that exceed the range, mark the index position of the nodes that exceed the limit according to matrix coordinates, extract the error value and structural information of the corresponding vector position and establish a node index list, and generate an error exceeding the limit node identifier set. S42: Based on the error-exceeding node identifier set, extract the upstream and downstream connection indexes of the corresponding nodes in the output path, construct a branch structure starting from a single error-exceeding node, record the connection node index and form a path according to the sequence number, adjust the connection weight values of the nodes in the path, the adjustment value is related to the node's level and the direction of the propagation path, aggregate the adjusted connection weight values, and obtain residual fusion update weight reorganization. The aggregation process is as follows: construct a branch structure based on the error-exceeding node and complete the numerical adjustment of the connection weight values of each node in the path, perform unified numerical normalization of the adjusted weights according to the path structure, merge the local weight change results between each node during the propagation along the path, form an overall adjustment expression for the current network state, set a fusion factor based on the path length and node influence, perform weighted calculation on the weight adjustment values in the path according to the level depth of the node and the residual influence weight, generate normalized correction values, perform linear merging on the weighted adjustment values on the path and then perform segmented statistics according to structural units, and output a set of structured fusion update weight reorganization. S43: Based on the residual fusion update weight reorganization, the output data after node fusion weight is collected using the residual network, the error change is calculated according to the node index order and the sign direction is recorded, the nodes with continuous error offset trend are extracted and their positions are marked, the connection path is constructed with the error offset direction, the weight feedback value is allocated to the corresponding node index along the path, the connection structure set containing node index, error direction and update weight is constructed, and the residual weight feedback structure diagram is obtained.
7. The spectral analysis method based on deep belief networks according to claim 1, characterized in that, The specific steps for generating the spectral response feature output set are as follows: S51: Based on the residual weight feedback structure diagram, extract the numerical weights of the connecting edges between nodes and synchronously read the vector values of the corresponding labels of the nodes. Calculate and perform square sum processing on the coordinate differences between the node output values and label values, generate a list of Euclidean distances, and then arrange them in order according to the node index. Sort the edge traversal results in ascending order of distance, select the target node output value index position corresponding to the edge with the smallest error, and generate the mapping sequence of the node with the smallest error. S52: Based on the minimum error node mapping sequence, extract the numerical position of the target node in the output structure and store the corresponding vector value. Establish a number mapping table according to the index order and initialize the buffer. Fill the output value of all target nodes into the buffer and record the position index. Set the frozen mark status for each output value and update the numbering relationship. Combine the nodes in order to form an ordered vector set and obtain the frozen node output buffer set. S53: Based on the frozen node output cache set, read the current output value of the marked node and the error record value to calculate the absolute difference, set the error difference threshold as the screening criterion, determine whether the node meets the freezing condition and register the node position, generate a Boolean mark matrix according to the node number order, combine all the nodes that meet the conditions into a two-dimensional index array, and generate a spectral response feature output set.
8. A spectral analysis system based on deep belief networks, characterized in that, The system is used to perform the spectral analysis method based on deep belief networks as described in any one of claims 1-7, the system comprising: Channel difference construction module: Based on the spectral matrix channel sequence, triplet is constructed sequentially for each group of three channels. The maximum and minimum values in each triplet are extracted and the difference is calculated to form a difference vector. The difference vectors are grouped into ten groups and the mean is taken. The new spectral channel group sequence is reconstructed and mapped. At the same time, all difference vectors are merged and the mean difference of each group is calculated. The mean of each group is extracted and the average response group is constructed to establish the channel difference structure set. Signal feature extraction module: Based on the channel difference structure set, a three-layer neural node structure is built using a deep belief network. The standard deviation of the channel difference vector is calculated column by column. The column with the largest standard deviation is extracted to construct the input value vector, which is then input into the input layer of the deep belief network. The number of nodes in the input layer is set to be the number of channels, the number of nodes in the hidden layer is half the number of input nodes, and the number of nodes in the output layer is the same as the number of input nodes. In the layer-by-layer transmission, the node value difference of each hidden node is calculated and back-accumulated. The spectral response intensity curve is fused, and the difference judgment is performed at the node connection. The back mapping is fused and a multi-layer feature output vector group is generated. Vector embedding construction module: Based on the multi-layer feature output vector group, calculate the pairwise cosine distance of each node vector, arrange the node vector pairs in ascending order of distance value, combine the node input sequence and construct an equal-dimensional space in the vector combination space, set the dimension to be consistent with the original number of nodes, filter the node set that meets the minimum change of distance continuity, extract the node set and reconstruct the output sequence structure, and establish the target mapping embedding matrix; The residual weight feedback module extracts the squared error between the node output value and the label output value based on the target mapping embedding matrix, identifies nodes that exceed the limit, constructs a node association graph, calls the residual network to set the weight of the connection edge, uses additive residual connection between hidden layers, extracts the error direction of the node that exceeds the limit and accumulates the error value, adjusts the weight value of the hidden layer to the residual path direction, merges it into the overall output of the network, and establishes a residual weight feedback structure graph. Output feature generation module: Based on the residual weight feedback structure graph, extract all edge weights and calculate the Euclidean distance between the nodes at both ends of each connection path and the label. Traverse all paths to lock the frozen node with the smallest error. The output value of the frozen node is used as the cached output sequence. Extract the cached sequence nodes and perform error judgment. Construct a freezing matrix. Integrate the freezing matrix with the cached nodes to obtain the spectral response feature output set.
Citation Information
Patent Citations
Hyperspectral image anomaly detection method based on joint extraction of spatial-spectral characteristics
CN109493338A
Remote-sensing image change detection method based on deep convolutional network
WO2024222610A1