CN113192322B - Expressway traffic flow counting method based on cloud edge cooperation - Google Patents

Expressway traffic flow counting method based on cloud edge cooperation Download PDF

Info

Publication number
CN113192322B
CN113192322B CN202110294815.5A CN202110294815A CN113192322B CN 113192322 B CN113192322 B CN 113192322B CN 202110294815 A CN202110294815 A CN 202110294815A CN 113192322 B CN113192322 B CN 113192322B
Authority
CN
China
Prior art keywords
traffic flow
highway traffic
audio signal
sample
highway
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110294815.5A
Other languages
Chinese (zh)
Other versions
CN113192322A (en
Inventor
郭军
高赫妍
蒙龙
闫泽宇
张斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northeastern University China
Original Assignee
Northeastern University China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northeastern University China filed Critical Northeastern University China
Priority to CN202110294815.5A priority Critical patent/CN113192322B/en
Publication of CN113192322A publication Critical patent/CN113192322A/en
Application granted granted Critical
Publication of CN113192322B publication Critical patent/CN113192322B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation

Landscapes

  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention provides a highway traffic flow counting method based on cloud edge cooperation, and relates to the technical field of edge computing. According to the method, the edge computing device is responsible for collecting highway traffic flow audio samples, the cloud server carries out preprocessing and feature extraction on traffic flow audio, a traffic flow counting support vector machine model is trained, computing resources are adjusted in a self-adaptive mode in order to avoid resource waste and overlong task waiting time, and finally the highway traffic flow counting model is updated to the edge computing device.

Description

Highway traffic flow counting method based on cloud edge cooperation
Technical Field
The invention relates to the technical field of edge computing, in particular to a highway traffic flow counting method based on cloud edge cooperation.
Background
Along with the continuous innovation of the technology of the internet of things in recent years, the intelligent traffic system is continuously developed and perfected. Intelligent traffic is considered to be a general term encompassing route optimization, parking, street lighting, traffic flow, accident prevention/detection, road anomalies, and infrastructure applications. The current common technology for monitoring the traffic flow of the expressway in the intelligent traffic system is a video monitoring technology, and the technology detects, identifies and tracks vehicles on the expressway through videos shot by a camera and analyzes the traffic flow state. However, the method using video detection still has the following disadvantages:
(1) The camera is greatly influenced by the external environment. The camera detection effect is good when the illumination condition is good, and when light was darker, the video of camera shooting might be fuzzy, especially appeared sheltering from and when unusual weather, video detection's effect greatly reduced can lead to detecting failure even sometimes, and the shooting scope of camera is limited simultaneously.
(2) The image processing calculation amount is large. The video shot by the camera is formed by one frame and one frame of image, and the collected data is analyzed by using a video detection technology and an image processing technology to obtain traffic information. When a large number of traffic pictures are processed by a computer, the computing pressure of the computer is increased, and the cost of hardware equipment for high-performance computers and image processing is higher.
(3) The network transmission bandwidth pressure is large. The increase speed of the network bandwidth is far lower than that of the data, the information acquisition equipment directly transmits the acquired traffic information to the server without any processing, and the pressure of network information transmission is increased due to the continuity of information acquisition and continuous information transmission.
There are also some methods of analyzing a traffic flow state by audio, and it is the most direct detection method to detect a traffic abnormality by the sound of a vehicle collision, but when an accident site is far from an apparatus that collects audio, the audio apparatus may not collect the collision sound and thus a judgment is made wrong. Meanwhile, each edge computing device for acquiring the highway traffic flow audio sample is in different environments, and each edge computing device needs to train a separate highway traffic flow counting model, but the storage space and the computing capacity of the edge computing device are limited, so that the highway traffic flow counting model cannot be trained on the edge computing device, and the effect of the prior method on highway traffic flow statistics is not ideal.
Disclosure of Invention
The invention aims to solve the technical problem of the prior art, provides a highway traffic flow counting method based on cloud edge coordination, and solves the problem of highway traffic flow counting under limited edge computing capacity.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a highway traffic flow counting method based on cloud edge cooperation comprises the following steps:
step 1: the method comprises the steps that edge computing devices collect highway traffic flow audio samples, then the audio samples are transmitted to a cloud server and stored in a traffic flow audio sample library, and each edge computing device generates an own audio sample library;
step 2: the cloud server carries out pretreatment and feature extraction on the audio signal according to the highway traffic flow audio sample library of each edge computing device to generate a highway traffic flow training sample;
step 2.1: preprocessing an audio signal of the traffic flow of the expressway;
step 2.1.1: the high-frequency part of the highway traffic flow audio signal is pre-emphasized through a first-order digital filter, so that the frequency spectrum fluctuation interval of the audio signal is relatively reduced, and the following formula is shown:
H(z)=1-αz -1 (1)
y(t)=x(t)-αx(t-1) (2)
wherein H (z) represents a transfer function, alpha represents a pre-emphasis coefficient, 0.9< alpha <1.0, z represents a high-frequency part of the highway traffic flow audio signal, x (t) represents a sampling value of the highway traffic flow audio signal at the time t, and y (t) represents the pre-emphasized audio signal;
step 2.1.2: framing the pre-emphasized expressway traffic flow audio signal obtained in the step 2.1.1 by adopting a movable limited-length window for weighting;
step 2.1.3: windowing the highway traffic flow audio signal processed in the step 2.1.2 by adopting a Hamming window function, wherein the highway traffic flow audio signal after windowing is represented as follows:
Figure BDA0002983932130000021
s w (x)=s(x)*w(x) (4)
wherein w (x) represents a Hamming window function, N is a positive integer, s w (x) Representing the windowed highway traffic flow audio signal, s (x) representing the original highway traffic flow audio signal;
step 2.2: performing Fast Fourier Transform (FFT) on each frame of data of the preprocessed highway traffic flow audio signal, converting time domain analysis of the highway traffic flow audio signal into frequency domain analysis, and obtaining a frequency domain signal;
step 2.3: each frame of frequency domain signal in the highway traffic flow audio signal passes through a Mel filter, and the frequency scale is converted into a Mel frequency scale, wherein the formula is as follows:
Figure BDA0002983932130000022
wherein mel (f) represents the mel frequency scale and f represents the frequency scale;
step 2.4: calculating the energy sum of each frame of the filtered expressway traffic flow audio signal and taking the logarithm;
Figure BDA0002983932130000031
wherein y represents the calculation result, x i An ith frame of filtered energy representing an expressway traffic flow audio signal;
step 2.5: performing Discrete Cosine Transform (DCT) on the calculation result of the step 2.4 to obtain a Mel cepstrum coefficient, obtain the characteristics and the label of the highway traffic flow audio signal, and generate a highway traffic flow training sample array;
and 3, step 3: training an individualized expressway traffic flow counting model based on a Support Vector Machine (SVM), wherein the individualized expressway traffic flow counting model is obtained by training the training sample array;
3.1, dividing the highway traffic flow into 0,1,2, \8230, k +1 categories, and taking the highway traffic flow audio calculation model sample set generated in the step 2.5 as the input of the highway traffic flow classifier model;
step 3.2: taking each category of the highway traffic flow as a two-category problem, wherein the two-category problem refers to a problem classified according to two marks in a comparative study containing two categories of matters, the audio signal characteristics of the highway traffic flow belonging to the category are taken as positive samples of the category, the audio signal characteristics of the highway traffic flow belonging to the other categories are taken as negative samples, and k +1 two-category classifiers are trained, and the specific method comprises the following steps:
step 3.2.1: traffic flow training sample set D = { (x) on expressway 1 ,y 1 ),(x 2 ,y 2 ),...,(x m ,y m )},y i In a characteristic space formed by E { -1, +1}, finding a maximum interval division hyperplane, separating samples of different categories, and determining a highway traffic flow classifier model, wherein a specific formula is as follows:
f(x)=ω T x+b (6)
wherein, omega and b are model parameters, x is a highway traffic flow training sample set, (x) m ,y m ) The mth sample in the expressway traffic flow training sample set is obtained;
step 3.2.2: the problem of finding the optimal classification hyperplane in the feature space formed by the audio signal features of the traffic flow of the expressway is converted into a quadratic programming problem shown by the following formula, wherein the quadratic programming is a mathematical programming problem in nonlinear programming:
Figure BDA0002983932130000032
Figure BDA0002983932130000041
in the formula, xi i For the ith sampleRelaxation coefficient, express way traffic flow audio signal characteristic sample xi =0 satisfying constraint condition, express way traffic flow audio signal characteristic sample xi violating maximum interval rule>0; c is a penalty coefficient, and the larger C is, the greater the penalty strength for violating the constraint sample is; n is the sample number of the expressway traffic flow training sample set;
the original objective of the SVM, namely interval maximization, is expressed as a constraint optimization problem;
step 3.2.3: the lagrangian multiplier is used to obtain the lagrangian function as shown in the following equation:
Figure BDA0002983932130000042
wherein alpha is i And mu i Expressed as Lagrange multiplier, and α i ≥0,μ i ≥0;
Step 3.2.4: the optimization problem of the SVM is converted into an equivalent dual problem through Lagrange dual, and the dual obtains an expression as follows:
Figure BDA0002983932130000043
Figure BDA0002983932130000044
wherein, K (x) i ,x j ) Expressed as a kernel function, α i Expressed as lagrange multipliers;
step 3.2.5: the corresponding alpha vector has a value of alpha when equation (10) is minimum * Vector, then estimate b of b * The expression of (a) is as follows:
Figure BDA0002983932130000045
step 3.2.6: obtaining a classification decision function g (x) of the highway traffic flow audio signals, wherein the formula is as follows:
Figure BDA0002983932130000046
wherein sign is expressed as a sign function;
step 3.3: because the sample accumulation rates of the traffic flow audio sample libraries are different, a model training task queue is generated according to the time sequence when the sample accumulation in the traffic flow audio sample library reaches a threshold value, and the cloud server adaptively adjusts and calculates resources to train the highway traffic flow counting model;
step 3.3.1: defining that each expressway traffic flow audio sample contains an edge computing device number edge _ id, a traffic flow audio file name file and a traffic flow value vehicle _ count;
step 3.3.2: generating a model training task according to the sequence that the number of samples in the highway traffic flow audio sample library corresponding to each edge computing device reaches a threshold value, and adding the model training task into a model training task queue;
step 3.3.2.1: the task scheduler continuously extracts tasks from the task queue, applies for computing resources, and the resource distributor distributes virtual machines to complete model training tasks:
when the number of model training tasks in the task queue is increased, the computing resources applied by the task scheduler are increased;
when the number of model training tasks in the task queue is reduced, the computing resources applied by the task scheduler are reduced;
step 3.3.2.2: in order to avoid overlong task waiting time and waste of computing resources, along with the change of the number of tasks, the number of applied computing resources is adjusted, and the following formula is satisfied:
Figure BDA0002983932130000051
Figure BDA0002983932130000052
wherein n is expressed as the number of tasks in the task queue, m min Expressed as the minimum value of the number of virtual machines, k, during model training 1 Representing the training task threshold value distributed to each virtual machine on average;
step 3.3.3: the cloud server adaptively adjusts computing resources to train a highway traffic flow counting model;
if the number vm of the virtual machines currently occupied is count Greater than the minimum value m of the number of virtual machines in model training min Then turn off vm count -m min A virtual machine;
if the number vm of the virtual machines currently occupied is count Less than the minimum value m of the number of virtual machines in model training min Then apply for vm count -m min A virtual machine;
and 4, step 4: and updating the highway traffic flow counting model to the edge computing device, and storing the highway traffic flow counting result into a traffic flow time sequence library of the cloud server by the edge computing device, thereby completing the counting of the highway traffic flow.
Adopt the produced beneficial effect of above-mentioned technical scheme to lie in:
the invention provides a highway traffic flow counting method based on cloud edge coordination, wherein edge computing equipment is responsible for collecting highway traffic flow audio samples, a cloud server carries out pretreatment and feature extraction on traffic flow audio, a traffic flow counting support vector machine model is trained, computing resources are adjusted in a self-adaptive mode in order to avoid resource waste and overlong task waiting time, and finally a highway traffic flow counting model is updated to the edge computing equipment.
Drawings
FIG. 1 is a general flow chart provided by an embodiment of the present invention;
FIG. 2 is a diagram of an original audio waveform provided by an embodiment of the present invention;
FIG. 3 is a diagram of an original audio frequency spectrum provided by an embodiment of the present invention;
FIG. 4 is a diagram of pre-emphasis audio waveforms provided by an embodiment of the present invention;
FIG. 5 is a diagram of a pre-emphasis audio frequency spectrum provided by an embodiment of the present invention;
FIG. 6 is a graph of the number of model training tasks over time, provided by an embodiment of the present invention;
FIG. 7 is a diagram of computing resources over time, according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
A method for counting highway traffic flow based on cloud edge cooperation is shown in figure 1 and comprises the following steps:
step 1: the method comprises the steps that edge computing devices collect highway traffic flow audio samples, then the audio samples are transmitted to a cloud server and stored in a traffic flow audio sample library, and each edge computing device generates an own audio sample library;
in the embodiment, python is used as a programming language, an HPZ820 workstation is used as a cloud server, and configuration parameters of the HPZ820 workstation are shown in table 1.
Table 1 HPZ820 server configuration parameter table
Figure BDA0002983932130000061
The edge computing device transmits the highway traffic audio samples to a cloud server highway traffic flow audio sample library, and the cloud server trains a highway traffic flow support vector machine model for the edge computing device. Taking a training sample library of one of the edge computing devices as an example, the sample labels are divided into 0 vehicle, 1 vehicle, 2 vehicles, and 3 vehicles, and the composition of the training sample set is shown in table 2.
TABLE 2 training sample set composition
Figure BDA0002983932130000071
And 2, step: the cloud server carries out preprocessing and feature extraction on the audio signals according to the highway traffic flow audio sample library of each edge computing device;
step 2.1: preprocessing an audio signal of highway traffic flow;
step 2.1.1: the high-frequency part of the highway traffic flow audio signal is pre-emphasized through a first-order digital filter, so that the frequency spectrum fluctuation interval of the audio signal is relatively reduced, and the following formula is shown:
H(z)=1-αz -1 (1)
y(t)=x(t)-αx(t-1) (2)
wherein H (z) represents a transfer function, alpha represents a pre-emphasis coefficient, 0.9< alpha <1.0, z represents a high-frequency part of the highway traffic flow audio signal, x (t) represents a sampling value of the highway traffic flow audio signal at the time t, and y (t) represents the pre-emphasized audio signal;
step 2.1.2: framing the pre-emphasized expressway traffic flow audio signal obtained in the step 2.1.1 by adopting a movable finite-length window for weighting;
step 2.1.3: and (3) windowing the highway traffic flow audio signal obtained after the processing of the step 2.1.2 by adopting a Hamming window function, wherein the highway traffic flow audio signal after windowing is represented as follows:
Figure BDA0002983932130000072
s w (x)=s(x)*w(x) (4)
wherein w (x) represents a Hamming window function, N is a positive integer, s w (x) Representing the windowed highway traffic flow audio signal, s (x) representing the original highway traffic flow audio signal;
the sound preprocessing is the basis of audio signal analysis, and the oscillogram and spectrogram contrast chart before and after the sound preprocessing in the embodiment are shown in fig. 2 to 5.
As can be seen from the comparison of the original audio and the preprocessed audio in fig. 2-5, the amplitude of the high frequency part of the sound is improved after the preprocessing.
Step 2.2: performing Fast Fourier Transform (FFT) on each frame of the preprocessed highway traffic flow audio signal, and converting time domain analysis into frequency domain analysis of the highway traffic flow audio signal to obtain a frequency domain signal;
step 2.3: each frame of frequency domain signal in the highway traffic flow audio signal passes through a Mel filter, and the frequency scale is converted into a Mel frequency scale, wherein the formula is as follows:
Figure BDA0002983932130000081
wherein mel (f) represents the mel frequency scale and f represents the frequency scale;
step 2.4: calculating the energy sum of each frame of the filtered expressway traffic flow audio signal and taking the logarithm;
Figure BDA0002983932130000082
wherein y represents the calculation result, x i Filtered energy of ith frame representing highway traffic flow audio signal
Step 2.5: performing Discrete Cosine Transform (DCT) on the calculation result of the step 2.4 to obtain a Mel cepstrum coefficient, obtain the characteristics and the label of the highway traffic flow audio signal, and generate a highway traffic flow training sample array;
and step 3: training an individualized expressway traffic flow counting model based on a Support Vector Machine (SVM), wherein the individualized expressway traffic flow counting model is obtained by training the training sample array;
3.1, dividing the highway traffic flow into 0,1,2, \8230, k +1 categories, and taking the highway traffic flow audio calculation model sample set generated in the step 2.5 as the input of the highway traffic flow classifier model;
step 3.2: taking each category of the highway traffic flow as a two-category problem, wherein the two-category problem refers to a problem classified according to two marks in a comparative study containing two categories of matters, the audio signal characteristics of the highway traffic flow belonging to the category are taken as positive samples of the category, the audio signal characteristics of the highway traffic flow belonging to the other categories are taken as negative samples, and k +1 two-category classifiers are trained, and the specific method comprises the following steps:
step 3.2.1: traffic flow training sample set D = { (x) on expressway 1 ,y 1 ),(x 2 ,y 2 ),...,(x m ,y m )},y i In a characteristic space formed by E { -1, +1}, finding a maximum interval division hyperplane, separating samples of different classes, and determining a highway traffic flow classifier model, wherein the specific formula is as follows:
f(x)=ω T x+b (6)
wherein, omega and b are model parameters, x is a highway traffic flow training sample set, (x) m ,y m ) The mth sample in the expressway traffic flow training sample set is obtained;
step 3.2.2: the problem of finding the optimal classification hyperplane in the feature space formed by the audio signal features of the traffic flow of the highway is converted into a quadratic programming problem shown by the following formula, wherein the quadratic programming is a mathematical programming problem in nonlinear programming and is applied to various aspects, such as investment combination, solution of constraint least square problem, application of sequential quadratic programming in nonlinear optimization problem and the like:
Figure BDA0002983932130000091
Figure BDA0002983932130000092
in the formula, xi i For the relaxation coefficient of the ith sample, the highway traffic flow audio signal characteristic sample xi =0 meeting the constraint condition, wherein the highway traffic flow audio signal characteristic sample xi violating the maximum interval rule>0; c is a penalty coefficient, and the larger C is, the greater the penalty strength for violating the constraint sample is; n is the sample number of the expressway traffic flow training sample set;
the original objective of the SVM, namely interval maximization, is expressed as a constraint optimization problem;
step 3.2.3: the lagrange multiplier is used to obtain the lagrange function, as shown in the following equation:
Figure BDA0002983932130000093
wherein alpha is i And mu i Expressed as Lagrange multiplier, and α i ≥0,μ i ≥0;
Step 3.2.4: the optimization problem of the SVM is converted into an equivalent dual problem through Lagrange dual, and the dualization obtains an expression as follows:
Figure BDA0002983932130000094
Figure BDA0002983932130000095
wherein, K (x) i ,x j ) Expressed as a kernel function, α i Expressed as lagrange multipliers;
step 3.2.5: the corresponding alpha vector has a value of alpha when equation (10) is minimum * Vector, then estimate b of b * The expression of (a) is as follows:
Figure BDA0002983932130000101
step 3.2.6: obtaining a classification decision function g (x) of the highway traffic flow audio signals, wherein the formula is as follows:
Figure BDA0002983932130000102
wherein sign is expressed as a sign function;
step 3.3: the sample accumulation rates of the traffic flow audio sample bases are different, a model training task queue is generated according to the time sequence that the sample accumulation in the traffic flow audio sample bases reaches a threshold value, and the cloud server adaptively adjusts and calculates resources to train the highway traffic flow counting model;
step 3.3.1: defining that each expressway traffic flow audio sample contains an edge computing device number edge _ id, a traffic flow audio file name file and a traffic flow value vehicle _ count;
step 3.3.2: generating a model training task according to the sequence that the number of samples in the highway traffic flow audio sample library corresponding to each edge computing device reaches a threshold value, and adding the model training task into a model training task queue;
step 3.3.2.1: the task scheduler continuously extracts tasks from the task queue, applies for computing resources, and the resource distributor distributes virtual machines to complete model training tasks:
when the number of model training tasks in the task queue is increased, the computing resources applied by the task scheduler are increased;
when the number of model training tasks in the task queue is reduced, the computing resources applied by the task scheduler are reduced;
step 3.3.2.2: in order to avoid overlong task waiting time and waste of computing resources, along with the change of the number of tasks, the number of applied computing resources is adjusted, and the following formula is satisfied:
Figure BDA0002983932130000103
Figure BDA0002983932130000104
wherein n is expressed as the number of tasks in the task queue, m min Expressed as the minimum value of the number of virtual machines, k, during model training 1 Representing the training task threshold value distributed to each virtual machine on average;
step 3.3.3: the cloud server adaptively adjusts a computing resource to train a highway traffic flow counting model;
if the number vm of the virtual machines currently occupied is count Greater than the minimum value m of the number of virtual machines in model training min Then turn off vm count -m min A virtual machine;
if the number vm of the virtual machines currently occupied is count Less than the minimum value m of the number of virtual machines in model training min Then apply for vm count -m min A virtual machine;
an audio-based highway traffic flow count support vector machine model is trained with highway traffic flow audio samples. There are 344 traffic flow audio samples in the highway traffic flow audio sample library, with 151 car 0 audio samples, 80 car 1 audio samples, 58 car 2 audio samples, and 55 car 3 audio samples. The training set is 70% of the total number of samples, 240 samples, and the number of the test set samples is 104. The accuracy of the traffic flow count results for each type is shown in table 3.
TABLE 3 model training classification accuracy
Figure BDA0002983932130000111
From table 3, it can be seen that the classification accuracy is the greatest when there is no vehicle, and the smaller the traffic flow value is, the higher the classification accuracy of the model is. This is because the more vehicles and the greater the density of vehicles in a given time, the more chaotic the sounds of the vehicles will be to make it difficult to distinguish the specific traffic flow size.
And 4, step 4: and updating the highway traffic flow counting model to the edge computing device, and storing the highway traffic flow counting result into a traffic flow time sequence library of the cloud server by the edge computing device, thereby completing the counting of the highway traffic flow.
And generating a model training task queue on the cloud server according to the sequence that the accumulated samples in the highway traffic flow audio sample library corresponding to each edge computing device reach the threshold value, adaptively adjusting the distributed computing resources according to the number of tasks in the task queue, and setting the number of tasks in the model training task queue as n, wherein the number of model training tasks changes with time as shown in FIG. 6. When the number of calculation resources is designed to be m, the number of calculation resources allocated varies with time as shown in fig. 7.
It follows from fig. 6 and 7 that as time increases, the number of training model tasks and the number of computational resources are reduced as they increase. As the edge computing equipment continuously accumulates highway traffic flow audio samples at the beginning, when the number of the samples in the sample library reaches a certain threshold value, the samples are added into the model training task queue, and more computing resources are applied for training the highway traffic flow model as the training tasks are more and more. When all the edge computing devices finish collecting highway traffic flow audio samples, the number of tasks in the model training task queue is not increased any more, the number of tasks is continuously reduced along with the training of the highway traffic flow counting model, and computing resources are continuously closed to avoid resource waste, so the computing resources are also continuously reduced.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions and scope of the present invention as defined in the appended claims.

