Network quality anomaly detection method and system

By combining an encoder and a hidden Markov model with an attention layer in network quality anomaly detection, the problem of the attention layer being unable to focus on critical moments is solved, and higher accuracy network quality anomaly detection is achieved.

CN121357584APending Publication Date: 2026-01-16中移信息技术有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511470724.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

In existing technologies, the attention layer cannot effectively focus on critical moments of network quality anomalies, resulting in low accuracy in network quality anomaly detection.

Method used

By acquiring time-series data of network quality metrics, preprocessing is performed using an encoder to obtain hidden state vectors, which are then input into a Hidden Markov Model (HMM). Combining the attention layer and the posterior probability vector of the hidden state, a target global context vector is generated, and finally, network quality anomaly detection is performed using the HMM.

Benefits of technology

It improves the accuracy of network quality anomaly detection, enabling more precise focus on critical moments of network quality anomalies and enhancing detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121357584A_ABST
    Figure CN121357584A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a network quality anomaly detection method and system. The method comprises the following steps: acquiring time sequence data of a network quality index, and preprocessing the time sequence data by using an encoder to obtain hidden state vectors at a plurality of moments; inputting an initial global context vector obtained according to the hidden state vector into a preset hidden Markov model to obtain a hidden state posterior probability vector at each moment; inputting the hidden state vector and the hidden state posterior probability vector into a preset attention layer, outputting an attention weight of each moment by the attention layer, and generating a target global context vector according to the attention weight and the hidden state vector; and inputting the target global context vector into the hidden Markov model to obtain a network quality anomaly detection result. According to the technical scheme of the embodiment of the invention, the network quality anomaly detection precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The embodiment of the present application relates to the technical field of Internet of Vehicles, and particularly relates to a network quality anomaly detection method and system. BACKGROUND

[0002] In a vehicle-road-cloud network environment, network quality is affected by various factors, such as signal attenuation, bandwidth bottleneck, packet loss, sudden delay and frequent switching, etc., which can all cause unstable communication between the vehicle-road-cloud, and thus seriously affect the stable operation of intelligent networked vehicles. Therefore, it is crucial to detect network quality anomalies, especially for vehicle-road-cloud network quality.

[0003] In related network quality anomaly detection schemes, an encoder can be used to process time series data of network quality indicators, and then an attention layer is used to process the output of the encoder, and on this basis, network quality anomaly detection is performed.

[0004] In the process of implementing the present application, the inventors have found that the prior art has the following technical problems: the attention layer cannot effectively focus on the key moment of network quality anomaly, resulting in low network quality anomaly detection accuracy, which needs to be solved urgently. SUMMARY

[0005] The embodiment of the present application provides a network quality anomaly detection method and system, which solves the problem of low network quality anomaly detection accuracy.

[0006] According to an aspect of the present application, a network quality anomaly detection method can include:

[0007] Obtaining time series data of network quality indicators, preprocessing the time series data by using an encoder to obtain hidden state vectors at multiple time points;

[0008] Inputting an initial global context vector obtained according to the hidden state vectors into a preset hidden Markov model to obtain hidden state posterior probability vectors at the time points;

[0009] Inputting the hidden state vectors and the hidden state posterior probability vectors into a preset attention layer, outputting attention weights at the time points by the attention layer, and generating a target global context vector according to the attention weights and the hidden state vectors;

[0010] Inputting the target global context vector into the hidden Markov model to obtain a network quality anomaly detection result.

[0011] Optionally, obtaining the time series data of network quality indicators includes:

[0012] For each network quality indicator, obtain original time series data of the network quality indicator, segment the original time series data according to a preset time window to obtain a plurality of time window data, and perform interpolation processing on each time window data to obtain all interpolation processing results, and update the original time series data according to all interpolation processing results;

[0013] The updated original time series data of different network quality indicators are normalized to obtain time series data corresponding to each network quality indicator.

[0014] Optionally, the time series data is preprocessed by using an encoder to obtain hidden state vectors at a plurality of moments, including:

[0015] The time series data is respectively forward and backward encoded by using the encoder to obtain forward hidden state vectors and backward hidden state vectors at a plurality of moments;

[0016] The forward hidden state vectors and the backward hidden state vectors at each moment are spliced to obtain a hidden state vector.

[0017] Optionally, the hidden state vector and the latent state posterior probability vector are input into a preset attention layer, and the attention layer outputs attention weights at each moment, including:

[0018] The hidden state vector and the latent state posterior probability vector are input into a preset attention layer, and the attention layer performs additive fusion or multiplicative fusion on the hidden state vector and the latent state posterior probability vector at each moment to output attention weights at each moment.

[0019] On this basis, an optional additive fusion is performed on the hidden state vector and the latent state posterior probability vector at each moment to output attention weights at each moment, including:

[0020] The hidden state vector at each moment is linearly transformed to obtain a first vector, and the latent state posterior probability vector at each moment is linearly transformed to obtain a second vector;

[0021] The sum of the first vector and the second vector is output as the attention weight at each moment.

[0022] Another optional multiplicative fusion is performed on the hidden state vector and the latent state posterior probability vector at each moment to output attention weights at each moment, including:

[0023] The hidden state vector at each moment is linearly transformed to obtain a third vector, and the latent state posterior probability vector at each moment is linearly transformed to obtain a fourth vector;

[0024] According to a dot product result of the third vector and the fourth vector, a similarity between the third vector and the fourth vector is obtained, and the attention weight of each time is output according to the similarity.

[0025] Optionally, the attention layer is obtained by training in the following manner:

[0026] After obtaining the sample hidden state posterior probability vector and the sample attention weight obtained in the training process of the attention layer, loss calculation is performed on the basis of the optimization target that the sample attention weight approaches the sample hidden state posterior probability vector, and the attention layer is trained according to the obtained guided attention loss.

[0027] On this basis, the attention layer is trained according to the obtained guided attention loss, including:

[0028] The network quality anomaly probability output by the hidden Markov model in the training process and the network quality anomaly label corresponding to the network quality anomaly probability are obtained, and the clustering discrimination loss is obtained according to the network quality anomaly probability and the network quality anomaly label.

[0029] The joint total loss is determined according to the obtained guided attention loss and the clustering discrimination loss, and the parameters in the pre-trained attention layer are adjusted according to the joint total loss, so as to train the attention layer.

[0030] On the basis of any of the above technical solutions, optionally, the time series data is data obtained from the vehicle-road cloud data according to the network quality index, and the network quality is the vehicle-road cloud network quality; and / or,

[0031] The emission probability of the hidden Markov model is obtained by modeling through a Gaussian mixture model, and the Gaussian mixture model is used to adaptively cluster the number of clusters in the clustering process of the hidden state.

