Method for predicting regional demand of aquatic products based on dynamic heterogeneous graph neural network

By constructing a dynamic heterogeneous graph neural network, integrating the static and dynamic features of nodes and edges, and employing an attention mechanism and Transformer structure to optimize the propagation of temporal information, the modeling problem of complex relationships in the regional demand forecasting of aquatic products was solved, and high-precision regional demand forecasting was achieved.

CN122134390APending Publication Date: 2026-06-02GUANGDONG OCEAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG OCEAN UNIVERSITY
Filing Date
2026-03-05
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively capture the complex relationships between various types of entities in the aquatic product industry chain, especially the dynamic evolution patterns under regional supply and demand differences, seasonal fluctuations, and emergencies. Furthermore, they lack modeling of global supply and demand dependency paths and time-series information dissemination mechanisms.

Method used

A dynamic heterogeneous graph neural network is constructed, which integrates the static attributes and dynamic states of nodes and edges. It adopts type-specific embedding and attention mechanisms, combines the Transformer structure for global dependency modeling, and optimizes the propagation of temporal information through residual connections to achieve high-precision demand prediction of nodes.

Benefits of technology

It accurately extracts the differentiated features of heterogeneous entities, enhances the ability to perceive key demand paths, significantly improves the accuracy and timeliness of regional demand forecasting, and overcomes the limitations of traditional methods in time-series dynamic modeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134390A_ABST
    Figure CN122134390A_ABST
Patent Text Reader

Abstract

This invention discloses a method for predicting regional demand for aquatic products based on a dynamic heterogeneous graph neural network, belonging to the field of intelligent forecasting technology for the aquatic product supply chain. The method includes: constructing a dynamic heterogeneous graph of aquatic product demand containing multiple types of nodes and edges that evolve over time; generating node and edge feature vectors that integrate static attributes and dynamic behaviors; obtaining initial embeddings through type-specific parameter mapping and generating standard node embeddings using a heterogeneous neighbor aggregation mechanism; introducing an edge-type-aware attention mechanism to weight different relationship paths; and combining a Transformer structure to model global dependencies across regions and product categories, resulting in an enhanced context-aware representation. This method predicts regional demand for aquatic products, assisting in the rational layout and dynamic adjustment of aquatic product production capacity, achieving coordinated optimization across all stages from aquaculture and processing to logistics, improving supply response speed and market matching accuracy, and effectively reducing the risks of inventory backlog and overcapacity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent forecasting technology for aquatic product supply chains, specifically to a method for forecasting regional demand for aquatic products based on dynamic heterogeneous graph neural networks. Background Technology

[0002] Regional demand forecasting for aquatic products is crucial for ensuring the efficient operation of the aquatic product supply chain and achieving supply-demand balance. Traditional methods often rely on time series models or regression analysis, making isolated predictions based on historical data. This approach struggles to effectively capture the complex relationships between various entities, including aquaculture enterprises, processing units, logistics nodes, and consumer markets, and particularly fails to reflect the dynamic evolution patterns under the influence of regional supply-demand differences, seasonal fluctuations, and unforeseen events. With the development of deep learning, graph neural networks have been introduced to model the complex network structure of the aquatic product industry chain. Early studies used homogeneous graph neural networks, but their single node type makes it difficult to characterize the differentiated features and interaction patterns among heterogeneous entities such as aquaculture, distribution, and consumption. While subsequent work introduced dynamic heterogeneous graph neural networks to enhance expressive power through type-specific embeddings and temporal features, significant shortcomings remain: First, the static attributes and dynamic states of nodes and edges are not fully integrated, resulting in incomplete feature representations. Second, simple attention mechanisms are often used when aggregating cross-type information, lacking modeling of global supply and demand dependency paths and making it difficult to identify key bottlenecks. Third, the temporal information propagation mechanism is not optimized, lacking structural designs such as residual connections, which limits the accurate capture of dynamic processes such as "gradual accumulation of demand" and "lag in production capacity response." In summary, there is an urgent need for a method for forecasting regional demand for aquatic products that can deeply integrate static and dynamic features, enhance global correlation modeling, and optimize the propagation of temporal information. Summary of the Invention

[0003] To address the aforementioned shortcomings in the existing technology, this invention provides a method for predicting regional demand for aquatic products based on dynamic heterogeneous graph neural networks.

[0004] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows:

[0005] A method for predicting regional demand for aquatic products based on dynamic heterogeneous graph neural networks includes the following steps:

[0006] S1. Construct a dynamic heterogeneous graph of aquatic product demand that includes multiple types of nodes and multiple types of edges and evolves over time;

[0007] S2. Construct a node feature vector for each node in the heterogeneous graph, fusing its static attributes and dynamic states; construct an edge feature vector for each edge, fusing its static attributes, dynamic states, and interaction features between connected nodes.

