[go: up one dir, main page]

CN107293120A - A kind of methods of self-tuning of the Algorithm for Traffic Incidents Detection based on genetic algorithm - Google Patents

A kind of methods of self-tuning of the Algorithm for Traffic Incidents Detection based on genetic algorithm Download PDF

Info

Publication number
CN107293120A
CN107293120A CN201710607981.XA CN201710607981A CN107293120A CN 107293120 A CN107293120 A CN 107293120A CN 201710607981 A CN201710607981 A CN 201710607981A CN 107293120 A CN107293120 A CN 107293120A
Authority
CN
China
Prior art keywords
algorithm
detection
traffic
performance
threshold
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.)
Pending
Application number
CN201710607981.XA
Other languages
Chinese (zh)
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.)
Chongqing University
Original Assignee
Chongqing University
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 Chongqing University filed Critical Chongqing University
Priority to CN201710607981.XA priority Critical patent/CN107293120A/en
Publication of CN107293120A publication Critical patent/CN107293120A/en
Pending legal-status Critical Current

Links

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
    • G08G1/0129Traffic data processing for creating historical data or processing based on historical data
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Evolutionary Biology (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Genetics & Genomics (AREA)
  • Evolutionary Computation (AREA)
  • Chemical & Material Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Physiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Analytical Chemistry (AREA)
  • Traffic Control Systems (AREA)

Abstract

本发明公开了一种基于遗传算法的交通事件检测算法的参数自整定方法,包括一:完成阈值参数的离线整定;二:配置系统信息;三:捕获系统时间t;四:读取数据库中的交通流数据;步骤五:得到每个检测周期的检测结果;六:实时存储检测结果和对应的交通流数据;七:获取当前算法阈值,估算对应时间窗内的交通事件检测性能效果并存储;八:引入遗忘因子λ,计算当前的算法性能指标;九:判断当前算法的检测性能是否满足性能要求,如果满足则不更新California算法参数,如果不满足则返回步骤二更新信息。本发明针对California算法阈值标定困难、标定不合理等问题,本发明提出的参数自整定方法能够提高California算法的可移植性和自适应性,提升交通事件检测的整体效果。

The invention discloses a parameter self-tuning method of a traffic incident detection algorithm based on a genetic algorithm, which includes: first: completing offline tuning of threshold parameters; second: configuring system information; third: capturing system time t; fourth: reading the Traffic flow data; Step 5: Obtain the detection results of each detection cycle; 6: Store the detection results and corresponding traffic flow data in real time; 7: Obtain the current algorithm threshold, estimate and store the traffic incident detection performance in the corresponding time window; Eight: Introduce the forgetting factor λ to calculate the current algorithm performance index; Nine: Determine whether the detection performance of the current algorithm meets the performance requirements. If it meets the performance requirements, the California algorithm parameters will not be updated. If not, return to step 2 to update the information. The present invention aims at problems such as difficult and unreasonable calibration of the threshold value of the California algorithm, and the parameter self-tuning method proposed by the present invention can improve the portability and adaptability of the California algorithm, and improve the overall effect of traffic incident detection.

Description

一种基于遗传算法的交通事件检测算法的参数自整定方法A Parameter Self-tuning Method of Traffic Incident Detection Algorithm Based on Genetic Algorithm

技术领域technical field

本发明涉及本发明属于智能交通领域,尤其涉及利用遗传算法对交通事件检测算法的参数进行的自整定。The invention relates to the field of intelligent traffic, and in particular to the self-tuning of the parameters of the traffic event detection algorithm by using a genetic algorithm.

背景技术Background technique

目前,高速公路为人们提供了一个舒适快捷的生活方式,然而日益增长的交通需求量和相对较低的道路通行能力产生了矛盾,导致道路上发生的交通事故、车辆抛锚、货物散落等偶然交通事件频发,使得高速公路效率降低,造成了不良的社会影响,日益成为高速公路运营的重要问题,因此采用事件检测方法及时、准确地发现交通事件,对保证高速公路的运行安全和社会公众出行畅通具有十分重要的意义。At present, highways provide people with a comfortable and fast way of life. However, the increasing traffic demand and relatively low road capacity have produced contradictions, resulting in accidental traffic accidents, vehicle breakdowns, and scattered goods on the road. The frequent occurrence of incidents reduces the efficiency of expressways and causes adverse social impacts. It has become an important issue in the operation of expressways. Therefore, the use of event detection methods to detect traffic incidents in a timely and accurate manner is crucial to ensuring the safety of expressways and the travel of the public. Fluency is of great significance.

交通事件检测算法是进行事件检测、把握道路异常运行状态和进行道路运营管理的前提和关键技术。其中California算法是一种经典的交通事件检测算法,因该算法具有原理简单,过程直观的优势,已经成熟地应用于国内外各种工程实践中。然而在实际应用中还存在一些问题影响着检测效果,然而目前还存在算法阈值标定困难、标定不合理等问题,且随着如路段属性和流量环境等外界条件的变化,固定阈值会导致算法检测性能下降,从而导致算法的适应性变差和误警率升高。The traffic incident detection algorithm is the premise and key technology for incident detection, grasping abnormal road operation status and road operation management. Among them, the California algorithm is a classic traffic incident detection algorithm. Because the algorithm has the advantages of simple principle and intuitive process, it has been maturely used in various engineering practices at home and abroad. However, there are still some problems that affect the detection effect in practical applications. However, there are still problems such as difficult and unreasonable calibration of the algorithm threshold, and with the change of external conditions such as road section attributes and traffic environment, the fixed threshold will lead to algorithm detection. The performance is degraded, which leads to the poor adaptability of the algorithm and the increase of the false alarm rate.

目前算法参数的确定过程实际上是利用事件和非事件数据,对算法的各个参数组合进行测试,统计得出一组检测率、误报率和检测时间的值,通过综合比较这些评价值,选择判别效果最佳的参数。然而这类参数标定的方法效率低下,并且不能及时的适应交通状态的变化。因此寻找一种智能的方法代替传统的标定方法,可以有效地提高阈值确定的效率,改善算法适应性。At present, the process of determining algorithm parameters is actually to use event and non-event data to test each parameter combination of the algorithm, and obtain a set of values of detection rate, false alarm rate and detection time through statistics. By comprehensively comparing these evaluation values, select Identify the parameters that work best. However, this method of parameter calibration is inefficient and cannot adapt to changes in traffic conditions in a timely manner. Therefore, finding an intelligent method to replace the traditional calibration method can effectively improve the efficiency of threshold determination and improve the adaptability of the algorithm.

发明内容Contents of the invention

有鉴于此,本发明的目的是提供一种基于遗传算法的交通事件检测算法的参数自整定方法,让机器帮人去调节California算法参数,改善算法的其可移植性、连续学习能力和适应性。In view of this, the purpose of the present invention is to provide a parameter self-tuning method of the traffic incident detection algorithm based on the genetic algorithm, allowing the machine to help people adjust the parameters of the California algorithm, and improve its portability, continuous learning ability and adaptability of the algorithm .

本发明的目的是通过以下技术方案来实现的,一种基于遗传算法的交通事件检测算法的参数自整定方法,包括The purpose of the present invention is achieved by the following technical solutions, a parameter self-tuning method of the traffic incident detection algorithm based on genetic algorithm, comprising

步骤一:利用历史数据,以事件检测的性能指标为目标,采用遗传算法对检测算法阈值参数进行寻优,完成阈值参数的离线整定;Step 1: Using historical data, with the performance index of event detection as the target, the genetic algorithm is used to optimize the threshold parameters of the detection algorithm, and the offline tuning of the threshold parameters is completed;

步骤二:配置系统信息,包括算法初始参数和算法需满足的性能指标要求;Step 2: Configure system information, including the initial parameters of the algorithm and the performance index requirements that the algorithm needs to meet;

步骤三:捕获系统时间t,判断是否到采样周期,不到则等待;Step 3: capture the system time t, judge whether it is the sampling period, if not, wait;

步骤四:若时间已到采样周期,则读取数据库中的交通流数据,并进行数据预处理和路段匹配;Step 4: If the time has reached the sampling period, read the traffic flow data in the database, and perform data preprocessing and road segment matching;

步骤五:启动交通事件检测算法,得到每个检测周期的检测结果,根据检测结果,进行报警与解除报警处理;Step 5: Start the traffic incident detection algorithm, obtain the detection results of each detection cycle, and perform alarm and release alarm processing according to the detection results;

步骤六:建立滑动时间窗t-m+1,实时存储检测结果和对应的交通流数据,其中,t为当前时间,m为时间窗的长度;Step 6: Establish a sliding time window t-m+1, and store the detection results and corresponding traffic flow data in real time, where t is the current time and m is the length of the time window;

步骤七:获取当前算法阈值,结合时间窗t-m+1内的交通流数据,利用基于事件检测性能的自整定条件模型估算对应时间窗内的交通事件检测性能效果并存储;Step 7: Obtain the current algorithm threshold, combine the traffic flow data in the time window t-m+1, use the self-tuning condition model based on the event detection performance to estimate the traffic event detection performance effect in the corresponding time window and store it;

步骤八:引入遗忘因子λ,利用以往存储的检测性能结果加权求和,计算当前的算法性能指标;Step 8: Introduce the forgetting factor λ, and use the weighted sum of the detection performance results stored in the past to calculate the current algorithm performance index;

步骤九:判断当前算法的检测性能是否满足性能要求,如果满足则不更新California算法参数,如果不满足则利用改进的遗传算法更新California算法参数直至满足性能要求为止并返回步骤二更新系统信息;Step 9: Judging whether the detection performance of the current algorithm meets the performance requirements, if so, do not update the California algorithm parameters, if not, use the improved genetic algorithm to update the California algorithm parameters until the performance requirements are met, and return to step 2 to update the system information;

步骤十:当前判别周期结束,等待下一检测周期到来。Step 10: The current discrimination cycle is over, and the next detection cycle is waiting for arrival.

进一步,所述采用遗传算法对检测算法阈值参数进行寻优,完成阈值参数的离线整定,包括Further, the genetic algorithm is used to optimize the threshold parameters of the detection algorithm, and the off-line tuning of the threshold parameters is completed, including

步骤(1)通过基因编码策略,将所求解的空间转化成编码后的解空间;Step (1) Transform the solved space into the encoded solution space through the genetic coding strategy;

步骤(2)根据具体的研究问题,构造适应度函数;Step (2) Construct a fitness function according to specific research questions;

步骤(3)确定算法执行过程中的相关参数;Step (3) determines relevant parameters in the algorithm execution process;

步骤(4)随机地生成初始种群,用适应度函数评价每个个体的适应度值;Step (4) Randomly generate the initial population, and use the fitness function to evaluate the fitness value of each individual;

步骤(5)判断是否满足结束条件,如果满足就输出参数结果,如果不满足就执行步骤(6);Step (5) judges whether to meet the end condition, if it is satisfied, the parameter result is output, and if it is not satisfied, step (6) is executed;

步骤(6)将选择复制、交叉和变异操作算子作用于种群,生成新一代种群;返回步骤(5)。Step (6) Apply selection, replication, crossover and mutation operators to the population to generate a new generation of population; return to step (5).

进一步,在所述启动交通事件检测算法,得到每个检测周期的检测结果中,所述交通事件检测算法为:Further, in the described starting traffic incident detection algorithm, obtain the detection result of each detection period, described traffic incident detection algorithm is:

步骤(1)将上下游检测器占有率之差与阈值K1进行比较,若所述上下游检测器占有率之差大于等于阈值K1,则进行步骤(2),否则作无交通事件判断;Step (1) compares the difference between the occupancy rate of the upstream and downstream detectors with the threshold K1, if the difference between the occupancy rates of the upstream and downstream detectors is greater than or equal to the threshold K1, then proceed to step (2), otherwise it is judged that there is no traffic incident;

步骤(2)将上下游检测器占有率之差与上游检测器占有率之比与阈值K2进行比较,若所述上下游检测器占有率之差与上游检测器占有率之比大于等于K2,则进行步骤(3),否则作无交通事件判断;Step (2) comparing the ratio of the occupancy rate difference between the upstream and downstream detectors to the occupancy rate of the upstream detector with the threshold K2, if the ratio of the occupancy rate difference between the upstream and downstream detectors to the occupancy rate of the upstream detector is greater than or equal to K2, Then proceed to step (3), otherwise judge that there is no traffic incident;

步骤(3)将上下游检测器占有率之差与下游检测器占有率之比与阈值K3进行比较,若所述上下游检测器占有率之差大于等于阈值K3,则表示有交通事件,否则作无交通事件判断。Step (3) Compare the difference between the occupancy rate of the upstream and downstream detectors with the ratio of the occupancy rate of the downstream detector with the threshold K3, if the difference between the occupancy rates of the upstream and downstream detectors is greater than or equal to the threshold K3, it means that there is a traffic incident, otherwise Make no traffic accident judgment.

进一步,在所述利用基于事件检测性能的自整定条件模型估算对应时间窗内的交通事件检测性能效果并存储中,所述基于事件检测性能的自整定条件模型获取方法为:Further, in the process of estimating and storing the traffic event detection performance effect in the corresponding time window by using the self-tuning condition model based on event detection performance, the acquisition method of the self-tuning condition model based on event detection performance is:

步骤(1)选取多组California算法阈值进行试验,针对不同时空影响因素统计得到检测算法的性能效果与算法阈值的关系;Step (1) select multiple groups of California algorithm thresholds to test, and obtain the relationship between the performance effect of the detection algorithm and the algorithm threshold according to statistics of different spatio-temporal influence factors;

步骤(2)结合不同时空影响因素的表征参数,利用多元统计分析法,建立时空影响因素参数、算法阈值与算法性能指标的关系模型,实现交通事件检测性能效果的实时估计。Step (2) Combining the characterization parameters of different spatio-temporal influencing factors, using the multivariate statistical analysis method, establishing a relationship model between spatio-temporal influencing factor parameters, algorithm thresholds and algorithm performance indicators, and realizing real-time estimation of traffic incident detection performance.

由于采用了上述技术方案,本发明具有如下的优点:Owing to adopting above-mentioned technical scheme, the present invention has following advantage:

本发明针对California算法阈值标定困难、标定不合理等问题,本发明提出的参数自整定方法能够提高California算法的可移植性和自适应性,提升交通事件检测的整体效果。The present invention aims at problems such as difficult and unreasonable calibration of the threshold value of the California algorithm, and the parameter self-tuning method proposed by the present invention can improve the portability and adaptability of the California algorithm, and improve the overall effect of traffic incident detection.

附图说明Description of drawings

为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步的详细描述,其中:In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail below in conjunction with the accompanying drawings, wherein:

图1为基于遗传算法的California算法参数自整定系统流程图;Fig. 1 is the flow chart of California algorithm parameter self-tuning system based on genetic algorithm;

图2为California算法参数离线整定结构图;Figure 2 is a structure diagram of California algorithm parameter offline tuning;

图3为遗传算法迭代运算流程图;Fig. 3 is the flow chart of genetic algorithm iterative operation;

图4为参数自整定过程中遗传算法适应度函数曲线图;Fig. 4 is a graph of the genetic algorithm fitness function curve in the parameter self-tuning process;

图5为交通事件检测California算法流程图;Fig. 5 is a traffic incident detection California algorithm flow chart;

图6为California算法参数在线整定结构图;Fig. 6 is a structure diagram of California algorithm parameter online tuning;

图7为算法参数在线整定流程图。Figure 7 is a flowchart of online tuning of algorithm parameters.

具体实施方式detailed description

以下将结合附图,对本发明的优选实施例进行详细的描述;应当理解,优选实施例仅为了说明本发明,而不是为了限制本发明的保护范围。The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings; it should be understood that the preferred embodiments are only for illustrating the present invention, rather than limiting the protection scope of the present invention.

基于遗传算法的交通事件检测算法参数自整定方法的流程图如图1所示。以下是实施的具体过程:The flow chart of the parameter self-tuning method of traffic incident detection algorithm based on genetic algorithm is shown in Figure 1. The following is the specific process of implementation:

步骤一、利用历史数据,以事件检测的性能指标为目标,采用遗传算法对检测算法的阈值参数进行寻优,完成California算法参数的离线整定。Step 1. Using historical data and targeting the performance indicators of event detection, the genetic algorithm is used to optimize the threshold parameters of the detection algorithm, and the offline tuning of California algorithm parameters is completed.

首先需在离线的状态下,运用遗传算法对California算法的初始参数进行优化,其中参数离线整定结构图如图2所示。遗传算法迭代运算流程图如图3所示,主要需完成以下几个步骤:Firstly, it is necessary to optimize the initial parameters of the California algorithm by using the genetic algorithm in the offline state, and the parameter offline tuning structure diagram is shown in Figure 2. The flow chart of the iterative operation of the genetic algorithm is shown in Figure 3, and the following steps need to be completed:

(1)通过特定的基因编码策略,将所求解的空间转化成编码后的解空间。(1) Transform the solved space into the encoded solution space through a specific genetic coding strategy.

遗传算法首先通过基因编码将解空间转化成编码后的空间。遗传算法基因编码方式包括二进制编码、浮点编码和符号编码。为了使得遗传算子的操作便于实现,本发明选用遗传算法中最常采用的二进制编码方法,其中每一个待整定参数的取值范围、设定精度及基因个数应满足关系式如下所示:Genetic algorithm first transforms the solution space into the coded space through genetic coding. Genetic algorithm gene encoding methods include binary encoding, floating-point encoding and symbol encoding. In order to make the operation of the genetic operator easy to realize, the present invention selects the most commonly used binary coding method in the genetic algorithm, wherein the range of values of each parameter to be adjusted, the setting precision and the number of genes should satisfy the relational expression as follows:

Ue-Us=δ(2k-1)U e -U s = δ(2 k -1)

其中,Ue-Us代表参数的取值范围;Among them, U e -U s represent the value range of the parameter;

δ代表取值精度;δ represents the value accuracy;

k代表基因数。k represents the number of genes.

(2)根据具体的研究问题,构造适应度函数;(2) According to the specific research questions, construct the fitness function;

本发明选用三个事件检测性能指标(DR--检测率,FAR--误报率,MTTD--平均检测时间)作为遗传算法的适应度函数。将多目标问题转化为单目标问题求解,常见的方法有加权求和法、ε-约束法、最小-最大法和步驟法等,本发明采用最为常用的加权求和法,将多目标优化问题中的各个子目标按照线性组合的方式将多目标优化转化为单个目标来进行优化求解。The present invention selects three event detection performance indexes (DR—detection rate, FAR—false alarm rate, MTTD—average detection time) as the fitness function of the genetic algorithm. The multi-objective problem is transformed into a single-objective problem solution. Common methods include weighted summation method, ε-constraint method, minimum-maximum method and step method, etc. The present invention adopts the most commonly used weighted summation method to convert the multi-objective optimization problem Each sub-objective in is transformed into a single objective in the form of linear combination to optimize the solution.

适应度函数如下式所示:The fitness function is shown in the following formula:

f=α*DR+β*(1-FAR)+γMTTD′f=α*DR+β*(1-FAR)+γMTTD'

其中,MTTD′为归一化后的MTTD,由于MTTD有量纲,无法与DR和FAR直接合成,因此对其做归一化处理;Among them, MTTD′ is the normalized MTTD. Since MTTD has dimensions, it cannot be directly synthesized with DR and FAR, so it is normalized;

α为检测率DR的权值,β为(1-FAR)的权值,γ为MTTD′的权值,其中三个权值满足α+β+γ=1。α is the weight of the detection rate DR, β is the weight of (1-FAR), γ is the weight of MTTD′, and the three weights satisfy α+β+γ=1.

在式中的权值越大,所对应的分量在适应度函数中所起的作用越大,根据性能指标的重要程度对适应度函数中各分量赋以不同的权重。本发明初始设定α=β=γ=1/3。The greater the weight in the formula, the greater the role of the corresponding component in the fitness function. According to the importance of performance indicators, different weights are assigned to each component in the fitness function. The present invention initially sets α=β=γ=1/3.

(3)确定算法过程中的相关参数,如迭代次数和种群大小等遗传;(3) Determine the relevant parameters in the algorithm process, such as the number of iterations and population size and other inheritance;

在遗传算法执行优化过程之前,需要设定个体编码串长度l、种群个数M、初始交叉率pc0、初始变异率pm0、终止迭代次数T等参数。Before the genetic algorithm performs the optimization process, it is necessary to set parameters such as the length l of the individual code string, the number of populations M, the initial crossover rate p c0 , the initial mutation rate p m0 , and the number of termination iterations T.

本发明中的个体的编码串长度l由所期望的求解精度可确定为24;针对本发明的优化问题,分析种群个数M对算法的运行速度至关重要,然而过小或过大都容易出现早熟现象;交叉率会影响算法的全局搜索能力;变异率在一定范围内可以保护种群中已有的良好模式;终止迭代次数T一般取100-1000。因此通过实验分析出本发明的参数设置种群个数M=50、初始交叉率pc0=0.9、初始变异率pm0=0.001、终止迭代次数T=250。The individual code string length l in the present invention can be determined as 24 by the expected solution precision; For the optimization problem of the present invention, the analysis population number M is crucial to the operating speed of the algorithm, but too small or too large is easy to occur Premature phenomenon; the crossover rate will affect the global search ability of the algorithm; the mutation rate within a certain range can protect the existing good patterns in the population; the number of termination iterations T is generally 100-1000. Therefore, through experiment analysis, it is found that the parameters of the present invention are set population number M=50, initial crossover rate p c0 =0.9, initial mutation rate p m0 =0.001, and termination iteration number T=250.

(4)随机地生成初始种群,用适应度函数评价每个个体的适应度值;(4) Randomly generate the initial population, and use the fitness function to evaluate the fitness value of each individual;

生成初始种群,利用步骤(2)中构造适应度函数计算初始种群中每个个体的适应度值,计算平均适应度函数值,选出最佳适应度函数值。Generate the initial population, use the fitness function constructed in step (2) to calculate the fitness value of each individual in the initial population, calculate the average fitness function value, and select the best fitness function value.

(5)判断是否满足结束条件,如果满足就输出参数结果,如果不满足就执行步骤(6);(5) Judging whether the end condition is satisfied, if it is satisfied, the parameter result is output, and if it is not satisfied, step (6) is performed;

本发明提出的California算法阈值参数的离线整定过程中遗传算法的结束条件为事件检测性能指标在一定范围内,即检测率大于60%、误报率小于10%,并且遗传算法寻优,即计算的相邻两代最优适应度函数值和平均适应度函数值的变化值均不大于0.1%。The end condition of the genetic algorithm in the off-line tuning process of the California algorithm threshold parameter proposed by the present invention is that the event detection performance index is within a certain range, that is, the detection rate is greater than 60%, and the false alarm rate is less than 10%, and the genetic algorithm is optimized, that is, the calculation The change values of the optimal fitness function value and the average fitness function value of the adjacent two generations are not more than 0.1%.

(6)将选择复制、交叉和变异等操作算子作用于种群,生成新一代种群;返回步骤(5)。(6) Apply operation operators such as selective replication, crossover and mutation to the population to generate a new generation of population; return to step (5).

遗传算子主要有三种,包括:There are three main types of genetic operators, including:

1)选择复制算子1) Select the copy operator