[0032] According to another aspect of the present application, a network quality anomaly detection system can include:

[0033] The hidden state vector obtaining module is configured to obtain time series data of the network quality index, and pre-process the time series data by using an encoder to obtain a plurality of hidden state vectors of time points.

[0034] The hidden state posterior probability vector obtaining module is configured to input an initial global context vector obtained according to the hidden state vector into a preset hidden Markov model to obtain a hidden state posterior probability vector of each time point.

[0035] The target global context vector obtaining module is configured to input the hidden state vector and the hidden state posterior probability vector into a preset attention layer, output an attention weight of each time point by the attention layer, and generate a target global context vector according to the attention weight and the hidden state vector.

[0036] The network quality anomaly detection module is configured to input the target global context vector into the hidden Markov model to obtain a network quality anomaly detection result.

[0037] Optionally, the network quality anomaly detection system comprises an edge end and a cloud end, wherein the hidden state vector obtaining module, the hidden state posterior probability vector obtaining module, and the target global context vector obtaining module are deployed on the edge end, and the network quality anomaly detection module is deployed on the cloud end.

[0038] The technical scheme of the embodiment of the application comprises the following steps: obtaining time series data of network quality indexes; preprocessing the time series data by using an encoder to obtain hidden state vectors at multiple time points; inputting an initial global context vector obtained according to the hidden state vectors into a preset hidden Markov model to obtain hidden state posterior probability vectors at the multiple time points; inputting the hidden state vectors and the hidden state posterior probability vectors into a preset attention layer, outputting attention weights at the multiple time points by the attention layer, and generating a target global context vector according to the attention weights and the hidden state vectors; and inputting the target global context vector into the hidden Markov model to obtain a network quality anomaly detection result. The technical scheme described above introduces the hidden state posterior probability vectors output by the hidden Markov model as a guide signal for the attention layer to calculate the attention weights, and the attention weights calculated based on this can focus more accurately on the key time points of network quality anomalies, thereby improving the network quality anomaly detection precision.

[0039] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can also be obtained by those skilled in the art without any creative effort based on these drawings.

[0041] Figure 1 is a schematic diagram according to an optional example in the related network quality anomaly detection method;

[0042] Figure 2a is a schematic diagram according to an optional example in the network quality anomaly detection method provided by the embodiment of the application;

[0043] Figure 2b is a flowchart of an optional example in the network quality anomaly detection method provided by the embodiment of the application;

[0044] Figure 3 is a flowchart of a network quality anomaly detection method according to an embodiment of the present application;

[0045] Figure 4 is a flowchart of a preprocessing example in a network quality anomaly detection method according to an embodiment of the present application;

[0046] Figure 5 is a flowchart of another network quality anomaly detection method according to an embodiment of the present application;

[0047] Figure 6a is a flowchart of guided Attention collaborative feedback training in another network quality anomaly detection method according to an embodiment of the present application;

[0048] Figure 6b is a structural schematic diagram of Bi-GRU + Attention in another network quality anomaly detection method according to an embodiment of the present application;

[0049] Figure 7 is a flowchart of yet another network quality anomaly detection method according to an embodiment of the present application;

[0050] Figure 8 is a schematic diagram of cloud-edge collaborative detection architecture in yet another network quality anomaly detection method according to an embodiment of the present application;

[0051] Figure 9 is a flowchart of yet another network quality anomaly detection method according to an embodiment of the present application;

[0052] Figure 10 is a structural schematic diagram of DP-GMM-based HMM in yet another network quality anomaly detection method according to an embodiment of the present application;

[0053] Figure 11 is a structural block diagram of a network quality anomaly detection system according to an embodiment of the present application;

[0054] Figure 12 is a structural schematic diagram of an edge device or a cloud server implementing a network quality anomaly detection method according to an embodiment of the present application. DETAILED DESCRIPTION

[0055] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0056] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The same applies to "target," "original," etc., and will not be repeated here. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0057] It should be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solution of this invention all comply with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to maintain the security of user personal information and network security.

[0058] Before introducing the embodiments of the present invention, relevant network quality anomaly detection methods will be described by way of example to better understand the advantages of the network quality anomaly detection methods proposed in the embodiments of the present invention. For example, the relevant methods can be broadly classified into two categories: engineering practice verification methods and algorithm model detection methods.

[0059] Among these methods, engineering practice verification is a commonly used technique in the early deployment phase of vehicle-to-everything (V2X) networks, widely applied in operator network monitoring systems and basic communication operation and maintenance systems. It primarily relies on manual testing, fixed-point sampling, indicator threshold judgment, and manual empirical rules, typically using macroscopic statistical characteristics for anomaly detection. This type of method has advantages such as low deployment cost, intuitive implementation logic, and ease of understanding, making it suitable for small-scale pilot projects or preliminary assessments in static areas. However, this method has significant limitations: it struggles to cover large-scale and long-term dynamic network states, its detection granularity is relatively coarse, and it lacks the ability to capture anomaly evolution trends. Furthermore, it has weak capabilities in identifying novel, combined, and evolving anomalies.

[0060] With the development of artificial intelligence technology, researchers have gradually shifted towards relying on algorithmic models for network anomaly detection, forming a mainstream technical approach based primarily on algorithmic model detection methods. These methods rely on machine learning and deep learning algorithms, such as... Figure 1 As shown, this method achieves automatic identification and judgment of network quality anomalies by learning pattern changes in historical data. This improves the automation level of detection and the ability to model complex data distributions. However, it still faces many challenges in practical applications, such as heavy reliance on large-scale, high-quality labeled samples, the lack of adaptive ability of clustering algorithms to the number of anomaly categories, insufficient ability of deep models to identify key time segments, and shortcomings in balancing temporal dependence and real-time response in some models. Therefore, it is crucial to construct a small-sample semi-supervised network quality detection method that possesses both adaptive anomaly identification capabilities and balances temporal modeling depth with real-time computational efficiency.

[0061] Based on this, various embodiments of the present invention provide examples such as Figure 2a and Figure 2b The network quality anomaly detection method shown may include a data preprocessing module, a Bi-GRU+guided attention feedback encoder module, and a DP-GMM-based HMM clustering guided feedback recognizer module. Furthermore, it may include a cloud-edge collaborative detection architecture. These components will be elaborated upon below.

[0062] Figure 3 This is a flowchart of a network quality anomaly detection method provided in an embodiment of the present invention. This embodiment is applicable to network quality anomaly detection, especially to vehicle-road-cloud network quality anomaly detection. The method can be executed by the network quality anomaly detection system provided in this embodiment of the present invention. This system can be implemented in software and / or hardware. Based on this, and considering the application scenarios that may be involved in this embodiment of the present invention, optionally, the system can include an edge terminal and a cloud terminal. The edge terminal can be integrated on an edge device, such as an in-vehicle terminal and / or roadside equipment, and the cloud terminal can be integrated on a cloud server.