[0008] S3. Using type-specific parameter matrices, the node feature vectors are mapped to the initial embedding representations of the nodes, and the edge feature vectors are mapped to the embedding representations of the edges. Based on the initial embedding representations of the nodes and the embedding representations of their connecting edges, the standard embedding representations of the nodes are obtained through the aggregation mechanism in the heterogeneous graph.

[0009] S4. Introduce an attention mechanism, combine the standard embedding representation of a node, and aggregate its neighbor node information under different edge types to obtain an aggregated representation;

[0010] S5. The Transformer structure is used to perform global dependency modeling on the preliminary aggregated representation of the node. Based on the self-attention mechanism, the normalized importance weight of the node to different edge types is calculated, and all neighbor information is aggregated in a weighted manner to obtain the enhanced aggregated representation of the node.

[0011] S6. The standard embedded representation and the enhanced aggregate representation of the node are fused through residual connection to obtain the final embedded representation of the node;

[0012] S7. Based on the final embedded representation of nodes, construct a demand forecasting model to achieve high-precision forecasting of future demand for aquatic products in various regions.

[0013] Furthermore, the step of constructing the dynamic aquatic product demand heterogeneity graph in S1 specifically includes:

[0014] S11. Define the set of node types and the set of edge types for heterogeneous graphs. The set of node types includes aquaculture bases, aquatic product processing enterprises, wholesale markets, retail terminals, consumption areas, meteorological monitoring stations, and logistics hubs. The set of edge types includes supply relationships, distribution relationships, consumption relationships, transportation routes, climate impacts, and price transmission.

[0015] S12. Construct node feature vectors, where the feature vector of each node is composed of static attribute vectors and dynamic state vectors. The static attribute vectors include registered capital, breeding species code, geographical coordinates and historical average annual output, and the dynamic state vectors include daily output, daily inventory, average sales of the past 7 days and climate impact index.

[0016] S13. Construct edge feature vectors, where the feature vector of each edge is composed of static edge attribute vectors, dynamic edge attribute vectors, and node interaction feature vectors. The static edge attribute vectors include transportation distance, cooperation period, logistics mode code, and cooperation type. The dynamic edge attribute vectors include current transportation timeliness, daily order volume, price difference, and logistics delay days. The node interaction feature vectors include supply and demand gap, seasonal coordination coefficient, price transmission strength, and inventory turnover matching degree.

[0017] S14. Describe the time evolution mechanism of a dynamic graph, where the node set is fixed and the edge set and feature vectors are updated in real time from an external data source with each time step.

[0018] S15. Provide a mathematical representation of the graph. The dynamic heterogeneous graph is represented as a triple at time t, including the set of node feature vectors, the set of edge feature vectors, and the node and edge types.

[0019] Furthermore, the steps in S2 for constructing node and edge feature vectors specifically include:

[0020] S21. For any node At time step Node feature vectors Represented as:

[0021] ,in It is a static attribute vector. It is a dynamic state vector;

[0022] S22, For any edge At time step edge feature vectors Represented as:

[0023] ,in These are static edge attributes. For dynamic edge attributes, The node interaction characteristics are calculated using factors including supply and demand gap, seasonal coordination coefficient, price transmission strength, and inventory turnover matching degree.

[0024] S23. Map the feature vectors of nodes and edges to a unified dimension using type-specific linear projection, where the node features are mapped as follows: Edge feature mapping is ,in, and For learnable parameter matrix, For nodes type For the edge type for Node of time The node feature vectors, for Time Side The edge feature vectors.

[0025] Furthermore, the steps in S3 of mapping to the initial embedding and obtaining the standard embedding representation specifically include:

[0026] S31. Type-specific embedding mapping, the initial node embedding is represented as follows:

[0027] ;

[0028] Edge embedding is represented as:

[0029] ;

[0030] Where σ is a nonlinear activation function, and For bias terms, and For learnable parameter matrix, For nodes type For the edge type for Node of time The node feature vectors, for Time Side The edge feature vectors;

[0031] S32. Based on the neighbor aggregation mechanism in heterogeneous graphs, group neighbor sets according to edge type and calculate the aggregation message for each edge type. :

[0032] ;

[0033] Where ⊕ represents vector concatenation, For type-specific aggregate functions, For edge type, For the neighbor set grouped by edge type, For nodes The initial embedding representation;

[0034] The messages from all edge types are then merged, and the merged message is represented as follows:

[0035]

[0036] In the formula, To integrate messages, To fuse the weight matrix, For the first The fusion message of each type of edge;

[0037] S33. Generate the standard embedding representation of the node. The standard embedding representation is as follows:

[0038] ;

[0039] in, For the standard embedded representation of nodes, and These are learnable parameters.

[0040] Furthermore, the step of introducing an attention mechanism for aggregation in S4 specifically includes:

[0041] S41, For the target node and its arbitrary neighbor vectors The message vector from u to v is constructed by combining the embeddings of neighboring nodes, the embeddings of edges, and the state of the target node itself. , is represented as:

[0042] ;

[0043] In the formula, The standard embedding representation of neighbor node u, For the edge Embedded representation;

[0044] S42. Group neighbors by edge type, by node. For each type of edge centered on the center, the attention weights are calculated independently as follows:

[0045] ;

[0046] ;

[0047] In the formula, for Time-side type Attention weights of edges For the neighbor set grouped by edge type, for Time-side type Middle The edge feature vectors, edge type Learnable projection matrix, edge type Attention vector;

[0048] And compute a weighted aggregate representation for each edge type;

[0049] S44. Merge the aggregation results of all edge types to generate nodes. Preliminary aggregation representation The calculation method is as follows:

[0050] ;

[0051] ;

[0052] in For globally shared projection matrix, For learnable context vectors, For matrix transpose, For each edge type The calculated weighted aggregation representation, Indicates the type of relationship in the current context. For nodes The relative importance, For the set of all edge types, It represents any specific edge type.

[0053] A type-level attention mechanism is used to further weight the importance of different types to generate nodes. At time step Aggregate representation:

[0054] .

[0055] Furthermore, the steps in S5 for global dependency modeling using the Transformer structure specifically include:

[0056] S51. Input sequence construction: Organize the aggregate representation of all nodes into a sequence:

[0057] ;

[0058] In the formula, The aggregate representation sequence of all nodes. This is an aggregate representation of all nodes. The total number of nodes;

[0059] S52, For any pair of nodes Calculate the attention score between nodes :

[0060] ;

[0061] In the formula, These are the learnable query and key projection matrices, respectively. For embedded dimensions, They are nodes and Aggregate representation;

[0062] Attention weights are modulated based on edge importance weights;

[0063] S53. Use the modulated attention weights to perform a weighted summation of the values ​​of all neighboring or full-graph nodes to obtain the node values. Enhanced aggregation representation :

[0064] ;

[0065] ;

[0066]

[0067] In the formula, The projection matrix is ​​the value. The modulated attention weights, For attention weight modulation factor, For nodes First-order neighbors The type of connection edge, Let T be a learnable vector, and T be the matrix transpose. For type Multilayer perceptron, For the set of all edge types, It represents any specific edge type.

[0068] A nonlinear transformation is performed using a feedforward network, and each node is output. Enhanced aggregation representation :

[0069] .

[0070] Furthermore, the step of fusing the representation to obtain the final embedding in S6 specifically includes:

[0071] S61, For any node In time Residual fusion of its standard embedding representation and enhanced aggregate representation yields the node. The final embedding representation :

[0072] ;

[0073] In the formula, Representation layer normalization, For nodes In time Standard embedded representation, For nodes In time Enhanced aggregation representation, It is a nonlinear transformation;

[0074] S62. Based on the specific form fusion process of nonlinear transformation, the final embedded representation of the display expression is obtained.

[0075] Furthermore, the steps in S7 for constructing the demand forecasting model specifically include:

[0076] S71. Based on the prediction of future demand in consumption areas or wholesale market nodes, classify nodes by type and assign tasks accordingly.

[0077] S72, For any demand node A two-layer front-connection network is used to map the final embedding to future requirements, and optimization is performed using a loss function.

[0078] The present invention has the following beneficial effects:

[0079] (1) The present invention constructs a dynamic heterogeneous demand graph for aquatic products, which covers various types of nodes and edge relationships, including aquaculture enterprises, processing units, logistics nodes, and consumer markets. The characteristics of nodes and edges evolve dynamically with multiple time steps, accurately extracting the differentiated characteristics of heterogeneous entities at different stages. This effectively solves the problem of insufficient modeling ability for complex heterogeneous structures in existing methods and meets the actual needs of collaborative modeling of multiple subjects and relationships in the aquatic product industry chain.

[0080] (2) This invention combines the attention mechanism with the standard embedding representation of nodes to aggregate their neighbor information under different edge types to obtain a preliminary aggregated representation. It also introduces the Transformer structure for global dependency modeling and calculates the normalized importance weight of nodes to various types of edges based on the self-attention mechanism to achieve weighted fusion of cross-type relationships. This significantly enhances the model's ability to perceive key demand paths and improves the accuracy of identifying regional demand fluctuations.

[0081] (3) This invention uses time step embedding to dynamically update the graph structure and adopts residual connection fusion standard embedding and enhanced aggregation representation. While retaining the original information, it strengthens the propagation of time series information, effectively captures the dynamic evolution law of aquatic product demand "gradual accumulation" and production capacity "lagging response", overcomes the limitations of traditional methods in time series dynamic modeling, and significantly improves the accuracy and timeliness of demand forecasting. Attached Figure Description

[0082] Figure 1 This is a method for predicting regional demand for aquatic products based on dynamic heterogeneous graph neural networks. Detailed Implementation

[0083] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0084] like Figure 1As shown, the method for predicting regional demand for aquatic products based on dynamic heterogeneous graph neural networks includes steps S1-S7, as detailed below:

[0085] S1. Construct a dynamic heterogeneous graph of aquatic product demand, which contains multiple types of nodes and edges, and the characteristics of nodes and edges evolve dynamically over time.

[0086] This step involves constructing a multi-type entity relationship network that evolves over time to comprehensively characterize the spatiotemporal dynamics of the various participants and their interactions in the aquatic product supply chain. Specifically, it includes the following sub-steps:

[0087] S1.1 Define the set of node types and the set of edge types for heterogeneous graphs.

[0088] Let the dynamic heterogeneity graph be ,in Represents the discrete time step. Total time span. Node type set. Including but not limited to: aquaculture bases, seafood processing enterprises, wholesale markets, retail outlets, consumption areas, meteorological monitoring stations, and logistics hubs. Edge type set. This includes, but is not limited to: supply relationships, distribution relationships, consumption relationships, transportation routes, climate impacts, and price transmission.

[0089] S1.2 Constructing Node Feature Vectors

[0090] For any node Its time step Node feature vectors It is composed of static attributes and dynamic states:

[0091]

[0092] in It is a static characteristic that does not change over time. It is a dynamic feature that is updated at each time step.

[0093] S1.3 Constructing edge feature vectors

[0094] For any edge In time edge feature vectors Defined as:

[0095]

[0096] in These are static edge attributes. For dynamic edge attributes, These are the characteristics of node interaction.

[0097] S1.4 Temporal Evolution Mechanism of Dynamic Graphs

[0098] The entire graph structure evolves over time, forming a graph sequence. , where the node set Typically fixed, edge set Features of all nodes may change over time. Sum of edge features At each time step Collect and update data in real time from external data sources.

[0099] Mathematical representation of graph S1.5

[0100] Ultimately, the dynamic heterogeneity diagram of aquatic product demand over time... It can be represented as a triple:

[0101]

[0102] in For nodes type For the edge The type.

[0103] S2. Construct a node feature vector for each node in the heterogeneous graph, fusing its static attributes and dynamic states; construct an edge feature vector for each edge, fusing its static attributes, dynamic states, and interaction features between connected nodes.

[0104] This step involves creating a dynamic aquatic product demand heterogeneity diagram. All nodes and edges in the graph neural network are used to generate structured, high-dimensional input feature representations, which serve as the foundation for subsequent graph neural network embedding learning. This includes two parts: node feature vector construction and edge feature vector construction.

[0105] S2.1 Node Feature Vector Construction

[0106] For any node Its time step Node feature vectors It is formed by concatenating static attribute vectors and dynamic state vectors:

[0107]

[0108] in It is a static vector that does not change over time and reflects the inherent properties of the nodes. For example, when When used as a breeding base:

[0109]

[0110] It is a dynamic vector that changes with time step. Updates reflect the real-time motion status of nodes. For example:

[0111]

[0112] S2.2 Edge Feature Vector Construction

[0113] For any edge In time edge feature vectors Defined as:

[0114]

[0115] static attribute vector Inherent properties of reactive edges, for example:

[0116]

[0117] Dynamic state vector The reaction edge in time Real-time status, for example:

[0118]

[0119] Node interaction feature vector Depicting connected nodes and In time The state of cooperation or conflict. The calculation method is as follows:

[0120]

[0121] in For nodes Current inventory, node Current demand or sales volume For nodes Expected consumption The Pearson correlation coefficient measures the correlation between historical sales series. It is a numerically stable term.

[0122] S2.3 Feature Dimension Unification

[0123] Since the original feature dimensions may differ for different node / edge types, the features can be mapped to a unified dimension through type-specific linear projection before being fed into the graph neural network.

[0124]

[0125]

[0126] in For nodes type For the edge type , This is the learnable parameter matrix.

[0127] S3. Using type-specific parameter matrices, node feature vectors are mapped to initial embedding representations of nodes, and edge feature vectors are mapped to embedding representations of edges. Based on the initial embedding representations of nodes and the embedding representations of their connecting edges, a standard embedding representation of the node is obtained through an aggregation mechanism in the heterogeneous graph to reflect the basic state of the node at the current moment.

[0128] This step maps the original feature vectors constructed in S2 to low-dimensional dense embeddings through learnable type-specific projections, and aggregates neighbor information based on a heterogeneous graph structure to obtain a standard embedding representation reflecting the current basic state of the nodes. Specifically, it includes the following sub-steps:

[0129] S3.1 Type-Specific Embedding Map

[0130] Since nodes and edges in heterogeneous graphs have multiple types, and different types of entities have different semantic spaces, a type-specific parameter matrix is ​​used for feature mapping to preserve type specificity.

[0131] (1) Initial embedding representation of nodes

[0132] For any node Its type is In time step Initial embedding representation:

[0133]

[0134] in The node feature vectors constructed in S2 For type Dedicated learnable weight matrix, For bias terms, It is a non-linear activation function. To unify the embedding dimensions.

[0135] (2) Edge embedding representation

[0136] For any edge Its type is In time step edge embedding representation Mapped to:

[0137]

[0138] in The edge feature vectors constructed in S2 For type Dedicated edge projection matrix, The message vector of the edge is used for subsequent aggregation, and is usually set as follows: Based on the dimension of matching node embedding.

[0139] Neighbor aggregation mechanism in S3.2 heterogeneous graphs

[0140] To obtain a standard embedded representation of a node, it is necessary to aggregate the information transmitted by all its neighbors through edges of different types. Due to the diversity of edge types, a type-aware grouping and aggregation strategy is adopted. For nodes... Its neighbor set is grouped by edge type:

[0141]

[0142] For each edge type Calculate the aggregated message for this type:

[0143]

[0144] in This represents vector concatenation. For type A dedicated attention-weighted average aggregation function, if ,but .

[0145] Then, all types of messages are merged:

[0146]

[0147] in This is the fusion weight matrix.

[0148] S3.3 generates a standard embedded representation of nodes.

[0149] Ultimately, the node At time step Standard Embedded Representation It is determined by its initial embedding and the aggregated message:

[0150]

[0151] in For vector concatenation, and For learnable parameters, output It is the standard embedding representation of the basic state of the reaction node at the current moment, which includes its own features and local context information.

[0152] S4. Introduce an attention mechanism and combine it with the standard embedding representation of a node to aggregate its neighbor node information under different edge types.

[0153] This step performs refined contextual modeling on the standard node embedding representations obtained in S3. By introducing an edge-type-aware attention mechanism, it dynamically measures the importance of different neighbor nodes under different relation types and weights and aggregates their information to generate a more discriminative preliminary aggregated representation. Specifically, it includes the following sub-steps:

[0154] S4.1 Neighbor Message Construction

[0155] For the target node and any of its neighbors (i.e., there are edges) First, construct from arrive The message vector. This message integrates the embeddings of neighboring nodes, edge embeddings, and the state of the target node itself:

[0156]

[0157] in For neighboring nodes Standard embedded representation, For the edge The embedded representation of addition can be replaced by a linear transformation after concatenation, but addition is more efficient and equally effective in practice.

[0158] S4.2 Edge Type Grouping and Attention Weight Calculation

[0159] Because there are multiple edge types in the graph Group neighbors by edge type:

[0160]

[0161] For each type Attention weights are calculated independently for each node. Centered on each Its attention coefficient Defined as:

[0162]

[0163]

[0164] in , For type A proprietary, learnable projection matrix. For type Dedicated attention vector, For the LeakyReLU activation function, the denominator is of the same type. Normalize all neighbors to ensure .

[0165] S4.3 Intra-type weighted aggregation

[0166] For each edge type Calculate the weighted aggregation representation:

[0167]

[0168] like ,but .

[0169] S4.4 Multi-type representation fusion

[0170] Merge the aggregation results of all edge types to generate nodes. Preliminary aggregation representation A type-level attention mechanism is employed to further weight the importance of different types:

[0171]

[0172]

[0173] in For globally shared projection matrix, For learnable context vectors, Indicates the relation type in the current context. For nodes The relative importance of.

[0174] Ultimately, the node At time step The initial aggregation is represented as follows:

[0175]

[0176] This indicates a dynamic focus on important neighbors (via...) ), and adaptively select key relationship types (through It integrates local heterogeneous contexts, providing high-quality input for subsequent global modeling.

[0177] S5. The Transformer structure is used to perform global dependency modeling on the preliminary aggregated representation of the nodes; the normalized importance weight of the nodes to different edge types is calculated based on the self-attention mechanism, and all neighbor information is aggregated accordingly to obtain the enhanced aggregated representation of the nodes.

[0178] This step overcomes the limitations of local aggregation by introducing a Transformer structure to perform global interaction modeling on the initial aggregation representation of all nodes, explicitly learning long-range dependencies across regions and stages. In particular, an edge-type-aware self-attention mechanism is designed to calculate the normalized importance weights of nodes for different relationship types, and based on this, reconstruct the neighbor information aggregation process to generate an enhanced aggregation representation with more global context awareness.

[0179] S5.1 Input Sequence Construction

[0180] The initial aggregation representation of all nodes in the graph It is considered as a "sequence of nodes" and used as input to the Transformer encoder:

[0181]

[0182] in The total number of nodes. For the embedded dimension.

[0183] S5.2 Self-attention mechanism of edge type awareness

[0184] The standard Transformer uses fully connected self-attention, but in heterogeneous graphs, not all node pairs are semantically related. To address this, edge-type guided attention masks and weight modulation are introduced.

[0185] (1) Calculation of global relevance score

[0186] For any node pair Calculate its original attention score:

[0187]

[0188] in This is a learnable query and key projection matrix.

[0189] (2) Modeling the importance weight of edge type

[0190] If node and There are multi-hop paths or potential relationships between them, and the types of each edge need to be evaluated. Contribution to this association. Define the node. opposite edge type The normalized importance weights are:

[0191]

[0192] in For type Dedicated multi-layer sensor, For learnable vectors, Represents a node The distribution of preferences for various types of relations in the current context.

[0193] (3) Attention weight modulation

[0194] If node and There are direct edges or through types Connect, then This is incorporated into the attention weights as a modulation factor. For simplicity, let's assume we focus on... The first-order neighbors and their edge types, then for Let its connecting edge type be The final attention weights are:

[0195]

[0196] For non-neighbor nodes , can be set (i.e., apply adjacency masks), or retain small weights to capture indirect effects.

[0197] S5.3 Enhanced Aggregate Representation Generation

[0198] Using the attention weights described above, a weighted sum is calculated of the values ​​of all neighbors (or all nodes in the graph) to obtain the node. Enhanced aggregation representation:

[0199]

[0200] in The projection matrix is ​​the value. Subsequently, a further nonlinear transformation is performed through a feedforward network (FFN):

[0201]

[0202] in .

[0203] S5.4 Output Results

[0204] Ultimately, each node Obtain its enhanced aggregation representation:

[0205]

[0206] By enhancing aggregation and integrating the global context, the importance of edge types is explicitly modeled, and neighbor aggregation weights are dynamically adjusted to adapt to the spatiotemporal evolution characteristics of the aquatic product supply and demand system.

[0207] S6. The standard embedding representation and the enhanced aggregate representation of the node are fused through residual connection to preserve the original information while enhancing the model's expressive power, thus obtaining the final embedding representation of the node.

[0208] This step effectively integrates the semantic information learned by nodes at both the local context and global dependency levels. By introducing a residual connection mechanism, the standard embedding representation generated by S3 is fused with the enhanced aggregate representation generated by S5. While preserving the integrity of the original local features, a global context enhancement signal is injected, thereby obtaining a more discriminative and robust final embedding representation, providing high-quality node representations for subsequent prediction tasks.

[0209] S6.1 Residual Fusion Structure Design

[0210] For any node In time step Its two intermediate representations are: standard embedded representation: Enhanced aggregation representation Both have the same dimensions (both are...). (Dimensional), allowing direct residual fusion. Define nodes. The final embedding representation for:

[0211]

[0212] in An optional nonlinear transformation module is used to adapt the enhanced representation or extract features; LayerNorm represents layer normalization to stabilize the training process and accelerate convergence; addition operations form residual connections to ensure the preservation of original local information. It will not be covered.

[0213] S6.2 Nonlinear Transformation Module Specific form

[0214] To enhance integration flexibility, It may be in any of the following forms:

[0215] Form 1: Identity Mapping

[0216]

[0217] Form 2: Feedforward Neural Network

[0218]

[0219] in , For learnable weights, To expand dimensions, It is a GELU or ReLU activation function.

[0220] S6.3 Complete Fusion Process Formula

[0221] when When choosing the identity mapping, the explicit representation of the final embedded representation can be obtained:

[0222]

[0223] LayerNorm is defined as follows:

[0224]

[0225] , for Mean and variance along the feature dimension; , Learnable scaling and offset parameters; It is a numerically stable term; This indicates element-wise multiplication.

[0226] Ultimately, each node At time step Obtain its final embedding representation This representation encodes both local neighborhood structure and global graph-level dependencies, combining stability and expressiveness.

[0227] S7. Based on the final embedded representation of nodes, construct a demand forecasting model.

[0228] This step utilizes the final embedded representation of the nodes generated by S6. For different node types in the heterogeneous supply and demand graph of aquatic products, a demand forecasting model is constructed to predict the future demand in consumption areas or wholesale markets. The underlying graph representation learning module of the model adopts independent task-specific heads to achieve multi-objective collaborative optimization.

[0229] S7.1 Node Type Classification and Task Allocation

[0230] Demand forecasting task: Applicable to consumer nodes .

[0231] S7.2 Demand Forecasting Model

[0232] For any demand-type node The goal is to predict its future. Demand sequence at each time step:

[0233]

[0234] (1) Predicting head structure

[0235] A two-layer fully connected network (MLP) is used to map the final embedding to future requirements:

[0236]

[0237]

[0238] in , These are learnable weights; The hidden layer dimension is used; the output is linearly activated and supports any positive real value.

[0239] (2) Loss function

[0240] Using the Huber loss function:

[0241]

[0242] in , The threshold is used. The total demand forecasting loss is the sum of the losses across all demand nodes:

[0243]

[0244] S8. Based on the demand forecasting model, a demand-capacity matching model can be further constructed to assess the degree of matching between the supply side and downstream demand.

[0245] S8.1 Capacity Matching Model

[0246] For any supply node The goal is to assess the match score between its current production capacity and downstream demand. A higher value indicates a better match.

[0247] (1) Matching degree modeling

[0248] First, aggregate the total predicted demand across all its downstream demand nodes:

[0249]

[0250] in for The neighboring side; As a weight for historical cooperation, to meet .

[0251] set up For nodes exist Available capacity at any given time, defining the original match ratio:

[0252]

[0253] Ideal match , This indicates overcapacity. This indicates that demand exceeds supply.

[0254] (2) Matching degree prediction head

[0255] The final embedding and matching ratio are jointly input into the MLP to output the standardized matching score:

[0256]

[0257]

[0258]

[0259] in For the sigmoid function, ensure the output is in Interval.

[0260] (3) Self-supervised matching loss

[0261] In the absence of explicit matching labels, a refactoring self-supervised objective is designed: requiring the model to infer reasonable capacity allocation from matching scores. Definition:

[0262]

[0263] minimize With actual available capacity Relative error:

[0264]

[0265] Total capacity matching loss:

[0266]

[0267] S7.4 Multi-task Joint Optimization

[0268] The overall loss function is a weighted sum of the two types of tasks:

[0269]

[0270] in Hyperparameters (default) The parameters can be adjusted using a validation set. The model jointly optimizes all parameters through backpropagation, including the graph representation learning module and the two task heads.

[0271] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0272] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0273] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0274] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

[0275] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.

Claims

1. A method for predicting regional demand for aquatic products based on dynamic heterogeneous graph neural networks, characterized in that, Includes the following steps: S1. Construct a dynamic heterogeneous graph of aquatic product demand that includes multiple types of nodes and multiple types of edges and evolves over time; S2. Construct a node feature vector for each node in the heterogeneous graph, fusing its static attributes and dynamic states; construct an edge feature vector for each edge, fusing its static attributes, dynamic states, and interaction features between connected nodes. S3. Using type-specific parameter matrices, the node feature vectors are mapped to the initial embedding representations of the nodes, and the edge feature vectors are mapped to the embedding representations of the edges. Based on the initial embedding representations of the nodes and the embedding representations of their connecting edges, the standard embedding representations of the nodes are obtained through the aggregation mechanism in the heterogeneous graph. S4. Introduce an attention mechanism, combine the standard embedding representation of a node, and aggregate its neighbor node information under different edge types to obtain an aggregated representation; S5. The Transformer structure is used to perform global dependency modeling on the preliminary aggregated representation of the node. Based on the self-attention mechanism, the normalized importance weight of the node to different edge types is calculated, and all neighbor information is aggregated in a weighted manner to obtain the enhanced aggregated representation of the node. S6. The standard embedding representation and the enhanced aggregate representation of the node are fused through residual connection to obtain the final embedding representation of the node; S7. Based on the final embedded representation of nodes, construct a demand forecasting model to achieve high-precision forecasting of future demand for aquatic products in various regions.

2. The method for predicting regional demand for aquatic products based on dynamic heterogeneous graph neural networks according to claim 1, characterized in that, The steps in S1 to construct the dynamic aquatic product demand heterogeneity graph specifically include: S11. Define the set of node types and the set of edge types for heterogeneous graphs. The set of node types includes aquaculture bases, aquatic product processing enterprises, wholesale markets, retail terminals, consumption areas, meteorological monitoring stations, and logistics hubs. The set of edge types includes supply relationships, distribution relationships, consumption relationships, transportation routes, climate impacts, and price transmission. S12. Construct node feature vectors, where the feature vector of each node is composed of static attribute vectors and dynamic state vectors. The static attribute vectors include registered capital, breeding species code, geographical coordinates and historical average annual output, and the dynamic state vectors include daily output, daily inventory, average sales of the past 7 days and climate impact index. S13. Construct edge feature vectors, where the feature vector of each edge is composed of static edge attribute vectors, dynamic edge attribute vectors, and node interaction feature vectors. The static edge attribute vectors include transportation distance, cooperation period, logistics mode code, and cooperation type. The dynamic edge attribute vectors include current transportation timeliness, daily order volume, price difference, and logistics delay days. The node interaction feature vectors include supply and demand gap, seasonal coordination coefficient, price transmission strength, and inventory turnover matching degree. S14. Describe the time evolution mechanism of a dynamic graph, where the node set is fixed and the edge set and feature vectors are updated in real time from an external data source with each time step. S15. Provide a mathematical representation of the graph. The dynamic heterogeneous graph is represented as a triple at time t, including the set of node feature vectors, the set of edge feature vectors, and the node and edge types.

3. The method for predicting regional demand for aquatic products based on dynamic heterogeneous graph neural networks according to claim 1, characterized in that, The steps for constructing node and edge feature vectors in S2 specifically include: S21. For any node At time step Node feature vectors Represented as: ,in It is a static attribute vector. It is a dynamic state vector; S22, For any edge At time step edge feature vectors Represented as: ,in These are static edge attributes. For dynamic edge attributes, The node interaction characteristics are calculated using factors including supply and demand gap, seasonal coordination coefficient, price transmission strength, and inventory turnover matching degree. S23. Map the feature vectors of nodes and edges to a unified dimension using type-specific linear projection, with the node features mapped as follows: Edge feature mapping is ,in, and For learnable parameter matrix, For nodes type For the edge type for Node of time The node feature vectors, for Time Side The edge feature vectors.

4. The method for predicting regional demand for aquatic products based on dynamic heterogeneous graph neural networks according to claim 1, characterized in that, The steps in S3, which involve mapping to the initial embedding and obtaining the standard embedding representation, specifically include: S31. Type-specific embedding mapping, the initial node embedding is represented as follows: ; Edge embedding is represented as: ; Where σ is a nonlinear activation function, and For bias terms, and For learnable parameter matrix, For nodes type For the edge type for Node of time The node feature vectors, for Time Side The edge feature vectors; S32. Based on the neighbor aggregation mechanism in heterogeneous graphs, group neighbor sets according to edge type and calculate the aggregation message for each edge type. : ; Where ⊕ represents vector concatenation, For type-specific aggregate functions, For edge type, For the neighbor set grouped by edge type, For nodes The initial embedding representation; The messages from all edge types are then merged, and the merged message is represented as follows: In the formula, To integrate messages, To fuse the weight matrix, For the first The fusion message of each type of edge; S33. Generate the standard embedding representation of the node. The standard embedding representation is as follows: ; in, For the standard embedded representation of nodes, and These are learnable parameters.

5. The method for predicting regional demand for aquatic products based on dynamic heterogeneous graph neural networks according to claim 1, characterized in that, The specific steps of introducing an attention mechanism for aggregation in S4 include: S41, For the target node and its arbitrary neighbor vectors The method integrates the embedding of neighboring nodes, the embedding of edges, and the state of the target node itself to construct the structure. arrive message vector , is represented as: ; In the formula, The standard embedding representation of neighbor node u, For the edge Embedded representation; S42. Group neighbors by edge type, by node. For each type of edge centered on the center, the attention weights are calculated independently as follows: ; ; In the formula, for Time-side type Attention weights of edges For the neighbor set grouped by edge type, for Time-side type Middle The edge feature vectors, edge type Learnable projection matrix, edge type Attention vector; And compute a weighted aggregate representation for each edge type; S44. Merge the aggregation results of all edge types to generate nodes. Preliminary aggregation representation The calculation method is as follows: ; ; in The projection matrix is ​​shared globally. For learnable context vectors, For matrix transpose, For each edge type The calculated weighted aggregation representation, Indicates the type of relationship in the current context. For nodes The relative importance, For the set of all edge types, Represents any specific edge type; A type-level attention mechanism is used to further weight the importance of different types to generate nodes. At time step Aggregate representation: 。 6. The method for predicting regional demand for aquatic products based on dynamic heterogeneous graph neural networks according to claim 1, characterized in that, The steps for global dependency modeling using the Transformer structure in S5 specifically include: S51. Input sequence construction: Organize the aggregate representation of all nodes into a sequence: ; In the formula, The aggregate representation sequence of all nodes. This is an aggregate representation of all nodes. The total number of nodes; S52, For any pair of nodes Calculate the attention score between nodes : ; In the formula, These are the learnable query and key projection matrices, respectively. For embedded dimensions, They are nodes and Aggregate representation; Attention weights are modulated based on edge importance weights; S53. Use the modulated attention weights to perform a weighted summation of the values ​​of all neighboring or full-graph nodes to obtain the node values. Enhanced aggregation representation : ; ; ; In the formula, The projection matrix is ​​the value. For the modulated attention weights, For attention weight modulation factor, For nodes First-order neighbors The type of connection edge, For learnable vectors, For matrix transpose, For type Multilayer perceptron, For the set of all edge types, Represents any specific edge type; A nonlinear transformation is performed using a feedforward network, and each node is output. Enhanced aggregation representation : 。 7. The method for predicting regional demand for aquatic products based on dynamic heterogeneous graph neural networks according to claim 1, characterized in that, The step of fusing representation to obtain the final embedding in S6 specifically includes: S61, For any node In time Residual fusion of its standard embedding representation and enhanced aggregate representation yields the node. The final embedding representation : ; In the formula, Representation layer normalization, For nodes In time Standard embedded representation, For nodes In time Enhanced aggregation representation, It is a nonlinear transformation; S62. Based on the specific form fusion process of nonlinear transformation, the final embedded representation of the display expression is obtained.

8. The method for predicting regional demand for aquatic products based on dynamic heterogeneous graph neural networks according to claim 1, characterized in that, The specific steps for constructing the demand forecasting model in S7 include: S71. Based on the prediction of future demand in consumption areas or wholesale market nodes, classify nodes by type and assign tasks accordingly. S72, For any demand node A two-layer front-connection network is used to map the final embedding to future requirements and optimize it using a loss function.