CN115719294A - Method, system, electronic equipment and medium for indoor pedestrian flow evacuation control - Google Patents
Method, system, electronic equipment and medium for indoor pedestrian flow evacuation control Download PDFInfo
- Publication number
- CN115719294A CN115719294A CN202211479239.2A CN202211479239A CN115719294A CN 115719294 A CN115719294 A CN 115719294A CN 202211479239 A CN202211479239 A CN 202211479239A CN 115719294 A CN115719294 A CN 115719294A
- Authority
- CN
- China
- Prior art keywords
- evacuation
- neural network
- density
- pedestrian flow
- pedestrian
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 238000013528 artificial neural network Methods 0.000 claims abstract description 140
- 238000012549 training Methods 0.000 claims abstract description 50
- 238000005259 measurement Methods 0.000 claims abstract description 37
- 230000002159 abnormal effect Effects 0.000 claims abstract description 21
- 230000006872 improvement Effects 0.000 claims abstract description 16
- 230000006870 function Effects 0.000 claims description 118
- 230000015556 catabolic process Effects 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 13
- 238000006731 degradation reaction Methods 0.000 claims description 13
- 230000008569 process Effects 0.000 claims description 11
- 238000004088 simulation Methods 0.000 claims description 11
- 230000004913 activation Effects 0.000 claims description 6
- 238000010276 construction Methods 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000012795 verification Methods 0.000 claims description 3
- 230000009471 action Effects 0.000 claims 2
- 238000006467 substitution reaction Methods 0.000 claims 1
- 230000009467 reduction Effects 0.000 abstract description 2
- 230000005856 abnormality Effects 0.000 description 10
- 239000011159 matrix material Substances 0.000 description 10
- 230000000694 effects Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 5
- 238000011160 research Methods 0.000 description 3
- 101000802640 Homo sapiens Lactosylceramide 4-alpha-galactosyltransferase Proteins 0.000 description 2
- 102100035838 Lactosylceramide 4-alpha-galactosyltransferase Human genes 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 2
- 239000000779 smoke Substances 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011217 control strategy Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000002787 reinforcement Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Images
Landscapes
- Alarm Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及行人疏散技术领域,特别是涉及一种室内行人流疏散控制方法、系统、电子设备及介质。The invention relates to the technical field of pedestrian evacuation, in particular to an indoor pedestrian flow evacuation control method, system, electronic equipment and medium.
背景技术Background technique
随着社会的不断发展,城市各地的娱乐设施、大型商场等公共场所急剧增加。而上述公共场所往往存在人群高度聚集的情况,发生诸如火灾、地震等灾害后,极易产生踩踏事件。而在发生突发情况下,如果引导人员能够进行有效疏散将会极大减少伤亡。因此人群疏散已经成为热门的研究课题。With the continuous development of society, public places such as entertainment facilities and large shopping malls in various parts of the city have increased dramatically. And above-mentioned public places often have the situation that crowd gathers highly, after disasters such as fire, earthquake take place, very easily produce stampede incident. In the event of an emergency, if the guide personnel can effectively evacuate, casualties will be greatly reduced. Therefore, crowd evacuation has become a hot research topic.
对比当前中国国内外的研究现状,路径查找算法、元胞自动机模型和强化学习控制策略等广泛应用于行人疏散的研究课题中。然而,上述算法在人群疏散过程中性能优良的前提是传感器(比如摄像头)的精确测量。如果此时传感器周围有烟雾等不可控因素的影响,可能会导致传感器对行人分布的测量不准确,从而影响到疏散算法的工作效率。而在实际应用中,疏散算法效率降低可能造成的是生命财产无法挽回的损失。Comparing the current research status at home and abroad in China, path finding algorithms, cellular automata models, and reinforcement learning control strategies are widely used in the research topics of pedestrian evacuation. However, the prerequisite for the above algorithm to perform well in the process of crowd evacuation is the accurate measurement of sensors (such as cameras). If there are uncontrollable factors such as smoke around the sensor at this time, it may cause the sensor to measure the distribution of pedestrians inaccurately, thus affecting the working efficiency of the evacuation algorithm. In practical applications, the reduction in the efficiency of the evacuation algorithm may cause irreparable losses of life and property.
发明内容Contents of the invention
本发明的目的是提供一种室内行人流疏散控制方法、系统、电子设备及介质,以提高在传感器性能下降或者损坏条件下的行人流疏散效率。The purpose of the present invention is to provide an indoor pedestrian flow evacuation control method, system, electronic equipment and medium, so as to improve the pedestrian flow evacuation efficiency under the condition of sensor performance degradation or damage.
为实现上述目的,本发明提供了如下方案:To achieve the above object, the present invention provides the following scheme:
一方面,本发明提供一种室内行人流疏散控制方法,包括:In one aspect, the present invention provides a method for controlling indoor pedestrian flow evacuation, including:
对室内疏散场景下的行人密度演化规则进行建模,构建出口行人密度的状态方程和测量方程;Model the evolution rules of pedestrian density in indoor evacuation scenarios, and construct the state equation and measurement equation of exit pedestrian density;
构建用于辨识所述状态方程和测量方程中的状态函数和观测函数的BP神经网络;所述BP神经网络包括输入层、隐藏层和输出层;Constructing a BP neural network for identifying state functions and observation functions in the state equation and measurement equation; the BP neural network includes an input layer, a hidden layer and an output layer;
对所述BP神经网络进行离线迭代训练,训练结束得到BP神经网络中各层权值;Carry out off-line iterative training to described BP neural network, obtain the weight of each layer in BP neural network after training finishes;
根据所述BP神经网络中各层权值求解出所述状态方程和测量方程中的状态函数和观测函数;Solve the state function and the observation function in the state equation and the measurement equation according to the weights of each layer in the BP neural network;
根据求解出的状态函数以及观测函数进行行人流疏散密度的预测,得到行人流疏散密度预测值;Predict the evacuation density of pedestrian flow according to the obtained state function and observation function, and obtain the predicted value of evacuation density of pedestrian flow;
构建用于对所述行人流疏散密度预测值进行纠正的误差在线神经网络;Constructing an error online neural network for correcting the predicted value of the pedestrian flow evacuation density;
根据所述室内疏散场景中的传感器状态判断是否存在数据状态异常;judging whether there is an abnormal data state according to the sensor state in the indoor evacuation scene;
若不存在数据状态异常,直接根据所述行人流疏散密度预测值进行室内行人流疏散控制,并持续训练所述误差在线神经网络;If there is no data state abnormality, directly perform indoor pedestrian flow evacuation control according to the predicted value of the pedestrian flow evacuation density, and continuously train the error online neural network;
若存在数据状态异常,则根据当前训练好的误差在线神经网络计算预测误差值,并计算所述行人流疏散密度预测值与所述预测误差值之和作为行人流疏散密度预测改进值;If there is an abnormality in the data state, then calculate the prediction error value according to the current trained error online neural network, and calculate the sum of the pedestrian flow evacuation density prediction value and the described prediction error value as the pedestrian flow evacuation density prediction improvement value;
根据所述行人流疏散密度预测改进值进行室内行人流疏散控制。Indoor pedestrian flow evacuation control is performed according to the improved value of the pedestrian flow evacuation density prediction.
可选地,所述对室内疏散场景下的行人密度演化规则进行建模,构建出口行人密度的状态方程和测量方程,具体包括:Optionally, the step of modeling the pedestrian density evolution rule in the indoor evacuation scene, constructing the state equation and measurement equation of the exit pedestrian density, specifically includes:
对室内疏散场景下的行人密度演化规则进行建模,构建出口行人密度的状态方程X(k)=f(X(k-1))+q(k-1)和测量方程Z(k)=h(X(k))+r(k);其中所述室内疏散场景具有多个出口,且每个出口配备有疏散引导人员和传感器;X(k)∈Rn×n和X(k-1)分别表示k时刻和k-1时刻的状态变量;Z(k)∈Rm×n表示k时刻的观测变量;f(·)表示非线性状态函数;h(·)表示非线性观测函数;q(k-1)∈Rn×n表示过程噪声;r(k)∈Rm×n表示测量噪声。Model the pedestrian density evolution rules in the indoor evacuation scene, construct the state equation X(k)=f(X(k-1))+q(k-1) and the measurement equation Z(k)= h(X(k))+r(k); wherein the indoor evacuation scene has multiple exits, and each exit is equipped with evacuation guide personnel and sensors; X(k)∈R n×n and X(k- 1) represent the state variables at time k and k-1 respectively; Z(k)∈R m×n represents the observed variables at time k; f(·) represents the nonlinear state function; h(·) represents the nonlinear observation function ; q(k-1)∈R n×n represents process noise; r(k)∈R m×n represents measurement noise.
可选地,所述构建用于辨识所述状态方程和测量方程中的状态函数和观测函数的BP神经网络,具体包括:Optionally, the construction of a BP neural network for identifying the state function and the observation function in the state equation and the measurement equation specifically includes:
构建用于辨识所述状态方程中的非线性状态函数f(·)的BP神经网络,所述BP神经网络以X(k)作为输入,Z(k)作为输出,Sigmoid函数作为激活函数,函数表达式为Z(k)=h(X(k))=W2 Tsigmoid(W1 TX(k));其中W1为输入层到隐藏层的权值,W2为隐藏层到输出层的权值;Construct the BP neural network for identifying the nonlinear state function f(·) in the state equation, the BP neural network takes X(k) as input, Z(k) as output, Sigmoid function as activation function, function The expression is Z(k)=h(X(k))=W 2 T sigmoid(W 1 T X(k)); where W 1 is the weight from the input layer to the hidden layer, and W 2 is the weight from the hidden layer to the output layer weights;
构建用于辨识所述测量方程中的非线性观测函数h(·)的BP神经网络,所述BP神经网络以X(k-1)作为输入,X(k)作为输出,Sigmoid函数作为激活函数,函数表达式为X(k)=f(X(k-1))=W2 Tsigmoid(W1 TX(k-1))。Constructing a BP neural network for identifying the nonlinear observation function h(·) in the measurement equation, the BP neural network takes X(k-1) as input, X(k) as output, and Sigmoid function as activation function , the function expression is X(k)=f(X(k-1))=W 2 T sigmoid(W 1 T X(k-1)).
可选地,所述对所述BP神经网络进行离线迭代训练,训练结束得到BP神经网络中各层权值,具体包括:Optionally, the off-line iterative training of the BP neural network is carried out, and the weights of each layer in the BP neural network are obtained after training, specifically including:
基于行人疏散仿真实验得到用于训练所述BP神经网络的样本数据,将样本数据以7:3的比例分成训练集和验证集,同时将SGD作为优化器更新权值,MSE作为损失函数,设定学习率以及训练次数进行迭代训练,训练结束后得到BP神经网络中各层权值。Based on the pedestrian evacuation simulation experiment, the sample data used to train the BP neural network is obtained, and the sample data is divided into a training set and a verification set at a ratio of 7:3. At the same time, SGD is used as an optimizer to update weights, and MSE is used as a loss function. Iterative training is carried out with a fixed learning rate and training times, and the weights of each layer in the BP neural network are obtained after the training.
可选地,所述构建用于对所述行人流疏散密度预测值进行纠正的误差在线神经网络,具体包括:Optionally, the construction of an error online neural network for correcting the predicted value of pedestrian flow evacuation density specifically includes:
基于BP神经网络构建用于对所述行人流疏散密度预测值进行纠正的误差在线神经网络;所述误差在线神经网络的输入为行人流疏散密度预测值,输出为行人流疏散密度预测值与行人流疏散密度真实值之间的误差,即预测误差值。Based on the BP neural network, the error online neural network used to correct the predicted value of the evacuation density of the pedestrian flow is constructed; the input of the online neural network of the error is the predicted value of the evacuation density of the pedestrian flow, and the output is the predicted value of the evacuation density of the pedestrian flow. The error between the true values of the evacuation density of people, that is, the forecast error value.
可选地,所述根据所述室内疏散场景中的传感器状态判断是否存在数据状态异常,具体包括:Optionally, the judging whether there is an abnormal data state according to the sensor state in the indoor evacuation scene specifically includes:
若所述室内疏散场景中的传感器存在性能下降或者损坏状态,则确定存在数据状态异常;If the sensor in the indoor evacuation scene has a performance degradation or a damaged state, it is determined that there is an abnormal data state;
若所述室内疏散场景中的传感器不存在性能下降或者损坏状态,则确定不存在数据状态异常。If the sensor in the indoor evacuation scene does not have a performance degradation or a damaged state, it is determined that there is no abnormal data state.
可选地,所述根据所述行人流疏散密度预测改进值进行室内行人流疏散控制,具体包括:Optionally, the indoor pedestrian flow evacuation control according to the improved value of the pedestrian flow evacuation density prediction includes:
将k时刻第i个出口的行人流疏散密度预测改进值ρi(k)代入公式进行室内行人流疏散控制;其中表示室内疏散场景中k时刻第i个出口的行人流疏散目标密度;ui(k)表示k时刻第i个出口的引导作用系数;当ui(k)为1时打开第i个出口的引导作用,当ui(k)为0时关闭第i个出口的引导作用。Substitute the improved value ρ i (k) of pedestrian flow evacuation density prediction at the i-th exit at time k into the formula Carry out indoor pedestrian flow evacuation control; Indicates the pedestrian evacuation target density of the i-th exit at time k in the indoor evacuation scene; u i (k) represents the guiding effect coefficient of the i-th exit at k time; when u i (k) is 1, the Guidance function, when u i (k) is 0, close the guidance function of the i-th exit.
另一方面,本发明还提供一种室内行人流疏散控制系统,包括:On the other hand, the present invention also provides an indoor pedestrian flow evacuation control system, including:
行人密度方程建模模块,用于对室内疏散场景下的行人密度演化规则进行建模,构建出口行人密度的状态方程和测量方程;The pedestrian density equation modeling module is used to model the evolution rules of pedestrian density in indoor evacuation scenarios, and construct the state equation and measurement equation of pedestrian density at exits;
BP神经网络构建模块,用于构建用于辨识所述状态方程和测量方程中的状态函数和观测函数的BP神经网络;所述BP神经网络包括输入层、隐藏层和输出层;A BP neural network building block, used to construct a BP neural network for identifying state functions and observation functions in the state equation and measurement equation; the BP neural network includes an input layer, a hidden layer and an output layer;
离线网络迭代训练模块,用于对所述BP神经网络进行离线迭代训练,训练结束得到BP神经网络中各层权值;The off-line network iterative training module is used to carry out off-line iterative training to the BP neural network, and the training ends to obtain the weights of each layer in the BP neural network;
状态和观测函数求解模块,用于根据所述BP神经网络中各层权值求解出所述状态方程和测量方程中的状态函数和观测函数;A state and observation function solving module, used to solve the state function and the observation function in the state equation and measurement equation according to the weights of each layer in the BP neural network;
行人流疏散密度预测模块,用于根据求解出的状态函数以及观测函数进行行人流疏散密度的预测,得到行人流疏散密度预测值;The pedestrian flow evacuation density prediction module is used to predict the pedestrian flow evacuation density according to the solved state function and the observation function, and obtain the pedestrian flow evacuation density prediction value;
误差在线神经网络构建模块,用于构建用于对所述行人流疏散密度预测值进行纠正的误差在线神经网络;An error online neural network building block is used to construct an error online neural network for correcting the predicted value of the pedestrian flow evacuation density;
数据状态异常判断模块,用于根据所述室内疏散场景中的传感器状态判断是否存在数据状态异常;A data state abnormal judgment module, configured to judge whether there is a data state abnormality according to the sensor state in the indoor evacuation scene;
误差在线神经网络训练模块,用于若不存在数据状态异常,直接根据所述行人流疏散密度预测值进行室内行人流疏散控制,并持续训练所述误差在线神经网络;The error online neural network training module is used to directly perform indoor pedestrian flow evacuation control according to the predicted value of the pedestrian flow evacuation density if there is no abnormal data state, and continuously train the error online neural network;
密度预测改进值计算模块,用于若存在数据状态异常,则根据当前训练好的误差在线神经网络计算预测误差值,并计算所述行人流疏散密度预测值与所述预测误差值之和作为行人流疏散密度预测改进值;The density prediction improved value calculation module is used to calculate the prediction error value according to the currently trained error online neural network if there is an abnormal data state, and calculate the sum of the pedestrian flow evacuation density prediction value and the prediction error value as the row Improvement value of crowd evacuation density prediction;
室内行人流疏散控制模块,用于根据所述行人流疏散密度预测改进值进行室内行人流疏散控制。The indoor pedestrian flow evacuation control module is used to perform indoor pedestrian flow evacuation control according to the improved value of the pedestrian flow evacuation density prediction.
另一方面,本发明还提供一种电子设备,包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现所述的室内行人流疏散控制方法。On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the computer program when executing the computer program. The above-mentioned indoor pedestrian flow evacuation control method.
另一方面,本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,所述计算机程序被执行时实现所述的室内行人流疏散控制方法。On the other hand, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the above-mentioned indoor pedestrian flow evacuation control method is realized.
根据本发明提供的具体实施例,本发明公开了以下技术效果:According to the specific embodiments provided by the invention, the invention discloses the following technical effects:
本发明提供了一种室内行人流疏散控制方法、系统、电子设备及介质,所述方法包括:对室内疏散场景下的行人密度演化规则进行建模,构建出口行人密度的状态方程和测量方程;构建用于辨识所述状态方程和测量方程中的状态函数和观测函数的BP神经网络;所述BP神经网络包括输入层、隐藏层和输出层;对所述BP神经网络进行离线迭代训练,训练结束得到BP神经网络中各层权值;根据所述BP神经网络中各层权值求解出所述状态方程和测量方程中的状态函数和观测函数;根据求解出的状态函数以及观测函数进行行人流疏散密度的预测,得到行人流疏散密度预测值;构建用于对所述行人流疏散密度预测值进行纠正的误差在线神经网络;根据所述室内疏散场景中的传感器状态判断是否存在数据状态异常;若不存在数据状态异常,直接根据所述行人流疏散密度预测值进行室内行人流疏散控制,并持续训练所述误差在线神经网络;若存在数据状态异常,则根据当前训练好的误差在线神经网络计算预测误差值,并计算所述行人流疏散密度预测值与所述预测误差值之和作为行人流疏散密度预测改进值;根据所述行人流疏散密度预测改进值进行室内行人流疏散控制。本发明方法在传感器性能下降或者损坏条件下依然能够保证行人流疏散密度预测的准确性,从而提高行人流疏散效率。The present invention provides an indoor pedestrian flow evacuation control method, system, electronic equipment and medium. The method includes: modeling the evolution rules of pedestrian density in an indoor evacuation scene, and constructing a state equation and a measurement equation of pedestrian density at an exit; Construction is used to identify the BP neural network of state function and observation function in described state equation and measurement equation; Described BP neural network comprises input layer, hidden layer and output layer; Described BP neural network is carried out off-line iterative training, training End to obtain the weights of each layer in the BP neural network; solve the state function and the observation function in the state equation and the measurement equation according to the weights of each layer in the BP neural network; perform the operation according to the state function and the observation function solved Prediction of the evacuation density of the pedestrian flow, obtaining the predicted value of the evacuation density of the pedestrian flow; constructing an error online neural network for correcting the predicted value of the evacuation density of the pedestrian flow; judging whether there is an abnormal data state according to the sensor state in the indoor evacuation scene ; If there is no data state abnormality, directly carry out indoor pedestrian flow evacuation control according to the predicted value of the pedestrian flow evacuation density, and continuously train the error online neural network; if there is an abnormal data state, then according to the currently trained error online neural network The network calculates the prediction error value, and calculates the sum of the pedestrian flow evacuation density prediction value and the prediction error value as the pedestrian flow evacuation density prediction improvement value; performs indoor pedestrian flow evacuation control according to the pedestrian flow evacuation density prediction improvement value. The method of the invention can still ensure the accuracy of pedestrian flow evacuation density prediction under the condition of sensor performance degradation or damage, thereby improving pedestrian flow evacuation efficiency.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1为本发明一种室内行人流疏散控制方法的流程图;Fig. 1 is the flow chart of a kind of indoor pedestrian flow evacuation control method of the present invention;
图2为本发明一种室内行人流疏散控制方法的技术路线图;Fig. 2 is the technical roadmap of a kind of indoor pedestrian flow evacuation control method of the present invention;
图3为本发明实施例提供的室内疏散场景示意图;FIG. 3 is a schematic diagram of an indoor evacuation scene provided by an embodiment of the present invention;
图4为本发明实施例提供的非线性观测函数辨识的BP神经网络结构示意图;FIG. 4 is a schematic structural diagram of a BP neural network for nonlinear observation function identification provided by an embodiment of the present invention;
图5为本发明实施例提供的非线性状态函数辨识的BP神经网络结构示意图;5 is a schematic structural diagram of a BP neural network for nonlinear state function identification provided by an embodiment of the present invention;
图6为本发明实施例提供的误差在线神经网络的结构示意图。FIG. 6 is a schematic structural diagram of an error online neural network provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
本发明的目的是提供一种室内行人流疏散控制方法、系统、电子设备及介质,在行人流疏散密度控制仿真的基础上实现对传感器(比如摄像头)视野内行人流疏散密度的预测,从而解决在疏散过程中传感器性能下降甚至损坏(比如火灾导致摄像头损坏)后,行人流疏散密度控制不能正常工作的问题,提高在传感器性能下降或者损坏条件下的行人流疏散效率。The object of the present invention is to provide a method, system, electronic device and medium for indoor pedestrian flow evacuation control, and realize the prediction of pedestrian flow evacuation density in the field of view of sensors (such as cameras) on the basis of pedestrian flow evacuation density control simulation. During the evacuation process, the performance of the sensor is degraded or even damaged (for example, the camera is damaged due to a fire), and the pedestrian flow evacuation density control cannot work normally, so as to improve the pedestrian flow evacuation efficiency under the condition of sensor performance degradation or damage.
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
图1为本发明一种室内行人流疏散控制方法的流程图;图2为本发明一种室内行人流疏散控制方法的技术路线图。参见图1和图2,本发明一种室内行人流疏散控制方法,包括:Fig. 1 is a flow chart of an indoor pedestrian flow evacuation control method according to the present invention; Fig. 2 is a technical roadmap of an indoor pedestrian flow evacuation control method according to the present invention. Referring to Fig. 1 and Fig. 2, a kind of indoor pedestrian flow evacuation control method of the present invention comprises:
步骤1:对室内疏散场景下的行人密度演化规则进行建模,构建出口行人密度的状态方程和测量方程。Step 1: Model the evolution rules of pedestrian density in the indoor evacuation scene, and construct the state equation and measurement equation of exit pedestrian density.
图3为本发明实施例提供的室内疏散场景示意图。参见图3,本发明针对的疏散场景是室内疏散场景,例如大型商场、游乐场、图书馆、博物馆等,所述室内疏散场景具有多个出口,且每个出口配备有疏散引导人员和传感器;该传感器通常为摄像头。将室内疏散场景做网格化处理,可以形成包括N×N个格子的空间。如图3所示的实施例中具有4个出口,且每个出口配备有疏散引导人员。通过位于出口处的摄像头,疏散引导人员可以获得所在出口的行人密度并对引导信号进行调整(打开或关闭),从而实现对整个行人流疏散引导过程的控制。Fig. 3 is a schematic diagram of an indoor evacuation scene provided by an embodiment of the present invention. Referring to Fig. 3, the evacuation scene targeted by the present invention is an indoor evacuation scene, such as a large shopping mall, playground, library, museum, etc., the indoor evacuation scene has multiple exits, and each exit is equipped with evacuation guides and sensors; This sensor is usually a camera. The indoor evacuation scene is gridded to form a space including N×N grids. In the embodiment shown in Fig. 3, there are 4 exits, and each exit is equipped with evacuation guide personnel. Through the camera at the exit, the evacuation guidance personnel can obtain the pedestrian density at the exit and adjust the guidance signal (open or close), so as to realize the control of the entire pedestrian flow evacuation guidance process.
本发明对室内疏散场景下的行人密度演化规则进行建模,构建出口行人密度的状态方程和测量方程如下。The invention models the pedestrian density evolution rule in the indoor evacuation scene, and constructs the state equation and measurement equation of the exit pedestrian density as follows.
出口行人密度的状态方程为:The state equation of exit pedestrian density is:
X(k)=f(X(k-1))+q(k-1) (1)X(k)=f(X(k-1))+q(k-1) (1)
出口行人密度的测量方程为:The measurement equation of exit pedestrian density is:
Z(k)=h(X(k))+r(k) (2)Z(k)=h(X(k))+r(k) (2)
式中X(k)∈Rn×n和X(k-1)∈Rn×n分别表示k时刻和k-1时刻的状态变量;Z(k)∈Rm×n表示k时刻的观测变量;f(·)表示非线性状态函数;h(·)表示非线性观测函数;q(k-1)∈Rn×n表示过程噪声;r(k)∈Rm×n表示测量噪声。where X(k)∈R n×n and X(k-1)∈R n×n represent the state variables at time k and k-1 respectively; Z(k)∈R m×n represents the observation at time k variable; f(·) represents the nonlinear state function; h(·) represents the nonlinear observation function; q(k-1)∈R n×n represents the process noise; r(k)∈R m×n represents the measurement noise.
其中r(k)和q(k-1)相互独立,均值为0并且满足以下等式:where r(k) and q(k-1) are independent of each other, have a mean of 0 and satisfy the following equation:
E[r(k)]=0,E[q(k-1)]=0 (3)E[r(k)]=0, E[q(k-1)]=0 (3)
E[r(k)rT(k)]=R(k),E[q(k-1)qT(k-1)]=Q(k-1) (4)E[r(k)r T (k)]=R(k), E[q(k-1)q T (k-1)]=Q(k-1) (4)
式中E[.]表示期望;R(k)和Q(k-1)分别表示r(k)和q(k-1)的协方差矩阵,并且二者为高斯白噪声。其中Q(k-1)的取值为R(k)的取值为0.1。In the formula, E[.] represents the expectation; R(k) and Q(k-1) represent the covariance matrix of r(k) and q(k-1) respectively, and both are Gaussian white noise. Among them, the value of Q(k-1) is The value of R(k) is 0.1.
在图3所示的实施例中,假设第4个门(即出口4)的周边有未知因素的干扰,导致传感器采集到的出口行人密度存在误差,则第4个门的传感器(摄像头)检测出的人流量密度对应观测变量Z(k),另外三个门的传感器检测出的人流量密度对应着状态变量X(k):In the embodiment shown in Figure 3, assuming that there is interference from unknown factors around the fourth door (that is, exit 4), resulting in an error in the pedestrian density at the exit collected by the sensor, the sensor (camera) of the fourth door detects The human flow density obtained corresponds to the observed variable Z(k), and the human flow density detected by the sensors of the other three doors corresponds to the state variable X(k):
Z(k)=(第4个传感器检测的人流量密度) (6)Z(k)=(people flow density detected by the fourth sensor) (6)
由于上述的方程中的状态函数f(·)和观测函数h(·)不能直接求解,因此本发明采用BP神经网络进行辨识,进而求解获得非线性状态函数f(·)和非线性观察函数h(·)。Since the state function f( ) and observation function h( ) in the above equation cannot be solved directly, the present invention adopts BP neural network for identification, and then obtains the nonlinear state function f( ) and nonlinear observation function h (·).
步骤2:构建用于辨识所述状态方程和测量方程中的状态函数和观测函数的BP神经网络。Step 2: Construct a BP neural network for identifying the state function and observation function in the state equation and measurement equation.
对于图3所示的实施例,在步骤1构建的构建出口行人密度的状态方程(1)和测量方程(2)中,k-1时刻的状态变量X(k-1)∈R3×1,k时刻的状态变量X(k)∈R3×1,k时刻的观测变量Z(k)∈R1×1。由于两个函数f(·)和h(·)的输入和输出不一样,因此需要分别构建两个BP神经网络分别用于辨识非线性状态函数f(·)和非线性观测函数h(·)。两个BP神经网络均包括输入层、中间层(通常为隐藏层)和输出层。For the embodiment shown in Figure 3, in the state equation (1) and measurement equation (2) for constructing exit pedestrian density constructed in
用于非线性观测函数h(·)辨识的BP神经网络结构如图4所示,其中dense_1_input:ImputLayer、dense_1:Dense和dense_2:Dense分别表示BP神经网络的输入层、中间层和输出层;input和output分别代表BP神经网络某层的输入和输出。图4中,以k时刻第1,2,3个门的人流量密度作为输入,故输入层的输入是3维,None则代表所需输入的样本数量,因此输入层的输入可写作(None,3);输入层根据输入层与中间层的连接权值将(None,3)转变为(None,7),同理中间层通过连接权值得到输出层的输出(None,1),即k时刻第4个门的人流量密度。也就是说,本发明用于非线性观测函数h(·)辨识的BP神经网络以X(k)作为输入,Z(k)作为输出,Sigmoid函数作为BP神经网络的激活函数。因此该BP神经网络的函数表达式为:The BP neural network structure used for the identification of the nonlinear observation function h( ) is shown in Figure 4, where dense_1_input:ImputLayer, dense_1:Dense and dense_2:Dense respectively represent the input layer, intermediate layer and output layer of the BP neural network; input and output respectively represent the input and output of a certain layer of BP neural network. In Figure 4, the flow density of the 1st, 2nd, and 3rd gates at time k is used as input, so the input of the input layer is 3-dimensional, and None represents the number of samples required to be input, so the input of the input layer can be written as (None ,3); the input layer converts (None,3) into (None,7) according to the connection weights between the input layer and the middle layer, and similarly the middle layer obtains the output (None,1) of the output layer through the connection weights, namely The traffic density of the fourth door at time k. That is to say, the BP neural network used for the identification of the nonlinear observation function h(·) in the present invention takes X(k) as input, Z(k) as output, and the Sigmoid function as the activation function of the BP neural network. Therefore, the function expression of the BP neural network is:
Z(k)=h(X(k))=W2 Tsigmoid(W1 TX(k)) (7)Z(k)=h(X(k))=W 2 T sigmoid(W 1 T X(k)) (7)
其中W1为输入层到隐藏层的权值,W2为隐藏层到输出层的权值;Sigmoid函数会将神经网络中每个神经元线性加权的计算结果非线性化,赋予神经网络非线性映射能力,其函数的表达式为 Where W 1 is the weight from the input layer to the hidden layer, and W 2 is the weight from the hidden layer to the output layer; the Sigmoid function will nonlinearize the calculation results of each neuron in the neural network linearly weighted, endowing the neural network with nonlinear Mapping ability, the expression of its function is
用于非线性状态函数f(·)辨识的BP神经网络结构如图5所示,该BP神经网络以k-1时刻第1,2,3个门的人流量密度作为输入,k时刻第1,2,3个门的人流量密度作为输出,因此图5所示BP神经网络结构与图4的区别在于,该BP神经网络的输出层dense_2:Dense中,其输出维度是3维,即输入层根据输入层与中间层的连接权值将(None,3)转变为(None,7),同理中间层通过连接权值得到输出层的输出为(None,3),即k时刻第1,2,3个门的人流量密度。也就是说,本发明用于非线性状态函数f(·)辨识的BP神经网络以X(k-1)作为输入,X(k)作为输出,Sigmoid函数作为BP神经网络的激活函数。因此该BP神经网络的函数表达式为:The structure of the BP neural network used for the identification of the nonlinear state function f(·) is shown in Figure 5. The BP neural network takes the flow density of the 1st, 2nd, and 3rd gates at time k-1 as input, and the 1st gate at time k , 2,3 The traffic density of the gates is used as the output, so the difference between the BP neural network structure shown in Figure 5 and Figure 4 is that in the output layer dense_2:Dense of the BP neural network, its output dimension is 3-dimensional, that is, the input The layer converts (None, 3) into (None, 7) according to the connection weights between the input layer and the intermediate layer. Similarly, the output of the output layer obtained by the intermediate layer through the connection weight is (None, 3), that is, the first , 2,3 door traffic density. That is to say, the BP neural network used for the identification of the nonlinear state function f(·) in the present invention takes X(k-1) as input, X(k) as output, and the Sigmoid function as the activation function of the BP neural network. Therefore, the function expression of the BP neural network is:
X(k)=f(X(k-1))=W2 Tsigmoid(W1 TX(k-1)) (8)X(k)=f(X(k-1))=W 2 T sigmoid(W 1 T X(k-1)) (8)
其中W1为输入层到隐藏层的权值,W2为隐藏层到输出层的权值。Where W 1 is the weight from the input layer to the hidden layer, and W 2 is the weight from the hidden layer to the output layer.
步骤3:对所述BP神经网络进行离线迭代训练,训练结束得到BP神经网络中各层权值。Step 3: Perform off-line iterative training on the BP neural network, and obtain the weights of each layer in the BP neural network after training.
在步骤2构建的BP神经网络的基础上,基于行人疏散仿真实验得到用于训练所述BP神经网络的样本数据,将样本数据以7:3的比例分成训练集和验证集,同时将SGD作为优化器更新权值,MSE作为损失函数,设定学习率以及训练次数进行迭代训练,训练结束后即可得到BP神经网络中各层权值W1和W2。On the basis of the BP neural network constructed in
具体地,进行基于现有室内多出口行人流仿真方法的行人疏散仿真实验,该行人疏散仿真实验运行时会记录下行人疏散过程中每个时刻四个门测量到的人流量密度数据,然后随机取其中1000次仿真结果进行保存,从而得到用于训练本发明BP神经网络的样本数据。将样本数据以7:3的比例分成训练集和验证集,同时将SGD作为优化器更新权重,MSE作为损失函数,设定学习率以及训练次数进行迭代训练。在BP神经网络训练结束后可以得到各层的权值。Specifically, a pedestrian evacuation simulation experiment based on the existing indoor multi-exit pedestrian flow simulation method is carried out. When the pedestrian evacuation simulation experiment is running, the pedestrian flow density data measured by the four gates at each moment during the pedestrian evacuation process will be recorded, and then random Take 1000 times of simulation results and save them, so as to obtain sample data for training the BP neural network of the present invention. Divide the sample data into a training set and a validation set at a ratio of 7:3, and at the same time use SGD as the optimizer to update the weight, MSE as the loss function, set the learning rate and the number of training times for iterative training. After the BP neural network is trained, the weights of each layer can be obtained.
其中随机梯度下降策略(SGD)以目标梯度的负梯度方向对BP神经网络的权值进行调整,对于某个输出节点:Among them, the stochastic gradient descent strategy (SGD) adjusts the weight of the BP neural network in the direction of the negative gradient of the target gradient. For an output node:
其中η代表学习率,取值为0.01;Ek为均方误差MSE;XWij表示BP神经网络第i层与第j层之间的连接权值,ΔWij为训练过程中连接权值XWij的更新量。Among them, η represents the learning rate, and the value is 0.01; E k is the mean square error MSE; XW ij represents the connection weight between the i-th layer and the j-th layer of the BP neural network, and ΔW ij is the connection weight XW ij in the training process of updates.
隐藏层与输入层之间的连接权值和阈值需要进行如下的调整:The connection weights and thresholds between the hidden layer and the input layer need to be adjusted as follows:
计算出的连接权值XWij是一个标量;W12即为输入层与中间层之间的连接权值,训练结束后将其作为公式(7)、(8)中的W1;W23即为中间层与输出层之间的连接权值,训练结束后将其作为公式(7)、(8)中的W2。W1、W2均为矩阵形式。The calculated connection weight XW ij is a scalar; W 12 is the connection weight between the input layer and the middle layer, and it will be used as W 1 in formulas (7) and (8) after training; W 23 is is the connection weight between the middle layer and the output layer, and it will be used as W 2 in the formulas (7) and (8) after the training. Both W 1 and W 2 are in matrix form.
此外,为了使实际误差和与网络的预测误差尽可能的小,需要根据随机梯度下降策略不断迭代地调整BP神经网络各层的权值,使得损失函数的值不断减小。In addition, in order to make the actual error and the prediction error with the network as small as possible, it is necessary to iteratively adjust the weights of each layer of the BP neural network according to the stochastic gradient descent strategy, so that the value of the loss function is continuously reduced.
步骤4:根据所述BP神经网络中各层权值求解出所述状态方程和测量方程中的状态函数和观测函数。Step 4: Solve the state function and observation function in the state equation and measurement equation according to the weight values of each layer in the BP neural network.
将训练得到的各层权值W1、W2代入到对应BP神经网络的传输函数中,针对状态函数和观测函数分别为公式(7)和(8)中,即可得到非线性状态函数f(·)以及非线性观测函数h(·)。式中W1为输入层到隐藏层的连接权值,W2为隐藏层到输出层的连接权值,input为BP神经网络的输入,output为BP神经网络的输出。Substitute the weights W 1 and W 2 of each layer obtained from training into the transfer function of the corresponding BP neural network , for the state function and the observation function are formulas (7) and (8) respectively, the nonlinear state function f(·) and the nonlinear observation function h(·) can be obtained. In the formula, W 1 is the connection weight from the input layer to the hidden layer, W 2 is the connection weight from the hidden layer to the output layer, input is the input of the BP neural network, and output is the output of the BP neural network.
求得f(·)和h(·)后,即可根据公式(1)和公式(2)进行每个时刻某个出口的人流量密度的实时预测,得到对应出口的行人流疏散密度预测值。After obtaining f(·) and h(·), the real-time prediction of the pedestrian flow density at a certain exit at each time can be carried out according to the formula (1) and formula (2), and the predicted value of the pedestrian flow evacuation density of the corresponding exit can be obtained .
步骤5:根据求解出的状态函数以及观测函数进行行人流疏散密度的预测,得到行人流疏散密度预测值。Step 5: Predict the evacuation density of pedestrian flow according to the obtained state function and observation function, and obtain the predicted value of evacuation density of pedestrian flow.
根据求解得到的非线性状态函数f(·)以及非线性观测函数h(·)进行行人流疏散密度的预测,预测过程如下:According to the obtained nonlinear state function f( ) and nonlinear observation function h( ) to predict the evacuation density of pedestrian flow, the prediction process is as follows:
1)计算先验估计X(k|k-1);具体用k-1时刻的状态变量X(k-1)代入公式(11),计算k时刻的状态变量X(k)的先验估计X(k|k-1):1) Calculate the prior estimate X(k|k-1); specifically, use the state variable X(k-1) at time k-1 into formula (11) to calculate the prior estimate of the state variable X(k) at time k X(k|k-1):
X(k|k-1)=f(X(k-1)) (11)X(k|k-1)=f(X(k-1)) (11)
2)根据X(k|k-1)预测k时刻第4个出口的行人流疏散密度预测值Z4(k):2) According to X(k|k-1), predict the pedestrian flow evacuation density prediction value Z 4 (k) of the fourth exit at time k:
Z4(k)=H(k)X(k|k-1) (12)Z 4 (k)=H(k)X(k|k-1) (12)
其中H(k)是h(X(k|k-1))的雅可比矩阵。where H(k) is the Jacobian matrix of h(X(k|k-1)).
3)计算协方差矩阵P(k|k-1):3) Calculate the covariance matrix P(k|k-1):
P(k|k-1)=F(k|k-1)P(k-1)FT(k,k-1)+Q(k-1) (13)P(k|k-1)=F(k|k-1)P(k-1) FT (k,k-1)+Q(k-1) (13)
其中F(k|k-1)是f(X(k-1))的雅可比矩阵;P(k-1)表示k-1时刻的协方差矩阵。Where F(k|k-1) is the Jacobian matrix of f(X(k-1)); P(k-1) represents the covariance matrix at time k-1.
4)计算增益K(k),用于体现对预测值和观测值的置信度:4) Calculate the gain K(k), which is used to reflect the confidence of the predicted value and the observed value:
K(k)=P(k|k-1)HT(k)[H(k)P(k|k-1)HT(k)+R(k)]-1 (14)K(k)=P(k|k-1)HT( k )[H(k)P(k|k-1) HT (k)+R(k)] -1 (14)
5)结合增益K(k),计算后验估计X(k),即对X(k|k-1)进行修正:5) Combined with the gain K(k), calculate the posterior estimate X(k), that is, modify X(k|k-1):
X(k)=X(k|k-1)+K(k)[Z(k)-h(X(k|k-1))] (15)X(k)=X(k|k-1)+K(k)[Z(k)-h(X(k|k-1))] (15)
6)计算协方差矩阵P(k):6) Calculate the covariance matrix P(k):
P(k)=[I-K(k)H(k)]P(k|k-1) (16)P(k)=[I-K(k)H(k)]P(k|k-1) (16)
式中I为单位矩阵;F(k|k-1)是f(X(k-1))的雅可比矩阵;H(k)是h(X(k|k-1))的雅可比矩阵。根据公式(11)至(16)可递推的预测每个时刻某个出口的人流量密度,例如k时刻第4个出口的行人流疏散密度预测值Z4(k)和k时刻第1,2,3个出口的行人流疏散密度预测值X(k)。In the formula, I is the unit matrix; F(k|k-1) is the Jacobian matrix of f(X(k-1)); H(k) is the Jacobian matrix of h(X(k|k-1)) . According to formulas (11) to (16), it is possible to recursively predict the flow density of people at a certain exit at each moment, for example, the predicted value Z 4 (k) of pedestrian flow evacuation density at the fourth exit at time k and the first, The predicted value X(k) of pedestrian flow evacuation density at 2 and 3 exits.
步骤6:构建用于对所述行人流疏散密度预测值进行纠正的误差在线神经网络。Step 6: constructing an error online neural network for correcting the predicted value of the pedestrian flow evacuation density.
步骤5可递推的预测每个时刻某个出口的人流量密度,但随着时间的的不断递推,预测误差可能会随时间的累计不断放大。另一方面,如果室内疏散场景中的传感器存在性能下降或者损坏状态,则根据传感器采集数据预测的人流量密度将存在显著误差。针对该问题,本发明基于BP神经网络构建用于对所述行人流疏散密度预测值进行纠正的误差在线神经网络,通过构建误差在线神经网络进行预测值的纠正,其网络结构图如图6所示。图6中dense_1_input:ImputLayer、dense_1:Dense和dense_2:Dense分别表示BP神经网络的输入层、中间层和输出层;input和output分别代表BP神经网络某层的输入和输出。图6中,以k时刻第1,2,3个门的人流量密度作为输入,故输入层的输入是3维,None则代表所需输入的样本数量,则输入层的输入可写作(None,3);输入层根据输入层与中间层的连接权值将(None,3)转变为(None,7),同理中间层通过连接权值得到输出层的输出(None,1),即k时刻行人流疏散密度预测值Z(k)与k时刻行人流疏散密度真实值Z真(k)之间的误差ΔZ(k)。
即,本发明构建的误差在线神经网络的输入为行人流疏散密度预测值,在本实施例中为公式(12)计算得到的Z4(k);输出为行人流疏散密度预测值与行人流疏散密度真实值之间的误差,即预测误差值ΔZ(k)。其中k时刻行人流疏散密度真实值Z真(k)采用行人疏散仿真实验运行时记录下的行人疏散过程中k时刻第4个门的人流量密度数据。当不存在数据状态异常时,Z4(k)=Z真(k);当存在数据状态异常时,Z真(k)=Z4(k)+ΔZ(k)。That is, the input of the error online neural network constructed by the present invention is the predicted value of pedestrian flow evacuation density, which is Z 4 (k) calculated by formula (12) in this embodiment; the output is the predicted value of pedestrian flow evacuation density and pedestrian flow The error between the true values of the evacuation density, that is, the prediction error value ΔZ(k). Among them, the real value of pedestrian evacuation density Ztrue (k) at time k adopts the pedestrian flow density data of the fourth door at time k during the pedestrian evacuation process recorded during the pedestrian evacuation simulation experiment. When there is no abnormality in the data state, Z 4 (k)= Ztrue (k); when there is an abnormality in the data state, Ztrue (k)=Z 4 (k)+ΔZ(k).
步骤7:根据所述室内疏散场景中的传感器状态判断是否存在数据状态异常。Step 7: Judging whether there is an abnormal data state according to the sensor state in the indoor evacuation scene.
现有室内多出口行人流仿真方法需要在传感器获取到的人流量密度信息具有较高准确性才能正常工作。但是在实际疏散场景中,比如火灾紧急疏散场景,可能由于烟雾遮挡导致传感器存在性能下降情况或者由于火灾导致传感器存在损坏情况,在以上情况下,对人员疏散密度进行采集的摄像头很容易出现采集数据不准确的情况。上述问题的出现导致现有方法不能持续正常工作,从而影响疏散效率。为了解决该问题,本发明提出将摄像头获取到行人密度数据先进行预测校正来提高数据的准确性,然后再根据校正后的行人流疏散密度预测改进值进行室内行人流疏散控制,从而减少数据误差对于引导控制系统的的影响。The existing indoor multi-exit pedestrian flow simulation method needs to have high accuracy of the pedestrian flow density information obtained by the sensor to work normally. However, in an actual evacuation scene, such as a fire emergency evacuation scene, the performance of the sensor may be degraded due to smoke occlusion or the sensor may be damaged due to the fire. Inaccurate situation. The occurrence of the above-mentioned problems leads to the inability of the existing methods to continue to work normally, thereby affecting the evacuation efficiency. In order to solve this problem, the present invention proposes to predict and correct the pedestrian density data acquired by the camera to improve the accuracy of the data, and then perform indoor pedestrian flow evacuation control according to the corrected pedestrian flow evacuation density prediction improvement value, thereby reducing data errors Influence on the guidance control system.
具体地,若所述室内疏散场景中的传感器存在性能下降或者损坏状态,则确定存在数据状态异常;若所述室内疏散场景中的传感器不存在性能下降或者损坏状态,则确定不存在数据状态异常。Specifically, if the sensor in the indoor evacuation scene has a performance degradation or a damaged state, it is determined that there is an abnormal data state; if the sensor in the indoor evacuation scene does not have a performance degradation or a damaged state, then it is determined that there is no abnormal data state .
步骤8:若不存在数据状态异常,直接根据所述行人流疏散密度预测值进行室内行人流疏散控制,并持续训练所述误差在线神经网络。Step 8: If there is no abnormality in the data state, perform indoor pedestrian flow evacuation control directly according to the predicted value of the pedestrian flow evacuation density, and continuously train the error online neural network.
如果目前传感器采集的数据处在正常的状态,则让误差在线神经网络进入训练状态,持续训练所述误差在线神经网络。此时可以直接根据所述行人流疏散密度预测值进行室内行人流疏散控制,控制算法如下:If the data collected by the sensor is in a normal state at present, the error online neural network is put into a training state, and the error online neural network is continuously trained. At this time, the indoor pedestrian flow evacuation control can be carried out directly according to the predicted value of the pedestrian flow evacuation density, and the control algorithm is as follows:
但判断不存在数据状态异常时,可以将k时刻第i个出口的行人流疏散密度预测值Zi(k)(本发明实施例中为Z4(k))作为ρi(k),代入公式(17)进行室内行人流疏散控制。其中ρi aim表示室内疏散场景中k时刻第i个出口的行人流疏散目标密度;ui(k)表示k时刻第i个出口的引导作用系数;当ui(k)为1时打开第i个出口的引导作用,当ui(k)为0时关闭第i个出口的引导作用。即,当位于第i个出口的疏散引导人员获得的k时刻出口行人密度ρi(k)小于等于设置的目标密度时,对应门的引导作用系数ui(k)会被调整为1,从而打开引导作用。反之,则对应门的引导作用系数ui(k)会被调整为0,从而关闭引导作用。However, when it is judged that there is no data state abnormality, the predicted value Z i (k) of the pedestrian flow evacuation density of the i-th exit at k time (Z 4 (k) in the embodiment of the present invention) can be used as ρ i (k) and substituted into Equation (17) performs indoor pedestrian flow evacuation control. Among them, ρ i aim represents the pedestrian flow evacuation target density of the i-th exit at time k in the indoor evacuation scene; u i (k) represents the guiding coefficient of the i-th exit at k time; when u i (k) is 1, open the first The guidance function of the i exit, when u i (k) is 0, the guidance function of the i-th exit is turned off. That is, when the exit pedestrian density ρ i (k) obtained by the evacuation guide personnel at the i-th exit at time k is less than or equal to the set target density When , the guiding effect coefficient u i (k) of the corresponding door will be adjusted to 1, thus turning on the guiding effect. On the contrary, the guiding effect coefficient u i (k) of the corresponding door will be adjusted to 0, thus turning off the guiding effect.
步骤9:若存在数据状态异常,则根据当前训练好的误差在线神经网络计算预测误差值,并计算所述行人流疏散密度预测值与所述预测误差值之和作为行人流疏散密度预测改进值。Step 9: If there is an abnormal data state, calculate the prediction error value according to the currently trained error online neural network, and calculate the sum of the pedestrian flow evacuation density prediction value and the prediction error value as the pedestrian flow evacuation density prediction improvement value .
如果传感器采集的当前数据处在异常状态,则此时误差在线神经网络进入使用状态,根据当前训练好的误差在线神经网络计算预测误差值ΔZ(k)。将网络预测值和误差在线神经网络得到的预测误差值相结合,得到改进后的结果。即根据以下公式(18)计算所述行人流疏散密度预测值Z4(k)与所述预测误差值ΔZ(k)之和作为行人流疏散密度预测改进值Z改(k):If the current data collected by the sensor is in an abnormal state, the error online neural network enters the use state at this time, and the predicted error value ΔZ(k) is calculated according to the currently trained error online neural network. The network prediction value and the prediction error value obtained by the error online neural network are combined to obtain an improved result. That is, the sum of the predicted pedestrian evacuation density value Z 4 (k) and the predicted error value ΔZ(k) is calculated according to the following formula (18) as the pedestrian flow evacuation density predicted improved value Z(k):
Z改(k)=Z4(k)+ΔZ(k) (18)Z change (k) = Z 4 (k) + ΔZ (k) (18)
步骤10:根据所述行人流疏散密度预测改进值进行室内行人流疏散控制。Step 10: Perform indoor pedestrian flow evacuation control according to the improved value of the pedestrian flow evacuation density prediction.
当判断存在数据状态异常时,是将k时刻第i个出口的行人流疏散密度预测改进值Z改(k)作为ρi(k),代入以上公式(17)进行室内行人流疏散控制。在本发明实施例中,当u4(k)为1时打开第4个出口的引导作用,当u4(k)为0时关闭第4个出口的引导作用。结果表明,在经过本发明方法对摄像头获取到的行人密度数据进行校正后,室内行人流疏散控制的效果得到了显著提升。When it is judged that there is an abnormality in the data state, the improved value Z of pedestrian flow evacuation density prediction at the i-th exit at time k is changed to (k) as ρ i (k), and is substituted into the above formula (17) for indoor pedestrian flow evacuation control. In the embodiment of the present invention, when u 4 (k) is 1, the guiding function of the fourth outlet is turned on, and when u 4 (k) is 0, the guiding function of the fourth outlet is turned off. The results show that after the pedestrian density data acquired by the camera is corrected by the method of the present invention, the effect of indoor pedestrian flow evacuation control has been significantly improved.
可见,本发明方法首先对室内疏散场景下的行人密度演化规则进行建模,构建出口行人密度的非线性状态函数和非线性观测函数表达式;其次采用BP神经网络辨识求解出非线性状态函数和非线性观测函数的参数,解决无法通过推导直接求解函数参数的问题;再次通过误差在线神经网络对预测值进行实时的优化和调整,进一步提高预测的精度;最后将实时预测改进值用于行人流疏散控制,提高了在传感器性能下降或者损坏条件下的疏散效率。本发明方法在现有行人流疏散密度控制仿真的基础上实现了对传感器(比如摄像头)视野内行人疏散密度的预测,从而解决了在疏散过程中传感器性能下降甚至损坏(比如火灾导致摄像头损坏)后,行人流疏散密度控制不能正常工作的问题。It can be seen that the method of the present invention firstly models the pedestrian density evolution rule in the indoor evacuation scene, and constructs the nonlinear state function and nonlinear observation function expression of the exit pedestrian density; secondly, the BP neural network identification is used to solve the nonlinear state function and The parameters of the nonlinear observation function solve the problem that the function parameters cannot be directly solved by derivation; again, the prediction value is optimized and adjusted in real time through the error online neural network to further improve the prediction accuracy; finally, the real-time prediction improvement value is used for pedestrian flow Evacuation control improves evacuation efficiency in the event of sensor degradation or damage. The method of the present invention realizes the prediction of the pedestrian evacuation density in the field of view of the sensor (such as a camera) on the basis of the existing pedestrian flow evacuation density control simulation, thereby solving the problem of sensor performance degradation or even damage during the evacuation process (such as camera damage caused by fire) After that, the pedestrian flow evacuation density control does not work properly.
基于本发明提供的方法,本发明还提供一种室内行人流疏散控制系统,包括:Based on the method provided by the present invention, the present invention also provides an indoor pedestrian flow evacuation control system, including:
行人密度方程建模模块,用于对室内疏散场景下的行人密度演化规则进行建模,构建出口行人密度的状态方程和测量方程;The pedestrian density equation modeling module is used to model the evolution rules of pedestrian density in indoor evacuation scenarios, and construct the state equation and measurement equation of pedestrian density at exits;
BP神经网络构建模块,用于构建用于辨识所述状态方程和测量方程中的状态函数和观测函数的BP神经网络;所述BP神经网络包括输入层、隐藏层和输出层;A BP neural network building block, used to construct a BP neural network for identifying state functions and observation functions in the state equation and measurement equation; the BP neural network includes an input layer, a hidden layer and an output layer;
离线网络迭代训练模块,用于对所述BP神经网络进行离线迭代训练,训练结束得到BP神经网络中各层权值;The off-line network iterative training module is used to carry out off-line iterative training to the BP neural network, and the training ends to obtain the weights of each layer in the BP neural network;
状态和观测函数求解模块,用于根据所述BP神经网络中各层权值求解出所述状态方程和测量方程中的状态函数和观测函数;A state and observation function solving module, used to solve the state function and the observation function in the state equation and measurement equation according to the weights of each layer in the BP neural network;
行人流疏散密度预测模块,用于根据求解出的状态函数以及观测函数进行行人流疏散密度的预测,得到行人流疏散密度预测值;The pedestrian flow evacuation density prediction module is used to predict the pedestrian flow evacuation density according to the solved state function and the observation function, and obtain the pedestrian flow evacuation density prediction value;
误差在线神经网络构建模块,用于构建用于对所述行人流疏散密度预测值进行纠正的误差在线神经网络;An error online neural network building block is used to construct an error online neural network for correcting the predicted value of the pedestrian flow evacuation density;
数据状态异常判断模块,用于根据所述室内疏散场景中的传感器状态判断是否存在数据状态异常;A data state abnormal judgment module, configured to judge whether there is a data state abnormality according to the sensor state in the indoor evacuation scene;
误差在线神经网络训练模块,用于若不存在数据状态异常,直接根据所述行人流疏散密度预测值进行室内行人流疏散控制,并持续训练所述误差在线神经网络;The error online neural network training module is used to directly perform indoor pedestrian flow evacuation control according to the predicted value of the pedestrian flow evacuation density if there is no abnormal data state, and continuously train the error online neural network;
密度预测改进值计算模块,用于若存在数据状态异常,则根据当前训练好的误差在线神经网络计算预测误差值,并计算所述行人流疏散密度预测值与所述预测误差值之和作为行人流疏散密度预测改进值;The density prediction improved value calculation module is used to calculate the prediction error value according to the currently trained error online neural network if there is an abnormal data state, and calculate the sum of the pedestrian flow evacuation density prediction value and the prediction error value as the row Improvement value of crowd evacuation density prediction;
室内行人流疏散控制模块,用于根据所述行人流疏散密度预测改进值进行室内行人流疏散控制。The indoor pedestrian flow evacuation control module is used to perform indoor pedestrian flow evacuation control according to the improved value of the pedestrian flow evacuation density prediction.
整体上,本发明方法及系统采用建模方法对摄像头获取到行人密度数据进行预测校正,从而提高数据的准确性;然后再根据校正后的数据进行室内行人流疏散控制,从而减少数据误差对于引导控制系统的的影响,进而提高在传感器在性能下降或者损坏条件下的疏散效率。本发明通过神经网络辨识的方法对非线性状态函数以及非线性观测函数训练集进行辨识,从而解决了行人流疏散系统模型复杂,很难直接求解的问题。本发明还采用离线方法进行系统辨识的工作,由于在实验中实时获取的辨识数据较少,采用离线辨识可以充分利用历史数据,可以有效提高辨识的训练效率。本发明还采用误差在线神经网络进行预测数据的纠正,如果仅依靠模型的不断递推,误差会随时间的累计不断放大,针对该问题,本发明利用神经网络对模型输出的预测值数据进行在线修正,从而提高了本发明方法在实际应用中的鲁棒性。On the whole, the method and system of the present invention use the modeling method to predict and correct the pedestrian density data obtained by the camera, thereby improving the accuracy of the data; and then carry out indoor pedestrian flow evacuation control according to the corrected data, thereby reducing data errors. The impact of the control system, thereby improving the evacuation efficiency in the event of sensor degradation or damage. The invention identifies the nonlinear state function and the nonlinear observation function training set through the neural network identification method, thereby solving the problem that the model of the pedestrian flow evacuation system is complicated and difficult to directly solve. The present invention also adopts an offline method for system identification. Since the identification data obtained in real time is less in the experiment, the offline identification can make full use of historical data and effectively improve the training efficiency of identification. The present invention also uses the error online neural network to correct the predicted data. If only relying on the continuous recursion of the model, the error will continue to enlarge with the accumulation of time. Correction, thereby improving the robustness of the method of the present invention in practical applications.
进一步地,本发明还提供一种电子设备,该电子设备可以包括:处理器、通信接口、存储器和通信总线。其中,处理器、通信接口、存储器通过通信总线完成相互间的通信。处理器可以调用存储器中的计算机程序,以执行所述的室内行人流疏散控制方法。Further, the present invention also provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus. Wherein, the processor, the communication interface, and the memory complete the mutual communication through the communication bus. The processor can call the computer program in the memory to execute the indoor pedestrian flow evacuation control method.
此外,上述的存储器中的计算机程序通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。In addition, when the above-mentioned computer program in the memory is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, server or network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk.
进一步地,本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,所述计算机程序被执行时可以实现所述的室内行人流疏散控制方法。Further, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the above-mentioned indoor pedestrian flow evacuation control method can be realized.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for the related information, please refer to the description of the method part.
本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处。综上所述,本说明书内容不应理解为对本发明的限制。In this paper, specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; meanwhile, for those of ordinary skill in the art, according to the present invention Thoughts, there will be changes in specific implementation methods and application ranges. In summary, the contents of this specification should not be construed as limiting the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211479239.2A CN115719294A (en) | 2022-11-23 | 2022-11-23 | Method, system, electronic equipment and medium for indoor pedestrian flow evacuation control |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211479239.2A CN115719294A (en) | 2022-11-23 | 2022-11-23 | Method, system, electronic equipment and medium for indoor pedestrian flow evacuation control |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115719294A true CN115719294A (en) | 2023-02-28 |
Family
ID=85256150
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211479239.2A Pending CN115719294A (en) | 2022-11-23 | 2022-11-23 | Method, system, electronic equipment and medium for indoor pedestrian flow evacuation control |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115719294A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116385969A (en) * | 2023-04-07 | 2023-07-04 | 暨南大学 | People Gathering Detection System Based on Multi-camera Collaboration and Human Feedback |
CN117311188A (en) * | 2023-09-26 | 2023-12-29 | 青岛理工大学 | Control method, system and equipment for crowd diversion railings in fixed places |
-
2022
- 2022-11-23 CN CN202211479239.2A patent/CN115719294A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116385969A (en) * | 2023-04-07 | 2023-07-04 | 暨南大学 | People Gathering Detection System Based on Multi-camera Collaboration and Human Feedback |
CN116385969B (en) * | 2023-04-07 | 2024-03-12 | 暨南大学 | People gathering detection system based on multi-camera collaboration and human feedback |
CN117311188A (en) * | 2023-09-26 | 2023-12-29 | 青岛理工大学 | Control method, system and equipment for crowd diversion railings in fixed places |
CN117311188B (en) * | 2023-09-26 | 2024-03-12 | 青岛理工大学 | Control method, system and equipment for crowd diversion railings in fixed places |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113570859B (en) | A Traffic Flow Prediction Method Based on Asynchronous Space-Time Dilated Graph Convolutional Networks | |
CN107786369B (en) | Power communication network security situation perception and prediction method based on IRT (intelligent resilient test) hierarchical analysis and LSTM (local Scale TM) | |
CN110647900A (en) | Method, device and system for intelligent prediction of security situation based on deep neural network | |
CN115719294A (en) | Method, system, electronic equipment and medium for indoor pedestrian flow evacuation control | |
CN110149333B (en) | A network security situation assessment method based on SAE+BPNN | |
CN110085327A (en) | Attention mechanism-based multi-channel LSTM neural network influenza epidemic situation prediction method | |
CN107480440A (en) | A kind of method for predicting residual useful life for modeling of being degenerated at random based on two benches | |
CN111445010B (en) | Distribution network voltage trend early warning method based on evidence theory fusion quantum network | |
CN112270122A (en) | Inversion evaluation method for fire source parameters of building fire | |
CA2705613A1 (en) | System and method for occupancy estimation | |
CN110119540B (en) | A Multi-Output Gradient Boosting Tree Modeling Method for Survival Risk Analysis | |
CN112700326A (en) | Credit default prediction method for optimizing BP neural network based on Grey wolf algorithm | |
CN108683614A (en) | Virtual Reality Equipment Cluster Bandwidth Allocation Device Based on Threshold Residual Network | |
CN108460462A (en) | A kind of Interval neural networks learning method based on interval parameter optimization | |
CN117590766B (en) | Control method and device for angle adjustment of channel inlet guide rail | |
CN117311188A (en) | Control method, system and equipment for crowd diversion railings in fixed places | |
CN113177675A (en) | Air conditioner cold load prediction method based on optimization neural network of longicorn group algorithm | |
CN113742178A (en) | Network node health state monitoring method based on LSTM | |
CN110310199B (en) | Method and system for constructing loan risk prediction model and loan risk prediction method | |
CN113379455B (en) | Order quantity prediction method and equipment | |
CN109190749A (en) | A kind of prediction technique and device for the intelligent electric meter service life | |
CN117690289B (en) | A traffic network encoding representation learning method based on masked graph attention mechanism | |
CN107451660A (en) | Step-length optimization method in fuzzy neural network BP training process | |
CN117407675A (en) | Lightning arrester leakage current prediction method based on multi-variable reconstruction combined dynamic weight | |
CN114911157A (en) | Robot Navigation Control Method and System Based on Partially Observable Reinforcement Learning |
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 |