Expressway edge calculation flow regulation and control method based on OpenHarmony

By constructing a lightweight model and a spatiotemporal feature fusion model in the highway edge computing system, and combining them with a dynamic early warning mechanism, the delay and coordination problems in traffic flow control were solved, achieving high-precision real-time perception and coordinated control, and improving the overall performance of the system.

CN121034080APending Publication Date: 2025-11-28YUNNAN COMM INVESTMENT & CONSTR GRP CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511331114.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

Existing methods for controlling traffic flow on highways suffer from problems such as high latency in centralized processing, limited computing power of edge devices, a prominent contradiction between model complexity and real-time performance, high false alarm rate in anomaly detection, and insufficient system coordination capabilities.

Method used

A highway edge computing traffic control method based on OpenHarmony is adopted. Through the construction of a lightweight model, deep fusion of spatiotemporal features, dynamic intelligent early warning and distributed collaborative decision-making, the technical solution includes a lightweight improved YOLOv8 model, a spatiotemporal feature fusion Transformer model and an LSTM-AutoEncoder model. Combined with a dynamic non-monotonic focusing loss function and a dynamic threshold mechanism, it can realize high-precision real-time perception, accurate prediction and collaborative proactive control of traffic flow.

Benefits of technology

It significantly improves the traffic efficiency, safety level and emergency response capability of the highway system, reduces the model's computational load and false alarm rate, and enhances the system's real-time performance and collaborative processing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121034080A_ABST
    Figure CN121034080A_ABST
Patent Text Reader

Abstract

The invention discloses a highway edge calculation flow regulation and control method based on OpenHarmony, and belongs to the technical field of intelligent traffic control systems. The method comprises the following steps: traffic flow detection adopts a lightweight improved YOLOv8 model, a backbone network is replaced by an OfficientViT, a neck network is optimized by phantom convolution, a feature fusion module is enhanced by SCConv, and a dynamic non-monotonic focusing loss function is introduced; according to traffic flow prediction, a spatio-temporal feature fusion Transform model is constructed, a multi-head convolution low-rank decomposition attention mechanism is adopted to capture time dependence, spatial topological features are extracted in combination with attention graph convolution, spatio-temporal information is fused through a gating unit, and a prediction error is controlled within 1.5-3.0 times of historical standard deviation; a triple lightweight LSTM-AutoEncoder is adopted for abnormal early warning, so that the false alarm rate is reduced; the OpenHarmony distributed task scheduling is cooperated with the above modules, the variable information sign and the dynamic speed limit sign are driven to execute regulation and control, the response delay is reduced, the problem of real-time accurate regulation and control under the condition that the computing power of the edge device is limited is solved, and the traffic efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent traffic control systems, and specifically relates to a highway edge computing traffic regulation method based on OpenHarmony. BACKGROUND

[0002] In recent years, intelligent transportation systems have become increasingly popular in highway management. Traditional traffic flow regulation methods mainly rely on centralized cloud computing platforms for data processing and decision-making. Although this approach has strong computing power, it also has some obvious shortcomings. First, data needs to be transmitted to the cloud for processing, which introduces high communication delay, making it difficult to meet the low-latency requirements of real-time traffic regulation. Second, the centralized processing method relies too much on network bandwidth and cloud computing power, and when faced with massive data, it is easy to form a performance bottleneck, limiting the scalability of the system. In addition, when local traffic incidents occur, the response speed of the cloud system is slow, and it lacks the ability to make real-time intelligent decisions on the edge side, which seriously hinders the improvement of traffic control effectiveness.

[0003] With the rapid development of edge computing technology, moving computing tasks to edge devices close to data sources has become an effective way to solve the above problems. By completing data collection, processing and decision-making locally, communication delay can be significantly reduced, and system response speed can be improved. However, in actual highway scenarios, edge devices often face challenges such as limited computing power, insufficient storage resources, and strict energy consumption, making it difficult to directly deploy complex deep learning models. Current traffic flow regulation methods based on edge computing still face some technical bottlenecks: such as high computational complexity of target detection models, slow inference speed, and difficulty in meeting real-time requirements; existing traffic flow prediction methods usually ignore the spatial topology of the road network, or even if the graph structure is introduced, the model complexity is too high, making it difficult for edge devices to bear; most abnormal detection methods use static threshold strategies, which are difficult to cope with dynamic changes in traffic flow, resulting in high false alarm rates; in addition, there is a lack of effective coordination mechanism between edge nodes, making it impossible to achieve global system linkage regulation. SUMMARY

