An intelligent data storage analysis method based on a graph neural network

CN122507318APending Publication Date: 2026-08-04CHENGDU QUANTUM WORKSHOP INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHENGDU QUANTUM WORKSHOP INFORMATION TECH CO LTD
Filing Date
2026-05-15
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

单纯基于时间戳的判定方法忽略了图数据中隐含的复杂结构关联(如节点出入度差异、多类型边权重分布等)以及深层的拓扑语义特征,导致在执行冷热边界划分时发生热度评估失真,从而限制了固态硬盘与机械硬盘混合存储架构的读写性能

Benefits of technology

(1)本发明通过引入改进GATNE模型与偏心距还原机制,实现了异构关联数据的高维拓扑语义提取与多维权重精准量化表征。类型投影映射层基于关系类别标识执行张量索引映射并融合节点特征,通过前馈神经网络非线性变换生成类型特定边嵌入向量。差异化注意力计算层提取节点出入度差值构建方向数值特征,将方向数值特征与类型特定边嵌入向量逐元素相乘生成动态偏置项并叠加至初始注意力系数进行归一化操作,输出多维注意力权重向量。边权重融合层针对基础边向量计算相对于零点的偏心距数值序列,将多维注意力权重向量转换为等比例数值序列并与偏心距数值序列执行逐元素相乘操作生成单边加权特征向量,遍历所有边进行矩阵化组装生成加权边特征矩阵。该机制通过方向特征动态偏置调节与偏心距数值序列非线性还原,将节点拓扑结构与边类型语义深度耦合至边权重空间,生成了具备高区分度的加权边特征矩阵与带权图数据。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122507318A_ABST
    Figure CN122507318A_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent data storage and analysis method based on graph neural networks, relating to the field of data storage technology. The method includes the following steps: S1, acquiring entity data and relationships to construct a heterogeneous graph topology; S2, by improving the GATNE model, generating multi-dimensional attention weights based on edge type mapping and in-degree direction features, restoring the weighted edge feature matrix using eccentricity, and finally aggregating and outputting weighted graph data; S3, outputting an edge state bitmap; S4, generating hot edge write instructions and cold edge write instructions; S5, returning a physical storage address mapping table; S6, reading data from the corresponding storage medium and returning the query results; S7, outputting a candidate set for elimination; S8, erasing the physical sectors occupied by the candidate set for elimination. This invention overcomes the limitations of traditional methods, such as single-point hotness determination, ignoring topological constraints, and the tendency to mistakenly eliminate high-frequency long-tailed edges, providing an efficient solution for intelligent storage of heterogeneous graph data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data storage technology, and in particular to an intelligent data storage and analysis method based on graph neural networks. Background Technology

[0002] With the explosive growth of heterogeneous relational data, traditional storage systems face severe memory challenges in the hierarchical scheduling and dynamic eviction of massive graph topology data. Existing hierarchical storage algorithms, such as improved LRU caching strategies, while leveraging the principle of temporal locality to enhance data hit efficiency, primarily rely on the most recently accessed timestamp for hotness determination. This timestamp-based approach ignores the complex structural relationships implicit in graph data (such as differences in node in-degree and out-degree, and the weight distribution of various edge types) and deep topological semantic features, leading to distortion in hotness assessment during cold / hot boundary partitioning. This limits the read / write performance of hybrid SSD / HDD storage architectures. Furthermore, traditional storage eviction methods often struggle to fully utilize the attention weight distribution of graph neural networks to dynamically constrain the eviction space, resulting in the "false positive" deletion of high-frequency long-tail edges when cleaning up cold edge data. This disrupts the connectivity integrity of the heterogeneous graph topology in the cache layer and increases the computational overhead of physical sector erasure and graph reconstruction.

[0003] Therefore, how to provide an intelligent data storage and analysis method based on graph neural networks is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] This invention proposes an intelligent data storage and analysis method based on graph neural networks. It generates weighted graph data by aggregating data using an improved GATNE model, extracts adaptive hotness boundaries based on the minimum points of the probability density function to divide hot and cold edge states, and outputs an edge state bitmap. Combining SSD channel characteristics and HDD seek spans, write instructions are generated to layer the graph data onto the hybrid storage medium. When the remaining space triggers a dynamic safety level, a candidate set for data eviction is selected based on the read count and positive deviation of the residence time. Logical deletion of the mapping table, memory state cleanup, and graph topology pointer severance are then performed sequentially, ultimately erasing physical sectors to complete safe data reclamation. This mechanism establishes a full-link processing path from "graph neural network semantic aggregation" to "multi-dimensional adaptive hot and cold layering" and then to "multi-dimensional feature joint safe eviction," effectively eliminating the heat assessment distortion caused by traditional temporal locality strategies. It ensures that the hybrid storage architecture can dynamically maintain the high-order topological semantic features of the graph data and the connectivity integrity of the memory structure, achieving the technical effect of improving the hybrid read / write performance of SSDs and HDDs while ensuring the absolute safety of cold edge data eviction. This invention overcomes the limitations of traditional methods, such as relying on a single heat determination method, ignoring topological constraints, and mistakenly eliminating high-frequency long-tailed edges, providing an efficient solution for intelligent storage of heterogeneous graph data.

[0005] According to an embodiment of the present invention, an intelligent data storage and analysis method based on a graph neural network specifically includes: S1. Obtain entity data and relationships to construct a heterogeneous graph topology, extract node feature vectors and edge types, and write them into the cache layer for temporary storage. S2. Input the data temporarily stored in the cache layer into the improved GATNE model, generate type-specific edge embedding vectors based on edge type mapping, calculate the difference between the in-degree and out-degree of nodes to construct directional features and generate multi-dimensional attention weight vectors, restore the multi-dimensional attention weight vectors to weighted edge feature matrices based on the eccentricity of the edge vectors relative to the zero point, and finally aggregate node features to output weighted graph data. S3. Based on the weighted graph data, extract the attention weight distribution features, dynamically determine the adaptive heat boundary line through statistical feature thresholds, divide the hot edge or cold edge state of each edge, and output the edge state bitmap. S4. Parse the hot and cold state identifiers in the edge state bitmap and generate hot edge write commands and cold edge write commands pointing to the solid-state drive and mechanical hard drive, respectively. S5. In response to the hot edge write command and the cold edge write command, write the corresponding edge type and associated node feature vector to the solid-state drive and the hard disk drive respectively, and return the physical storage address mapping table. S6. Parse the physical storage address mapping table, read data from the corresponding storage medium, and return the query result. If the query hits the cold edge data in the mechanical hard disk, the read count value of the corresponding edge is incremented and updated to the memory shared status table. S7. When the background timer detects that the remaining space is lower than the dynamic safety level, the dwell time is calculated by combining the read count value in the memory shared status table with the current timestamp. Cold edge data with a positive deviation of dwell time from the global mean that exceeds the adaptive tolerance and whose read count value is lower than the frequency distribution dynamic quantile cutoff point are extracted as elimination candidate sets. S8. Erase the physical sectors occupied by the candidate elimination set, cut off the connection pointers according to the corresponding node identifiers, and synchronously update the heterogeneous graph topology in the cache layer.

[0006] Optionally, S1 specifically includes: S11. Collect entity data and extract attribute fields, construct an adaptive vocabulary based on the word frequency statistics of the attribute fields, map the attribute fields into high-dimensional sparse vectors through the adaptive vocabulary, and perform nonlinear dimensionality reduction transformation to output the node feature vectors. S12. Collect the relationship between entity data, extract source nodes, target nodes and interaction tags, generate directed edge indexes based on the source nodes and target nodes, and encapsulate the interaction tags into type enumeration values ​​to output the edge type; S13. Based on the directed edge index, load the node feature vector and the edge type into the memory adjacency table, establish a heterogeneous type constraint matrix according to the type enumeration value, and construct the heterogeneous graph topology based on the heterogeneous type constraint matrix; S14. Scan the free shard capacity of the cache layer, calculate the memory ratio in combination with the node size of the heterogeneous graph topology, dynamically adjust the sharding granularity of the node feature vector and the edge type based on the memory ratio, and write the sharded data into the cache layer for temporary storage.

