A product service network quality evaluation and load space-time prediction method based on heterogeneous graph and transformer
Patent Information
- Application Number
- CN202611003037.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-07
- Publication Date
- 2026-10-13
AI Technical Summary
[0010]为解决现有的QoPSN多维量化问题、异构时空依赖的表征学习问题和预测误差的非对称惩罚问题等技术问题,本发明提出了一种基于异构图与Transformer的产品服务网络质量评估与负载时空预测方法
(1)实现了从网络通信状态单维考量向数字-物理双空间融合评估的跨越: 相比于只监控CPU、带宽的传统IT运维手段,本发明将物理实体的磨损、电量等作为预测系统底层驱动逻辑,使得评估体系更加贴合真实的工业互联网和下一代物联网(IoT)环境,有效避免了服务状态正常但设备物理宕机的盲区。
Smart Images

Figure CN122909154A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent predictive scheduling systems, specifically involving a product service network quality assessment and load spatiotemporal prediction method based on heterogeneous graphs and Transformers. Background Technology
[0002] In recent years, with the rapid evolution of the Internet of Things (IoT), edge computing, and Industry 4.0, the traditional software service ecosystem is deeply integrating with physical hardware products. For example, in connected vehicles, autonomous driving, cloud manufacturing, and intelligent shared mobility systems, digital computing resources (edge servers, cloud microservices) and physical entities (smart cars, CNC machine tools, AGVs) are highly collaborative, forming a complex and dynamic Product Service Network (PSN) composed of multi-dimensional capabilities such as smart car hardware, remote diagnostics, insurance services, and charging pile networks.
[0003] In PSN, the load status of network nodes (i.e., the amount of data traffic a node needs to process per unit time or the extent to which its CPU, bandwidth, and other resources are occupied) not only exhibits high nonlinearity and burstiness in time series but also shows strong heterogeneous correlation in spatial topology. To ensure the efficient and stable operation of the system, accurately predicting the spatiotemporal load of each node in the network and scheduling resources accordingly has become a key challenge in the field of service computing.
[0004] In recent years, researchers have often used Spatial-Temporal Graph Neural Networks (ST-GNN) for network load or traffic prediction. For example, STGCN (Spatial-Temporal Graph Convolutional Network) uses Chebyshev multinomial approximation graph convolution to capture spatial dependencies and combines it with one-dimensional CNN to capture temporal dependencies; ASTGCN introduces a spatiotemporal attention mechanism to dynamically adjust the spatial weights between nodes.
[0005] In addition, Transformer-based methods (such as Traffic Transformer) have been introduced, which utilize multi-head self-attention to capture temporal periodicity over long time spans.
[0006] However, the following problems still exist: (1) One-sided evaluation metrics (separation of physical and digital): Traditional prediction and scheduling systems are often guided by traditional Quality of Service (QoS, such as network latency and throughput) or Quality of Experience (QoE). However, in PSN, due to the introduction of physical products, pure QoS cannot truly reflect the overall health of the network. There is a lack of an evaluation system that can organically unify the "physical product status" and "digital computing resources".
[0007] (2) Lack of heterogeneous topology modeling capability: Existing ST-GNN or Transformer models typically assume that the network graph is homogeneous, meaning that all nodes and edges are of the same type. However, in PSN, the network includes user nodes, physical product nodes, and computing service nodes, and the interactions between them have distinctly different semantic characteristics. If a homogeneous graph model is used, it is easy to introduce severe semantic confusion and feature noise when aggregating neighbor information.
[0008] (3) Disconnect between prediction target and system fault tolerance threshold: Existing load prediction models typically use MSE or MAE as the loss function. This globally indiscriminate optimization target ignores the system's "nonlinear quality degradation characteristics." In actual business operations, a 10% prediction error is insignificant for a low-load node; however, for a high-load node approaching the collapse threshold, a 2% prediction error can lead to a service avalanche across the entire region. Existing models lack the ability to proactively perceive and prioritize optimization of "high-risk nodes in system quality."
[0009] Therefore, there is an urgent need for a new method for product service network quality assessment and load forecasting. Summary of the Invention
[0010] To address existing technical challenges such as QoPSN multidimensional quantization, heterogeneous spatiotemporal dependency representation learning, and asymmetric penalty for prediction errors, this invention proposes a product service network quality assessment and load spatiotemporal prediction method based on heterogeneous graphs and Transformers.
[0011] The specific technical solution is as follows: S1. Obtain product service networks at multiple historical moments, and extract users, physical products, and services from each product service network as nodes, the interaction relationships between nodes as directed edges, and the attribute information of nodes as node features, thereby constructing the corresponding heterogeneous graph. S2 introduces dynamic information entropy as weight to construct a comprehensive evaluation index system for product service network quality that includes digital service quality components, physical product quality components, and supply and demand coordination components, and further calculates the evaluation score of each node at each historical moment. S3 uses a heterogeneous graph attention network module to sequentially apply node-level attention mechanism and semantic-level attention mechanism to the heterogeneous graph at each historical moment, obtain the fused features of all nodes in the heterogeneous graph and form a spatial feature matrix; the spatial feature matrices of all heterogeneous graphs form a spatial feature sequence. S4. Based on the spatial feature sequence, a spatial feature encoding sequence is obtained using Transformer; the spatial feature encoding sequence is then passed through a multi-head self-attention module to obtain the final temporal feature representation, and further, the predicted load of all nodes within a specified time step is obtained. S5, combining the predicted load, evaluation score and the actual load of the node, calculates the quality-aware loss function and updates all parameters in the heterogeneous graph attention network module and the multi-head self-attention module until convergence; S6 obtains the product service network to be predicted at multiple historical moments, and uses all trained modules to obtain the predicted load of all nodes within a specified future time step.
[0012] Furthermore, in S2, the calculation process for the digital service quality component is as follows: If the node is a user node or a physical product node, then the digital quality of service component of that node is 0. If the node is a service node, then the formula for calculating the digital quality of service component of that node is: ; in, All are weighted parameters, and ; This represents the upper limit of the service response time for node i. The node at time t Service response time This is the lower bound for the service response time of node i. The node at time t throughput, Let i be the upper limit of the throughput of node i. Let i be the lower limit of the throughput of node i. The node at time t packet loss rate, Let be the value of the digital quality of service component of node i at time t.
[0013] Furthermore, in step S2, the calculation process for the physical product mass component is as follows: If the node is a user node or a service node, its physical product quality component is 0. If the node is a physical product node, the formula for calculating its physical product quality component is as follows: ; in, , These are the weight parameters, Let be the remaining battery power of the physical entity corresponding to node i at time t. The mechanical health of the physical entity corresponding to node i at time t is obtained by fitting the Weibull distribution reliability function. Let be the value of the physical product quality component of node i at time t.
[0014] Furthermore, in S2, the supply and demand coordination component is calculated using KL divergence, and the calculation formula is as follows: ; in, Here, exp is the adjustment coefficient, and exp is the exponential function. Let represent the distribution of the total computing power request value of all product nodes in the product service network at time t. The distribution of available idle computing power on the server. Let be the value of the supply and demand coordination component of node i at time t.
[0015] Furthermore, in S3, the process of extracting the fusion features of nodes using the heterogeneous graph attention network module based on the heterogeneous graph at time t is specifically as follows: S301 specifies multiple path patterns, iterates through each path pattern in turn and performs node-level attention extraction: for each node, extract all meta-paths that start from that node and conform to the path pattern; based on the start and end nodes of each meta-path, obtain the importance coefficient of each meta-path, and further obtain the semantic representation of the node under different meta-paths. S302, perform semantic-level attention extraction: taking the meta-path as a unit, calculate the semantic importance weight of each meta-path based on the semantic representation of all nodes under the meta-path; after normalizing the semantic importance weight, use the normalized semantic importance weight as the coefficient to perform weighted summation of the semantic representations obtained by each node under different meta-paths to obtain the fusion feature representation of the node.
[0016] Furthermore, in S4, the spatial feature encoding sequence is obtained by encoding the spatial feature sequence using Transformer positional encoding and then adding it to the spatial feature sequence.
[0017] Furthermore, the Transformer position encoding adopts sine-cosine position encoding.
[0018] Furthermore, in step S4, the process of obtaining the final temporal feature representation through the multi-head self-attention module is specifically as follows: S401, the spatial feature encoding sequence is mapped to a query matrix, a key matrix, and a value matrix respectively through the query weight matrix, the key weight matrix, and the value weight matrix; S402: Input the query matrix, key matrix, and value matrix into each attention head and calculate the dot product attention; then concatenate and linearly transform the dot product attention of all attention heads to obtain the final output; S403 adds the final output to the spatial feature encoding sequence, and then passes it through a feedforward neural network, residual connections, and layer normalization in sequence to obtain the temporal feature representation.
[0019] Furthermore, in step S5, the calculation process of the quality-perceived loss function is as follows: First, the evaluation score of node i at time t is subtracted from the safety threshold to obtain the safety margin of node i at time t; Secondly, based on the safety margin, an adaptive penalty function is constructed, which further yields the quality-perceived loss function, calculated as follows: ; in, Let the quality-perceived loss function be... The total number of nodes, i.e. ; Let be the actual load of node i at time t+a. It is the L2 norm. The L2 regularization coefficient; The total duration for a specified time step. Let be the predicted load of node i at time t+a. Let be the adaptive penalty function for node i at time t+a. For parameters.
[0020] Furthermore, the formula for calculating the adaptive penalty function is as follows: ; in, To punish the scaling factor, The attenuation slope, Let be the penalty value for node i at time t. Let be the safety margin of node i at time t.
[0021] The beneficial effects of this invention are: (1) It realizes the leap from single-dimensional consideration of network communication status to digital-physical dual-space fusion evaluation: Compared with the traditional IT operation and maintenance methods that only monitor CPU and bandwidth, this invention uses the wear and tear of physical entities, power consumption, etc. as the underlying driving logic of the prediction system, making the evaluation system more in line with the real industrial Internet and next-generation Internet of Things (IoT) environment, and effectively avoiding the blind spot of normal service status but physical equipment downtime.
[0022] (2) It breaks through the bottleneck of traditional GNNs in handling complex heterogeneous semantics: Compared with traditional STGCN or homogeneous Transformer, this invention uses the HGAT structure with metapaths to strictly distinguish the physical meaning of different interaction types such as "human to device" and "device to computing service". This heterogeneous modeling effectively filters noise in the topological feature fusion process, which greatly improves the prediction accuracy of spatial load propagation trend in highly heterogeneous scenarios.
[0023] (3) It combines extremely high algorithm accuracy with business-level avalanche fault tolerance: The QoPSN perception loss function of this invention changes the blind fitting of pure data-driven methods. Compared with the MSE loss of existing technologies, this invention not only has higher prediction accuracy when the system is generally stable, but also significantly improves the accuracy of model prediction when facing sudden traffic peaks and high-risk and endangered nodes. This reduces the economic losses caused by network avalanche and heavy load downtime due to prediction deviations, and has good industrial implementation and commercial application value. Attached Figure Description
[0024] Figure 1 This is an overall framework diagram of the method of the present invention.
[0025] Figure 2 This is a flowchart illustrating the Trans-HGAT model in the method of this invention. Detailed Implementation
[0026] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. Technical features in the various embodiments of the present invention can be combined accordingly without mutual conflict.
[0027] For ease of explanation, some terms appearing in the specific embodiments of the present invention will first be explained.
[0028] Product Service Network (PSN): A network system formed by the deep coupling of physical products and digital computing services in space and network topology, such as cloud manufacturing networks and vehicle networks.
[0029] Quality of Product-Service Network (QoPSN): This invention proposes a comprehensive evaluation index system that integrates digital service quality (QoS), physical entity status, and supply-demand coordination.
[0030] Heterogeneous Graph Attention Network (HGAT) is a graph neural network capable of handling complex network topologies with multiple node and edge types, and aggregating node neighborhood information through an attention mechanism.
[0031] Meta-path: In a heterogeneous graph, a specific semantic path that connects two types of nodes (e.g., "user-access-product-call-microservice").
[0032] In the product service network prediction scenario, this invention abstracts the product service network as a dynamic heterogeneous attribute graph. .Include: Node set : Contains a subset of nodes that are mutually exclusive in three categories, namely : , representing the set of user nodes This represents the i-th user node; , representing the set of physical product nodes, This represents the J-th physical product node; This represents the set of edge cloud computing service nodes. This represents the Kth edge cloud computing service node.
[0033] Directed edge set It includes multiple types of interaction relationships, namely ,in This indicates the user's access topology to the product; This indicates the topology of the product's call to the service; This indicates the network communication topology between services.
[0034] Feature tensor : In time step , will node The attributes (such as throughput, network latency, etc.) are encoded into attribute feature vectors. d is the dimension of the feature vector. When the given historical length is... The time window, product service network characteristics input is It contains the attribute feature vectors of all nodes in the dynamic heterogeneous attribute graph at all time steps within the time window.
[0035] Therefore, the objective of multimodal load spatiotemporal prediction is: given a historical observation sequence Learn a mapping function To predict the future Load prediction matrix for all nodes (especially service nodes and product nodes) in the network within a given time step. : Meanwhile, in training the mapping function At that time, its optimization process must be subject to the real-time comprehensive quality status (QoPSN) of the network nodes.
[0036] The above-mentioned load prediction scenarios can correspond to various practical application scenarios. This invention uses a product service network in an intelligent vehicle network environment as an example for illustration: In the context of intelligent connected vehicles, the product service network is an edge computing service system within the Internet of Vehicles (IoV). This system includes three types of core nodes: vehicle terminal nodes (such as intelligent vehicles), roadside physical device nodes (such as roadside units (RSUs) and charging piles), and cloud / edge computing service nodes (such as route planning services, autonomous driving assistance services, and real-time traffic analysis services).
[0037] The resulting dynamic heterogeneous property graph In this context, user nodes represent vehicle users or driving entities; physical product nodes represent specific intelligent vehicles and their onboard equipment, whose status includes battery level, device health, sensor status, etc.; and service nodes represent data processing and computing services deployed on edge servers or in the cloud, whose load status includes CPU utilization, task queue length, network bandwidth usage, etc.
[0038] In actual operation, such as during urban rush hours, a large number of vehicles simultaneously requesting route planning and real-time traffic analysis services can cause a sharp increase in the load on some edge service nodes. At the same time, due to insufficient battery power or aging equipment in some vehicles, their task processing capacity decreases, which can also affect the overall network.
[0039] Therefore, in this specific application context, the prediction objective of this invention can be specifically defined as: given the operating status data (including vehicle status, service load, network communication status, etc.) of all nodes in the vehicle-to-everything (V2X) system within a past time window (e.g., the past 30 minutes), predicting the load changes of different nodes within several future time steps (e.g., the next 5 to 15 minutes), including: (1) Load change trends of each edge computing service node (such as CPU utilization and request volume). (2) The operational pressure status of key physical product nodes (such as vehicles or roadside equipment); (3) Load propagation and congestion evolution trend of the entire product service network in spatial topology.
[0040] For example, it is possible to predict whether a specific edge server will reach an overload threshold within a future time window, thereby triggering task migration or load balancing strategies in advance; or to predict the risk of service congestion caused by concentrated vehicle requests in a certain area.
[0041] Through modeling and prediction of the specific scenarios described above, this invention can provide a forward-looking resource scheduling basis for vehicle-to-everything (V2X) systems, effectively avoiding problems such as service congestion, device overload, and system performance degradation. Based on the above background and analysis, this invention proposes a product service network quality assessment and load prediction framework based on heterogeneous graphs and Transformers. The overall process is as follows: Figure 1 As shown.
[0042] Specifically, for the QoPSN evaluation problem, this invention designs a metric function that includes three dimensions: digital, physical, and collaborative, and uses a dynamic weighting strategy based on entropy weighting for aggregation; for the heterogeneous spatiotemporal dependency problem, this invention constructs Trans-HGAT (Transformer-enhanced heterogeneous graph attention network); and for the problem of disjointed prediction targets, this invention designs a QoPSN-Aware Loss Function.
[0043] I. Construction of a Comprehensive Evaluation System for Product Service Network Quality (QoPSN) To comprehensively measure node health, this invention will use time steps. Next node The QoPSN is defined as a linear combination of three independent dimensions: digital service quality, physical product quality, and supply-demand coordination. in, For time step Next node QoPSN, For the node The digital quality of service component when it is a service node, otherwise it is 0; For the node The physical product mass component when it is a physical node, otherwise it is 0; Let t be the node The supply and demand coordination component is determined by the supply and demand matching status of the entire network, so all nodes have the same value at the same time. The weights of each component are calculated using dynamic information entropy.
[0044] To avoid subjective weighting by humans, this invention introduces dynamic information entropy for weight determination. For the evaluation matrix within the time window M... (Including the evaluation matrix composed of each of the three components), calculate the entropy value of the nth component. : in, Let be the proportion of the nth component at time t. Let be the evaluation matrix corresponding to the nth component at time t. The evaluation matrix for the physical product quality component contains only physical nodes, and the evaluation matrix for the digital service quality component contains only service nodes.
[0045] Then, the weight coefficient corresponding to each component is calculated. : The specific calculation process for each component is as follows: (1) Digital Service Quality Components : This component is primarily for service nodes. This invention utilizes service response time ( Throughput () ) and packet loss rate ( Quantization is performed. Furthermore, to eliminate the influence of dimensions, this invention employs range standardization: in, These are all weighted parameters, which can be set by the service provider, and ; This represents the upper limit of the service response time for node i. The node at time t Service response time This is the lower bound for the service response time of node i. The node at time t throughput, Let i be the upper limit of the throughput of node i. Let i be the lower limit of the throughput of node i. The node at time t The packet loss rate.
[0046] (2) Physical product mass components : This component primarily targets physical product nodes. In this invention, the remaining battery power of the physical entity ( ) and mechanical health ( As the basis for calculation, it can be expressed as: in, , These are the weighted summation parameters for remaining battery power and mechanical health, respectively.
[0047] Due to mechanical health Typically, the reliability of mechanical health declines exponentially with historical high-load operating time. Therefore, this invention uses the Weibull distribution reliability function to fit and derive the mechanical health status: in, The duration of sustained high load is defined as the longest single duration during which the load exceeds the threshold within a time window. and The scale and shape parameters of the physical product corresponding to this node.
[0048] (3) Supply and demand coordination : This component measures the overall matching degree between physical task demand and digital computing supply in the entire product service network at time t, reflecting the resource coordination status of the entire network. Since this indicator is calculated from the perspective of global supply and demand relationship, all nodes share the same supply and demand coordination component value at the same time.
[0049] Let the total computing power request value of the product nodes observed in the product service network at time t be [value missing]. The available idle computing power of the server is To measure the difference between the two, this invention introduces the information-theoretic Kullback-Leibler (KL) divergence inverse mapping for calculation: in, Here, exp is the adjustment coefficient, and exp is the exponential function. Let x be the KL divergence, and x be the computing power task currently requested by the network. The distribution of computing power request values for computing power task x. This represents the distribution of available computing power that the server can provide to computing task x. The smaller the KL divergence, the better the supply and demand match, and the closer the cooperative component is to 1.
[0050] II. Heterogeneous Spatial Feature Aggregation: HGAT (Heterogeneous Graph Attention) Based on Meta-Paths In order to effectively model the complex interaction relationships between multiple types of nodes in a product service network in a spatial dimension, this invention uses a meta-path-based heterogeneous graph attention network (HGAT) to extract spatial features from dynamic heterogeneous graphs.
[0051] (1) Metapath definition In heterogeneous graphs, nodes and edges have different types, and the connections between nodes have different semantics. To characterize this semantic difference, this invention introduces the concept of a meta-path: a meta-path is represented as a path pattern composed of alternating node types and relationship types, such as user-product-service path, product-service path, and service-service path.
[0052] For a metapath of a given type It defines a class of adjacency relations that satisfy the path structure, thereby determining the set of neighbors of a node under this semantic relation.
[0053] (2) Node-level Attention: Metapath given a path pattern First, the corresponding meta-paths are extracted from the heterogeneous graph. Then, node features of different types are projected onto the same latent space. For type... nodes Its transformation characteristics for: in, This represents the original feature vector of node i, i.e. ; Represents the mapped features, This is a linear mapping matrix corresponding to the node type.
[0054] For path mode Starting node and the termination node associated with it in this path pattern. Importance coefficients are calculated based on the self-attention mechanism. : in, For path mode The corresponding learnable weight vector, This represents a vector concatenation operation. This represents the activation function.
[0055] The importance coefficients are normalized to obtain the normalized importance coefficients. : in, For nodes Its associated termination node The importance coefficient between them In path mode Next, node The set of neighboring nodes.
[0056] Further weighted aggregation of the features of the terminating node yields the node. In specific path patterns Semantic representation below : By changing different path patterns and repeating the above process, the semantic representation of node i in each path pattern can be obtained.
[0057] (3) Semantic-level Attention: For nodes in a heterogeneous graph, the semantic information represented by different meta-paths contributes to varying degrees. Therefore, this invention further employs a semantic-level attention mechanism to weightedly fuse the semantic representations of nodes obtained under different meta-paths.
[0058] First, use the semantic representation of all nodes in the heterogeneous graph. The path pattern for each type of heterogeneous graph is calculated. Corresponding weights : in, This is the weight matrix. For bias, This is the activation function, and the T in the upper right corner is the transpose. It is a learnable semantic-level attention vector.
[0059] The semantic importance weights corresponding to all meta-paths are normalized to obtain the normalized weights for each meta-path. : Where C is the total number of all path patterns in the heterogeneous graph.
[0060] Since the node-level attention phase has already aggregated the information of a node and its meta-path neighbor nodes, the semantic-level attention phase only focuses on the node. The semantic representations obtained from different meta-paths are fused without further aggregation or averaging of the results from different node pairs. The final output of the heterogeneous spatial features from multiple meta-paths is the fused feature representation, yielding the fused feature of the i-th node. : in, Let i be the total number of metapaths associated with node i.
[0061] Based on the specified metapath type, traverse all nodes of the corresponding type in the heterogeneous graph at time t, and combine the fused feature representations of all nodes in the heterogeneous graph at time t into a spatial feature matrix. This completes the current time step. Heterogeneous topological spatial features are extracted. Further, the heterogeneous graphs at all time points are traversed to obtain the corresponding spatial feature matrices, which are then combined to obtain the spatial feature sequence. .
[0062] III. Long Temporal Dependency Coding: Temporal Transformer Mechanism like Figure 2 As shown, for the spatial feature sequence acquired within the time window M This invention uses the Transformer model to replace the traditional RNN / LSTM in order to avoid gradient vanishing and improve the ability to capture global periodicity.
[0063] (1) Positional Encoding: To inject the sequential information of the time series, sine and cosine positional coding is used to encode the spatial feature sequence: in, For the hidden layer dimension, Index each dimension in the hidden layer. For each position in the spatial feature sequence, The index of the pos-th position in the spatial feature sequence at the th position. Encoding in each dimension The index of the pos-th position in the spatial feature sequence at the th position. Encoding in each dimension.
[0064] Taking each position in the spatial feature sequence as a unit, the corresponding codes are concatenated according to the hidden layer dimension order to obtain the encoding result at that position. Furthermore, the PE containing the codes of all positions in the spatial feature sequence is obtained, and it is added to the spatial feature sequence accordingly to obtain the spatial feature coding sequence. : (2) Multi-Head Self-Attention (MHSA): Multi-head attention mechanisms are used to model the dynamic dependencies between nodes at different time steps, thereby capturing the temporal evolution of load changes. Spatial feature encoding sequences are then employed. Mapped to Query ( respectively) ), Key ( ),Value ( Matrix: in, and These are the query weight matrix, key weight matrix, and value weight matrix, respectively.
[0065] Building upon this, a multi-head attention mechanism is introduced to enhance the model's ability to express different temporal dependencies. Specifically, the mapping result is divided into H subspaces, and attention calculations are performed in each subspace. For the h-th attention head, its corresponding mapping is: in, , , These are the query parameter matrix, key parameter matrix, and value parameter matrix corresponding to the h-th attention head, respectively.
[0066] Calculate the scaled dot product attention for each attention head separately. This allows us to capture the span correlation between time steps: in, This specifies the dimensions of the query matrix and the key matrix.
[0067] Subsequently, the outputs of all attention heads are concatenated, and the multi-head attention output is obtained through a linear transformation: in, This is the output mapping matrix.
[0068] Through a multi-head mechanism, the model can focus on the dependencies between different time steps in parallel in different subspaces, thereby capturing multi-scale dynamic change patterns (such as short-term fluctuations and long-term trends) in time series.
[0069] After multi-head attention computation, the features are further processed using a feedforward neural network (FFN) combined with residual connections and Layer Normalization to perform nonlinear transformation and stabilization: in, This is an intermediate feature representation. This represents the temporal characteristics of the final output.
[0070] Finally, based on the above time-series feature representation, the load prediction results for the future time window are output: in, This is the predicted load sequence for all nodes in the network from time t+1 to time t+T. MLP stands for Multilayer Perceptron, used to map temporal features to the final predicted value.
[0071] (iv) Core innovation of joint optimization: QoPSN-Aware Loss Function During the training phase, traditional models use MSE for global indiscriminate optimization (MSE). However, in a service network, the tolerance for prediction errors is non-linear: for a node on the verge of collapse, a slight underestimation of the load can lead to a catastrophic outage.
[0072] To this end, the present invention innovatively designs a dynamic penalty multiplier based on the real-time QoPSN state of the node.
[0073] Set nodes At any moment The corresponding system security threshold is Define the safety margin (Margin) of node i at time t. for: This invention further constructs an adaptive penalty function for the safety margin. The mathematical definition is as follows: in, To punish the scaling factor, The attenuation slope, Let be the penalty value for node i at time t.
[0074] when When the value is a large positive number (indicating excellent network quality and abundant resources), It degenerates into the standard MSE; when When the value approaches 0 or is less than or equal to 0 (network quality deteriorates, resources are nearing depletion), The severity of punishment is amplified exponentially.
[0075] This invention incorporates this function into the objective function of backpropagation optimization, thus constructing the final loss function of this invention—the product service network quality perception loss function. : in, The total number of nodes, i.e. ; Let be the actual load of node i at time t+a. It is the L2 norm. The L2 regularization coefficient is used to prevent overfitting. Based on the loss function constructed above, the model is trained end-to-end. The parameters in steps two (heterogeneous spatial feature aggregation) and three (long-term time series modeling) are jointly optimized through backpropagation until the loss function reaches the preset convergence condition, thus obtaining the trained spatiotemporal load prediction model.
[0076] During the inference phase, product service network data from multiple historical time steps are acquired, and corresponding input feature sequences are constructed. By inputting this data into the trained spatiotemporal load prediction model, the load prediction sequence for the target node within a specified future time range t+1 to t+T can be obtained. .
[0077] To demonstrate the effectiveness of the loss function constructed in this invention, the partial derivatives of the loss function are calculated according to the chain rule during backpropagation gradient calculation: From the above formula, it is clear that when the QoPSN of a certain node approaches... hour, It will increase dramatically, leading to The gradient values surge. This means that during the stochastic gradient descent (SGD / Adam) optimization process, the model is forced to allocate extremely large network weights to fit these nodes in a "high-risk state," thereby actively suppressing prediction errors that could easily cause system avalanche. This solves the fundamental technical defect of existing technologies where the prediction target is disconnected from the actual business fault tolerance capability.
[0078] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained through equivalent substitution or transformation fall within the protection scope of the present invention.
Claims
1. A method for quality assessment and spatiotemporal load prediction of product-service networks based on heterogeneous graphs and Transformers, characterized in that, include: S1. Obtain product service networks at multiple historical moments, and extract users, physical products, and services from each product service network as nodes, the interaction relationships between nodes as directed edges, and the attribute information of nodes as node features, thereby constructing the corresponding heterogeneous graph. S2 introduces dynamic information entropy as weight to construct a comprehensive evaluation index system for product service network quality that includes digital service quality components, physical product quality components, and supply and demand coordination components, and further calculates the evaluation score of each node at each historical moment. S3 uses a heterogeneous graph attention network module to sequentially apply node-level attention mechanism and semantic-level attention mechanism to the heterogeneous graph at each historical moment, thereby obtaining the fusion features of all nodes in the heterogeneous graph and forming a spatial feature matrix. The spatial feature matrices of all heterogeneous graphs constitute a spatial feature sequence; S4. Based on the spatial feature sequence, a spatial feature encoding sequence is obtained using Transformer; the spatial feature encoding sequence is then passed through a multi-head self-attention module to obtain the final temporal feature representation, and further, the predicted load of all nodes within a specified time step is obtained. S5, combining the predicted load, evaluation score and the actual load of the node, calculates the quality-aware loss function and updates all parameters in the heterogeneous graph attention network module and the multi-head self-attention module until convergence; S6 obtains the product service network to be predicted at multiple historical moments, and uses all trained modules to obtain the predicted load of all nodes within a specified future time step.
2. The method for quality assessment and spatiotemporal load prediction of product service networks based on heterogeneous graphs and Transformers according to claim 1, characterized in that, In S2, the calculation process for the digital service quality component is as follows: If the node is a user node or a physical product node, then the digital quality of service component of that node is 0. If the node is a service node, then the formula for calculating the digital quality of service component of that node is: ; in, All are weighted parameters, and ; This represents the upper limit of the service response time for node i. The node at time t Service response time This is the lower bound for the service response time of node i. The node at time t throughput, Let i be the upper limit of the throughput of node i. Let i be the lower limit of the throughput of node i. The node at time t packet loss rate, Let be the value of the digital quality of service component of node i at time t.
3. The method for quality assessment and spatiotemporal load prediction of product service networks based on heterogeneous graphs and Transformers according to claim 1, characterized in that, In step S2, the calculation process for the physical product mass component is as follows: If the node is a user node or a service node, its physical product quality component is 0. If the node is a physical product node, the formula for calculating its physical product quality component is as follows: ; in, , These are the weight parameters, Let be the remaining battery power of the physical entity corresponding to node i at time t. The mechanical health of the physical entity corresponding to node i at time t is obtained by fitting the Weibull distribution reliability function. Let be the value of the physical product quality component of node i at time t.
4. The method for product service network quality assessment and spatiotemporal load prediction based on heterogeneous graphs and Transformers according to claim 1, characterized in that, In S2, the supply and demand coordination component is calculated using KL divergence, and the calculation formula is as follows: ; in, Here, exp is the adjustment coefficient, and exp is the exponential function. Let represent the distribution of the total computing power request value of all product nodes in the product service network at time t. The distribution of available idle computing power on the server. Let be the value of the supply and demand coordination component of node i at time t.
5. The method for quality assessment and spatiotemporal load prediction of product service networks based on heterogeneous graphs and Transformers according to claim 1, characterized in that, In S3, the process of extracting the fusion features of nodes using the heterogeneous graph attention network module based on the heterogeneous graph at time t is as follows: S301 specifies multiple path patterns, iterates through each path pattern in turn and performs node-level attention extraction: for each node, extract all meta-paths that start from that node and conform to the path pattern; based on the start and end nodes of each meta-path, obtain the importance coefficient of each meta-path, and further obtain the semantic representation of the node under different meta-paths. S302, perform semantic-level attention extraction: taking the meta-path as a unit, calculate the semantic importance weight of each meta-path based on the semantic representation of all nodes under the meta-path; after normalizing the semantic importance weight, use the normalized semantic importance weight as the coefficient to perform weighted summation of the semantic representations obtained by each node under different meta-paths to obtain the fusion feature representation of the node.
6. The method for quality assessment and spatiotemporal load prediction of product service networks based on heterogeneous graphs and Transformers according to claim 1, characterized in that, In step S4, the spatial feature encoding sequence is obtained by encoding the spatial feature sequence using Transformer positional encoding and then adding it to the spatial feature sequence.
7. The method for product service network quality assessment and spatiotemporal load prediction based on heterogeneous graphs and Transformers according to claim 6, characterized in that, The Transformer position encoding is a sine / cosine position encoding.
8. The method for quality assessment and spatiotemporal load prediction of product service networks based on heterogeneous graphs and Transformers according to claim 1, characterized in that, In step S4, the process of obtaining the final temporal feature representation through the multi-head self-attention module is as follows: S401, the spatial feature encoding sequence is mapped to a query matrix, a key matrix, and a value matrix respectively through the query weight matrix, the key weight matrix, and the value weight matrix; S402, input the query matrix, key matrix and value matrix into each attention head and calculate the dot product attention; The dot product attention of all attention heads is then concatenated and linearly transformed to obtain the final output. S403 adds the final output to the spatial feature encoding sequence, and then passes it through a feedforward neural network, residual connections, and layer normalization in sequence to obtain the temporal feature representation.
9. The method for quality assessment and spatiotemporal load prediction of product service networks based on heterogeneous graphs and Transformers according to claim 1, characterized in that, In step S5, the calculation process of the quality-perceived loss function is as follows: First, the evaluation score of node i at time t is subtracted from the safety threshold to obtain the safety margin of node i at time t; Secondly, based on the safety margin, an adaptive penalty function is constructed, which further yields the quality-perceived loss function, calculated as follows: ; in, Let the quality-perceived loss function be... The total number of nodes, i.e. ; Let be the actual load of node i at time t+a. It is the L2 norm. The L2 regularization coefficient; The total duration for a specified time step. Let be the predicted load of node i at time t+a. Let be the adaptive penalty function for node i at time t+a. For parameters.
10. The method for quality assessment and spatiotemporal load prediction of product service networks based on heterogeneous graphs and Transformers according to claim 9, characterized in that, The formula for calculating the adaptive penalty function is as follows: ; in, To punish the scaling factor, The attenuation slope, Let be the penalty value for node i at time t. Let be the safety margin of node i at time t.