遗传算法中通过体现“优胜劣汰”的选择复制操作,引导群体不断向着适应环境的方向进化,因而选择复制操作是遗传算法最基本的操作。本发明选用随机竞争选择复制算子来进行选择复制操作,通过计算个体的适应度占本代所有个体适应度之和的比例,决定了该个体在产生下一代种群的过程中被选择复制的概率。本发明设计的个体被选择的概率计算公式如下式所示:In the genetic algorithm, the selection and replication operation embodying the "survival of the fittest" guides the population to continuously evolve in the direction of adapting to the environment, so the selection and replication operation is the most basic operation of the genetic algorithm. The present invention selects the random competitive selection replication operator to carry out the selective replication operation, and determines the probability of the individual being selected and replicated in the process of generating the next generation population by calculating the proportion of the fitness of the individual to the sum of the fitness of all individuals in this generation . The selected probability calculation formula of the individual designed in the present invention is shown in the following formula:

其中,pi为个体i存活下来的概率;Among them, p i is the probability of individual i surviving;

fi为个体的适应度;f i is the fitness of the individual;

I为种群个数。I is the population number.

2)交叉算子2) Crossover operator

遗传算法交叉操作能够保留父代个体中的优秀基因,产生更多新个体,是遗传算法的一项基本操作。本文选择单点交叉进行基因的交叉操作,单点交叉通过对个体进行两两的配对,对配对的个体根据随机数随机的选择某一基因后的位置作为交叉点,依据随机概率在交叉点位置处交换两个个体的部分基因,从而产生新的个体。由于进化后期的进化次数增加,群体逐渐靠近最优解,收敛进程延缓,因此本发明设计自适应交叉率,如下式所示:The genetic algorithm crossover operation can retain the excellent genes in the parent individuals and generate more new individuals, which is a basic operation of the genetic algorithm. In this paper, single-point crossover is selected for the crossover operation of genes. Single-point crossover pairs individuals in pairs, and randomly selects the position of a certain gene as the crossover point for the paired individuals according to a random number. Part of the genes of two individuals are exchanged to produce a new individual. Due to the increase in the number of evolutions in the later stage of evolution, the population is gradually approaching the optimal solution, and the convergence process is delayed. Therefore, the present invention designs an adaptive crossover rate, as shown in the following formula:

pc=pc0-(pc0-pcmin)*d/Dp c =p c0 -(p c0 -p cmin )*d/D

其中,pc0为初始交叉率;Among them, p c0 is the initial crossing rate;

pcmin为最小交叉率;p cmin is the minimum crossing rate;

d为当前进化次数;d is the current number of evolutions;

D为总进化次数。D is the total evolution times.

3)变异算子3) Mutation operator

在遗传算法中改变某些基因位的变异操作能够产生很多新的个体,是遗传算法的一项基本操作。本发明选用基本位变异操作,基本位变异通过变异概率来确定变异点,然后对每一个变异点的基因值取反运算,从而产生新的个体。为了使基因的变异在其允许的范围内变化,并且加快算法收敛速度,本发明设计采用如下的自适应变异率:In the genetic algorithm, the mutation operation of changing some gene bits can produce many new individuals, which is a basic operation of the genetic algorithm. The present invention selects the basic bit mutation operation, and the basic bit mutation determines the variation point through the variation probability, and then inverts the gene value of each variation point to generate a new individual. In order to make the variation of the gene change within its allowable range, and to speed up the convergence speed of the algorithm, the present invention designs and adopts the following adaptive mutation rate:

其中,pm0为初始变异率;Among them, p m0 is the initial mutation rate;