[0007] Optionally, the improved GATNE model includes a type projection mapping layer, a differential attention calculation layer, an edge weight fusion layer, and a weighted graph aggregation construction layer: The type projection mapping layer is used to parse the edge type to extract the relationship category identifier, perform tensor index mapping in the preset type parameter table based on the relationship category identifier to obtain the basic edge vector, concatenate and fuse the basic edge vector with the node feature vector of the adjacent node, perform nonlinear transformation through the feedforward neural network, and output the type-specific edge embedding vector and the basic edge vector. The differential attention calculation layer is used to extract the node feature vectors of adjacent source nodes and the node feature vectors of target nodes, calculate the dot product to generate initial attention coefficients, parse the heterogeneous graph topology to extract the in-degree and out-degree values ​​of target nodes, calculate the in-degree difference to construct directional numerical features, multiply the directional numerical features with the type-specific edge embedding vector element-wise to generate dynamic bias terms, and superimpose the dynamic bias terms onto the initial attention coefficients for normalization, outputting a multidimensional attention weight vector with the same dimension as the type-specific edge embedding vector. The edge weight fusion layer is used to receive the basic edge vector, calculate the eccentricity value sequence of each dimension of the basic edge vector relative to the zero point for each edge, convert the multidimensional attention weight vector into a proportional value sequence of the same length as the eccentricity value sequence, perform element-wise multiplication of the proportional value sequence and the eccentricity value sequence to generate a single-sided weighted feature vector, and traverse all edges in the heterogeneous graph topology to matrix-assemble the single-sided weighted feature vector to generate a weighted edge feature matrix. The weighted graph aggregation construction layer is used to concatenate the weighted edge feature matrix and the node feature vector along the feature dimension to obtain a fused node tensor. The fused node tensor is used as the updated node state, and the weighted edge feature matrix is ​​used as the updated edge weight. The weighted graph data is generated by aggregating the updated node state and the updated edge weight.

[0008] Optionally, S3 specifically includes: S31. Based on the weighted graph data, extract the multidimensional attention weight vectors of all edges, calculate the mean of attention weights along the vector dimension to generate a set of edge weight scalars, and construct a one-dimensional attention weight distribution histogram based on the set of edge weight scalars as the attention weight distribution feature. S32. Based on the attention weight distribution characteristics, calculate the probability density function of the one-dimensional attention weight distribution histogram, perform the first derivative of the probability density function to solve for the coordinates of the minimum point, and map the coordinates of the minimum point back to the set of edge weight scalars to extract the adaptive heat boundary line. S33. Perform a numerical comparison between each edge weight scalar in the edge weight scalar set and the adaptive heat boundary line. Assign a hot edge status identifier to the edge weight scalar that is greater than the adaptive heat boundary line, and assign a cold edge status identifier to the edge weight scalar that is less than or equal to the adaptive heat boundary line, thereby generating an edge status identifier set. S34. Extract the global topological sort index of the edges based on the weighted graph data, perform a key-value alignment and merging operation on the global topological sort index and the edge state identifier set, write the merged data into a two-dimensional Boolean matrix isomorphic to the weighted graph data, and output the edge state bitmap.

[0009] Optionally, S4 specifically includes: S41. Monitor the hardware controller status of the solid-state drive (SSD) and extract the addresses of free physical sectors of the SSD to build a queue of available space on the SSD. S42. Based on the edge state bitmap, perform a two-dimensional Boolean matrix scan to extract all hot edge state identifiers, and perform edge index aggregation on the hot edge state identifiers to generate a hot edge index list; S43. Extract the available space queue of the solid-state drive based on the hot edge index list, analyze the channel distribution characteristics of the physical sector addresses in the available space queue of the solid-state drive to calculate the dynamic write parallelism of the solid-state drive, split the hot edge index list into multiple hot edge parallel write sub-sequences based on the dynamic write parallelism of the solid-state drive, and allocate the physical sector addresses in the available space queue of the solid-state drive to the corresponding hot edge parallel write sub-sequences according to the channel distribution characteristics. S44. Based on the edge state bitmap, perform a two-dimensional Boolean matrix scan to extract all cold edge state identifiers, and perform edge index aggregation on the cold edge state identifiers to generate a cold edge index list; S45. Monitor the hardware controller status of the hard disk drive, extract the address of the free physical block of the hard disk drive to construct the available block list of the hard disk drive, extract the available block list of the hard disk drive based on the cold edge index list, extract the adjacent physical block addresses in the available block list of the hard disk drive to calculate the continuous seek span, and perform block-level rearrangement on the cold edge index list based on the continuous seek span to generate a cold edge sequential write sequence. S46. Encapsulate the hot-edge parallel write subsequence into a hot-edge write instruction containing the physical sector address of the solid-state drive, and encapsulate the cold-edge sequential write sequence into a cold-edge write instruction containing the physical block address of the mechanical hard drive.

[0010] Optionally, S5 specifically includes: S51. Parse the hot edge write instruction to extract the hot edge parallel write subsequence, extract the corresponding edge type and associated node feature vector from memory based on the hot edge parallel write subsequence and assemble them into a hot edge data block, distribute the hot edge data block to multiple physical channels of the solid-state drive to perform concurrent write operations, and extract the solid-state drive physical sector address based on the completion status of the concurrent write operation to generate a hot edge storage mapping entry. S52. Parse the cold edge write instruction to extract the cold edge sequential write sequence, extract the corresponding edge type and associated node feature vector from memory based on the cold edge sequential write sequence and assemble them into a cold edge data block, submit the cold edge data block to the disk controller of the mechanical hard disk to perform a sequential disk write operation, and extract the physical block address of the mechanical hard disk based on the completion status of the sequential disk write operation to generate a cold edge storage mapping entry. S53. Perform primary key alignment and merging on the hot edge storage mapping entry and the cold edge storage mapping entry, write the merged data into a global hash table, and output the physical storage address mapping table.

[0011] Optionally, S6 specifically includes: S61. Parse the physical storage address mapping table to extract the edge logical index and the corresponding physical storage address and storage medium identifier, and perform media routing judgment based on the storage medium identifier; S62. If it is determined to be a solid-state drive type, then initiate a concurrent read operation to the solid-state drive multi-channel based on the physical storage address, and extract the edge type and node feature vector returned by the concurrent read operation to assemble the solid-state drive query result. S63. If the type is determined to be a mechanical hard drive, a sequential read instruction is issued to the mechanical hard drive controller based on the physical storage address. The edge type and node feature vector returned by the sequential read instruction are extracted and assembled into a mechanical hard drive query result. At the same time, it is checked whether the memory shared state table has been initialized. If it has not been initialized, contiguous space is allocated in memory to construct a memory shared state table with the edge logical index as the primary key and containing a read count field, an initial write timestamp field, and a latest access timestamp field. After construction, the memory shared state table is retrieved using the edge logical index as the query key. If the search is successful, the historical read count value is extracted and incremented to generate the current read count value. The current system timestamp is obtained and the latest access timestamp field is updated. If the search is unsuccessful, the read count value is initialized to one as the current read count value. The current system timestamp is obtained and synchronously filled into the initial write timestamp field and the latest access timestamp field. The edge logical index, the current read count value, and the updated timestamp data are written into the memory shared state table to perform a state update.