Claims (2)

1. A highway traffic flow counting method based on cloud edge cooperation is characterized by comprising the following steps:
step 1: the method comprises the following steps that edge computing devices collect highway traffic flow audio samples, then the audio samples are transmitted to a cloud server and stored in a traffic flow audio sample library, and each edge computing device generates an own audio sample library;
and 2, step: the cloud server carries out preprocessing and feature extraction on the audio signals according to the highway traffic flow audio sample library of each edge computing device;
step 2.1: preprocessing an audio signal of highway traffic flow;
step 2.2: fast Fourier Transform (FFT) is carried out on each frame of data of the preprocessed highway traffic flow audio signal, and time domain analysis and frequency domain analysis of the highway traffic flow audio signal are converted to obtain a frequency domain signal;
step 2.3: and (2) passing each frame of frequency domain signal in the highway traffic flow audio signal through a Mel filter, and converting the frequency scale into a Mel frequency scale, wherein the formula is as follows:
Figure FDA0003757028210000011
wherein mel (f) represents the mel frequency scale and f represents the frequency scale;
step 2.4: calculating the energy sum of each frame of the filtered expressway traffic flow audio signal and taking the logarithm;
Figure FDA0003757028210000012
wherein y represents the calculation result, x i Filtered energy of ith frame representing highway traffic flow audio signal
Step 2.5: performing Discrete Cosine Transform (DCT) on the calculation result of the step 2.4 to obtain a Mel cepstrum coefficient, obtain the characteristics and the label of the highway traffic flow audio signal, and generate a highway traffic flow training sample array;
and step 3: training an individualized expressway traffic flow counting model based on a Support Vector Machine (SVM), wherein the individualized expressway traffic flow counting model is obtained by training the training sample array;
3.1, dividing the highway traffic flow into 0,1,2, \8230, k +1 categories, and taking the highway traffic flow audio calculation model sample set generated in the step 2.5 as the input of the highway traffic flow classifier model;
step 3.2: taking each category of the highway traffic flow as a two-category problem, wherein the two-category problem refers to a problem classified according to two marks in a comparative study containing two categories of matters, the audio signal characteristics of the highway traffic flow belonging to the category are taken as positive samples of the category, the audio signal characteristics of the highway traffic flow belonging to the other categories are taken as negative samples, and k +1 two-category classifiers are trained, and the specific method comprises the following steps:
step 3.2.1: traffic flow training sample set D { (x) on expressway 1 ,y 1 ),(x 2 ,y 2 ),…,(x m ,y m )},y i In a characteristic space formed by E { -1, +1}, finding a maximum interval division hyperplane, separating samples of different classes, and determining a highway traffic flow classifier model, wherein the specific formula is as follows:
f(x)=ω T x+b (6)
wherein, ω isB is model parameter, x is training sample set of highway traffic flow, (x) m ,y m ) The mth sample in the expressway traffic flow training sample set is obtained;
step 3.2.2: the problem of finding the optimal classification hyperplane in the feature space formed by the audio signal features of the traffic flow of the expressway is converted into a quadratic programming problem shown by the following formula, wherein the quadratic programming is a mathematical programming problem in nonlinear programming:
Figure FDA0003757028210000021
Figure FDA0003757028210000022
in the formula, xi i For the relaxation coefficient of the ith sample, the highway traffic flow audio signal characteristic sample xi =0 meeting the constraint condition, wherein the highway traffic flow audio signal characteristic sample xi violating the maximum interval rule>0; c is a penalty coefficient, and the larger C is, the greater the penalty strength for violating the constraint sample is; n is the sample number of the highway traffic flow training sample set;
the original objective of the SVM, namely interval maximization, is expressed as a constraint optimization problem;
step 3.2.3: the lagrange multiplier is used to obtain the lagrange function, as shown in the following equation:
Figure FDA0003757028210000023
wherein alpha is i And mu i Expressed as Lagrange multiplier, and α i ≥0,μ i ≥0;
Step 3.2.4: the optimization problem of the SVM is converted into an equivalent dual problem through Lagrange dual, and the dualization obtains an expression as follows:
Figure FDA0003757028210000024
Figure FDA0003757028210000025
wherein, K (x) i ,x j ) Expressed as a kernel function, α i Expressed as lagrange multipliers;
step 3.2.5: the value of the corresponding alpha vector is alpha when equation (10) is minimal * Vector, then estimate b of b * The expression of (c) is as follows:
Figure FDA0003757028210000031
step 3.2.6: obtaining a classification decision function g (x) of the highway traffic flow audio signals, wherein the formula is as follows:
Figure FDA0003757028210000032
wherein sign is expressed as a sign function;
step 3.3: because the sample accumulation rates of the traffic flow audio sample libraries are different, a model training task queue is generated according to the time sequence when the sample accumulation in the traffic flow audio sample library reaches a threshold value, and the cloud server adaptively adjusts and calculates resources to train the highway traffic flow counting model;
step 3.3.1: defining that each expressway traffic flow audio sample contains an edge computing device number edge _ id, a traffic flow audio file name file and a traffic flow value vehicle _ count;
step 3.3.2: generating a model training task according to the sequence that the number of samples in the highway traffic flow audio sample library corresponding to each edge computing device reaches a threshold value, and adding the model training task into a model training task queue;
step 3.3.2.1: the task scheduler continuously extracts tasks from the task queue, applies for computing resources, and the resource distributor distributes virtual machines to complete model training tasks:
when the number of model training tasks in the task queue is increased, the computing resources applied by the task scheduler are increased;
when the number of model training tasks in the task queue is reduced, the application of computing resources by the task scheduler is reduced;
step 3.3.2.2: in order to avoid the overlong waiting time of the tasks and the waste of computing resources, the applied computing resource quantity is adjusted along with the change of the task quantity, and the following formula is satisfied:
Figure FDA0003757028210000033
Figure FDA0003757028210000034
wherein n is expressed as the number of tasks in the task queue, m min Expressed as the minimum value of the number of virtual machines, k, during model training 1 Representing the training task threshold value distributed to each virtual machine on average;
step 3.3.3: the cloud server adaptively adjusts a computing resource to train a highway traffic flow counting model;
if the number vm of the virtual machines currently occupied is count Greater than the minimum value m of the number of virtual machines in model training min Then turn off vm count -m min A virtual machine;
if the number vm of the virtual machines currently occupied is count Less than the minimum value m of the number of virtual machines in model training min Then apply for vm count -m min A virtual machine;
and 4, step 4: and updating the highway traffic flow counting model to the edge computing device, and storing the highway traffic flow counting result into a traffic flow time sequence library of the cloud server by the edge computing device, thereby completing the counting of the highway traffic flow.
2. The cloud-edge-collaboration-based highway traffic flow counting method according to claim 1, wherein the step 2.1 specifically comprises the following steps:
step 2.1.1: the high-frequency part of the highway traffic flow audio signal is pre-emphasized through a first-order digital filter, so that the frequency spectrum fluctuation interval of the audio signal is relatively reduced, and the following formula is shown:
H(z)=1-αz -1 (1)
y(t)=x(t)-αx(t-1) (2)
wherein H (z) represents a transfer function, alpha represents a pre-emphasis coefficient, 0.9< alpha <1.0, z represents a high-frequency part of the highway traffic flow audio signal, x (t) represents a sampling value of the highway traffic flow audio signal at the time t, and y (t) represents the pre-emphasized audio signal;
step 2.1.2: framing the pre-emphasized expressway traffic flow audio signal obtained in the step 2.1.1 by adopting a movable limited-length window for weighting;
step 2.1.3: and (3) windowing the highway traffic flow audio signal obtained after the processing of the step 2.1.2 by adopting a Hamming window function, wherein the highway traffic flow audio signal after windowing is represented as follows:
Figure FDA0003757028210000041
s w (x)=s(x)*w(x) (4)
wherein w (x) represents a Hamming window function, N is a positive integer, s w (x) Representing the windowed highway traffic flow audio signal, and s (x) representing the original highway traffic flow audio signal.
CN202110294815.5A 2021-03-19 2021-03-19 Expressway traffic flow counting method based on cloud edge cooperation Active CN113192322B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110294815.5A CN113192322B (en) 2021-03-19 2021-03-19 Expressway traffic flow counting method based on cloud edge cooperation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110294815.5A CN113192322B (en) 2021-03-19 2021-03-19 Expressway traffic flow counting method based on cloud edge cooperation