[0063] See Figure 3 The method of this invention specifically includes the following steps:

[0064] S110. Obtain time-series data of network quality indicators, preprocess the time-series data using an encoder, and obtain hidden state vectors at multiple time points.

[0065] Among them, network quality indicators can be understood as metrics that characterize network quality. For example, Reference Signal Received Power (RSRP) and Reference Signal Received Quality (RSRQ) reflect the signal strength and quality of the wireless link between the vehicle-mounted terminal and the roadside base station. Latency can be understood as the end-to-end communication latency of data interaction between the vehicle and the cloud platform. Packet loss rate represents the stability of data transmission in the vehicle-road-cloud link, and bandwidth utilization is used to measure the use of link resources in scenarios such as roadside equipment transmitting video streams to the cloud. These network quality indicators have clear time-series characteristics and can be comprehensively used to dynamically evaluate the network quality, status, and performance of each link in the "vehicle-road-cloud" system, supporting network operation monitoring, trend analysis, and intelligent optimization.

[0066] The invention obtains time-series data of network quality indicators. Optionally, in this embodiment, the time-series data can be data obtained from vehicle-road-cloud data based on network quality indicators; that is, it can be data about network quality indicators extracted from vehicle-road-cloud data. In this case, the network quality is the vehicle-road-cloud network quality. Therefore, this embodiment can be considered as designed for integrated vehicle-road-cloud scenarios and can be applied to scenarios with high reliability requirements, such as vehicle networking and autonomous driving assistance systems, thereby meeting the need for intelligent network quality monitoring.

[0067] Alternatively, the aforementioned time-series data can be considered as data obtained after preprocessing. When there are at least two network quality indicators, obtaining the time-series data of the network quality indicators may include:

[0068] For each network quality indicator, the raw time-series data of the network quality indicator is obtained and segmented according to a preset time window to obtain multiple time window data. Interpolation processing is performed on the data in each time window to obtain all interpolation results. The raw time-series data is updated based on all interpolation results. Normalization processing is then performed on the updated raw time-series data of different network quality indicators to obtain the time-series data corresponding to each network quality indicator. The above interpolation processing of the data in each time window can unify the number of data points in each time window data obtained after interpolation. Thus, the raw discrete time-series data can be processed into time-series data suitable for subsequent clustering modeling.

[0069] An example of the preprocessing described above is given here. For an example, see [link to example]. Figure 4Data segmentation and interpolation: Continuously acquired time-series data (i.e., time series data) are segmented into time windows, and interpolation is used to ensure the consistency of the number of data points within each time window, thus ensuring consistency in subsequent processing. Then, data normalization: To eliminate the influence between different units, L2 normalization is used, mapping each data vector to a unit hypersphere. The normalized time-series data is denoted as... .

[0070] Furthermore, the temporal data is preprocessed using an encoder to obtain hidden state vectors at multiple time points. This preprocessing can be considered a temporal encoding process, and the multiple time points refer to the various time points involved in the temporal data, thus yielding hidden state vectors corresponding to each of these time points. In this embodiment, the encoder used can be a Long Short-Term Memory (LSTM) network, a Transformer, or a Gated Recurrent Unit (GRU), particularly a GRU, and especially a Bidirectional Gated Recurrent Unit (Bi-GRU), because its structure has the advantages of fewer parameters and faster inference speed, and the combination with an attention mechanism can improve accuracy.

[0071] Here is an example of temporal coding. For instance, the temporal data is encoded using an encoder in both forward and backward directions to obtain forward and backward hidden state vectors at multiple time points. The forward and backward hidden state vectors at each time point are then concatenated to obtain the hidden state vector. In other words, the forward and backward hidden state vectors at the same time point are concatenated to obtain the hidden state vector at that time point.

[0072] For example, taking time t as an example, for Perform forward and backward temporal coding respectively to obtain the forward hidden state at time t. and backward hidden state Then, the hidden states in the two directions are concatenated along the feature dimension (i.e., a vector concatenation operation is performed). This can form the complete hidden state vector (feature representation vector) at time t. ), which serves as the encoder's output for that time t.

[0073] S120. Input the initial global context vector obtained from the hidden state vector into the preset hidden Markov model to obtain the hidden state posterior probability vector at each time step.

[0074] The process involves obtaining an initial global context vector based on each hidden state vector. For example, the initial global context vector can be obtained from each hidden state vector and the initial attention weights. Then, the initial global context vector is input into a pre-defined Hidden Markov Model (HMM) to obtain the posterior probability vector of the hidden state at each time step based on the output of the HMM, thus obtaining the posterior probability vector of the hidden state corresponding to each time step.

[0075] It is understandable that since the hidden state posterior probability vector is obtained from time series data, the hidden state here is the network state, that is, the hidden state posterior probability vector is the network state posterior probability vector.

[0076] S130. Input the hidden state vector and the hidden state posterior probability vector into the preset attention layer. The attention layer outputs the attention weights at each time step and generates the target global context vector based on the attention weights and the hidden state vector.

[0077] To better understand this step, we will first explain how the attention mechanism is applied in the relevant methods. For example, this attention mechanism calculates the attention weights at each time step. Obtain the global context vector :

[0078] ;

[0079] Among them, h t Let be the hidden state vector at time t, generated by the encoder, representing the semantic features of the input at that time. W is a learnable weight matrix (usually a vector or a small matrix) used to project the hidden state vector onto the attention scoring space; it is a trainable parameter. b is a learnable bias term used to adjust the bias of the attention scoring; it is a trainable parameter. is the normalized attention weight, representing the relative importance of the current time t among all times, calculated using softmax. T is the total duration or number of time steps of the input sequence. c is the global context vector, also known as the context angle, which is the hidden state h at each time step. t The weighted sum is used as the overall semantic representation of the input.

[0080] Building upon this, to further enhance the Attention mechanism's ability to focus on critical moments of network quality anomalies, this embodiment of the invention introduces the hidden state posterior probability vector γ output by the HMM. tAs a guiding feedback signal, the relevant attention mechanism is enhanced and modeled. In this embodiment of the invention, critical moments of network quality anomalies, especially critical moments of vehicle-road-cloud network quality anomalies, can be understood as situations where network quality indicators deviate significantly from the normal state at a certain moment. This may lead to problems such as interruption of data transmission in vehicle applications, control response delays, and abnormal vehicle cloud services. By guiding the attention mechanism to focus on the hidden state characteristics of these abnormal moments, it helps to improve the system's ability to perceive and respond to sudden changes in network quality.