[0004] To solve the problems of high central processing delay, limited computing power of edge devices, prominent contradiction between model complexity and real-time performance, high false alarm rate of abnormal detection, and insufficient system coordination capability in existing expressway traffic flow regulation technologies, the application provides an expressway edge computing traffic regulation method based on OpenHarmony, which can effectively break through the calculation bottleneck of deploying complex AI models on the edge side, realize high-precision real-time perception, accurate prediction, early abnormal identification, and collaborative active regulation of traffic flow, and significantly improve the comprehensive performance of the expressway system in terms of traffic efficiency, safety level, and emergency response. The expressway edge computing traffic regulation method based on OpenHarmony provided in the application; To achieve the above technical solution, the specific steps are as follows: S1, traffic flow detection: input the traffic flow original video frame collected by the expressway camera, perform preprocessing operation on the traffic flow original video frame, and obtain traffic flow data through the lightweight improved YOLOv8 model; The way of performing preprocessing operation on the traffic flow original video frame is: input the traffic flow original video frame, and obtain the enhanced traffic image dataset through image noise reduction and histogram equalization; The lightweight improved YOLOv8 model includes: replacing the original backbone network with a visual network EfficientViT in the backbone network; replacing the standard convolution layer with a lightweight ghost convolution GhostConv in the neck network; combining a spatial channel reconstruction convolution (SCConv) in the cross-stage feature fusion module (C2f); The application replaces the original backbone network with a more efficient visual network EfficientViT; in the neck network, the standard convolution layer is replaced with a lightweight ghost convolution GhostConv, thereby reducing the computational burden and enhancing the feature expression capability of the model; the spatial channel reconstruction convolution (SCConv) is fused in the cross-stage feature fusion module (C2f) to enhance the detection effect; the loss function (WIOU) with a dynamic non-monotonic focusing mechanism is introduced to optimize the accuracy of the bounding box regression and further improve the accuracy of target detection. Such improvements effectively reduce the model calculation amount, while maintaining or even improving the detection performance, enhancing the applicability and accuracy of the model; the overall structure is as shown in Figure 2 (lightweight improved YOLO8) as shown: S1.1, input the enhanced traffic flow image dataset, and obtain a multi-scale feature map dataset through the visual network EfficientViT; The enhanced traffic flow image dataset is input into the EfficientViT network. The traffic flow image dataset is passed through one convolutional layer, one depthwise separable convolutional layer, two MB convolutional layers, and finally through two EfficientVi modules and MB convolutional layers. The EfficientVi module includes a multi-scale linear attention module and an FFN combined with a depthwise separable convolutional module to obtain a multi-scale feature map dataset. S1.2 Input the multi-scale feature map dataset, perform lightweight multi-scale feature fusion through the neck network, and then input it into the detection head to obtain the predicted bounding box; The neck network includes GhostConv and C2f-SCConv modules. The C2f-SCConv module is a cross-stage feature fusion mechanism C2f combined with spatial channel reconstruction convolution SCConv; In the neck network, this invention replaces the original standard convolution with GhostConv to achieve lightweight feature fusion. The core idea of ​​GhostConv is to extract features from the input image using a small number of convolution kernels, then perform simple linear transformations on the extracted feature images, and finally generate a new feature image through feature concatenation. This method reduces the computational cost for non-critical features, effectively maintaining model performance while reducing computational cost, thereby improving overall efficiency. The calculation formula for GhostConv is as follows: In the formula, X represents the original feature values; X represents the input feature image. For convolution kernel; For the first i The first original feature image generated by the first j One feature image; For the first i The first original feature image generated by the first j An identity projection; For the first i Each channel is a feature image; i is the channel index; j is the index of the feature image. After lightweight feature fusion, a multi-scale feature map containing rich semantic information is output. The fused features are used for prediction using each detection head. The detection head outputs prediction parameters through a 1×1 convolutional layer, including bounding box coordinate offset, object confidence, and class probability. For each grid cell on the feature map, the model predicts adjustment parameters for multiple prior anchor boxes. Then, the prediction parameters are converted into actual image coordinates through a decoding operation to generate the predicted bounding box. S1.3, input the predicted bounding box and the real bounding box, update the model weight through the loss function of the dynamic non-monotonic focusing mechanism, and obtain a traffic flow detection result; The application adopts a loss function (WIOU) of a dynamic non-monotonic focusing mechanism to measure the overlapping degree of the predicted box and the real box, updates the model weight, and obtains a traffic flow detection result. The core improvement is to introduce a penalty factor based on the Euclidean distance calculation of the center points of the predicted bounding box and the real bounding box. The penalty factor is especially suitable for the case where there is no overlapping area between the two, and can effectively represent the spatial position deviation, thereby significantly optimizing the regression effect of the model on the non-overlapping target. At the same time, the dynamic focusing mechanism integrated by WIOU enhances the generalization performance of the model. The calculation formula of the loss function of the dynamic non-monotonic focusing mechanism is as follows: Among them In the formula, is the loss function of the dynamic non-monotonic focusing mechanism, is the center point distance penalty term, is the IoU loss term, r is the focusing adjustment function; alpha is the first hyperparameter of the focusing adjustment function; delta is the second hyperparameter of the focusing adjustment function; beta is the outlying degree; and are the width and height of the minimum closed box respectively; x , y are the width and height of the predicted box respectively; and are the width and height of the real box respectively; IOU is the intersection over union of the predicted box and the real box; is the normal box loss value not participating in back propagation; is the incremental moving average value; S1.4, input the traffic flow detection result, organize data through the multi-target tracking and data association algorithm and the 60-second sliding window, and obtain traffic flow data; The application generates traffic flow sequence data by performing multi-target tracking and data association algorithm (MOTDA) on the traffic flow detection result for cross-frame association and trajectory smoothing. Then, the 60-second sliding window is input to organize data, and traffic flow data is obtained. S2, traffic flow prediction: input the traffic flow data, and obtain predicted traffic flow data through the spatio-temporal feature fusion Transformer model and the execution error control mechanism; The spatio-temporal feature fusion Transformer model comprises a multi-head convolution low-rank decomposition attention mechanism, an attention graph convolution and a gating unit; The application adopts a parallel structure to capture the spatio-temporal dependence of traffic flow; firstly, a multi-head convolution low-rank decomposition attention mechanism and an attention graph convolution are designed to capture the time and space features of traffic flow respectively; a causal convolution is introduced to obtain local context information, and the attention matrix is subjected to low-rank decomposition, then a gating unit is used to adaptively fuse the spatio-temporal features, finally, a feedforward neural network and a linear layer are used to output the traffic prediction result; the prediction process fully extracts and retains the original spatio-temporal feature information; finally, a error control mechanism is executed to obtain the predicted traffic flow data; S2.1, construct a road network topology graph; The method for constructing the road network topology graph is: The application uses a three-tuple road network topology graph to completely describe the road network: V represents the detector node, E represents the actual distance between detectors, and the adjacency matrix A quantifies the spatial correlation strength between nodes; the detector node set represents the detector set; the actual distance edge set between detectors represents the distance between different detectors, wherein C is the number of edges; wherein A is an adjacency matrix, representing the connection relationship between different detectors; the adjacency matrix represents the connection relationship between different detectors, wherein N is the number of detectors, R is the dimension, and the adjacency matrix is defined as: In the formula, is the detector of the i' node, is the detector of the j' node; S2.2, input traffic flow data and an adjacency matrix, and obtain time features and space features through a multi-head convolution low-rank decomposition attention mechanism and an attention graph convolution; Then the feature matrix of the traffic flow data can be represented as , N is the number of detectors, and the input features are encoded to obtain , F represents the number of traffic flow data features represent the values of all F traffic flow features at time t on all N edge node detectors in the entire traffic network; based on the above definition, the traffic flow prediction problem can be formally represented as: Wherein, f represents a mapping function for prediction, p represents the length of future traffic flow prediction, and T represents the length of historical traffic flow prediction. Furthermore, the input of the Transformer model for spatiotemporal feature fusion includes... The graph adjacency matrix A; First, the parameters, loss function, and optimizer in the model are initialized. In the preset training rounds, for the preset batch of samples, in this invention, the training rounds are 100 and the batch is 8; First, traffic flow data is embedded and encoded to generate the corresponding embedding vector. Subsequently, the embedded vectors are fed into a multi-head convolutional low-rank decomposition attention mechanism and an attention map convolutional module to extract the temporal features of traffic flow, respectively. and spatial features ; S2.3 Input temporal and spatial features, and obtain fused features through gating units; The present invention uses a gating unit that integrates temporal and spatial features to fuse these features, capturing the spatiotemporal dependencies in traffic flow, and ultimately obtaining a fused feature representation. ; Building upon this foundation, the gating unit adaptively fuses spatiotemporal features from different modules, optimizing feature combinations to accurately represent the spatiotemporal information of traffic flow. The fused result is then input into a feedforward neural network to further extract and enhance effective spatiotemporal features. To prevent the vanishing gradient problem, the model introduces two residual connections to ensure effective information transfer during training. Finally, the output layer transforms the processed spatiotemporal features and the resulting fused features into a prediction of future traffic flow through a prediction mechanism. Through this structured process, the model effectively captures the spatiotemporal patterns of traffic flow, improving prediction accuracy. S2.4 Input fusion features and obtain initial predicted traffic flow data through a feedforward neural network; This invention feeds fused features into a feedforward neural network to learn more abstract and complex nonlinear feature representations and generate nonlinear features. Finally, through a linear layer, the feedforward neural network model outputs initial predicted traffic flow data; and then predicts traffic flow data for a future period. ; S2.5 Execute error control mechanism; Input initial predicted traffic flow data, and obtain predicted traffic flow data by executing error control mechanism; The error control mechanism is to minimize the error between the initial predicted traffic flow data and the actual traffic flow data. The error control mechanism minimizes the error between the initial predicted traffic flow data and the actual traffic flow data. The optimization objective of minimizing the error between the initial predicted traffic flow data and the actual traffic flow data can be expressed as: In the formula, the true value representing the traffic flow, the initial predicted traffic flow data, and loss is a loss function; For the error control mechanism, a dynamic convergence condition based on the early stopping mechanism is set, and when the error of the validation set decreases by less than a preset threshold δ for k consecutive iterations, the training process is terminated; in the loss function design stage, a segmented weighted penalty term is constructed, and a nonlinear weight is applied to the error exceeding the preset tolerance boundary ; in the deployment stage, an acceptance standard based on historical data statistics is set, and the prediction result is required to satisfy , wherein is the standard deviation of the training data, is a configurable coefficient and the typical value range is 1.5 to 3.0 times the standard deviation, and for the expressway scene, the value is 1.5~2.0 (corresponding to 86%~95% confidence interval); it should be noted that the error threshold mechanism is an optional technical feature, and when the threshold is not configured, the model still minimizes the loss function as the optimization target, and finally obtains the predicted traffic flow data; S3, traffic flow anomaly warning: input traffic flow data, predicted traffic flow data and locally stored traffic flow historical data, and obtain an abnormal warning signal through an improved LSTM-AutoEncoder model and a dynamic threshold mechanism; The locally stored traffic flow historical data is collected by the local edge calculator and is denoised by wavelet, normalized and feature extracted; The improved LSTM-AutoEncoder model adopts a bidirectional encoder-unidirectional decoder architecture, learns the internal pattern of the data by reconstructing the feature sequence of the input data; the input data is the feature X of the traffic flow data after feature extraction, and each feature vector contains the energy feature extracted in the previous section; the encoder adopts a bidirectional LSTM structure, which can consider the forward and backward time sequence dependencies at the same time compared with the traditional unidirectional LSTM, and the expression of the bidirectional encoder is: In the formula, is the forward hidden state at time t; is the backward hidden state at time t; and are forward and backward LSTM units, respectively; is the complete feature after splicing the forward and backward hidden states, is the input data at time t; The internal structure of the LSTM unit includes an input gate, a forget gate and an output gate, and its calculation process is: wherein, , , and are the activation values of the input gate, the forget gate and the output gate, respectively; , , and are the weights of the input gate, the forget gate, the output gate and the candidate state, respectively; , , and are the weights of the input gate, the forget gate, the output gate and the candidate state, respectively; is the cell state; is the candidate state; is a sigmoid function; is an element-wise multiplication; in order to alleviate the problem of gradient disappearance in deep network training, a residual connection is introduced between the encoder and the decoder, and the calculation formula is: wherein, is the feature representation after adding the residual connection; is the input data at t time; is the complete feature after splicing the forward and backward hidden states; is a residual mapping matrix, which is used to adjust the dimension of the original feature to match the dimension of the hidden state; Through the residual connection, a unidirectional LSTM decoder is performed, and the decoder uses a unidirectional LSTM to reconstruct the sequence, and the calculation formula of the unidirectional LSTM decoder is: wherein, is the reconstructed feature sequence; is the feature representation after adding the residual connection; is a unidirectional LSTM unit of the decoder; is the cell state at the previous time; and are the weight matrix and the bias vector of the decoder, respectively; The loss function calculation formula of the improved LSTM-AutoEncoder model is: wherein, is the mean square error term, which measures the similarity between the reconstructed sequence and the original sequence; is the KL divergence constraint, which makes the encoded feature distribution more regular; is the temporal correlation regularization term, which forces the feature representation of adjacent time steps to have continuity; are preset weight coefficients, which are used to balance the contribution of each term; In the present application, is taken as 1.0, which is used to control the dominant role of the reconstruction error term MSE; is taken as 0.1, which is used to constrain the KL divergence term of the latent feature distribution to avoid over-regularization; is taken as 0.05, which is used to adjust the influence of the temporal continuity regularization term to enhance sequence smoothness; The abnormality detection process is shown in Figure 6 The present application designs a complete abnormality detection process based on the LSTM-AutoEncoder model trained on samples in normal mode: When the feature sequence of the input traffic data stream does not conform to the normal mode, the reconstruction error of the model will significantly increase, and abnormality detection can be achieved by setting a suitable discrimination threshold. First, for the input feature sequence X, the reconstruction sequence is obtained through the model, and the reconstruction error is calculated, and the mathematical expression is: In the formula, x is the original feature sequence; is the sequence reconstructed by the model; is the Euclidean distance norm. In order to better describe the deviation degree of the sample from the normal mode, the Mahalanobis distance is introduced to calculate the abnormality score, and the mathematical expression is: In the formula, is the reconstruction error vector of the current sample; is the mean vector of the reconstruction error of the normal sample; is the covariance matrix of the reconstruction error of the normal sample; the Mahalanobis distance considers the correlation between features, and can more accurately measure the abnormality degree of the sample than the Euclidean distance; considering the spatiotemporal variability of traffic flow features, a dynamic threshold is used for abnormality discrimination: based on the 72-hour historical data stored locally by the device, the reconstruction error mean and standard deviation in a 30-minute sliding window are continuously calculated, and the trigger threshold is set as the mean plus three times the standard deviation; the calculation formula is: In the formula, is the sliding average of the historical detection score; is the standard deviation of the historical detection score; k is an adjustable sensitivity parameter, and the present application takes the value of 3; The dynamic threshold value at time t; the final abnormality discrimination criterion is: In the formula: status=1 indicates an abnormal state, and status=0 indicates a normal state; this dynamic threshold-based discrimination method can adaptively adjust the sensitivity of detection and adapt to the dynamic changes of the device running state; Through the final abnormality discrimination criterion, the normal and abnormal abnormal early warning signals are finally output; S4, traffic flow regulation: input the abnormal early warning signal, drive the variable message sign (VMS) and the dynamic speed limit sign through the distributed task scheduling and the distributed software bus of the OpenHarmony operating system, and complete the flow regulation method; The beneficial effects of the present application are: (1) The improved YOLOv8 model is used in the traffic flow detection part, the main network is replaced by EfficientViT, the neck network is optimized by phantom convolution, the feature fusion module is enhanced by SCConv, and the dynamic non-monotonic focusing loss function (WIOU) is introduced. The improvement significantly reduces the model calculation amount and memory occupation, so that it can efficiently run on domestic CPU edge devices such as Kirin / Liujin, while ensuring or even improving the detection accuracy, greatly improving the detection speed, and providing real-time and accurate traffic flow data basis for subsequent processing links.