pmmin为最小变异率;p mmin is the minimum mutation rate;

为当前群体的平均适应度; is the average fitness of the current population;

为截至目前群体的最大适应度。 is the maximum fitness of the group so far.

基于遗传算法的California算法参数离线整定过程中遗传算法的适应度函数曲线图如图4所示。The fitness function curve of the genetic algorithm in the offline tuning process of California algorithm parameters based on the genetic algorithm is shown in Figure 4.

步骤二、配置系统信息,包括算法初始参数和算法需满足的性能指标要求等。Step 2. Configure system information, including the initial parameters of the algorithm and the performance index requirements that the algorithm needs to meet.

配置包括算法初始参数和算法需满足的性能指标要求等交通事件检测系统信息。The configuration includes the traffic incident detection system information such as the initial parameters of the algorithm and the performance index requirements that the algorithm needs to meet.

步骤三、捕获系统时间Step 3. Capture system time

系统程序捕获系统时间t,判断是否到采样周期,不到则等待。The system program captures the system time t, judges whether the sampling period is reached, and waits if it is not.

步骤四、读取数据库中的交通流数据,并对交通流数据进行预处理和路段匹配。Step 4: Read the traffic flow data in the database, and perform preprocessing and link matching on the traffic flow data.

获取检测路段上下游检测器的交通数据,进行数据预处理。可以通过高速集团提供的车检器数据,直接得到检测断面在5min内车辆的平均车速、车检器编码、行车方向等。高速公路交通数据字段定义如表1所示:Obtain the traffic data of the upstream and downstream detectors of the detected road section, and perform data preprocessing. Through the vehicle detector data provided by the Expressway Group, the average speed of the vehicle within 5 minutes of the detection section, the code of the vehicle detector, and the driving direction can be directly obtained. The definition of expressway traffic data fields is shown in Table 1:

表1:高速公路交通数据字段定义表Table 1: Freeway traffic data field definition table

步骤五、启动交通事件检测算法,得到每个检测周期的检测结果,并根居检测结果进行报警与解除报警操作。Step 5: Start the traffic incident detection algorithm, obtain the detection results of each detection cycle, and perform alarm and release alarm operations based on the detection results.

交通事件检测算法模块采用California算法,利用如图5的算法流程,计算得到检测周期的事件检测结果。The traffic incident detection algorithm module adopts the California algorithm, and uses the algorithm flow shown in Figure 5 to calculate the event detection results of the detection cycle.

具体的,所述交通事件检测算法为:Specifically, the traffic event detection algorithm is:

步骤(1)将上下游检测器占有率之差与阈值K1进行比较,若所述上下游检测器占有率之差大于等于阈值K1,则进行步骤(2),否则作无交通事件判断;Step (1) compares the difference between the occupancy rate of the upstream and downstream detectors with the threshold K1, if the difference between the occupancy rates of the upstream and downstream detectors is greater than or equal to the threshold K1, then proceed to step (2), otherwise it is judged that there is no traffic incident;

步骤(2)将上下游检测器占有率之差与上游检测器占有率之比与阈值K2进行比较,若所述上下游检测器占有率之差与上游检测器占有率之比大于等于K2,则进行步骤(3),否则作无交通事件判断;Step (2) comparing the ratio of the occupancy rate difference between the upstream and downstream detectors to the occupancy rate of the upstream detector with the threshold K2, if the ratio of the occupancy rate difference between the upstream and downstream detectors to the occupancy rate of the upstream detector is greater than or equal to K2, Then proceed to step (3), otherwise judge that there is no traffic incident;

步骤(3)将上下游检测器占有率之差与下游检测器占有率之比与阈值K3进行比较,若所述上下游检测器占有率之差大于等于阈值K3,则表示有交通事件,否则作无交通事件判断。Step (3) Compare the difference between the occupancy rate of the upstream and downstream detectors with the ratio of the occupancy rate of the downstream detector with the threshold K3, if the difference between the occupancy rates of the upstream and downstream detectors is greater than or equal to the threshold K3, it means that there is a traffic incident, otherwise Make no traffic accident judgment.

其中,OCC(i,t)表示上游检测器占有率,OCC(i+1,t)表示下游检测器占有率。Among them, OCC(i,t) represents the occupancy rate of the upstream detector, and OCC(i+1,t) represents the occupancy rate of the downstream detector.

步骤六、实时存储交通流数据和检测结果Step 6. Store traffic flow data and detection results in real time

建立滑动时间窗t-m+1(t为当前时间,m为时间窗的长度),实时存储检测结果和对应的交通流数据,每次存入1组新的数据,同时删除1组最老的数据。Establish a sliding time window t-m+1 (t is the current time, m is the length of the time window), store the detection results and corresponding traffic flow data in real time, store a new set of data each time, and delete the oldest set of data at the same time The data.

步骤七、实时估算检测性能效果Step 7. Estimate the detection performance effect in real time

获取当前算法阈值,结合时间窗t-m+1内的交通流数据,利用基于事件检测性能的自整定条件模型估算对应时间窗内的交通事件检测性能效果并存储。Obtain the threshold of the current algorithm, combined with the traffic flow data in the time window t-m+1, use the self-tuning condition model based on the event detection performance to estimate the traffic event detection performance effect in the corresponding time window and store it.

在所述利用基于事件检测性能的自整定条件模型估算对应时间窗内的交通事件检测性能效果并存储中,所述基于事件检测性能的自整定条件模型获取方法为:In the use of the self-tuning condition model based on the event detection performance to estimate and store the traffic incident detection performance effect in the corresponding time window, the acquisition method of the self-tuning condition model based on the event detection performance is:

步骤(1)选取多组California算法阈值进行试验,针对不同时空影响因素统计得到检测算法的性能效果与算法阈值的关系;Step (1) select multiple groups of California algorithm thresholds to test, and obtain the relationship between the performance effect of the detection algorithm and the algorithm threshold according to statistics of different spatio-temporal influence factors;

步骤(2)结合不同时空影响因素的表征参数,利用多元统计分析法,建立时空影响因素参数、算法阈值与算法性能指标的关系模型,实现交通事件检测性能效果的实时估计。Step (2) Combining the characterization parameters of different spatio-temporal influencing factors, using the multivariate statistical analysis method, establishing a relationship model between spatio-temporal influencing factor parameters, algorithm thresholds and algorithm performance indicators, and realizing real-time estimation of traffic incident detection performance.

步骤八、检测性能加权求和。Step 8, the detection performance weighted summation.

引入遗忘因子λ,利用以往存储的检测性能结果加权求和,计算当前的算法性能指标。Introduce the forgetting factor λ, and use the weighted sum of the detection performance results stored in the past to calculate the current algorithm performance index.

步骤九、利用实时数据完成California算法参数的在线整定。Step 9: Use the real-time data to complete the online tuning of the parameters of the California algorithm.

判断当前算法的检测性能是否满足性能要求,如果满足则不更新California算法参数,如果不满足则利用改进的遗传算法更新California算法参数直至满足性能要求为止并返回步骤二更新系统信息。Judging whether the detection performance of the current algorithm meets the performance requirements, if yes, do not update the parameters of the California algorithm, if not, use the improved genetic algorithm to update the parameters of the California algorithm until the performance requirements are met and return to step 2 to update the system information.

步骤十、报警处理Step 10. Alarm handling

报警与解除报警处理,有事件发生或有事件解除时进行报警;Alarm and release alarm processing, alarm when an event occurs or when an event is released;