[0081] After processing the encoder output, the Hidden Markov Model (HMM) can provide the probability distribution of each time step belonging to different hidden states, i.e. ,in, It is a vector of length K, representing the observation sequence at time t. Given the conditions, i.e., the hidden state vector at time t output by the encoder. Given conditions, hidden state The probability of taking each possible value. Specifically, K is the total number of hidden states. The posterior probability is calculated using the forward-backward algorithm of the Hidden Matrix (HMM). It is derived from the hidden state vector provided by the encoder. Subsequent modeling was used to enhance the interpretability of the hidden state at each time step.

[0082] Based on the enhanced modeling of the relevant attention mechanism, the attention weights at each time step can be output by the attention layer, and the target global context vector can be generated according to the attention weights and the hidden state vector.

[0083] For example, inputting the hidden state vector and the hidden state posterior probability vector into a preset attention layer, and having the attention layer output the attention weights at each time step, can include: inputting the hidden state vector and the hidden state posterior probability vector into a preset attention layer, and having the attention layer perform additive attention or multiplicative attention on the hidden state vector and the hidden state posterior probability vector at each time step, and outputting the attention weights at each time step.

[0084] For example, additively fusing the hidden state vectors and hidden state posterior probability vectors at each time step to output the attention weights at each time step can include: performing a linear transformation on the hidden state vectors at each time step to obtain a first vector, and performing a linear transformation on the hidden state posterior probability vectors at each time step to obtain a second vector; and outputting the attention weights at each time step based on the sum of the first and second vectors. The above additive fusion process can be described as... and Linear transformations are introduced separately, and the results are summed before being input into the softmax function to calculate the attention weights.

[0085] ;

[0086] in, It is the hidden state vector (i.e., semantic feature) output by the encoder at time t. It is the posterior probability vector of the hidden state calculated by HMM at time t (i.e., the distribution characteristics of the hidden state). It is The weight matrix projected onto the attention space; It is The weight matrix projected onto the attention space, where b is the bias term, and softmax is used to normalize the scores across all time steps to obtain the attention weights. .

[0087] The additive fusion approach described above essentially incorporates the probability of abnormal states as a "bias signal" into the attention scoring, allowing the model to more flexibly adjust its focus. This approach has good interpretability and is applicable to application scenarios with strong state distribution discrimination.

[0088] For example, multiplying and fusing the hidden state vectors and hidden state posterior probability vectors at each time step to output the attention weights at each time step can include: performing a linear transformation on the hidden state vectors at each time step to obtain a third vector, and performing a linear transformation on the hidden state posterior probability vectors at each time step to obtain a fourth vector; obtaining the similarity between the third and fourth vectors based on the dot product of the third and fourth vectors, and outputting the attention weights at each time step based on the similarity. This multiplicative fusion process can be described as a scoring principle based on vector similarity (dot product). and The closer the mapped directions are, the larger the dot product and the higher the attention weight. That is, for... and After linear mapping, calculate the dot product; the higher the similarity, the greater the weight.

[0089] ;

[0090] in, It is Weights projected onto the same space; It is Transpose after mapping; It is The result after mapping; It is a scalar that represents the similarity score between the two vectors.

[0091] The above multiplicative fusion method calculates similarity through linear mapping and dot product, measuring... and The "directional consistency" approach significantly improves the score when the expressions of the two become more consistent (e.g., abnormal features and abnormal semantics highly overlap), thereby enhancing the model's sensitivity to abnormal situations. This method is applicable to application scenarios where the model has higher requirements for modeling the similarity of abnormal states.

[0092] The above-mentioned guided scoring mechanism can enhance the model's anomaly detection capability in at least the following two aspects:

[0093] On the one hand, introducing aberrant state priors guides attention to aberrant segments: HMM, based on its global sequence modeling capabilities, outputs... It captures the probability of belonging to a potential anomalous state at each time step. This is used as a guiding signal... Fusion helps to explicitly highlight those moments that the HMM judges as "abnormal tendencies." This is equivalent to introducing a priori guidance of abnormal states into the attention mechanism, making it easier to focus on key segments.

[0094] On the other hand, it collaborates with HMM clustering boundaries: HMM's inherent clustering capability can delineate potential state boundaries, and the attention mechanism, after fusion, tends to align with these boundaries, thereby improving the detection accuracy of anomalous regions. The introduction of this helps the encoder output better match the discrimination boundary of the HMM.

[0095] All of these effectively improve the sensitivity of the attention mechanism to identifying anomalous time segments, enabling the encoder to output a result that better matches the HMM clustering discrimination boundary.

[0096] S140. Input the target global context vector into the hidden Markov model to obtain the network quality anomaly detection results.

[0097] The target global context vector obtained through the above steps is input into the HMM, so that the network quality represented by the above time series data can be determined from the output of the HMM.

[0098] The technical solution of this invention acquires time-series data of network quality indicators, preprocesses the time-series data using an encoder to obtain hidden state vectors at multiple time points, inputs the initial global context vector obtained from the hidden state vectors into a preset Hidden Markov Model (HMM) to obtain the hidden state posterior probability vectors at each time point, inputs the hidden state vectors and hidden state posterior probability vectors into a preset attention layer, outputs the attention weights at each time point, and generates a target global context vector based on the attention weights and hidden state vectors, and inputs the target global context vector into the HMM to obtain the network quality anomaly detection result. This technical solution, by introducing the hidden state posterior probability vector output by the HMM as a guiding signal for the attention layer to calculate the attention weights, allows the calculated attention weights to more accurately focus on critical moments of network quality anomalies, thereby improving the accuracy of network quality anomaly detection.

[0099] Specifically, the technical solution of this invention encodes temporal data based on a Bi-GRU and a guided Attention layer. The Bi-GRU simultaneously captures the forward and backward dependency features of the temporal data, and by introducing a guided attention feedback mechanism, the posterior probability vector of the hidden state is fed back to the Bi-GRU and the Attention layer, guiding them to focus on critical moments of potential anomalies. This mechanism enhances the state perception capability of attention through additive or multiplicative fusion, thereby exhibiting higher accuracy and temporal sensitivity in identifying complex anomaly scenarios such as congestion, link interruption, and signal interference, and improving the accuracy of network quality anomaly detection.

[0100] Figure 5 This is a flowchart of another network quality anomaly detection method provided in this embodiment of the invention. This embodiment is based on and optimized from the above-described technical solutions. In this embodiment, optionally, the attention layer can be trained as follows: obtain the sample hidden state posterior probability vector and sample attention weights obtained during the training process of the attention layer, calculate the loss with the optimization objective of making the sample attention weights closer to the sample hidden state posterior probability vector, and train the attention layer based on the obtained guided attention loss. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.

[0101] See Figure 5 The method in this embodiment may specifically include the following steps:

[0102] S210. Obtain the sample hidden state posterior probability vector and sample attention weights obtained during the training process of the attention layer. Calculate the loss with the optimization objective of making the sample attention weights closer to the sample hidden state posterior probability vector, and train the attention layer based on the obtained guided attention loss.

[0103] In this embodiment of the invention, during the training of the attention layer, the posterior probability vector of the sample hidden state can be obtained. The process of obtaining this sample hidden state posterior probability vector is similar to the process described above, except that the former is obtained during model training, while the latter is obtained during model inference (i.e., application). Therefore, the process of obtaining the sample hidden state posterior probability vector will not be elaborated here. The sample attention weights are obtained in the same way.

[0104] Specifically, the posterior probability vector of the hidden state of the sample can be... Used as sample attention weights Guidance, and Compare the results and construct a loss function. For example, compare the output of the HMM. Consider it as the target attention distribution, and compare it with the model learned. Distribution alignment is performed, and a loss function is constructed by comparing the two through a guided attention loss (such as KL divergence or mean squared error), thereby improving the model's attention response capability and overall discrimination performance in anomaly segment identification. This mechanism effectively integrates model semantic features and state priors to achieve supervised and enhanced temporal modeling. In this embodiment, KL divergence is used as the guided attention loss, and based on this, the following joint total loss can be obtained by combining it with the main task's clustering discrimination loss:

[0105] ;

[0106] Here, λ is an adjustable weighting coefficient. The attention weights used in the Attention layer, as explained earlier, represent the degree of attention the model pays to at different times. This represents the posterior probability vector of the hidden states at each time step of the HMM output, as described above. KL stands for Kullback-Leibler divergence, used to measure whether the attention focus is on important states. It characterizes the difference between the model's attention distribution and the probability of anomalous states in the HMM. A larger and smaller KL divergence indicates that the model's attention is more focused on the important states determined by the HMM, thus improving the ability to identify key anomalous segments; conversely, a larger KL divergence indicates that the model's attention has failed to effectively align with the anomalous risk areas, resulting in attention shift. Simply put, KL divergence encourages… Towards "Closeness" means making the attention distribution as consistent as possible with the state probabilities of the Hidden Markov Model (HMM). The KL divergence serves as the guide for attention loss. The calculation formula is as follows:

[0107] .

[0108] S220. Obtain time-series data of network quality indicators, preprocess the time-series data using an encoder, and obtain hidden state vectors at multiple time points.

[0109] S230. Input the initial global context vector obtained from the hidden state vector into the preset hidden Markov model to obtain the hidden state posterior probability vector at each time step.

[0110] S240. Input the hidden state vector and the hidden state posterior probability vector into the attention layer, output the attention weights at each time step, and generate the target global context vector based on the attention weights and the hidden state vector.

[0111] S250. Input the target global context vector into the hidden Markov model to obtain the network quality anomaly detection results.

[0112] The technical solution of this invention, during the training process of the attention layer, makes the sample attention weights as close as possible to the sample hidden state posterior probability vector, thereby making the attention layer more focused on the important state points or potential critical moments of HMM judgment, thereby improving the ability to identify key abnormal segments and further improving the network quality anomaly detection accuracy.

[0113] An optional technical solution, which trains an attention layer based on the obtained guided attention loss, may include: obtaining the network quality anomaly probability output by the Hidden Markov Model during training and the network quality anomaly label corresponding to the network quality anomaly probability; obtaining a clustering discrimination loss based on the network quality anomaly probability and the network quality anomaly label; determining a joint total loss based on the obtained guided attention loss and clustering discrimination loss; and adjusting the parameters in the pre-trained attention layer based on the joint total loss to train the attention layer.

[0114] In the model training process, in addition to considering the guidance attention loss, the main task clustering discrimination loss can also be considered. These are used to adjust the parameters in the pre-trained attention layer, which can be understood as the attention layer obtained through pre-training. At this time, the transfer learning approach can be adopted to train the model using a small number of labeled samples (i.e., small samples), which is equivalent to a semi-supervised learning method, so that the model can achieve high detection accuracy in a small sample environment.

[0115] For example, clustering discriminative loss This is anomaly identification based on time-series network quality. It employs the point-wise binary cross-entropy (BCE) loss function to measure the difference between the predicted anomaly probability (i.e., the probability of network quality anomalies) and the true label (the label of network quality anomalies), serving as the core supervision objective in the joint total loss. Clustering discrimination loss and guided attention loss jointly optimize the model, giving it greater accuracy and robustness in semantic representation and temporal anomaly identification. The BCE is shown below:

[0116] ;

[0117] in, Indicate whether time t is an anomaly (label); This represents the predicted anomaly probability of the model output (after sigmoid activation); T represents the total number of time steps.

[0118] Building upon this, to better understand the guided Attention collaborative feedback training process described above, the following section will combine... Figure 6a and Figure 6b The given examples are provided for illustrative purposes. For an example, see [link to example]. Figure 6a :

[0119] 1. Input sequence data: Time series data such as network quality indicators are used as model input.

[0120] 2. Bi-GRU encoder: Extracts temporal features from time-series data and outputs the hidden state at each time step. .

[0121] 3. HMM Hidden State Output Modeling the input data allows us to output the posterior probability of the hidden state at each time step. , as a signal to guide attention.

[0122] 4. Guided attention mechanism: This involves directing the hidden states of the Bi-GRU. With HMM Fusion (additive / multiplicative) to generate attention weights .

[0123] 5. Contextual Perpendicular Angle (i.e., Global Context Vector): Based on For all moments The weighted sum is used to generate the global context vector, which is c in the previous text.

[0124] 6. HMM Clustering Loss: Based on the clustering boundary or reconstruction error calculated by the traditional HMM module, it guides the accuracy of hidden state modeling.

[0125] 7. Cluster-discriminate loss: Enhances the discriminative power between different hidden states and strengthens the boundary representation of abnormal / normal states.

[0126] 8. Attention-guided loss (attn-guided loss): Distributing attention... With HMM Perform distribution comparisons (such as KL divergence) to ensure attention is focused on critical moments.

[0127] 9. Obtain the joint total loss: Construct a joint optimization objective by combining the HMM clustering loss, cluster discrimination loss, and attention guidance loss.

[0128] further, Figure 6b This demonstrates the process of generating a global context vector from time-series data after passing through a bidirectional GRU layer and an attention mechanism. As described above, a Bi-GRU + guided attention model has been constructed. To further enhance the model's ability to perceive key anomaly features, transfer learning can be used for initial pre-training. By combining a small number of labeled samples with the attention mechanism, the encoder can stably extract low-dimensional representations that are discriminative for anomaly detection, guiding the model to focus on key feature fragments in advance. These representations will also serve as the basic input for subsequent unsupervised clustering modeling (such as GMM-HMM), further improving the consistency and effectiveness of subsequent unsupervised clustering and attention guidance. GMM is an abbreviation for Gaussian Mixture Model.

[0129] Figure 7 This is a flowchart of another network quality anomaly detection method provided by an embodiment of the present invention. This embodiment is based on and optimized from the above-described technical solutions. Optionally, in this embodiment, the network quality anomaly detection method is applied in a network quality anomaly detection system, which includes an edge terminal and a cloud terminal; wherein, a hidden state vector and a target global context vector are obtained at the edge terminal, and the target global context vector is used in the cloud terminal to perform network quality anomaly detection. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.

[0130] See Figure 7 The method in this embodiment may specifically include the following steps:

[0131] S310. Obtain time-series data of network quality indicators through the edge terminal, and preprocess the time-series data using an encoder to obtain hidden state vectors at multiple time points.

[0132] S320. Through the edge, the initial global context vector obtained from the hidden state vector is input into the preset hidden Markov model to obtain the hidden state posterior probability vector at each time step.

[0133] S330. Through the edge, the hidden state vector and the hidden state posterior probability vector are input to the preset attention layer, and the attention layer outputs the attention weights at each time step. The target global context vector is generated based on the attention weights and the hidden state vector.

[0134] S340. By inputting the target global context vector into the Hidden Markov Model via the cloud, the network quality anomaly detection results are obtained.

[0135] In other words, considering the application scenarios that may be involved in the embodiments of the present invention, and in order to meet the real-time requirements of vehicle-road-cloud, the embodiments of the present invention propose a cloud-edge collaborative detection architecture:

[0136] 1. Edge processing: The vehicle terminal or roadside unit (RSU) runs the pre-trained Bi-GRU + Attention to complete data preprocessing and feature extraction, and obtain low-dimensional feature vectors.

[0137] 2. Cloud-based analytics: Low-dimensional features are uploaded from the edge device to the cloud, where a GMM-based HMM clustering module performs in-depth analysis and anomaly classification, outputting real-time alarms and detailed diagnostic results.

[0138] For example, see Figure 8 In practical applications of vehicle-road-cloud network quality anomaly detection, the general process is as follows: Vehicle terminals and roadside units continuously report network quality indicators, and the preprocessing module generates time-series data. The Bi-GRU+attention layer converts the time-series data into embedding vectors, and then GMM-HMM clustering analysis is used to analyze similar patterns, outputting the detection result of whether an anomaly exists. The detection result can trigger alarms and logs, which are then summarized, visualized, and notified to maintenance personnel by the cloud system.

[0139] The technical solution of this invention, through cloud-edge collaborative detection architecture design, distributes detection tasks to roadside and vehicle edge nodes to reduce latency; the cloud performs full-network aggregation analysis to improve computing power and support large-scale deployment. Compared with pure cloud or pure edge implementation solutions, it can take into account both real-time response and global perspective.

[0140] Moreover, the technical solution of this invention achieves end-to-end network quality detection through multi-node data comparison and association (vehicles, RSUs, and the cloud), which can locate anomalies in specific links or nodes, enhances the detection capability of distributed network quality anomalies, and has more comprehensive network visibility.

[0141] Figure 9 This is a flowchart of another network quality anomaly detection method provided in this embodiment of the invention. This embodiment is based on and optimized from the above-described technical solutions. In this embodiment, optionally, the emission probability of the Hidden Markov Model is obtained by modeling using a Gaussian Mixture Model, which is used to adaptively determine the number of clusters during the clustering process for the hidden states. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.

[0142] See Figure 9 The method in this embodiment may specifically include the following steps:

[0143] S410. Obtain the time series data of network quality indicators, and use the encoder to preprocess the time series data to obtain hidden state vectors at multiple time points.

[0144] S420. Input the initial global context vector obtained from the hidden state vector into the preset hidden Markov model to obtain the hidden state posterior probability vector at each time step.

[0145] S430. Input the hidden state vector and the hidden state posterior probability vector into the preset attention layer. The attention layer outputs the attention weights at each time step and generates the target global context vector based on the attention weights and the hidden state vector.

[0146] S440. Input the target global context vector into the Hidden Markov Model to obtain the network quality anomaly detection result. The emission probability of the Hidden Markov Model is obtained by modeling with a Gaussian mixture model, which is used to adaptively increase the number of clusters during the clustering process for the hidden state.

[0147] To further enhance the model's adaptive identification capability at critical moments of network quality index anomalies mentioned above, this embodiment of the invention introduces an improved Hidden Mirror Model (HMM) for unsupervised state modeling based on the temporal features output by the encoder. This model uses a Gaussian Mixture Model (GMM) to model the emission probability of the HMM, possessing the ability to adaptively determine the number of hidden states (i.e., the number of network states), effectively characterizing the temporal distribution of abnormal and normal states. Simultaneously, the resulting posterior probability vector of the hidden states can serve as a guiding signal for the attention mechanism, thereby enhancing the model's ability to focus on and discriminate abnormal segments. In this embodiment, the GMM can optionally be a Dirichlet Process Gaussian Mixture Model (DP-GMM) or an Expectation Maximization Gaussian Mixture Model (EM-GMM), particularly DP-GMM. The choice is based on actual needs and is not specifically limited here.

[0148] This section uses DP-GMM as an example for illustration. The basic principle and process of DP-GMM are as follows: Automatically generate mixed weights using the Stick-Breaking process: Where α is the concentration parameter. Then, the data generation model is as follows: Each observation vector x can be considered to be generated by multiple Gaussian distributions. Then, variational inference is performed, specifically using variational inference or MCMC methods to maximize the lower bound of evidence (ELBO): .

[0149] Building upon this, the guided feedback mechanism is applied in HMMs as follows: To further enhance the model's ability to automatically adapt and identify key anomalies, the emission model based on the Watson distribution in the relevant HMM can be replaced with a more adaptive GMM, especially a DP-GMM, thereby increasing the emission probability of each hidden state. It can adaptively and flexibly characterize the quality features of complex networks. Based on this, the hidden state posterior probability vector generated by the HMM model is improved. Attention mechanisms have also been further incorporated to guide the model to focus on potential abnormal states, thereby achieving a collaborative feedback mechanism between state modeling and attention learning (e.g.) Figure 6a (Referring to the "state feedback" part). During model training, variational inference methods can be used to update HMM and DP-GMM parameters, automatically determine the number of clusters, and achieve accurate classification of different network abnormal states (such as congestion, link interruption, and interference).

[0150] For example, seeFigure 10 This demonstrates the process of modeling vehicle-to-everything (V2X) quality anomalies based on a DP-GMM-based Hidden Model (HMM). The model input is a low-dimensional temporal feature sequence output by a Bi-GRU with guided Attention. This sequence, after being weighted by Attention, is better able to focus on the abnormal moment characteristics of the temporal pattern of vehicle-road-cloud network quality indicators.

[0151] Hidden Markov Models (HMMs) are constructed from an initial state distribution π and a state transition matrix A, both of which can be learned using an unsupervised variational Bayesian inference algorithm. The initial state distribution π represents the probability that each state is the starting point of the sequence; the state transition matrix A describes the transition relationships between states, reflecting the evolution of the network state over time.

[0152] Observation emission probability of each hidden state Modeled by DP-GMM. DP-GMM can adaptively determine the number of mixture components within each hidden state, and the Stick-Breaking process generates its mixture weights. This is obtained through variational inference learning. The posterior probability is calculated using the forward-backward algorithm of the Hidden Markov Model (HMM). This allows us to obtain the most likely hidden state at each time step.

[0153] In practical applications, these latent state clustering results can be aligned with actual network events. That is, during model training, a small amount of manual annotation (such as link interruption, congestion, and interference events) can be used, combined with the latent state posterior probability vector. Certain state clusters are labeled as "abnormal states," while the rest are labeled as "normal states." The final model can then automatically infer the category of the current state based on the observed data, thereby achieving end-to-end identification and location of network quality anomalies.

[0154] The technical solution of this invention utilizes GMM to model the emission probability of HMM, thereby achieving unsupervised clustering with adaptive clustering number. That is, the number of clusters is automatically determined according to the data complexity, which improves the flexibility and generalization ability of clustering, thereby enabling more accurate differentiation between normal and abnormal patterns, reducing false alarms and missed alarms, and further improving the accuracy of network quality anomaly detection.

[0155] In summary, the above-mentioned technical solutions work together to form a vehicle-road-cloud network quality anomaly detection method based on semi-supervised learning and adaptive clustering. By introducing an adaptive HMM clustering algorithm based on DP-GMM and combining it with a guided attention feedback mechanism, the clustering results are dynamically fed back to the encoder, guiding the model to focus on key moments of potential anomalies. This enables accurate identification of complex and ever-changing abnormal states (such as congestion, link interruption, and interference) in the vehicle network environment. At the same time, the use of pre-trained network models reduces the dependence on large-scale labeled samples, achieving real-time and accurate detection through end-to-end cloud-edge collaboration.

[0156] Figure 11 This is a structural block diagram of a network quality anomaly detection system provided in an embodiment of the present invention. This system is used to execute the network quality anomaly detection method provided in any of the above embodiments. This system and the network quality anomaly detection methods in the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the network quality anomaly detection system can be referred to in the embodiments of the network quality anomaly detection methods described above. See also... Figure 11 The system specifically includes:

[0157] The hidden state vector acquisition module 510 is used to acquire time series data of network quality indicators and preprocess the time series data using an encoder to obtain hidden state vectors at multiple time points.

[0158] The hidden state posterior probability vector acquisition module 520 is used to input the initial global context vector obtained from the hidden state vector into the preset hidden Markov model to obtain the hidden state posterior probability vector at each time step.

[0159] The target global context vector acquisition module 530 is used to input the hidden state vector and the hidden state posterior probability vector into the preset attention layer, and the attention layer outputs the attention weights at each time step, and generates the target global context vector based on the attention weights and the hidden state vector.

[0160] The network quality anomaly detection module 540 is used to input the target global context vector into the hidden Markov model to obtain the network quality anomaly detection result.

[0161] Optionally, the hidden state vector acquisition module 510 may include:

[0162] The time series data processing unit is used to acquire the original time series data of each network quality indicator, divide the original time series data into multiple time window data according to a preset time window, perform interpolation processing on each time window data to obtain all interpolation processing results, and update the original time series data based on all interpolation processing results.

[0163] The time-series data acquisition unit is used to normalize the updated raw time-series data of different network quality indicators to obtain the time-series data corresponding to each network quality indicator.

[0164] Optionally, the hidden state vector acquisition module 510 may include:

[0165] The timing coding unit can be used to perform forward timing coding and backward timing coding on timing data using an encoder to obtain forward hidden state vectors and backward hidden state vectors at multiple time points.

[0166] The hidden state vector is obtained by concatenating the forward and backward hidden state vectors at each time step to obtain the hidden state vector.

[0167] Optionally, the target global context vector acquisition module 530 may include:

[0168] The attention weight output unit is used to input the hidden state vector and the hidden state posterior probability vector into a preset attention layer. The attention layer performs additive or multiplicative fusion on the hidden state vector and the hidden state posterior probability vector at each time step and outputs the attention weight at each time step.

[0169] Based on this, an optional attention weight output unit may include:

[0170] The second vector is used to obtain a sub-unit, which is used to perform a linear transformation on the hidden state vector at each time step to obtain the first vector, and to perform a linear transformation on the hidden state posterior probability vector at each time step to obtain the second vector.

[0171] The first attention weight output subunit is used to output the attention weights at each time step based on the sum of the first and second vectors.

[0172] Another optional attention weight output unit may include:

[0173] The fourth vector is used to obtain a sub-unit, which is used to perform a linear transformation on the hidden state vector at each time step to obtain the third vector, and to perform a linear transformation on the hidden state posterior probability vector at each time step to obtain the fourth vector.

[0174] The second attention weight output subunit is used to obtain the similarity between the third and fourth vectors based on the dot product of the third and fourth vectors, and output the attention weights at each time step based on the similarity.

[0175] Optionally, the attention layer is trained using the following modules:

[0176] The attention layer training module is used to obtain the sample hidden state posterior probability vector and sample attention weights obtained during the training process of the attention layer. The loss is calculated with the optimization objective of making the sample attention weights closer to the sample hidden state posterior probability vector, and the attention layer is trained based on the obtained guided attention loss.

[0177] Based on this, the optional attention layer training module may include:

[0178] The clustering discriminant loss unit is used to obtain the network quality anomaly probability output by the Hidden Markov Model during training and the network quality anomaly label corresponding to the network quality anomaly probability. The clustering discriminant loss is obtained based on the network quality anomaly probability and the network quality anomaly label.