[0012] Optionally, S7 specifically includes: S71. When the background timer triggers the space detection event, the remaining physical space of the solid-state drive and the mechanical hard drive is extracted and summed to generate the total remaining storage space. The historical write rates of the solid-state drive and the mechanical hard drive are obtained and summed to generate the global aggregated write rate. The total remaining storage space is divided by the global aggregated write rate to output the dynamic safety level. S72. When it is determined that the total remaining storage space is lower than the dynamic safety level, the memory shared status table is traversed to extract the edge logical index, the read count value, the initial write timestamp field and the latest access timestamp field corresponding to each cold edge data, and the current system timestamp is obtained by subtracting the initial write timestamp field and the latest access timestamp field respectively, and the absolute resident difference and the relative idle difference are calculated and generated. S73. Remove the cold edge data with a read count value of one to extract a dynamic active cold edge subset. Sum the absolute dwell time differences in the dynamic active cold edge subset and divide by the total number of data items in the dynamic active cold edge subset to calculate the global dwell time average. Subtract the global dwell time average from the absolute dwell time difference of each cold edge data item to calculate the dwell time positive deviation. S74. Sum the relative idle differences in the dynamic active cold edge subset and divide by the total number of data entries in the dynamic active cold edge subset to generate the global idle time average. Based on the read count values ​​of all cold edge data, perform ascending sorting to extract the bottom quantile values ​​as dynamic quantile reference values. Multiply the dynamic quantile reference values ​​by an adaptive attenuation coefficient that decreases with the system runtime to generate frequency distribution dynamic quantile cutoff points. S75. Extract the edge logic index corresponding to the cold edge data where the dwell time positive deviation is greater than the adaptive tolerance threshold, the relative idle difference is greater than the global idle time average, and the read count value is lower than the frequency distribution dynamic quantile cutoff point, and assemble it to generate an elimination candidate set.

[0013] Optionally, S8 specifically includes: S81. Parse the elimination candidate set to extract the corresponding edge logic index, and locate the target physical storage address by querying the physical storage address mapping table based on the edge logic index. S82. Based on the target physical storage address, perform an entry deletion operation from the physical storage address mapping table, recalculate the total remaining storage space of the solid-state drive and the mechanical hard drive based on the physical storage address mapping table after the entry is deleted, and recalculate and generate a dynamic safety level based on the updated total remaining storage space and the global aggregated write rate. S83. Parse the elimination candidate set to extract the corresponding edge logic index, and based on the edge logic index, search and locate the source node identifier and the target node identifier in the heterogeneous graph topology in the cache layer, and extract the edge pointer connecting the source node identifier and the target node identifier. S84. Based on the edge logical index, perform a record deletion operation in the memory shared state table to release memory space, cut off the edge pointer between the source node identifier and the target node identifier, and re-execute bitmap mapping based on the heterogeneous graph topology after cutting off the edge pointer to generate an updated edge state bitmap. S85. Based on the target physical storage address, issue a sector erase command carrying the target physical storage address to the hard disk controller to reclaim physical sector space.

[0014] The beneficial effects of this invention are: (1) This invention achieves high-dimensional topological semantic extraction and accurate quantitative representation of multidimensional weights for heterogeneous relational data by introducing an improved GATNE model and an eccentricity restoration mechanism. The type projection mapping layer performs tensor index mapping based on relation category identifiers and fuses node features, generating type-specific edge embedding vectors through nonlinear transformation of a feedforward neural network. The differential attention calculation layer extracts the difference between node in-degree and out-degree to construct directional numerical features, multiplies the directional numerical features with the type-specific edge embedding vectors element-wise to generate dynamic bias terms, and adds them to the initial attention coefficients for normalization, outputting a multidimensional attention weight vector. The edge weight fusion layer calculates the eccentricity numerical sequence relative to the zero point for the basic edge vectors, converts the multidimensional attention weight vectors into proportional numerical sequences, performs element-wise multiplication with the eccentricity numerical sequence to generate a single-edge weighted feature vector, and traverses all edges for matrix assembly to generate a weighted edge feature matrix. This mechanism, through dynamic bias adjustment of directional features and nonlinear restoration of the eccentricity numerical sequence, deeply couples the node topology and edge type semantics to the edge weight space, generating a weighted edge feature matrix and weighted graph data with high discriminative power.

[0015] (2) This invention achieves adaptive hot and cold layered scheduling of graph data streams and efficient and accurate reclamation of physical sector space by constructing a probability density function minimum point location mechanism and a multi-dimensional feature joint security elimination path. Based on the attention weight distribution characteristics extracted from weighted graph data, a one-dimensional attention weight distribution histogram is constructed. The first derivative of the probability density function is used to solve for the coordinates of the minimum point and extract the adaptive heat boundary line. Based on the adaptive heat boundary line, the hot and cold states of the edges are divided and the edge state bitmap is output. Combining the channel distribution characteristics of solid-state drives and the continuous seek span of mechanical hard drives, hot edge parallel write instructions and cold edge sequential write instructions are generated respectively, and the graph data is written to the hybrid storage medium in layers. When the remaining space triggers the dynamic safety level, the absolute residence difference, relative idle difference and residence duration positive deviation are calculated by combining the read count value and timestamp in the memory shared status table. Combined with the frequency distribution dynamic quantile cutoff point, cold edge data is screened and assembled to generate an elimination candidate set. Based on the candidate set for elimination, the system sequentially performs operations such as deleting entries in the physical storage address mapping table, deleting records in the memory shared state table, and severing the connection pointers of the heterogeneous graph topology. Finally, it issues a sector erase instruction to reclaim physical sector space. This pathway ensures the ultimate release of read and write performance of the hybrid storage architecture and the absolute security of the connectivity integrity of the graph topology by adaptively defining the hierarchical boundary using probability density extrema, jointly constraining the extraction of the candidate set using multi-dimensional time and frequency features, and strictly controlling the timing of logical unbinding followed by physical destruction. Attached Figure Description

[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of an intelligent data storage and analysis method based on graph neural networks proposed in this invention; Figure 2 This is a flowchart illustrating the working principle of the improved GATNE model, which is based on a graph neural network for intelligent data storage and analysis, as proposed in this invention. Detailed Implementation

[0017] The invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0018] refer to Figure 1 and Figure 2 A method for intelligent data storage and analysis based on graph neural networks, specifically including: S1. Obtain entity data and relationships to construct a heterogeneous graph topology, extract node feature vectors and edge types, and write them into the cache layer for temporary storage. S2. Input the data temporarily stored in the cache layer into the improved GATNE model, generate type-specific edge embedding vectors based on edge type mapping, calculate the difference between the in-degree and out-degree of nodes to construct directional features and generate multi-dimensional attention weight vectors, restore the multi-dimensional attention weight vectors to weighted edge feature matrices based on the eccentricity of the edge vectors relative to the zero point, and finally aggregate node features to output weighted graph data. S3. Based on the weighted graph data, extract the attention weight distribution features, dynamically determine the adaptive heat boundary line through statistical feature thresholds, divide the hot edge or cold edge state of each edge, and output the edge state bitmap. S4. Parse the hot and cold state identifiers in the edge state bitmap and generate hot edge write commands and cold edge write commands pointing to the solid-state drive and mechanical hard drive, respectively. S5. In response to the hot edge write command and the cold edge write command, write the corresponding edge type and associated node feature vector to the solid-state drive and the hard disk drive respectively, and return the physical storage address mapping table. S6. Parse the physical storage address mapping table, read data from the corresponding storage medium, and return the query result. If the query hits the cold edge data in the mechanical hard disk, the read count value of the corresponding edge is incremented and updated to the memory shared status table. S7. When the background timer detects that the remaining space is lower than the dynamic safety level, the dwell time is calculated by combining the read count value in the memory shared status table with the current timestamp. Cold edge data with a positive deviation of dwell time from the global mean that exceeds the adaptive tolerance and whose read count value is lower than the frequency distribution dynamic quantile cutoff point are extracted as elimination candidate sets. S8. Erase the physical sectors occupied by the candidate elimination set, cut off the connection pointers according to the corresponding node identifiers, and synchronously update the heterogeneous graph topology in the cache layer.