[0005] (2) The spatiotemporal feature fusion Transformer model is constructed in the traffic flow prediction part, the multi-head convolution low-rank decomposition attention mechanism is used to capture the time dependence, the attention graph convolution is combined to extract the spatial topological features, and the adaptive fusion of spatiotemporal features is realized through the gating unit. The model effectively captures the complex spatiotemporal dependence relationship in the traffic flow, and the prediction error can be controlled within 1.5-3.0 times the historical standard deviation, which significantly improves the prediction accuracy, and reduces the calculation overhead through optimization strategies such as low-rank decomposition, meeting the real-time requirements of edge deployment.

[0006] (3) The triple lightweight LSTM-AutoEncoder model is used in the traffic flow abnormal early warning part, the bidirectional LSTM structure is used in the encoder to fully learn the time sequence features, and the dynamic threshold discrimination mechanism based on Mahalanobis distance is introduced, which is updated in real time according to the 72-hour historical data stored locally. Combined with the triple lightweight processing of structured pruning, parameter quantization and knowledge distillation of the model, the model complexity is reduced, the false alarm rate is reduced, the system can adapt to normal fluctuations in different periods and different scenes, and the accuracy and reliability of abnormal detection are significantly improved.

[0007] (4) The application realizes the collaborative processing of traffic flow detection, prediction, abnormal early warning and regulation of four parts through OpenHarmony distributed task scheduling. Relying on distributed software bus and distributed data management, each edge computing node can realize high-speed transmission and synchronization of task instructions, drive variable information signs and dynamic speed limit signs to execute real-time regulation, and reduce system response delay. This efficient distributed collaborative mechanism not only improves the overall response speed of the system, but also improves the efficiency of highway traffic, effectively alleviates traffic congestion, and enhances the overall control ability of the system.