步骤十一、等待检测周期Step 11. Wait for the detection cycle

当前判别周期结束,等待下一检测周期到来。The current discrimination period is over, waiting for the arrival of the next detection period.

以上所述仅为本发明的优选实施例,并不用于限制本发明,显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies thereof, the present invention also intends to include these modifications and variations.

Claims (4)

1. a kind of methods of self-tuning of the Algorithm for Traffic Incidents Detection based on genetic algorithm, it is characterised in that:Including
Step one:Using historical data, using the performance indications of event detection as target, using genetic algorithm to detection algorithm threshold value Parameter carries out optimizing, completes the off-line setting calculation of threshold parameter;
Step 2:Configure system information, including the performance indications requirement that algorithm initial parameter and algorithm need to be met;
Step 3:Capture systems time t, judged whether to the sampling period, less than then waiting;
Step 4:If having timed out the sampling period, the traffic flow data in reading database, line number of going forward side by side Data preprocess and road Section matching;
Step 5:Start Algorithm for Traffic Incidents Detection, the testing result of each detection cycle is obtained, according to testing result, if having Traffic events then carry out alert process, and releasing alert process is carried out if without traffic events;
Step 6:Time slip-window t-m+1, real-time storage testing result and corresponding traffic flow data are set up, wherein, t is to work as Preceding time, m is the length of time window;
Step 7:The traffic flow data in current algorithm threshold value, binding time window t-m+1 is obtained, using based on event detection The Self-tuning System condition model of energy is estimated the traffic incidents detection impact of performance in correspondence time window and stored;
Step 8:Forgetting factor λ is introduced, using the detection results of property weighted sum stored in the past, current algorithm is calculated Can index;
Step 9:Judge whether the detection performance of current algorithm meets performance requirement, California is not updated if meeting Algorithm parameter, California algorithm parameters are updated until meeting performance requirement if being unsatisfactory for using Revised genetic algorithum Untill and return to step two update system information;
Step 10:It is current to differentiate end cycle, wait next detection cycle to arrive.
2. a kind of methods of self-tuning of Algorithm for Traffic Incidents Detection based on genetic algorithm according to claim 1, It is characterized in that:The use genetic algorithm carries out optimizing to detection algorithm threshold parameter, completes the off-line setting calculation of threshold parameter, Including
Step (1) is by gene code strategy, by the spatial transformation solved into the solution space after coding;
Step (2) constructs fitness function according to specifically studying a question;
Step (3) determines the relevant parameter during algorithm performs;
Step (4) is randomly generated initial population, and the fitness value of each individual is evaluated with fitness function;
Step (5) judges whether to meet termination condition, if met with regard to output parameter result, if being unsatisfactory for being carried out step (6);
Step (6) will select duplication, intersection and mutation operation operator to act on population, generation population of new generation;Return to step (5)。
3. a kind of methods of self-tuning of Algorithm for Traffic Incidents Detection based on genetic algorithm according to claim 1, It is characterized in that:In the startup Algorithm for Traffic Incidents Detection, the testing result for obtaining each detection cycle, the traffic thing Part detection algorithm is:
The difference of upstream and downstream detector occupation rate and threshold k 1 are compared by step (1), if the upstream and downstream detector occupation rate Difference be more than or equal to threshold k 1, then carry out step (2), otherwise make no traffic events and judge;
The ratio between the difference of upstream and downstream detector occupation rate and upstream detector occupation rate are compared by step (2) with threshold k 2, if The ratio between difference and upstream detector occupation rate of the upstream and downstream detector occupation rate are more than or equal to K2, then carry out step (3), otherwise Make to judge without traffic events;
The ratio between the difference of upstream and downstream detector occupation rate and downstream detector occupation rate are compared by step (3) with threshold k 3, if The difference of the upstream and downstream detector occupation rate is more than or equal to threshold k 3, then it represents that has traffic events, otherwise makees no traffic events and sentence It is disconnected.
4. the Self-tuning System condition model according to claim 1 based on event detection performance, it is characterised in that:In the profit The traffic incidents detection impact of performance in correspondence time window is estimated with the Self-tuning System condition model based on event detection performance and is deposited Chu Zhong, the Self-tuning System condition model acquisition methods based on event detection performance are:
Step (1) is chosen multigroup California algorithms threshold value and tested, and is examined for different space-time influence factors statistics The impact of performance of method of determining and calculating and the relation of algorithm threshold value;
Step (2) combines the characterization parameter of different space-time influence factors, using Multivariate Analysis, sets up space-time influence factor The relational model of parameter, algorithm threshold value and algorithm performance index, realizes the real-time estimation of the traffic incidents detection impact of performance.
CN201710607981.XA 2017-07-24 2017-07-24 A kind of methods of self-tuning of the Algorithm for Traffic Incidents Detection based on genetic algorithm Pending CN107293120A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710607981.XA CN107293120A (en) 2017-07-24 2017-07-24 A kind of methods of self-tuning of the Algorithm for Traffic Incidents Detection based on genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710607981.XA CN107293120A (en) 2017-07-24 2017-07-24 A kind of methods of self-tuning of the Algorithm for Traffic Incidents Detection based on genetic algorithm

Publications (1)

Publication Number Publication Date
CN107293120A true CN107293120A (en) 2017-10-24

Family

ID=60103379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710607981.XA Pending CN107293120A (en) 2017-07-24 2017-07-24 A kind of methods of self-tuning of the Algorithm for Traffic Incidents Detection based on genetic algorithm

Country Status (1)

Country Link
CN (1) CN107293120A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116311748A (en) * 2022-12-27 2023-06-23 合肥科大立安安全技术有限责任公司 Composite detection system for household kitchen fire

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1311880A (en) * 1998-07-31 2001-09-05 特许科技有限公司 Automatic freeway incident detection system using artificial neural networks and genetic alogritms
US20050190975A1 (en) * 2004-02-26 2005-09-01 Porikli Fatih M. Traffic event detection in compressed videos
CN101089913A (en) * 2007-07-12 2007-12-19 中国科学院地理科学与资源研究所 A Method of Calculating Turning Ratio of Intersection Based on Genetic Algorithm and Maximum Entropy Model
CN101188064A (en) * 2007-12-20 2008-05-28 北京交通大学 Three-dimensional integrated highway traffic incident automatic detection method
CN103489039A (en) * 2013-09-12 2014-01-01 重庆大学 Expressway traffic flow fusing and forecasting method with online self-tuning and optimizing function
CN104572993A (en) * 2015-01-06 2015-04-29 浪潮电子信息产业股份有限公司 Genetic algorithm-based classification algorithm parameter optimization method
US9037519B2 (en) * 2012-10-18 2015-05-19 Enjoyor Company Limited Urban traffic state detection based on support vector machine and multilayer perceptron
CN106327868A (en) * 2016-08-30 2017-01-11 山东高速信息工程有限公司 Road congestion analysis method based on traffic flow detection equipment state
CN104933861B (en) * 2015-05-25 2017-06-13 重庆大学 The nonsynchronous traffic incidents detection method of data can be tolerated

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1311880A (en) * 1998-07-31 2001-09-05 特许科技有限公司 Automatic freeway incident detection system using artificial neural networks and genetic alogritms
US6470261B1 (en) * 1998-07-31 2002-10-22 Cet Technologies Pte Ltd Automatic freeway incident detection system and method using artificial neural network and genetic algorithms
US20050190975A1 (en) * 2004-02-26 2005-09-01 Porikli Fatih M. Traffic event detection in compressed videos
CN101089913A (en) * 2007-07-12 2007-12-19 中国科学院地理科学与资源研究所 A Method of Calculating Turning Ratio of Intersection Based on Genetic Algorithm and Maximum Entropy Model
CN101188064A (en) * 2007-12-20 2008-05-28 北京交通大学 Three-dimensional integrated highway traffic incident automatic detection method
US9037519B2 (en) * 2012-10-18 2015-05-19 Enjoyor Company Limited Urban traffic state detection based on support vector machine and multilayer perceptron
CN103489039A (en) * 2013-09-12 2014-01-01 重庆大学 Expressway traffic flow fusing and forecasting method with online self-tuning and optimizing function
CN104572993A (en) * 2015-01-06 2015-04-29 浪潮电子信息产业股份有限公司 Genetic algorithm-based classification algorithm parameter optimization method
CN104933861B (en) * 2015-05-25 2017-06-13 重庆大学 The nonsynchronous traffic incidents detection method of data can be tolerated
CN106327868A (en) * 2016-08-30 2017-01-11 山东高速信息工程有限公司 Road congestion analysis method based on traffic flow detection equipment state

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
崔珊珊: "遗传算法的一些改进及其应用", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
杨红: "控制时滞系统的遗忘因子迭代学习算法研究", 《重庆邮电大学学报·自然科学版》 *
樊小红: "基于遗传算法的交通事件检测研究", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》 *
樊小红: "基于遗传算法的交通事件检测研究", 《中国优秀硕士学位论文全文数据库·工程科技Ⅱ辑》》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116311748A (en) * 2022-12-27 2023-06-23 合肥科大立安安全技术有限责任公司 Composite detection system for household kitchen fire

Similar Documents

Publication Publication Date Title
CN110588658B (en) A Method for Detecting Driver's Risk Level Based on Comprehensive Model
CN104616498B (en) Combination Forecasting Method of Traffic Congestion Based on Markov Chain and Neural Network
CN108399248A (en) A kind of time series data prediction technique, device and equipment
CN106295874A (en) Traffic flow parameter Forecasting Methodology based on deep belief network
CN102592447A (en) Method for judging road traffic state of regional road network based on fuzzy c means (FCM)
CN103985055A (en) Stock market investment decision-making method based on network analysis and multi-model fusion
CN105138717A (en) Transformer state evaluation method by optimizing neural network with dynamic mutation particle swarm
CN107169628A (en) A kind of distribution network reliability evaluation method based on big data mutual information attribute reduction
CN117238126B (en) A traffic accident risk assessment method in continuous flow road scenarios
CN101599138A (en) Land evaluation method based on artificial neural network
CN111768622A (en) A Short-term Traffic Prediction Method Based on Improved Grey Wolf Algorithm
CN101706883B (en) Data mining method and device
CN110210973A (en) Insider trading recognition methods based on random forest and model-naive Bayesian
CN106896219A (en) The identification of transformer sub-health state and average remaining lifetime method of estimation based on Gases Dissolved in Transformer Oil data
CN112039903A (en) Network security situation assessment method based on deep self-coding neural network model
CN110562261B (en) A Method for Detecting Driver's Risk Level Based on Markov Model
CN107145991A (en) A Dynamic Path Search Method for Time-varying Stochastic Networks Considering Link Correlation
CN117009772A (en) Road traffic safety prediction method and prediction system based on risk intelligent perception model
CN104751254A (en) Line loss rate prediction method based on non-isometric weighted grey model and fuzzy clustering sorting
CN112560915A (en) Urban expressway traffic state identification method based on machine learning
CN117350146A (en) A health evaluation method of drainage pipe network based on GA-BP neural network
Wang et al. Changing lane probability estimating model based on neural network
CN113762591A (en) Short-term electric quantity prediction method and system based on GRU and multi-core SVM counterstudy
CN107293120A (en) A kind of methods of self-tuning of the Algorithm for Traffic Incidents Detection based on genetic algorithm
CN110991600B (en) Drought intelligent prediction method integrating distribution estimation algorithm and extreme learning machine

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20171024

RJ01 Rejection of invention patent application after publication