[0019] In this embodiment, S1 specifically includes: S11. Collect entity data and extract attribute fields. Based on double-round traversal, statistical word frequency is used to remove low-frequency words and construct an adaptive word list. According to the word list index, the attribute fields are mapped to 10,000-dimensional high-dimensional sparse vectors. Input the vectors into a feedforward neural network activated by ReLU and Tanh functions to perform nonlinear dimensionality reduction transformation and output a 16-dimensional node feature vector. S12. Collect entity association relationships to extract source nodes, target nodes and interaction tags. Concatenate the source node and target node identifiers and perform hash mapping to generate directed edge indexes. Match the interaction tags with the preset relationship dictionary to extract category numbers and encapsulate them into edge types in integer form. S13. Initialize the adjacency list in memory and construct a node feature dictionary with node identifier as key and node feature vector as value; traverse the directed edge index to parse out the source node and target node, locate the head of the linked list with the source node, and insert the target node and edge type as attributes into the edge linked list; construct a K-row K-column heterogeneous type constraint matrix to label the legal and illegal interaction combinations, verify and delete illegal edge linked list nodes in the adjacency list based on the matrix, and combine the remaining adjacency list and node feature dictionary into a heterogeneous graph topology; S14. Scan the cache layer to obtain the absolute byte value of the free fragment capacity, calculate the average value of the cache that can be allocated to a single node by combining the total number of nodes in the heterogeneous graph, compare the average value with the benchmark value to dynamically determine the fragmentation adjustment coefficient, calculate the actual fragmentation granularity by combining the basic fragmentation granularity, perform equal-length truncation of the node feature vector and edge type data stream according to the granularity, and write the data block into the cache layer for temporary storage.

[0020] In this embodiment, the improved GATNE model includes a type projection mapping layer, a differential attention calculation layer, an edge weight fusion layer, and a weighted graph aggregation construction layer: The type projection mapping layer is used to parse the edge interaction label to extract the relationship category identifier. Based on the identifier, the 8-dimensional basic edge vector is indexed from the type parameter table. It is then concatenated with the 16-dimensional node feature vectors of the connected source node and target node to form a 40-dimensional fusion vector. The input is processed by a feedforward neural network activated by ReLU and Tanh functions to perform nonlinear mapping, and the output is an 8-dimensional type-specific edge embedding vector. The differential attention computation layer calculates the element-wise product of the 16-dimensional feature vectors of the source and target nodes and divides it by 4 to generate a 16-dimensional initial attention coefficient vector. It then parses the heterogeneous graph topology to calculate the difference between the out-degree and in-degree and multiplies it by a scaling factor of 0.1 to generate a scalar direction feature. This feature is then multiplied element-wise with an 8-dimensional type-specific edge embedding vector to obtain an 8-dimensional dynamic bias term. After being projected to 16 dimensions by an 8x16 matrix, this term is added element-wise to the initial attention coefficient vector to generate a 16-dimensional superposition coefficient vector. Finally, the absolute value of this superposition coefficient vector is extracted, summed, and normalized by division to output a multi-dimensional attention weight vector with a dimension of 1x16 and a sum of 1 for all elements. The edge weight fusion layer is used to calculate the absolute value of each dimension of the 8-dimensional basic edge vector relative to the zero point to generate an 8-dimensional eccentricity sequence. The 16-dimensional multidimensional attention weight vector is projected through a 16-row 8-column dimensionality reduction matrix and the mean is removed to generate an 8-dimensional proportional sequence. The eccentricity sequence and the proportional sequence are multiplied element-wise to generate a 1-row 8-column single-sided weighted feature vector. Traverse all edges of the heterogeneous graph and stack the single-edge weighted feature vectors of each edge row by row according to the global index to form an N-row 8-column weighted edge feature matrix; The weighted graph aggregation construction layer is used to extract 16-dimensional feature vectors of N target nodes based on edge indices and stack them into an N-row 16-column matrix. This matrix is ​​then concatenated with an N-row 8-column weighted edge feature matrix in the column dimension to generate an N-row 24-column joint feature matrix of edge nodes. For each target node, the 24-column fusion vector corresponding to its associated edges is extracted, and the row mean is calculated to generate an edge message aggregation vector. At the same time, the original 16-dimensional features of the node are mapped to self-link node feature vectors through a 16-row 24-column matrix. The two are then added element by element to generate an updated node state in a 1-row 24-column matrix. This process is repeated for all nodes to generate a node state matrix. Finally, the node state matrix and the aforementioned N-row 8-column weighted edge feature matrix are packaged into a dictionary structure to output the weighted graph data.

[0021] The improved GATNE model proposed in this step is similar to the traditional GATNE model in that it is based on heterogeneous graph representation learning and edge type semantic aggregation theory. That is, it projects features by mapping heterogeneous relations to independent subspaces, uses attention mechanism to calculate the interaction weights between nodes and edges to capture the topological dependency rules of complex networks, and uses feature splicing and aggregation operations to update the hidden state representation of nodes.

[0022] The difference lies in that this invention breaks the limitation of the traditional GATNE model, which relies solely on static semantic similarity for attention allocation while ignoring the physical constraints of graph structure orientation. It adds a differential orientation feature calculation step to extract the in-degree difference and replaces the traditional fixed scalar weighting with an element-wise multiplication mechanism of the eccentricity numerical sequence. The eccentricity of the basic edge vector relative to the zero point is used as the spatial dynamic restoration benchmark to perform nonlinear scaling transformation. Finally, the edge weights and node states are updated based on the weighted edge feature matrix after eccentricity restoration, rather than directly multiplying the edge vector by a single semantic attention coefficient.

[0023] The beneficial effects of the improvements are that, by introducing directional bias and restoring the eccentricity mechanism, the directional constraints of the topological structure are forcibly embedded into the generation process of edge weights. This breaks the limitations of traditional methods that easily lead to semantic flow ambiguity and weight representation distortion when processing asymmetric directed graphs, and achieves a precise conversion from soft matching based on semantic similarity to strong constraints based on topological direction and spatial eccentricity. This design significantly enhances the ability to distinguish the differences in features of heterogeneous long-tailed edges, and can accurately restore the true importance of edges in multi-dimensional numerical space. Combined with weighted graph aggregation construction, it effectively improves the state awareness granularity and the absolute connectivity security of the underlying physical topology in cold and hot hierarchical storage of graph data.

[0024] In this embodiment, S3 specifically includes: S31. Extract the 16-dimensional multidimensional attention weight vectors of all edges in the weighted graph data, calculate the arithmetic mean of the elements within each vector to generate a one-dimensional edge weight scalar set, calculate the step size based on the extreme value difference of this set and the set of 50 partition intervals, and generate a one-dimensional attention weight distribution histogram by counting the scalar frequency in each interval. S32. Construct a first-order difference array based on the frequency of the vertical coordinate of the histogram. Locate the minimum index that satisfies the condition of turning from negative to positive by traversing the first 48 elements. Extract the mean of the horizontal coordinate of the corresponding interval based on the index as the coordinate of the minimum point. Find the scalar with the smallest absolute difference from the coordinate in the set of edge weight scalars and set it as the adaptive heat boundary. S33. Perform a difference comparison between each scalar in the set of edge weight scalars and the adaptive heat boundary line. Assign a Boolean value True as a hot edge status identifier for scalars with a difference greater than 0, and assign a Boolean value False as a cold edge status identifier for scalars with a difference less than or equal to 0. Generate an edge status identifier set in order. S34. Extract the global topological sort index of the edges in the weighted graph data, count the total number of edges N and initialize an N-row, 1-column two-dimensional Boolean matrix. Use the integer value of the global topological sort index as the row index, extract the corresponding Boolean value from the edge state identifier set and write it into the corresponding position in the matrix to complete the replacement, and output the edge state bitmap.

[0025] The adaptive heat boundary extraction process proposed in this step is similar to the traditional graph data caching layering mechanism in that it is based on the theory of edge weight feature evaluation and state space partitioning. That is, by projecting the multi-dimensional representation vector of graph edges onto the scalar space for importance quantification calculation, the weight value sorting mechanism is used to capture the activity distribution pattern of edges, and a threshold comparison operation is used to map continuous weight scalars into discrete hot and cold binary state identifiers.

[0026] The difference lies in that this invention breaks through the limitations of traditional fixed empirical threshold division or pure LRU time-driven ignoring the inherent clustering characteristics of graph data. It adds a probability density estimation step to extract the distribution characteristics of attention weights, and replaces the traditional static threshold calibration with a mechanism for locating the minimum point of the first derivative of the probability density function. It maps the mean of multidimensional attention weights to a one-dimensional histogram to perform density extremum solving to extract adaptive heat boundaries. Finally, it combines the coordinates of the minimum point with the global topological sorting index to output the edge state bitmap, rather than a single manual empirical threshold comparison.

[0027] The beneficial effects of the improvements are that, by using density estimation and derivative extremum location, the natural clustering distribution characteristics of graph data are rigidly embedded into the hot and cold boundary delineation process. This breaks the limitation of traditional methods that are prone to hierarchical boundary mismatch when facing business cycle fluctuations or long-tail distributions, and realizes the accurate transformation from static empirical truncation to data-driven adaptive delineation. This design significantly enhances the ability to perceive the dynamic evolution of graph networks, and can accurately capture hot and cold data faults at the natural valley of probability density. Combined with topology index-aligned bitmap mapping, it effectively improves the objective accuracy of heterogeneous edge hot and cold status identification and the ultimate rationality of subsequent hybrid storage scheduling.

[0028] In this embodiment, S4 specifically includes: S41. Send a status query command to the hardware controller of the solid-state drive, parse the returned SMART self-monitoring analysis report data, extract the starting logical block address of the physical sector with the status flag bit as free, arrange all the extracted starting logical block addresses of the free physical sector in ascending order of address value from smallest to largest, and build a first-in-first-out solid-state drive available space queue. S42. Parse the N-row, 1-column two-dimensional Boolean matrix in the edge state bitmap, traverse the matrix elements row by row, extract all row indices corresponding to the Boolean value True as hot edge indices and arrange them in the original row position order to generate a hot edge index list. At the same time, extract all row indices corresponding to the Boolean value False as cold edge indices and arrange them in the original row position order to generate a cold edge index list. S43. Parse the channel number field in the starting logical block address of all physical sectors in the available space queue of the solid-state drive (SSD), and set the sum of the frequencies of different channel numbers as the dynamic write parallelism of the SSD; initialize a blank subsequence pool with a quantity equal to this dynamic write parallelism, traverse the physical sector addresses in the available space queue of the SSD, calculate the remainder of the modulo operation of its channel number field with respect to the dynamic write parallelism as the channel index, and append the current physical sector address to the blank subsequence of the corresponding index to complete the channel isolation of the physical address; then traverse the hot edge index list, and allocate the hot edge indexes in turn to each subsequence that has completed channel isolation in order, so that each hot edge index and the physical sector address of the corresponding channel form a one-to-one pair within the subsequence, and output the paired hot edge parallel write subsequence; S45. Send a status query command to the hardware controller of the hard disk drive, parse the returned register status word to extract the free flag bit, and map the combination of the starting cylinder number and head number of the available physical block to the physical block address. Sort all physical block addresses in ascending order from near to far by seek distance to construct a bidirectional hard disk drive available block linked list. Traverse the bidirectional hard disk drive available block linked list, calculate the absolute value difference of the cylinder number of adjacent nodes to verify that the linked list has been sorted in ascending order by seek span. Extract physical block addresses in the order of linked list nodes, and bind the cold edge index in the cold edge index list to the extracted physical block address one-to-one in sequence to generate a cold edge sequential write sequence with ordered physical block addresses. S46. Traverse all hot-edge parallel write subsequences, extract the one-to-one pairing hot-edge index and physical sector address in the subsequence, use the physical sector address as the target write address and the hot-edge index as the write data payload, add command identifier and check code according to the data frame format of the solid-state drive NVMe protocol, and encapsulate to generate hot-edge write instructions; traverse the cold-edge sequential write sequence, extract the one-to-one binding cold-edge index and physical block address in the sequence, use the physical block address as the target write address and the cold-edge index as the write data payload, add command identifier and check code according to the data frame format of the mechanical hard drive SATA protocol, and encapsulate to generate cold-edge write instructions.

[0029] In this embodiment, S5 specifically includes: S51. Parse the hot edge write instruction to extract the hot edge parallel write subsequence, use the hot edge index in the subsequence as the key to extract the corresponding edge type and node feature vector from memory and assemble them into a hot edge data block, combine the bound physical sector address to distribute to the corresponding channel of the solid-state drive to perform concurrent writing, and extract the confirmed physical sector address and hot edge index based on the interrupt signal of writing completion to construct a hot edge storage mapping entry. S52. Parse the cold edge write instruction to extract the cold edge sequential write sequence. Use the cold edge index in the sequence as the key to extract the corresponding edge type and node feature vector from memory and assemble them into a cold edge data block. Combine the bound physical block address and submit it to the mechanical hard disk in the cylinder and head increment order to execute the disk write. Based on the register status after the write is completed, extract the confirmed physical block address and cold edge index to construct a cold edge storage mapping entry. S53. Using the hot edge index and cold edge index as a combined primary key, the hot edge storage mapping entries and cold edge storage mapping entries are aligned and merged in ascending order of the primary key to generate a mixed address mapping sequence. The index in the sequence is used as the hash key and the physical address is used as the hash value to write into the global hash table, and the physical storage address mapping table is output.

[0030] In this embodiment, S6 specifically includes: S61. Based on the graph data query request, parse the physical storage address mapping table, extract the target hash bucket node from the global hash table, obtain the edge logical index corresponding to the hash key, and the physical storage address and storage medium identifier field contained in the hash value. Input the storage medium identifier field into the preset media route distributor to perform the routing judgment of the storage medium type. S62. If the media routing distributor determines that the storage medium is identified as a solid-state drive (SSD), it parses the corresponding physical storage address to extract the channel number field. Based on the channel number field, it initiates concurrent read requests to multiple physical channels of the SSD through the PCIe bus. It listens for interrupt signals returned by the hardware controller in real time. When the interrupt signal carries a data ready flag, it reads the returned continuous data frames from the hardware cache of the SSD controller. It performs unpacking operations on the continuous data frames to extract the edge type data field, the source node feature vector, and the target node feature vector. It combines the three extracted fields to construct the SSD query result. S63. If the media routing distributor determines that the storage medium is a mechanical hard drive, it parses the corresponding physical storage address to extract the cylinder number and head number. Based on the cylinder number and head number, it generates a sequential read instruction in SATA protocol format and sends it to the hard drive's disk controller. The head sequentially seeks and reads data according to the cylinder number and head number. After the status word in the monitoring register is read, it extracts the return data frame from the disk controller cache and unpacks it to obtain the edge type data field, source node feature vector, and target node feature vector. It combines the three extracted fields to construct the hard drive query result. While assembling the hard drive query result, it checks whether there is a shared memory state table with allocated memory blocks in memory. If the pointer of the shared memory state table is null, it is determined that it is uninitialized. Then, it calls the operating system's memory allocation function to request contiguous physical memory space and sets the edge logic. The index is used as the primary key column, and read count, initial write timestamp, and latest access timestamp fields are created as data columns to complete the construction of the shared memory state table. Then, the currently obtained edge logical index is used as the query condition to perform a primary key search on the shared memory state table. If the primary key search is successful, the corresponding data row is located, the value of the historical read count field is read and incremented to generate the current read count value, and the current system timestamp is obtained to overwrite and replace the latest access timestamp field. If the primary key search is unsuccessful, a new data record is added to the shared memory state table, the read count field is set to one as the current read count value, and the current system timestamp is obtained and synchronously written to the initial write timestamp and latest access timestamp fields. Finally, the edge logical index, the current read count value, and the updated timestamp data are merged and written to the shared memory state table to complete the state update.