[0008] In summary, the application forms a complete highway edge computing flow regulation solution through the key technical improvement and collaborative integration of the above four aspects, effectively solves the real-time accurate regulation problem under the limitation of edge computing power, significantly improves the sensing ability, prediction accuracy, abnormal detection reliability and overall regulation efficiency of the system, and has significant technical advantages and application value. BRIEF DESCRIPTION OF DRAWINGS

[0009] Figure 1 The flow chart of the edge computing intelligent traffic flow regulation method of the application based on the OpenHarmony operating system.

[0010] Figure 2 The light-weight improved YOLOv8 structure diagram of the application.

[0011] Figure 3 The edge computing technology architecture diagram of the application.

[0012] Figure 4 The hardware connection scheme of the traffic flow detection system based on edge computing of the application.

[0013] Figure 5 The spatio-temporal feature fusion Transformer model diagram of the application.

[0014] Figure 6 The abnormal detection flow chart of the application.

[0015] Figure 7 The dynamic speed limit and variable information sign diagram of the application.

[0016] Figure 8 The AI edge computing terminal of the application.

[0017] Figure 9 The video detection model based on edge computing of the application.

[0018] Figure 10 The OpenHarmony operating system technology architecture diagram of the application.

[0019] Figure 11 This is a diagram of the EfficientViT network structure of the lightweight improved YOLOv8 of this invention. Detailed Implementation

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