[0179] The attention layer training unit is used to determine the joint total loss based on the obtained guided attention loss and clustering discrimination loss, and to adjust the parameters in the pre-trained attention layer according to the joint total loss in order to train the attention layer.

[0180] Optionally, based on any of the above systems, the time-series data is data obtained from vehicle-road-cloud data based on network quality indicators, where network quality refers to the vehicle-road-cloud network quality; and / or,

[0181] The emission probability of a Hidden Markov Model is obtained by modeling a Gaussian Mixture Model, which is used to adaptively determine the number of clusters during clustering of hidden states.

[0182] Optionally, based on any of the above systems, the system may include an edge terminal and a cloud terminal; wherein, the hidden state vector acquisition module, the hidden state posterior probability vector acquisition module, and the target global context vector acquisition module are deployed on the edge terminal, and the network quality anomaly detection module is deployed on the cloud terminal.

[0183] The network quality anomaly detection system provided in this embodiment of the invention, through the cooperation of various modules, introduces the hidden state posterior probability vector output by the Hidden Markov Model as the guiding signal for calculating the attention weights of the attention layer. Based on this, the attention weights calculated can more accurately focus on the critical moments of network quality anomalies, thereby improving the accuracy of network quality anomaly detection.

[0184] The network quality anomaly detection system provided in this embodiment of the invention can execute the network quality anomaly detection method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0185] It is worth noting that in the above embodiments of the network quality anomaly detection system, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0186] Figure 12 A schematic diagram of an edge device or cloud server (hereinafter collectively referred to as an electronic device) 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0187] like Figure 12 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer programs stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0188] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0189] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as network quality anomaly detection methods.

[0190] In some embodiments, the network quality anomaly detection method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the network quality anomaly detection method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the network quality anomaly detection method by any other suitable means (e.g., by means of firmware).

[0191] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0192] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0193] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0194] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0195] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0196] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0197] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.

[0198] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0199] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A network quality anomaly detection method, characterized by, The method comprises the following steps: obtaining time series data of network quality indicators, preprocessing the time series data by using an encoder to obtain hidden state vectors at multiple time points; inputting an initial global context vector obtained according to the hidden state vectors into a preset hidden Markov model to obtain hidden state posterior probability vectors at the multiple time points; inputting the hidden state vectors and the hidden state posterior probability vectors into a preset attention layer, outputting attention weights at the multiple time points by the attention layer, and generating a target global context vector according to the attention weights and the hidden state vectors; inputting the target global context vector into the hidden Markov model to obtain a network quality anomaly detection result.

2. The method of claim 1, wherein, The method comprises the following steps: for each network quality indicator, obtaining original time series data of the network quality indicator, segmenting the original time series data according to a preset time window to obtain multiple time window data, performing interpolation processing on each time window data to obtain all interpolation processing results, and updating the original time series data according to all the interpolation processing results; performing normalization processing on the updated original time series data of different network quality indicators to obtain time series data corresponding to each network quality indicator.

3. The network quality anomaly detection method of claim 1, wherein, The method comprises the following steps: performing forward time series encoding and backward time series encoding on the time series data by using an encoder to obtain forward hidden state vectors and backward hidden state vectors at multiple time points; splicing the forward hidden state vectors and the backward hidden state vectors at the multiple time points to obtain the hidden state vectors.

4. The network quality anomaly detection method of claim 1, wherein, The method comprises the following steps: inputting the hidden state vectors and the hidden state posterior probability vectors into a preset attention layer, performing additive fusion or multiplicative fusion on the hidden state vectors and the hidden state posterior probability vectors at the multiple time points by the attention layer to output attention weights at the multiple time points.

5. The network quality anomaly detection method of claim 4, wherein, The method comprises the following steps: performing linear transformation on the hidden state vectors at the multiple time points to obtain a first vector, performing linear transformation on the hidden state posterior probability vectors at the multiple time points to obtain a second vector, and outputting the attention weights at the multiple time points according to the sum of the first vector and the second vector. The method comprises the following steps:

6. The network quality anomaly detection method of claim 4, wherein, performing linear transformation on the hidden state vectors at the multiple time points to obtain a third vector, performing linear transformation on the hidden state posterior probability vectors at the multiple time points to obtain a fourth vector, and outputting the attention weights at the multiple time points according to the product of the third vector and the fourth vector. ​ According to a dot product result of the third vector and the fourth vector, a similarity between the third vector and the fourth vector is obtained, and an attention weight at each time point is obtained according to the similarity.

7. The network quality anomaly detection method of claim 1, wherein, The attention layer is obtained by training in the following manner: After obtaining a sample hidden state posterior probability vector and a sample attention weight obtained in a training process of the attention layer, loss calculation is performed on the sample attention weight to the sample hidden state posterior probability vector as an optimization target, and the attention layer is trained according to a guided attention loss obtained.

8. The network quality anomaly detection method of claim 7, wherein, The training of the attention layer according to the guided attention loss obtained includes: obtaining a network quality anomaly probability output by the hidden Markov model in the training process and a network quality anomaly label corresponding to the network quality anomaly probability applied, obtaining a clustering discrimination loss according to the network quality anomaly probability and the network quality anomaly label; determining a joint total loss according to the guided attention loss and the clustering discrimination loss, and adjusting parameters in a pre-trained attention layer according to the joint total loss to train the attention layer.

9. The network quality anomaly detection method according to any one of claims 1-8, wherein, the time series data is data obtained from vehicle-to-road cloud data according to the network quality indicators, and the network quality is vehicle-to-road cloud network quality; and / or the emission probability of the hidden Markov model is obtained by modeling through a Gaussian mixture model, and the Gaussian mixture model is used to adaptively cluster the number of clusters in the clustering process for hidden states.

10. A network quality anomaly detection system characterized by, comprises: a hidden state vector obtaining module, configured to obtain time series data of network quality indicators, and pre-process the time series data by using an encoder to obtain hidden state vectors at multiple time points; a hidden state posterior probability vector obtaining module, configured to input an initial global context vector obtained according to the hidden state vectors into a preset hidden Markov model to obtain hidden state posterior probability vectors at the multiple time points; a target global context vector obtaining module, configured to input the hidden state vectors and the hidden state posterior probability vectors into a preset attention layer, output attention weights at the multiple time points by the attention layer, and generate a target global context vector according to the attention weights and the hidden state vectors; a network quality anomaly detection module, configured to input the target global context vector into the hidden Markov model to obtain a network quality anomaly detection result.

11. The network quality anomaly detection system of claim 10, wherein, comprises an edge side and a cloud side, wherein the hidden state vector obtaining module, the hidden state posterior probability vector obtaining module, and the target global context vector obtaining module are deployed on the edge side, and the network quality anomaly detection module is deployed on the cloud side.