[0031] In this embodiment, S7 specifically includes: S71. When the background timer triggers the space detection event, extract the remaining physical space of the solid-state drive and the mechanical hard drive and sum them to generate the total remaining storage space. Obtain the historical write rate of the solid-state drive and the mechanical hard drive and sum them to generate the global aggregated write rate. Divide the total remaining storage space by the global aggregated write rate to output the dynamic safety level. S72. When the total remaining storage space is determined to be lower than the dynamic safety level, traverse the memory shared status table to extract the edge logical index, read count value, initial write timestamp field and latest access timestamp field corresponding to each cold edge data, obtain the current system timestamp and subtract the initial write timestamp field and the latest access timestamp field respectively, and calculate and generate the absolute resident difference and the relative idle difference. S73. Remove cold edge data with a read count value of one to extract a dynamic active cold edge subset. Sum the absolute dwell time differences in the dynamic active cold edge subset and divide by the total number of data items in the dynamic active cold edge subset to calculate the global dwell time average. Subtract the global dwell time average from the absolute dwell time difference of each cold edge data item to calculate the dwell time positive deviation. S74. Sum the relative idle differences in the dynamic active cold edge subset and divide by the total number of data entries in the dynamic active cold edge subset to generate the global idle time average. Based on the read count values ​​of all cold edge data, perform ascending sorting to extract the bottom quantile values ​​as dynamic quantile reference values. Multiply the dynamic quantile reference values ​​by an adaptive attenuation coefficient that decreases with the system runtime to generate the frequency distribution dynamic quantile cutoff point. S75. Extract the edge logic index corresponding to the cold edge data whose dwell time deviation is greater than the adaptive tolerance threshold, whose relative idle time difference is greater than the global idle time average, and whose read count value is lower than the frequency distribution dynamic quantile cutoff point, and assemble them to generate the elimination candidate set.

[0032] The multi-dimensional feature joint elimination candidate set extraction process proposed in this step is similar to the traditional storage space garbage collection mechanism in that it is based on the capacity level monitoring and elimination priority ranking theory. That is, it triggers the judgment by mapping the remaining space of the underlying physical medium to a safety warning threshold, uses the attribute field extraction mechanism of historical state records to capture the life cycle pattern of a single data, and uses multi-dimensional condition joint filtering to aggregate cold data that meet the features into a set to be recycled.

[0033] The difference lies in that this invention breaks through the limitations of traditional pure time decay or single frequency statistics that ignore the long-tail correlation characteristics of graph topology. It adds a dynamic active cold edge subset filtering step to remove zero-access dead data, and replaces the traditional linear integral elimination with a cross-constraint mechanism of positive time deviation and quantile truncation. It maps the absolute residence difference to the global mean deviation and the read count to a dynamic quantile truncation point that decays with the runtime to perform multi-dimensional rigorous cross-filtering. Finally, it combines the positive deviation of the time dimension, the mean comparison of the idle dimension, and the truncation of the frequency dimension to filter and output the elimination candidate set, rather than a single least recently used strategy for sorting.

[0034] The beneficial effects of the improvements are that, through mean deviation calculation and dynamic quantile truncation, the spatiotemporal multi-dimensional correlation constraints of graph data are rigidly embedded into the elimination judgment process. This breaks the limitation of traditional methods, which are prone to mistakenly killing and trunculating key topological pointers when dealing with long-tailed high-frequency access edges. It achieves a precise transformation from passive expiration of single elements to strong spatiotemporal frequency three-dimensional constraint cross-defense. This design significantly enhances the defense capability against the false active state of cold edges and sudden scanning disturbances. It can accurately lock high-cost and low-value redundant edges in the statistical deviation space. Combined with adaptive decay quantile fusion, it effectively improves the absolute security of heterogeneous graph topological connectivity and the extreme robustness of hybrid storage space reclamation.

[0035] In this embodiment, S8 specifically includes: S81. Parse the elimination candidate set to extract the corresponding edge logic index, and locate the target physical storage address by querying the physical storage address mapping table based on the edge logic index. S82. Perform an entry deletion operation from the physical storage address mapping table based on the target physical storage address. Recalculate the total remaining storage space of the solid-state drive and mechanical hard drive based on the physical storage address mapping table after the entry is deleted. Recalculate and generate a dynamic safety level based on the updated total remaining storage space and the global aggregate write rate. S83. Parse the candidate set of eliminations to extract the corresponding edge logical index. Based on the edge logical index, search and locate the source node identifier and the target node identifier in the heterogeneous graph topology in the cache layer, and extract the edge pointer connecting the source node identifier and the target node identifier. S84. Based on the edge logical index, perform a record deletion operation in the memory shared state table to release memory space, cut off the edge pointer between the source node identifier and the target node identifier, and re-execute bitmap mapping based on the heterogeneous graph topology after cutting off the edge pointer to generate an updated edge state bitmap. S85: Based on the target physical storage address, issue a sector erase command carrying the target physical storage address to the hard disk controller to reclaim physical sector space.

[0036] Example 1: To verify the feasibility of this invention in social network graph data management, the method of this invention was applied to the intelligent storage and query system for massive user relationship graphs of a large internet technology company (hereinafter referred to as "Company Q"). In traditional graph data storage systems, cache eviction and hot / cold tiering strategies based on static rules or recent access timestamps are commonly used. These methods not only struggle to accurately assess the true activity level of edges in heterogeneous relationship networks, but also fail to combine graph topological features with multidimensional temporal semantics for refined eviction, easily leading to solid-state drive resources being occupied by low-value long-tail edges or the accidental deletion of high-frequency associated edges, thus disrupting graph connectivity. To solve the above problems, Company Q decided to adopt the intelligent data storage and analysis method based on graph neural networks proposed in this invention.

[0037] During implementation, Company Q first utilized a distributed log collection component to acquire user entity attribute data and interaction relationships such as follows, likes, and comments within the platform. After constructing an adaptive vocabulary through word frequency statistics and performing nonlinear dimensionality reduction transformation, high-dimensional sparse node feature vectors were generated. Simultaneously, source nodes, target nodes, and interaction tags from the relationships were extracted, encapsulated as type enumeration values, and output as edge types. Based on directed edge indexes, the node feature vectors and edge types were loaded into an in-memory adjacency list, constructing a heterogeneous graph topology structure and temporarily storing it in a high-speed cache layer. Company Q's data engineering team performed precise node attribute cleaning and edge type enumeration and labeling on the collected multi-source graph data, serving as the benchmark for model input and storage scheduling.

[0038] Company Q improves the GATNE model by parsing edge types to extract relationship category identifiers and performing tensor index mapping in a pre-defined type parameter table to obtain basic edge vectors. These basic edge vectors are then concatenated and fused with the node feature vectors of adjacent nodes, and a nonlinear transformation is performed through a feedforward neural network to output type-specific edge embedding vectors. Next, a differential attention calculation layer extracts the node feature vectors of adjacent nodes, calculates the dot product to generate initial attention coefficients, parses the heterogeneous graph topology, calculates the in-degree difference of the target node to construct directional numerical features, and multiplies these directional numerical features element-wise with the type-specific edge embedding vectors to generate dynamic bias terms. These are then superimposed on the initial attention coefficients and normalized to output a multidimensional attention weight vector. Subsequently, an edge weight fusion layer calculates the eccentricity sequence of each dimension of the basic edge vector relative to zero, converts the multidimensional attention weight vector into a proportionally proportional sequence, performs element-wise multiplication to generate a single-edge weighted feature vector, and assembles it into a matrix. Finally, a weighted graph aggregation construction layer concatenates the node feature vectors to output weighted graph data.

[0039] In the core layering and storage phase, this invention extracts attention weight distribution features from weighted graph data to construct a one-dimensional attention weight distribution histogram. It then calculates the coordinates of the minimum point by performing a first-order derivative on the probability density function, extracts an adaptive heat boundary, and classifies edges into hot and cold states based on this boundary, outputting an edge state bitmap. The edge state bitmap is analyzed, and combined with the SSD channel distribution features and the HDD continuous seek span, to generate parallel write instructions for hot edges and sequential write instructions for cold edges. The corresponding edge types and associated node feature vectors are written to the SSD and HDD respectively, returning a physical storage address mapping table. When a query hits cold edge data in the HDD, the read count value of the corresponding edge is incremented and updated in the shared memory state table. When the background timer detects that the remaining space is lower than the dynamic safety level, it calculates the dwell time by combining the read count value in the memory shared status table with the current timestamp. It extracts cold edge data whose positive deviation from the global mean of dwell time exceeds the adaptive tolerance and whose read count value is lower than the frequency distribution dynamic quantile cutoff point as the elimination candidate set. It then erases the physical sectors occupied by the candidate set and cuts off the connection pointer to synchronously update the heterogeneous graph topology.

[0040] During implementation, the technical team at Company Q discovered that, compared to traditional timestamp caching eviction and conventional hierarchical storage methods, the method of this invention significantly improves the accuracy of hot and cold layer boundary delineation for graph data and the read / write efficiency of the underlying physical storage. Traditional methods cannot perceive the topological semantics of the graph structure and have a high false positive rate for eviction of long-tailed, high-frequency edges. In contrast, the method of this invention effectively achieves intelligent layering and secure eviction and recycling of heterogeneous graph data through graph neural network attention weight adaptive bounding, multi-dimensional time and frequency feature joint constraint eviction candidate set extraction, and strict time-series control of logical unbinding followed by physical destruction.

[0041] To further verify the actual performance of the method of the present invention, Company Q conducted a detailed comparative test between the method of the present invention and the traditional method. The specific performance data is shown in Table 1: Table 1 Performance Comparison of Company Q User Relationship Graph Intelligent Storage Method

[0042] As shown in Table 1, the performance of the intelligent storage system for user relationship graphs was comprehensively improved after applying the method of this invention. The accuracy of hot and cold edge classification increased from 75.2% in the traditional method to 93.6%, and the average latency of hot edge queries decreased from 12.5 milliseconds to 2.1 milliseconds, significantly improving the accuracy and response speed of reading highly active relationship data and providing reliable assurance for upper-layer social recommendation services. The false deletion rate of high-frequency long-tail edges decreased from 8.5% to 0.4%, effectively avoiding the damage to graph network connectivity caused by eviction operations. The physical sector space reclamation rate increased from 65.0% to 94.5%, and the number of isolated graph structures caused by eviction decreased from 45.0 per 10,000 times to 1.2 per 10,000 times, significantly enhancing the system's space utilization efficiency and topological integrity. In addition, the lifetime loss of hybrid storage media decreased from 15.0% to 6.5%, and the storage operation and maintenance labor cost decreased from RMB 1.2 million per year to RMB 450,000 per year, significantly reducing the wear and tear of underlying hardware and operation and maintenance expenses. The completeness of global topology queries has also been significantly improved, increasing from 88.0% to 99.8%.

[0043] Through the method of this invention, Company Q has successfully achieved high-precision hot and cold sensing and topology security elimination of massive heterogeneous graph data, effectively reducing the risk of invalid write amplification and hardware wear in the underlying physical storage, ensuring the topology consistency of the graph database under complex concurrent queries, significantly improving the intelligence and refinement of social network relationship graph storage scheduling, significantly reducing the capacity management burden of the underlying operation and maintenance personnel, enhancing the stability and robustness of the hybrid storage architecture, and providing strong technical support for ultra-large-scale graph data infrastructure.

[0044] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for intelligent data storage and analysis based on graph neural networks, characterized in that, Includes the following steps: S1. Obtain entity data and relationships to construct a heterogeneous graph topology, extract node feature vectors and edge types, and write them into the cache layer for temporary storage. S2. Input the data temporarily stored in the cache layer into the improved GATNE model, generate type-specific edge embedding vectors based on edge type mapping, calculate the difference between the in-degree and out-degree of nodes to construct directional features and generate multi-dimensional attention weight vectors, restore the multi-dimensional attention weight vectors to weighted edge feature matrices based on the eccentricity of the edge vectors relative to the zero point, and finally aggregate node features to output weighted graph data. S3. Based on the weighted graph data, extract the attention weight distribution features, dynamically determine the adaptive heat boundary line through statistical feature thresholds, divide the hot edge or cold edge state of each edge, and output the edge state bitmap. S4. Parse the hot and cold state identifiers in the edge state bitmap and generate hot edge write commands and cold edge write commands pointing to the solid-state drive and mechanical hard drive, respectively. S5. In response to the hot edge write command and the cold edge write command, write the corresponding edge type and associated node feature vector to the solid-state drive and the hard disk drive respectively, and return the physical storage address mapping table. S6. Parse the physical storage address mapping table, read data from the corresponding storage medium, and return the query result. If the query hits the cold edge data in the mechanical hard disk, the read count value of the corresponding edge is incremented and updated to the memory shared status table. S7. When the background timer detects that the remaining space is lower than the dynamic safety level, the dwell time is calculated by combining the read count value in the memory shared status table with the current timestamp. Cold edge data with a positive deviation of dwell time from the global mean that exceeds the adaptive tolerance and whose read count value is lower than the frequency distribution dynamic quantile cutoff point are extracted as elimination candidate sets. S8. Erase the physical sectors occupied by the candidate elimination set, cut off the connection pointers according to the corresponding node identifiers, and synchronously update the heterogeneous graph topology in the cache layer.

2. The intelligent data storage and analysis method based on graph neural networks according to claim 1, characterized in that, S1 specifically includes: S11. Collect entity data and extract attribute fields, construct an adaptive vocabulary based on the word frequency statistics of the attribute fields, map the attribute fields into high-dimensional sparse vectors through the adaptive vocabulary, and perform nonlinear dimensionality reduction transformation to output the node feature vectors. S12. Collect the relationship between entity data, extract source nodes, target nodes and interaction tags, generate directed edge indexes based on the source nodes and target nodes, and encapsulate the interaction tags into type enumeration values ​​to output the edge type; S13. Based on the directed edge index, load the node feature vector and the edge type into the memory adjacency table, establish a heterogeneous type constraint matrix according to the type enumeration value, and construct the heterogeneous graph topology based on the heterogeneous type constraint matrix; S14. Scan the free shard capacity of the cache layer, calculate the memory ratio in combination with the node size of the heterogeneous graph topology, dynamically adjust the sharding granularity of the node feature vector and the edge type based on the memory ratio, and write the sharded data into the cache layer for temporary storage.

3. The intelligent data storage and analysis method based on graph neural networks according to claim 1, characterized in that, The improved GATNE model includes a type projection mapping layer, a differential attention calculation layer, an edge weight fusion layer, and a weighted graph aggregation construction layer: The type projection mapping layer is used to parse the edge type to extract the relationship category identifier, perform tensor index mapping in the preset type parameter table based on the relationship category identifier to obtain the basic edge vector, concatenate and fuse the basic edge vector with the node feature vector of the adjacent node, perform nonlinear transformation through the feedforward neural network, and output the type-specific edge embedding vector and the basic edge vector. The differential attention calculation layer is used to extract the node feature vectors of adjacent source nodes and the node feature vectors of target nodes, calculate the dot product to generate initial attention coefficients, parse the heterogeneous graph topology to extract the in-degree and out-degree values ​​of target nodes, calculate the in-degree difference to construct directional numerical features, multiply the directional numerical features with the type-specific edge embedding vector element-wise to generate dynamic bias terms, and superimpose the dynamic bias terms onto the initial attention coefficients for normalization, outputting a multidimensional attention weight vector with the same dimension as the type-specific edge embedding vector. The edge weight fusion layer is used to receive the basic edge vector, calculate the eccentricity value sequence of each dimension of the basic edge vector relative to the zero point for each edge, convert the multidimensional attention weight vector into a proportional value sequence of the same length as the eccentricity value sequence, perform element-wise multiplication of the proportional value sequence and the eccentricity value sequence to generate a single-sided weighted feature vector, and traverse all edges in the heterogeneous graph topology to matrix-assemble the single-sided weighted feature vector to generate a weighted edge feature matrix. The weighted graph aggregation construction layer is used to concatenate the weighted edge feature matrix and the node feature vector along the feature dimension to obtain a fused node tensor. The fused node tensor is used as the updated node state, and the weighted edge feature matrix is ​​used as the updated edge weight. The weighted graph data is generated by aggregating the updated node state and the updated edge weight.

4. The intelligent data storage and analysis method based on graph neural networks according to claim 1, characterized in that, S3 specifically includes: S31. Based on the weighted graph data, extract the multidimensional attention weight vectors of all edges, calculate the mean of attention weights along the vector dimension to generate a set of edge weight scalars, and construct a one-dimensional attention weight distribution histogram based on the set of edge weight scalars as the attention weight distribution feature. S32. Based on the attention weight distribution characteristics, calculate the probability density function of the one-dimensional attention weight distribution histogram, perform the first derivative of the probability density function to solve for the coordinates of the minimum point, and map the coordinates of the minimum point back to the set of edge weight scalars to extract the adaptive heat boundary line. S33. Perform a numerical comparison between each edge weight scalar in the edge weight scalar set and the adaptive heat boundary line. Assign a hot edge status identifier to the edge weight scalar that is greater than the adaptive heat boundary line, and assign a cold edge status identifier to the edge weight scalar that is less than or equal to the adaptive heat boundary line, thereby generating an edge status identifier set. S34. Extract the global topological sort index of the edges based on the weighted graph data, perform a key-value alignment and merging operation on the global topological sort index and the edge state identifier set, write the merged data into a two-dimensional Boolean matrix isomorphic to the weighted graph data, and output the edge state bitmap.

5. The intelligent data storage and analysis method based on graph neural networks according to claim 1, characterized in that, S4 specifically includes: S41. Monitor the hardware controller status of the solid-state drive (SSD) and extract the addresses of free physical sectors of the SSD to build a queue of available space on the SSD. S42. Based on the edge state bitmap, perform a two-dimensional Boolean matrix scan to extract all hot edge state identifiers, and perform edge index aggregation on the hot edge state identifiers to generate a hot edge index list; S43. Extract the available space queue of the solid-state drive based on the hot edge index list, analyze the channel distribution characteristics of the physical sector addresses in the available space queue of the solid-state drive to calculate the dynamic write parallelism of the solid-state drive, split the hot edge index list into multiple hot edge parallel write sub-sequences based on the dynamic write parallelism of the solid-state drive, and allocate the physical sector addresses in the available space queue of the solid-state drive to the corresponding hot edge parallel write sub-sequences according to the channel distribution characteristics. S44. Based on the edge state bitmap, perform a two-dimensional Boolean matrix scan to extract all cold edge state identifiers, and perform edge index aggregation on the cold edge state identifiers to generate a cold edge index list; S45. Monitor the hardware controller status of the hard disk drive, extract the address of the free physical block of the hard disk drive to construct the available block list of the hard disk drive, extract the available block list of the hard disk drive based on the cold edge index list, extract the adjacent physical block addresses in the available block list of the hard disk drive to calculate the continuous seek span, and perform block-level rearrangement on the cold edge index list based on the continuous seek span to generate a cold edge sequential write sequence. S46. Encapsulate the hot-edge parallel write subsequence into a hot-edge write instruction containing the physical sector address of the solid-state drive, and encapsulate the cold-edge sequential write sequence into a cold-edge write instruction containing the physical block address of the mechanical hard drive.

6. The intelligent data storage and analysis method based on graph neural networks according to claim 1, characterized in that, S5 specifically includes: S51. Parse the hot edge write instruction to extract the hot edge parallel write subsequence, extract the corresponding edge type and associated node feature vector from memory based on the hot edge parallel write subsequence and assemble them into a hot edge data block, distribute the hot edge data block to multiple physical channels of the solid-state drive to perform concurrent write operations, and extract the solid-state drive physical sector address based on the completion status of the concurrent write operation to generate a hot edge storage mapping entry. S52. Parse the cold edge write instruction to extract the cold edge sequential write sequence, extract the corresponding edge type and associated node feature vector from memory based on the cold edge sequential write sequence and assemble them into a cold edge data block, submit the cold edge data block to the disk controller of the mechanical hard disk to perform a sequential disk write operation, and extract the physical block address of the mechanical hard disk based on the completion status of the sequential disk write operation to generate a cold edge storage mapping entry. S53. Perform primary key alignment and merging on the hot edge storage mapping entry and the cold edge storage mapping entry, write the merged data into a global hash table, and output the physical storage address mapping table.

7. The intelligent data storage and analysis method based on graph neural networks according to claim 1, characterized in that, S6 specifically includes: S61. Parse the physical storage address mapping table to extract the edge logical index and the corresponding physical storage address and storage medium identifier, and perform media routing judgment based on the storage medium identifier; S62. If it is determined to be a solid-state drive type, then initiate a concurrent read operation to the solid-state drive multi-channel based on the physical storage address, and extract the edge type and node feature vector returned by the concurrent read operation to assemble the solid-state drive query result. S63. If the type is determined to be a mechanical hard drive, a sequential read instruction is issued to the mechanical hard drive controller based on the physical storage address. The edge type and node feature vector returned by the sequential read instruction are extracted and assembled into a mechanical hard drive query result. At the same time, it is checked whether the memory shared state table has been initialized. If it has not been initialized, contiguous space is allocated in memory to construct a memory shared state table with the edge logical index as the primary key and containing a read count field, an initial write timestamp field, and a latest access timestamp field. After construction, the memory shared state table is retrieved using the edge logical index as the query key. If the search is successful, the historical read count value is extracted and incremented to generate the current read count value. The current system timestamp is obtained and the latest access timestamp field is updated. If the search is unsuccessful, the read count value is initialized to one as the current read count value. The current system timestamp is obtained and synchronously filled into the initial write timestamp field and the latest access timestamp field. The edge logical index, the current read count value, and the updated timestamp data are written into the memory shared state table to perform a state update.

8. The intelligent data storage and analysis method based on graph neural networks according to claim 1, characterized in that, Specifically, S7 includes: S71. When the background timer triggers the space detection event, the remaining physical space of the solid-state drive and the mechanical hard drive is extracted and summed to generate the total remaining storage space. The historical write rates of the solid-state drive and the mechanical hard drive are obtained and summed to generate the global aggregated write rate. The total remaining storage space is divided by the global aggregated write rate to output the dynamic safety level. S72. When it is determined that the total remaining storage space is lower than the dynamic safety level, the memory shared status table is traversed to extract the edge logical index, the read count value, the initial write timestamp field and the latest access timestamp field corresponding to each cold edge data, and the current system timestamp is obtained by subtracting the initial write timestamp field and the latest access timestamp field respectively, and the absolute resident difference and the relative idle difference are calculated and generated. S73. Remove the cold edge data with a read count value of one to extract a dynamic active cold edge subset. Sum the absolute dwell time differences in the dynamic active cold edge subset and divide by the total number of data items in the dynamic active cold edge subset to calculate the global dwell time average. Subtract the global dwell time average from the absolute dwell time difference of each cold edge data item to calculate the dwell time positive deviation. S74. Sum the relative idle differences in the dynamic active cold edge subset and divide by the total number of data entries in the dynamic active cold edge subset to generate the global idle time average. Based on the read count values ​​of all cold edge data, perform ascending sorting to extract the bottom quantile values ​​as dynamic quantile reference values. Multiply the dynamic quantile reference values ​​by an adaptive attenuation coefficient that decreases with the system runtime to generate frequency distribution dynamic quantile cutoff points. S75. Extract the edge logic index corresponding to the cold edge data where the dwell time positive deviation is greater than the adaptive tolerance threshold, the relative idle difference is greater than the global idle time average, and the read count value is lower than the frequency distribution dynamic quantile cutoff point, and assemble it to generate an elimination candidate set.

9. The intelligent data storage and analysis method based on graph neural networks according to claim 1, characterized in that, S8 specifically includes: S81. Parse the elimination candidate set to extract the corresponding edge logic index, and locate the target physical storage address by querying the physical storage address mapping table based on the edge logic index. S82. Based on the target physical storage address, perform an entry deletion operation from the physical storage address mapping table, recalculate the total remaining storage space of the solid-state drive and the mechanical hard drive based on the physical storage address mapping table after the entry is deleted, and recalculate and generate a dynamic safety level based on the updated total remaining storage space and the global aggregated write rate. S83. Parse the elimination candidate set to extract the corresponding edge logic index, and based on the edge logic index, search and locate the source node identifier and the target node identifier in the heterogeneous graph topology in the cache layer, and extract the edge pointer connecting the source node identifier and the target node identifier. S84. Based on the edge logical index, perform a record deletion operation in the memory shared state table to release memory space, cut off the edge pointer between the source node identifier and the target node identifier, and re-execute bitmap mapping based on the heterogeneous graph topology after cutting off the edge pointer to generate an updated edge state bitmap. S85. Based on the target physical storage address, issue a sector erase command carrying the target physical storage address to the hard disk controller to reclaim physical sector space.