[0021] like Figure 1 As shown in this embodiment, a highway edge computing traffic control method based on OpenHarmony is characterized by comprising: S1. Traffic flow detection: Input the original video frames of traffic flow captured by the highway camera, perform preprocessing operations on the original video frames of traffic flow, and obtain traffic flow data through the lightweight improved YOLOv8 model; The method for performing preprocessing operations on the original traffic flow video frames is as follows: input the original traffic flow video frames, and obtain the enhanced traffic image dataset through image denoising and histogram equalization; The lightweight improved YOLOv8 model includes: replacing the original backbone network with the EfficientViT visual network in the backbone network; replacing the standard convolutional layers in the neck network with lightweight ghost convolutions (GhostConv); and combining spatial channel reconstruction convolutions (SCConv) in the cross-stage feature fusion module (C2f). This invention replaces the original backbone network with the more efficient visual network EfficientViT; in the neck network, its standard convolutional layers are replaced with lightweight phantom convolutions (GhostConv), thereby reducing computational burden and enhancing the model's feature representation capabilities; spatial channel reconstruction convolutions (SCConv) are fused in the cross-stage feature fusion module (C2f) to enhance detection performance; and a loss function (WIOU) with a dynamic non-monotonic focusing mechanism is introduced to optimize the accuracy of bounding box regression, further improving object detection accuracy. These improvements effectively reduce model computation while maintaining or even improving detection performance, enhancing the model's applicability and accuracy; the overall structure is as follows: Figure 2 (As shown in the lightweight improvement of YOLO8): S1.1 Input the enhanced traffic flow image dataset and obtain a multi-scale feature map dataset through the visual network EfficientViT; The enhanced traffic flow image dataset is input into the EfficientViT network, and the traffic flow image dataset sequentially passes through a convolution layer and a depth separable convolution layer, two MB convolution layers, and finally passes through two EfficientVi modules and an MB convolution layer; the EfficientVi module includes a multi-scale linear attention module and a FFN combined depth separable convolution module, to obtain a multi-scale feature map dataset; In the backbone network, the visual network EfficientViT of the application adopts a multi-scale linear attention module to replace a traditional Softmax attention mechanism, and simultaneously introduces a depth separable convolution (DSconv), thereby significantly reducing the parameter quantity and the calculation complexity; as shown in Figure 11 As shown in FIG. 1, the EfficientViT network structure is as follows: first, a multi-scale linear attention module is used to extract multi-scale global features from input information, and features of different scales are fused. In order to enhance the extraction ability of local features, a mobile flip bottleneck convolution (MBconv, i.e., Mobile Inverted Bottleneck Convolution) is introduced, which realizes the expansion and scaling of input channels based on a depth separable convolution, so as to efficiently extract local features; the EfficientViT effectively balances the global and local feature extraction abilities through the above-mentioned manner, and has a lightweight advantage, and thus exhibits excellent performance in resource-limited application scenarios such as edge computing devices; S1.2, input the multi-scale feature map dataset, pass through a neck network, perform lightweight multi-scale feature fusion, input into a detection head, and obtain a predicted bounding box; The neck network includes a ghost convolution (GhostConv) and a C2f-SCConv module The C2f-SCConv module is a cross-stage feature fusion mechanism C2f combined with a spatial channel reconstruction convolution (SCConv); In the neck network, the application uses a ghost convolution (GhostConv) to replace the original standard convolution, so as to realize lightweight processing of the neck network; the core idea of the ghost convolution (GhostConv) is to extract features of an input image through a small number of convolution kernels, then perform a simple linear change on the extracted feature image, and finally generate a new feature image through feature splicing; this method reduces the calculation amount of non-key features, effectively maintains the performance of the model while reducing the calculation amount, thereby improving the overall efficiency; the calculation formula of the ghost convolution (GhostConv) is as follows: In the formula, X represents the original feature values; X represents the input feature image. For convolution kernel; For the first i The first original feature image generated by the first j One feature image; For the first i The first original feature image generated by the first j An identity projection; For the first i Each channel is a feature image; i is the channel index; j is the index of the feature image; In the neck network design, the Spatial and Channel Reconstruction Convolution (SCConv) is combined with the cross-stage feature fusion module (C2f) to form the C2f-SCConv module. Compared with the original C2f module, the C2f-SCConv module has stronger feature extraction capabilities. SCConv dynamically adjusts the correlation between the spatial and channel dimensions of the feature through self-calibration operations, enabling the network to capture richer spatial and channel information and generate feature images with higher discriminative power. The internal operation of SCConv is as follows: the input feature X is spatially reconstructed through the Spatial Reconstruction Unit (SRU) to obtain spatially refined features. The feature is then further processed using a Channel Reconstruction Unit (CRU) to output the channel-refined feature Y, ultimately generating a feature image. By leveraging the synergy of SRU and CRU, SCConv reduces computation, improves feature transfer efficiency, and enhances the model's ability to recognize complex data structures, enabling it to flexibly adapt to diverse input features. Although C2f-SCConv introduces both spatial and channel reconstruction units, its overall computational complexity is low, making it suitable for deployment on edge devices with limited computing power. After lightweight feature fusion, a multi-scale feature map containing rich semantic information is output. The fused features are used for prediction using each detection head. The detection head outputs prediction parameters through a 1×1 convolutional layer, including bounding box coordinate offsets, object confidence, and class probability. For each grid cell on the feature map, the model predicts adjustment parameters for multiple prior anchor boxes. Subsequently, the prediction parameters are converted into actual image coordinates through decoding to generate predicted bounding boxes. To eliminate redundant detection results, the system performs non-maximum suppression (NMS) on the decoded predicted boxes, resulting in predicted bounding boxes that represent traffic flow detection results, including vehicle location, quantity, and class information. S1.3 Input the predicted bounding box and the true bounding box, and update the model weights through the loss function of the dynamic non-monotonic focusing mechanism to obtain the traffic flow detection results; The application adopts a loss function (WIOU) of a fused dynamic non-monotonic focusing mechanism to measure the overlapping degree of a predicted frame and a real boundary frame, performs model weight updating, and obtains a traffic flow detection result; the core improvement is that a penalty factor based on the Euclidean distance calculation of the center points of the predicted boundary frame and the real boundary frame is introduced. The penalty factor is especially suitable for the case where there is no overlapping area between the two, can effectively represent the spatial position deviation, and thus significantly optimizes the regression effect of the model on the non-overlapping target. At the same time, the dynamic focusing mechanism integrated by WIOU enhances the generalization performance of the model. The mechanism considers that there may be low-quality labeled samples in the training data, appropriately reduces the weight of such interference samples in the loss calculation through adaptive adjustment, reduces the negative impact of the samples on the model training, and finally realizes the significant improvement of the generalization ability. The calculation formula of the loss function of the dynamic non-monotonic focusing mechanism is as follows: Wherein In the formula, is the loss function of the dynamic non-monotonic focusing mechanism, is the center point distance penalty term, is the IoU loss term, r is the focusing adjustment function; alpha is the first hyperparameter of the focusing adjustment function; delta is the second hyperparameter of the focusing adjustment function; beta is the outlying degree; and are the width and height of the minimum closed frame respectively; x , y are the width and height of the predicted frame respectively; and are the width and height of the real frame respectively; IOU is the intersection over union of the predicted frame and the real frame; is the normal frame loss value not participating in back propagation; is the incremental moving average value; For the highway traffic flow detection scene, due to the diversity of the shooting angle, the target object (traffic vehicle) presents significant scale changes in size and shape; the application of the WIOU loss function can effectively improve the adaptability of the model to the scale change characteristics, realize more accurate positioning of the target area, and optimize the accuracy of the boundary frame regression, thereby further improving the robustness and detection performance of the model; S1.4, input the traffic flow detection result, organize data through a multi-target tracking and data association algorithm and a 60-second sliding window, and obtain traffic flow data; The application ensures generation of continuous, stable and identity-consistent structured traffic flow sequence data by cross-frame association and trajectory smoothing of traffic flow detection results through a multi-target tracking and data association algorithm (MOTDA); and then inputting 60-second sliding window organized data to ensure accuracy and reliability of time sequence statistical data. The application utilizes the improved lightweight YOLOv8 deployed on the edge computing node to collect data and detect traffic flow in sections of the expressway; the collected data is stored in the edge computing node of each section, the distributed soft bus based on the OpenHarmony operating system is used for pre-processing of the data by the distributed data management, including image data noise reduction, histogram equalization and transformation processing, linear interpolation to fill in missing values, standardization based on local historical mean, 60-second sliding window organized data to avoid influence of part of missing values, abnormal values or error values on the experiment, and finally uploading the results through the communication module; the local historical mean is the historical traffic flow dataset stored by each edge computing node and having spatiotemporal correlation; The edge computing can directly detect and process the collected data locally, not only sharing the computing load of the server, but also significantly improving the real-time performance of in-situ detection. On the other hand, the edge computing node can store the monitoring data locally and then upload it to the server through the communication module, which is convenient for unified management and centralized analysis of the detection data. This distributed detection mode can effectively reduce network delay and improve resource utilization efficiency. Figure 3 As shown in the figure, the Multi-modal V200Z-R is used as the hardware core of the edge detection node in this embodiment, which can collect traffic flow data in real time, carry a lightweight deep learning model to complete data inference and caching, and finally upload the processing results to the data center through the communication module.

[0022] Further, the domestic CPU such as Kirin and Loongson is applied, the domestic operating system such as self-trustable is configured, the AI video event analysis software of Yunjiaoke is built-in, the toll station and tunnel station are taken as units, the background analysis is used, the small-scale AI video event edge analysis ability of 5-20 different specifications is possessed, the multi-event AI analysis ability of congestion, accident and the like of road, tunnel and toll station is possessed, the rapid discovery and rapid reporting of road network events are realized, and the road network event information intercommunication is facilitated; the hardware connection scheme of the system is as shown in the figure. Figure 4As shown, its core includes Multi-modal V200Z-R edge computing nodes deployed on site, network cameras, PC displays, LCD screen groups, and USB cameras and other equipment. The edge computing node serves as the hardware core, responsible for receiving and processing raw video streams collected by network cameras and USB cameras, and conducting real-time detection and analysis of traffic flow through the AI video analysis software built into the domestic CPU. The processing results and warning information can be output through the serial port or network port to drive external devices such as variable message signs (VMS) and dynamic speed limit signs to perform control, while the control information is monitored and visualized in real time on the local PC display or LCD screen group. Through standard industrial interfaces and communication protocols, a complete, efficient and scalable edge perception-decision-execution closed-loop system is formed.

[0023] S2, traffic flow prediction: input traffic flow data, obtain predicted traffic flow data through a spatio-temporal feature fusion Transformer model and an execution error control mechanism; The spatio-temporal feature fusion Transformer model includes three components: an input layer, an encoding layer, and an output layer, and introduces two residual connections; the encoding layer includes a multi-head convolution low-rank decomposition attention mechanism, an attention graph convolution, a gating unit, and a feedforward neural network; The application adopts a parallel structure to capture the spatio-temporal dependence of traffic flow; first, a multi-head convolution low-rank decomposition attention mechanism and an attention graph convolution are designed to capture the time and space features of traffic flow, respectively; a causal convolution is introduced to obtain local context information, and the attention matrix is decomposed into low rank, then a gating unit is used to adaptively fuse the spatio-temporal features, finally, a feedforward neural network and a linear layer are used to output the traffic prediction results; the prediction process fully extracts and retains the original spatio-temporal feature information, avoiding potential feature loss; finally, through an execution error control mechanism, predicted traffic flow data is obtained; S2.1, constructing a road network topology graph; The method for constructing the road network topology graph is to use a triple road network topology graph to completely describe the road network topology graph; wherein V represents a detector node, E represents the actual distance between detectors, and A represents an adjacency matrix; The application uses a triple road network topology graph to completely describe the road network: V represents a detector node, E represents the actual distance between detectors, and the adjacency matrix A quantifies the spatial correlation strength between nodes; the detector node set represents a detector set; the actual distance edge set between detectors represents the distance between different detectors, where C is the number of edges; where A is the adjacency matrix, representing the connection relationship between different detectors; the adjacency matrix represents the connection relationship between different detectors, where N is the number of detectors, R is the dimension, and the adjacency matrix is defined as: wherein; is the detector of the i' node, is the detector of the j' node; The adjacency matrix A quantifies the spatial correlation strength between nodes; therefore, the historical traffic flow data X (time feature) and the adjacency matrix A (spatial feature) can be jointly input into the prediction model; the model processes the space-time information in parallel: on the one hand, it captures the time sequence variation law of each detection point, and on the other hand, it analyzes the spatial interaction between nodes, so as to realize more accurate traffic flow prediction by fusing the two types of features; S2.2, input traffic flow data and adjacency matrix, obtain time feature and space feature through multi-head convolution low-rank decomposition attention mechanism and attention graph convolution; Then the feature matrix of the traffic flow data can be represented as , N is the number of detectors, and the input feature is encoded to obtain , F represents the number of traffic flow data features represents the value of all F traffic flow features at time t on all N edge node detectors in the entire traffic network; based on the above definition, the traffic flow prediction problem can be formally represented as: wherein f represents a mapping function for prediction, p represents the length of future traffic flow prediction, and T represents the length of historical traffic flow prediction. Further, the input of the space-time feature fusion Transformer model includes and the graph adjacency matrix A; first, the parameters, loss function and optimizer in the model are initialized, and in the preset training rounds, for the preset batch of samples, the training rounds in this embodiment are 100, and the batch is 8; first, the traffic flow data is embedded and encoded to generate the corresponding embedding vector ; the embedding vector is input into the multi-head convolution low-rank decomposition attention mechanism and the attention graph convolution module to extract the time feature and the space feature of the traffic flow, respectively; S2.3, input the time feature and the space feature, and obtain the fused feature through the gating unit; The input time feature and space feature gating unit is used to fuse the time feature and the space feature, capture the space-time dependent relationship in the traffic flow, and finally obtain the fused feature representation ; As Figure 5 shown, the space-time feature fusion Transformer model is used for traffic flow prediction, mainly including an input layer, an encoding layer and an output layer three components;Among them, the encoding layer is composed of a multi-head convolution low-rank decomposition attention mechanism, an attention graph convolution, a gating unit and a feedforward neural network;The role of the input layer is to perform feature embedding on the historical traffic flow data, and add position encoding to ensure that the relationship between time and space can be effectively represented;Next, the traffic flow features after embedding and coding processing are input into the multi-head convolution low-rank decomposition attention mechanism and the attention graph convolution module at the same time;The two mechanisms are respectively used to capture the time dependence and the spatial dependence; On this basis, the gating unit adaptively fuses the space-time features from different modules, optimizes the feature combination to accurately express the space-time information of the traffic flow. The fused result is then input into the feedforward neural network for further extraction and strengthening of effective space-time features. In order to prevent the occurrence of gradient disappearance problem, the model introduces two residual connections to ensure that information can be effectively transmitted during the training process. Finally, the output layer processes the space-time features to obtain the fused features, which are converted into the prediction result of the future traffic flow through the prediction mechanism. Through this structured process, the model can effectively capture the space-time rules of the traffic flow and improve the prediction accuracy; S2.4, input the fused features, and obtain initial prediction traffic flow data through the feedforward neural network; The fused features are input into the feedforward neural network for learning more abstract and complex nonlinear feature representations and generating nonlinear features ;Finally, the feedforward neural network model outputs the initial prediction traffic flow data through a linear layer;The prediction traffic flow data ; S2.5, performing an error control mechanism;Input the initial prediction traffic flow data, and obtain the prediction traffic flow data through the error control mechanism; The goal of traffic flow prediction is to minimize the error between the initial prediction traffic flow data and the real traffic flow data, and the optimization goal of the traffic flow prediction problem can be represented as: In the formula, represents the real value of the traffic flow, represents the initial prediction traffic flow data, and loss is the loss function; Regarding the error control mechanism, a dynamic convergence condition based on early stopping is set, terminating the training process when the decrease in the validation set error over k consecutive iterations is less than a preset threshold δ. During the loss function design phase, a piecewise weighted penalty term is constructed to penalize errors exceeding a preset tolerance boundary. Nonlinear weights are applied to the error; during the deployment phase, acceptance criteria are set based on historical data statistics, requiring the prediction results to meet certain requirements. ,in For the standard deviation of the training data, The value is a configurable coefficient with a typical range of 1.5 to 3.0 times the standard deviation. For highway scenarios, the value is 1.5 to 2.0 (corresponding to an 86% to 95% confidence interval). It should be noted that the error threshold mechanism is an optional technical feature. When no threshold is configured, the model still aims to minimize the loss function to obtain the predicted traffic flow data. In this embodiment, to evaluate the model's performance, the Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE) metrics are used; the values ​​for all three metrics are within a certain range. ; S3. Traffic Flow Anomaly Warning: Input traffic flow data, predict traffic flow data and locally stored historical traffic flow data, and obtain anomaly warning signals through LSTM-AutoEncoder model and dynamic threshold mechanism; The local storage of historical traffic flow data is data collected by the local edge calculator and has undergone wavelet denoising, normalization, and feature extraction. The improved LSTM-AutoEncoder model employs a bidirectional encoder-unidirectional decoder architecture, learning the inherent patterns of the data by reconstructing the feature sequences of the input data. The input data consists of features X of the traffic flow data after feature extraction, with each feature vector containing the energy features extracted in the previous section. The encoder uses a bidirectional LSTM structure, which, compared to the traditional unidirectional LSTM, can simultaneously consider the temporal dependencies of both the forward and backward directions. Its expression is as follows: In the formula, This represents the forward hidden state at time t; Let be the backward hidden state at time t; and These are the forward and backward LSTM units, respectively; To form the complete feature after concatenating the forward and backward hidden states, The input data is at time t; The internal structure of the LSTM unit includes an input gate, a forget gate and an output gate, and the calculation process is as follows: wherein, , , and are the activation values of the input gate, the forget gate and the output gate, respectively; , , and are the weights of the input gate, the forget gate, the output gate and the candidate state, respectively; , , and are the weights of the input gate, the forget gate, the output gate and the candidate state, respectively; is the unit state; is the candidate state; is a sigmoid function; is an element-wise multiplication. In order to alleviate the problem of gradient disappearance in deep network training, a residual connection is introduced between the encoder and the decoder, and the calculation formula is as follows: wherein, is the feature representation after adding the residual connection; is the input data at time t; is the complete feature after splicing the forward and backward hidden states; is a residual mapping matrix, which is used to adjust the dimension of the original feature to match the dimension of the hidden state; Through the residual connection, a unidirectional LSTM decoder is performed, and the decoder uses a unidirectional LSTM to reconstruct the sequence, and the calculation formula of the unidirectional LSTM decoder is as follows: wherein, is the reconstructed feature sequence; is the feature representation after adding the residual connection; is the unidirectional LSTM unit of the decoder; is the unit state at the previous time; and are the weight matrix and the bias vector of the decoder, respectively; The loss function calculation formula of the improved LSTM-AutoEncoder model is: In the formula, is a mean square error term, used to measure the similarity between the reconstructed sequence and the original sequence; is a KL divergence constraint, which can make the encoded feature distribution more regular; is a time correlation regularization term, used to force the feature representation of adjacent time steps to have continuity; are all preset weight coefficients, used to balance the contribution of each term; In the application, is 1.0, used to control the dominant role of the reconstruction error term MSE; is 0.1, used to constrain the KL divergence term of the latent feature distribution to avoid over-regularization; is 0.05, used to adjust the influence of the time sequence continuity regularization term to enhance sequence smoothness; The abnormality detection process is as shown in Figure 6 The application designs a complete abnormality detection process based on the LSTM-AutoEncoder model trained based on normal mode samples: When the feature sequence of the input traffic data stream does not match the normal mode, the reconstruction error of the model will significantly increase, and abnormality detection can be achieved by setting a suitable discrimination threshold. First, for the input feature sequence X, the reconstruction sequence is obtained through the model, and the reconstruction error is calculated, and the mathematical expression is: In the formula, x is the original feature sequence; is the sequence reconstructed by the model; is the Euclidean distance norm. In order to better describe the deviation degree of the sample from the normal mode, the Mahalanobis distance is introduced to calculate the abnormal score, and the mathematical expression is: In the formula, is the reconstruction error vector of the current sample; is the mean vector of the reconstruction error of the normal sample; is the covariance matrix of the reconstruction error of the normal sample; the Mahalanobis distance considers the correlation between features, and can more accurately measure the abnormality degree of the sample than the Euclidean distance; considering the spatiotemporal variability of traffic flow features, a dynamic threshold is used for abnormality discrimination: based on the 72-hour historical data stored locally by the device, the reconstruction error mean and standard deviation in a 30-minute sliding window are continuously calculated, and the trigger threshold is set to the mean plus three times the standard deviation; this design enables the system to adapt to normal fluctuations at different times (such as holiday peaks); the mathematical expression of the dynamic threshold mechanism is In the formula, is the sliding average of historical detection scores; is the standard deviation of historical detection scores; k is an adjustable sensitivity parameter, and the value of the application is 3; is the dynamic threshold value at time t; and the expression of the final abnormality discrimination criterion is: In the formula, status=1 indicates an abnormal state, and status=0 indicates a normal state; this kind of discrimination method based on a dynamic threshold value can adaptively adjust the sensitivity of detection and adapt to the dynamic change of the running state of the equipment; Through the final abnormality discrimination criterion, normal and abnormal abnormal early warning signals are finally output; The application further further adapts to the computing power of the edge device, and the model is subjected to triple lightweight processing: the LSTM layer is subjected to structural pruning, and redundant connections with a weight absolute value less than 0.01 are removed; the model parameters are quantized from FP32 precision to INT8 (typical precision loss is controlled to be within 2%); and through a knowledge distillation technology, a large bidirectional LSTM model trained in the cloud is used to guide the training of the edge small model; S4, traffic flow regulation: inputting the abnormal early warning signal, driving a variable message sign (VMS) and a dynamic speed limit sign through distributed task scheduling and a distributed soft bus of an OpenHarmony operating system, and completing a traffic flow regulation method; As shown in Figure 10 Further, the traffic flow regulation part receives the abnormal early warning signal, each edge computing node device transmits a task instruction based on the distributed soft bus and the distributed task scheduling of the Openharmony operating system, and drives the variable message sign (VMS) and the dynamic speed limit sign (as shown in Figure 7 ) to control the highway entrance ramp, automatically adjusts the speed limit according to the traffic condition, and reminds the driver to select other routes or prepare for driving.

[0024] As shown in Figure 9 , the distributed task scheduling system dynamically decides and allocates the regulation tasks according to the abnormal signals reported by the edge nodes, the device load, the network condition and the business emergency degree. The core is a priority-based preemptive scheduling: tasks with high real-time requirements such as ramp control and speed limit adjustment are set to high priority to ensure that they can immediately preempt computing and communication resources; and background tasks such as data reporting and log recording are set to low priority and are scheduled in a non-real-time manner. The scheduler also continuously monitors the CPU, memory and network bandwidth usage of the edge nodes, dynamically adjusts the task allocation based on the resource condition, avoids node overload, and ensures that critical tasks obtain sufficient resources.

[0025] Distributed soft bus provides low latency and high reliability cross-device communication for task execution; it adopts a lightweight protocol based on UDP, and implements retransmission and congestion control at the application layer, ensuring that instructions can still be transmitted stably in complex network environments. For control instructions, the soft bus enables a dedicated high-priority transmission channel, reduces intermediate forwarding, and ensures that the transmission delay of instructions from edge nodes to variable message signs (VMS), dynamic speed limit signs, and other peripherals remains at the millisecond level.

[0026] Through advanced video and traffic flow feature parameter detection technology, real-time response is made to the changing road traffic environment characteristics, the current traffic flow operation state is actively judged based on the real-time collected data, and the current speed limit value is automatically adjusted through a certain control strategy, which is published to road users through information real-time publishing technology, realizing dynamic adjustment of traffic operation state under abnormal traffic states such as traffic accidents, traffic congestion, and bad weather, reducing vehicle speed difference, improving traffic operation efficiency, and ensuring driving safety; Further, by applying an autonomous trusted operating system, protocol standardization, system security and trusted execution environment support, protocol adaptation for corresponding edge devices is realized, forming a regional secure and trusted ad hoc network. The efficiency of emergency response and resource coordination ability are improved, breaking the time and space constraints of the traditional expressway emergency system, and effectively reducing the emergency command response time; Further, by applying domestic CPUs such as Kirin and Loongson, configuring autonomous and trusted domestic operating systems, and built-in cloud AI video event analysis software, the system has 5-20 different specifications of small-scale AI video event edge analysis capabilities, and has AI analysis capabilities for multiple events such as congestion and accidents at roadways, tunnels, and toll stations, realizing rapid discovery and rapid reporting of road network events for the purpose of road network event information interconnection. The hardware connection scheme of the system is shown in Figure 4 and Figure 8 The core of the system includes Multi-modal V200Z-R edge computing nodes, network cameras, PC displays, LCD screen groups, and USB cameras deployed on site. The edge computing node serves as the hardware core, responsible for receiving and processing raw video streams collected by network cameras and USB cameras, and performing real-time detection and analysis of traffic flow through the built-in AI video analysis software of the domestic CPU. The processing results and warning information can be output through serial ports or network interfaces, driving peripherals such as variable message signs (VMS) and dynamic speed limit signs to execute control, while the control information is monitored and visually displayed on local PC displays or LCD screen groups in real time. Through standard industrial interfaces and communication protocols, a complete, efficient, and scalable edge perception-decision-execution closed-loop system is formed.

[0027] The above-described embodiments are merely preferred embodiments of the present application, and are not intended to limit the concept and scope of the present application. Various modifications and improvements to the technical solutions of the present application made by those of ordinary skill in the art without departing from the design concept of the present application shall fall within the protection scope of the present application. The technical content claimed by the present application has been entirely recorded in the technical requirements.

Claims

1. An OpenHarmony-based expressway edge computing traffic regulation method, characterized in that, The method comprises the following steps: S1, traffic flow detection: inputting a highway camera to collect traffic flow original video frames, performing a pretreatment operation on the traffic flow original video frames, and obtaining traffic flow data through a lightweight improved YOLOv8 model; The manner of performing the pretreatment operation on the traffic flow original video frames is: inputting the traffic flow original video frames, and obtaining an enhanced traffic image dataset through image noise reduction and histogram equalization; The lightweight improved YOLOv8 model comprises: replacing the original backbone network with a visual network EfficientViT in the backbone network; replacing a standard convolution layer with a lightweight ghost convolution GhostConv in the neck network; and combining a spatial channel reconstruction convolution in a cross-stage feature fusion module; S2, traffic flow prediction: inputting the traffic flow data, and obtaining predicted traffic flow data through a spatiotemporal feature fusion Transformer model and an error control mechanism; The spatiotemporal feature fusion Transformer model comprises: a multi-head convolution low-rank decomposition attention mechanism, an attention graph convolution, and a gating unit; S3, traffic flow anomaly early warning: inputting the traffic flow data, the predicted traffic flow data, and locally stored traffic flow historical data, and obtaining an anomaly early warning signal through an improved LSTM-AutoEncoder model and a dynamic threshold mechanism; The anomaly early warning signal comprises normal and abnormal early warning signals; S4, traffic flow regulation: inputting the anomaly early warning signal, and driving a variable message sign VMS and a dynamic speed limit sign through an OpenHarmony operating system distributed task scheduling and a distributed software bus to complete a traffic flow regulation method.

2. The highway edge computing traffic regulation method based on OpenHarmony according to claim 1, characterized in that, In the step S1, the following steps are included: S1.1, inputting the enhanced traffic flow image dataset, and obtaining a multi-scale feature map dataset through a visual network EfficientViT; S1.2, inputting the multi-scale feature map dataset, performing lightweight multi-scale feature fusion through a neck network, and inputting the same to a detection head to obtain a predicted bounding box; The neck network comprises a ghost convolution GhostConv and a C2f-SCConv module; The C2f-SCConv module is a cross-stage feature fusion mechanism C2f combined with a spatial channel reconstruction convolution SCConv; S1.3, inputting the predicted bounding box and a real bounding box, performing model weight updating through a loss function of a dynamic non-monotonic focusing mechanism, and obtaining a traffic flow detection result; S1.4, inputting the traffic flow detection result, and obtaining traffic flow data through a multi-target tracking and data association algorithm and a 60-second sliding window data organization.

3. The method according to claim 2, wherein, In the step S1.2, the expression of the ghost convolution is: ; ; In the formula, is the original feature value; X is the input feature image; is the convolution kernel; is the original feature image generated by the first i channel feature image; j is the first feature image generated by the first channel original feature image; i is the identity hidden mapping of the first j feature image generated by the first channel original feature image; i is the first channel feature image; i is an index for a channel; j is an index for a feature map.

4. The method according to claim 2, wherein, In the step S1.3, the expression of the loss function of the dynamic non-monotonic focusing mechanism is: ; In the formula, is a loss function of a dynamic non-monotonic focusing mechanism, is a center point distance penalty term, is an IoU loss term, r is a focusing adjustment function.

5. The OpenHarmony-based expressway edge computing traffic regulation method according to claim 1, characterized in that, In the step S2, the following steps are included: S2.1, constructing a road network topology graph; S2.2, inputting traffic flow data and an adjacency matrix, and obtaining time features and space features through a multi-head convolution low-rank decomposition attention mechanism and an attention graph convolution; S2.3, input time features and space features, obtain fusion features through a gating unit; S2.4, input fusion features, obtain initial predicted traffic flow data through a feedforward neural network; S2.5, execute an error control mechanism; input initial predicted traffic flow data, obtain predicted traffic flow data through the error control mechanism; The error control mechanism is to minimize the error between the initial predicted traffic flow data and the real traffic flow data.

6. The OpenHarmony-based expressway edge computing traffic regulation method according to claim 5, characterized in that, In the step S2.1, the road network topology graph is constructed in the following manner: using a triple road network topology graph to construct the road network topology graph; wherein V represents the detector node, E represents the actual distance between detectors, and A represents the adjacency matrix.

7. The OpenHarmony-based expressway edge computing traffic regulation method according to claim 5, characterized in that, In the step S2.5, the optimization objective of minimizing the error between the initial predicted traffic flow data and the real traffic flow data can be expressed as: ; In the formula, a true value representing traffic flow, represents initial predicted traffic flow data, and loss is a loss function.

8. The OpenHarmony-based highway edge computing traffic regulation method according to claim 1, characterized in that, In the step S3, the improved LSTM-AutoEncoder model adopts a bidirectional encoder-single-directional decoder architecture; The expression of the bidirectional encoder is: ; wherein, is the forward hidden state at time t; is the backward hidden state at time t; and are forward and backward LSTM units, respectively; is the complete feature after concatenating the forward and backward hidden states, is the input data at time t; The calculation formula of the single-directional decoder is: ; wherein, is the reconstructed feature sequence; is the feature representation after adding the residual connection; is the one-directional LSTM unit of the decoder; is the cell state of the previous time step; and are the weight matrix and bias vector of the decoder, respectively. The loss function calculation formula of the improved LSTM-AutoEncoder model is: ; In the formula, is a mean square error term; is a KL divergence constraint; is a temporal correlation regularization term for enforcing continuity of the feature representation of adjacent time steps; is a temporal regularization; is a first preset weight coefficient; is a second preset weight coefficient; is a third preset weight coefficient.

9. The OpenHarmony-based expressway edge computing traffic regulation method of claim 1, wherein, In the step S3, the expression of the dynamic threshold mechanism is: ; wherein is a sliding average of the historical detection scores; is a standard deviation of the historical detection scores; k is an adjustable sensitivity parameter, taking a value of 3; is a dynamic threshold value at time t.

10. The OpenHarmony-based expressway edge computing traffic regulation method of claim 1, wherein, In the step S3, the expression of the anomaly discrimination criterion is: ; In the formula, status=1 indicates an abnormal state, and status=0 indicates a normal state. is a dynamic threshold value at time t.

Citation Information

Cited By

  • Breathing sound recognition method and system based on multi-modal data fusion

    CN121600964A