Publications (2)

Publication Number Publication Date
CN113192322A CN113192322A (en) 2021-07-30
CN113192322B true CN113192322B (en) 2022-11-25

Family

ID=76973508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110294815.5A Active CN113192322B (en) 2021-03-19 2021-03-19 Expressway traffic flow counting method based on cloud edge cooperation

Country Status (1)

Country Link
CN (1) CN113192322B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113888871B (en) * 2021-10-20 2023-05-05 上海电科智能系统股份有限公司 Automatic handling linkage system and method for expressway traffic incidents

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103238136A (en) * 2010-12-10 2013-08-07 亚马逊技术股份有限公司 Virtual machine morphing for heterogeneous migration environments
CN106793045A (en) * 2017-03-01 2017-05-31 安徽工程大学 Cloud wirelessly networking system and its Energy dissipation method
CN107341041A (en) * 2017-06-27 2017-11-10 南京邮电大学 Cloud task Multi-dimensional constraint backfill dispatching method based on Priority Queues

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938416B (en) * 2010-09-01 2012-08-08 华南理工大学 Cloud computing resource scheduling method based on dynamic reconfiguration virtual resources
CN102682601B (en) * 2012-05-04 2014-02-26 南京大学 Expressway traffic incident detection method based on optimized support vector machine (SVM)
CN102799899B (en) * 2012-06-29 2014-12-10 北京理工大学 Special audio event layered and generalized identification method based on SVM (Support Vector Machine) and GMM (Gaussian Mixture Model)
IN2013CH04372A (en) * 2013-09-26 2015-04-03 Infosys Ltd
CN105489019B (en) * 2015-12-18 2018-04-24 中山大学 A kind of traffic throughput monitor system for dividing vehicle based on double-audio signal collection
US10102744B2 (en) * 2016-09-27 2018-10-16 International Business Machines Corporation Predictive traffic management using virtual lanes
CN107911478B (en) * 2017-12-06 2020-09-22 武汉理工大学 Multi-user calculation unloading method and device based on chemical reaction optimization algorithm
CN108182949A (en) * 2017-12-11 2018-06-19 华南理工大学 A kind of highway anomalous audio event category method based on depth conversion feature
CN109405962B (en) * 2018-11-21 2020-10-09 中山大学 Road traffic noise frequency spectrum calculation method
CN110120218B (en) * 2019-04-29 2021-06-22 东北大学 Method for identifying highway large-scale vehicles based on GMM-HMM
CN110097755B (en) * 2019-04-29 2021-08-17 东北大学 Highway traffic flow state identification method based on deep neural network
CN110246171B (en) * 2019-06-10 2022-07-19 西北工业大学 Real-time monocular video depth estimation method
CN111585916B (en) * 2019-12-26 2023-08-01 国网辽宁省电力有限公司电力科学研究院 LTE power wireless private network task unloading and resource allocation method based on cloud edge cooperation
CN212463305U (en) * 2020-07-24 2021-02-02 西门子(中国)有限公司 Edge calculation device and edge calculation system
CN112100435B (en) * 2020-09-09 2023-11-07 沈阳帝信人工智能产业研究院有限公司 Automatic labeling method based on edge traffic audio and video synchronization samples
CN112331231B (en) * 2020-11-24 2024-04-19 南京农业大学 Broiler feed intake detection system based on audio technology

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103238136A (en) * 2010-12-10 2013-08-07 亚马逊技术股份有限公司 Virtual machine morphing for heterogeneous migration environments
CN106793045A (en) * 2017-03-01 2017-05-31 安徽工程大学 Cloud wirelessly networking system and its Energy dissipation method
CN107341041A (en) * 2017-06-27 2017-11-10 南京邮电大学 Cloud task Multi-dimensional constraint backfill dispatching method based on Priority Queues

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
云计算环境下多GPU资源调度机制研究;吕相文等;《小型微型计算机系统》;20160415(第04期);全文 *

Also Published As

Publication number Publication date
CN113192322A (en) 2021-07-30

Similar Documents

Publication Publication Date Title
CN110097755B (en) Highway traffic flow state identification method based on deep neural network
Dou et al. A hybrid CEEMD-GMM scheme for enhancing the detection of traffic flow on highways
CN110598620B (en) Deep neural network model-based recommendation method and device
CN107492383B (en) Live content screening method, device, equipment and storage medium
Dalir et al. Classification of vehicles based on audio signals using quadratic discriminant analysis and high energy feature vectors
CN113192322B (en) Expressway traffic flow counting method based on cloud edge cooperation
CN109920448A (en) A kind of identifying system and method for automatic driving vehicle traffic environment special type sound
CN104795064A (en) Recognition method for sound event under scene of low signal to noise ratio
CN108615532A (en) A kind of sorting technique and device applied to sound field scape
CN112100435B (en) Automatic labeling method based on edge traffic audio and video synchronization samples
Wang et al. Rainfall observation using surveillance audio
CN110287879A (en) A kind of video behavior recognition methods based on attention mechanism
Hassan et al. Road anomaly classification for low-cost road maintenance and route quality maps
CN114741185A (en) Edge computing system for multi-target video monitoring and working method thereof
Omar et al. Fourier Domain Kernel Density Estimation-based Approach for Hail Sound classification
Astapov et al. A multistage procedure of mobile vehicle acoustic identification for single-sensor embedded device
Czyżewski et al. Application of autoencoder to traffic noise analysis
CN117312548A (en) Multi-source heterogeneous disaster situation data fusion understanding method
Hashimoto et al. Detection of car abnormal vibration using machine learning
CN112614158A (en) Sampling frame self-adaptive multi-feature fusion online target tracking method
Parineh et al. Detecting emergency vehicles With 1D-CNN using fourier processed audio signals
CN116260547B (en) System and method for inhibiting same-frequency interference
Guo et al. An Evaluation Model of Traffic Abnormal Probability of Adjacent Freeway Nodes Based on Space-time Constraints
AU2005252714B2 (en) Effective audio segmentation and classification
Strisciuglio et al. Trainable cope features for sound event detection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant