WO2021027139A1 - 基于小波神经网络的交通流数据预测方法和装置 - Google Patents

基于小波神经网络的交通流数据预测方法和装置 Download PDF

Info

Publication number
WO2021027139A1
WO2021027139A1 PCT/CN2019/117353 CN2019117353W WO2021027139A1 WO 2021027139 A1 WO2021027139 A1 WO 2021027139A1 CN 2019117353 W CN2019117353 W CN 2019117353W WO 2021027139 A1 WO2021027139 A1 WO 2021027139A1
Authority
WO
WIPO (PCT)
Prior art keywords
evaluation
fitness value
road section
traffic flow
road
Prior art date
Application number
PCT/CN2019/117353
Other languages
English (en)
French (fr)
Inventor
杜艳艳
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021027139A1 publication Critical patent/WO2021027139A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q50/40

Definitions

  • This application relates to the technical field of data processing. Specifically, the application relates to a method and device for predicting traffic flow data based on wavelet neural network.
  • an intelligent transportation system is used to collect historical traffic flow data corresponding to the same time period in the near future, and to predict the current traffic flow based on the collected content.
  • this method can play a certain role in predicting real-time traffic flow data, it is generally only suitable for short-term traffic flow data prediction, and is not suitable for long-term traffic data prediction.
  • this application provides a method for predicting traffic flow data based on wavelet neural network, which includes the following steps:
  • a road section directly connected to the target road section is set as an evaluation road section, and the traffic flow data of the target road section is acquired according to the evaluation road section;
  • the traffic flow data of each evaluated road section is used as the evaluation parameter, and the fitness value of each evaluated road section is calculated according to the number of iterations, and the obtained fitness values are compared to obtain all Evaluate the optimal fitness value of the road section;
  • connection weights Calculating the connection weights by using the optimal fitness values of all the evaluated road sections, and obtaining the prediction model constructed by the wavelet neural network according to the connection weights;
  • test samples of the traffic flow data of each assessed road section are input into the prediction model to obtain the traffic flow prediction data of the target road section.
  • this application also provides a traffic flow data prediction device based on wavelet neural network, which includes:
  • An acquisition module configured to set a road section directly connected to the target road section as an evaluation road section according to the determined target road section, and obtain traffic flow data of the target road section according to the evaluation road section;
  • the iterative calculation module is used to use the particle swarm algorithm to use the traffic flow data of each assessed road section as the assessment parameter, calculate the fitness value of each assessed road section according to the number of iterations, and calculate the fitness value obtained The values are compared to obtain the optimal fitness value of all assessed road sections;
  • a construction module configured to calculate connection weights by using the optimal fitness values of all the evaluated road sections, and obtain the prediction model constructed by the wavelet neural network according to the connection weights;
  • the prediction module is configured to input the test samples of the traffic flow data of each of the assessed road sections into the prediction model to obtain the traffic flow prediction data of the target road section.
  • this application also provides a server, which includes:
  • One or more processors are One or more processors;
  • One or more computer programs wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and the one or more computer programs are configured to execute The traffic flow data prediction method based on wavelet neural network described in the above embodiment.
  • the present application also provides a computer non-volatile readable storage medium, the computer non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned embodiments are implemented.
  • the traffic flow data prediction method based on wavelet neural network is described.
  • the traffic flow data prediction method and device based on wavelet neural network uses particle swarm algorithm to obtain the connection weight of the wavelet neural network prediction model, which uses particle swarm algorithm to have strong global search ability and convergence
  • the characteristics of fast speed and few parameter configurations make it possible to quickly converge to obtain the global optimal solution. Therefore, the wavelet neural network traffic flow prediction model trained by the initialization wavelet neural network parameters obtained by the particle swarm algorithm can predict traffic flow. Achieve the goal of improving prediction speed and prediction accuracy.
  • the technical solution provided in this application can predict traffic flow data in different periods and time periods, which overcomes the existing The problem that technology cannot accurately predict long-term traffic flow.
  • Fig. 1 is a flowchart of a method for predicting traffic flow data based on wavelet neural network according to an embodiment of the application
  • FIG. 2 is a flowchart of a method for predicting traffic flow data based on wavelet neural network according to another embodiment of the application
  • FIG. 3 is a schematic diagram of a traffic flow data prediction device based on wavelet neural network in an embodiment of the application
  • FIG. 4 is a schematic structural diagram of a server according to an embodiment of the application.
  • this application provides a method for predicting traffic flow data based on wavelet neural network. Please refer to FIG. 1, which is an example based on The flow chart of the wavelet neural network traffic flow data prediction method, including the following steps:
  • a road section directly connected to the target road section is set as an evaluation road section, and the traffic flow data of the target road section is obtained according to the evaluation road section.
  • the target road section is the object of traffic flow data prediction.
  • the target road section is a general road section, which must form a direct or indirect connection relationship with other road sections, and the traffic flow data of the road section connected with the target road section will affect the traffic flow data of the target road section, especially A road section that forms a direct connection relationship with the target road section.
  • the evaluation road section is an evaluation carrier for traffic flow data prediction of the target road section.
  • the evaluation road section can be used as the next-level target road section, and the road section connected to it is set as its sub-evaluation road section.
  • the road network is dissected layer by layer and predicted layer by layer according to the connection relationship between the road sections, and finally the prediction result of the target road section can be obtained.
  • the traffic flow may specifically be the traffic flow data of the target road section and/or the evaluation road section within a set time period.
  • the particle swarm algorithm is used to calculate the fitness value of the traffic flow data to obtain the optimal fitness value, and the wavelet neural network is trained to construct a traffic flow prediction model for the target road section.
  • the traffic flow data of the evaluated road segment obtained in step S110 is used as the particles of the particle swarm algorithm, that is, as an evaluation parameter, and the fitness value of each evaluated road segment is calculated.
  • calculate the fitness value of the updated traffic flow data of the assessed road section and compare the obtained fitness values to obtain the minimum fitness value, which is used as the optimal fitness value .
  • the fitness value is a parameter that reflects the current position of the particle in the particle swarm algorithm.
  • connection weights Calculate connection weights by using the optimal fitness values of all the evaluated road sections, and obtain a prediction model constructed by the wavelet neural network according to the connection weights.
  • connection weight is calculated by using the optimal fitness value obtained in step S120.
  • the connection weight is input into the wavelet neural network to obtain a prediction model constructed by the wavelet neural network.
  • the prediction model obtained by training the wavelet neural network using the particle swarm algorithm compares the error with the predicted value and the actual value that only relies on calculating the connection weight, and continuously adjusts the wavelet neural network according to the magnitude of the error. Parameters, until the predicted value gets closer and closer to the true value, it is easier to get the connection weight that matches the actual value.
  • the connection weight includes a first connection weight and a second connection weight.
  • S140 Input the test samples of the traffic flow data of each of the assessed road sections into the prediction model to obtain the traffic flow prediction data of the target road section.
  • the traffic flow data is used as the prediction
  • the input value of the input layer of the model finally obtains the output value of the output layer of the prediction model, and the output value is used as the prediction data of the traffic flow of the target road section.
  • the present application provides a method for predicting traffic flow data based on wavelet neural network, which determines the evaluation road section according to the direct connection relationship between the target road section and other road sections; uses the particle swarm algorithm to obtain the optimal adaptation of the evaluation road section
  • the prediction model constructed by the wavelet neural network is trained according to the optimal fitness value; the test samples of the traffic flow data of the assessment road section are input into the prediction model to obtain the traffic of the target road section Stream forecast data.
  • This application trains the wavelet neural network through the particle swarm algorithm to obtain the prediction model, and can predict the traffic flow of the target road section by obtaining the traffic flow data of the assessed road section in different periods and different time periods.
  • the historical traffic flow in the same time period can only be simply predicted in the short-term, which cannot meet the problem of long-term traffic flow prediction on the target road section.
  • the step of calculating the fitness value of each evaluation road section and comparing the obtained fitness values to obtain the optimal fitness value of all the evaluation road sections includes The following steps:
  • A1 Obtain part of the historical traffic flow data of different time sub-segments of each assessed road segment in the set time period as training samples, and update the training samples of each assessed road segment according to the maximum number of iterations to obtain each Evaluate the updated fitness value of the road segment.
  • the evaluation time period of the traffic flow of the target road section is determined as a set time period, and the evaluation time period is divided into several sub-time periods with equal time intervals. For each determined evaluation road section, obtain the traffic flow data in each sub-time period, and use part of the traffic flow data as the training sample x it .
  • the maximum number of iterations set by the particle swarm algorithm is used to update the training sample x it of each evaluation road section.
  • the updated fitness value of each evaluation road section is calculated.
  • y i is calculated by the wavelet neural network model, and the formula of the output layer is as follows:
  • h(j) represents the output result of the j-th node of the hidden layer
  • the selected hidden layer output formula is:
  • the fitness value is the prediction error value of the wavelet neural network
  • y i is the predicted output of the i-th node
  • mi is the expected output of the i-th node
  • the expected output is a variable sample of the obtained traffic flow data
  • a i is the expansion factor
  • b i is the translation factor.
  • step S120 that is, before the particle swarm algorithm is used to obtain the optimal fitness level of the evaluation road section, a wavelet neural network prediction model needs to be constructed, and the aforementioned wavelet a first neural network values of connection weights W ij, the second connection weights W jk, stretching factor a i, b i is initialized shift factor is provided, so as to calculate the fitness value of each evaluation segment.
  • the updated fitness value it is compared with the global optimal fitness value and the local fitness value to obtain the optimal fitness values of all the evaluated road sections.
  • the global optimal fitness value is obtained by comparing the fitness values of all the evaluated road sections, and the local optimal fitness value is obtained by comparing the fitness values of some of the evaluated road sections .
  • the updated fitness value is compared with the local optimal fitness value and the global optimal fitness value respectively, and the obtained minimum fitness value is used as the optimal fitness value.
  • each assessed road section can be divided into a busy level based on historical traffic flow data, and all assessed road sections are divided into different assessed road section sets according to the busy level. .
  • step A2 may further include:
  • the training samples of each evaluation road section in each evaluation road section set are updated and iterated.
  • the corresponding training sample update iterations are compared to obtain the local optimal fitness value.
  • A24 Compare the first smaller value with the global optimal fitness value to obtain a second smaller value, and use the second smaller value as the optimal fitness value.
  • the fitness value of the evaluation road segment obtained in the same sub-period is compared with the local optimal fitness value of the corresponding evaluation road segment set. If the fitness value of the evaluation road segment is smaller than the local The optimal fitness value, the fitness value of the assessed road section is taken as the first smaller value for comparison with the global optimal fitness value, the smaller value is taken to obtain the second smaller value, and the The second smaller value is used as the optimal fitness value. Otherwise, the local optimal fitness value is compared with the global optimal fitness value, and the smaller value is taken as the second smaller value, and taken as the optimal fitness value.
  • the traffic flow data prediction method provided in this application can converge to the global optimal solution, so it is beneficial to improve the prediction speed and prediction accuracy.
  • step S130 may further include the following steps:
  • the particle position vector corresponding to the optimal fitness value is obtained.
  • the fitness function is used to characterize the corresponding relationship between all individuals in the problem and their fitness.
  • the particle position vector is:
  • the particle position vector obtained by using the fitness value function is a vector of the first connection weight W ij , the second connection weight W jk , the expansion factor a i and the translation factor b i of the wavelet neural network.
  • the fitness function is used to calculate an optimal solution of the first connection weight W ij and the second connection weight W jk according to the optimal fitness value.
  • the obtained optimal solution of the first connection weight W ij and the second connection weight W jk is to be input into the constructed wavelet neural network model to obtain an optimal prediction model for the target road section.
  • test samples of the traffic flow data of each assessed road section are input into the prediction model to obtain the traffic flow prediction data of the target road section.
  • the traffic flow data prediction method provided by this application is easier to converge to the global optimal solution, which is beneficial to improve the prediction speed and prediction accuracy.
  • the addition of the training samples, test samples, and variable samples of traffic flow data involved in the above description is the sum of the traffic flow data acquired in different sub-time periods of the set time period for the evaluation road section, according to The empirical value sets the ratio of the above three samples.
  • the proportion of the training samples is set to 65%, and the proportion of the variable samples is set to 10%, the proportion of test samples is set to 25%.
  • the obtained traffic flow data corresponding to each sample are respectively distributed according to proportions and waiting to be entered, and the data is processed to obtain the traffic flow prediction data of the target road section.
  • FIG. 2 is a flowchart of another embodiment of a method for predicting traffic flow data based on a wavelet neural network.
  • the traffic flow data is divided into different evaluation parameters according to the flow of injected or diverted traffic to the target road segment within the set time period, which are respectively the injected evaluation road segment and the diverted evaluation road segment.
  • step S120 may further include:
  • the evaluation time period of the traffic flow data of the target road section is also determined as a set time period, and the set time period is divided into several sub-time periods with equal time intervals. And for the injection evaluation road section and the dredging evaluation road section, respectively, the traffic flow data in each sub-time period is obtained, and part of the traffic flow data is used as a training sample.
  • the maximum number of iterations set by the particle weight algorithm is used to update the corresponding training samples of each injection evaluation road section and the grooming evaluation road section.
  • the fitness value of each injection evaluation road section and the grooming evaluation road section are calculated respectively.
  • S122 Respectively update and iterate and compare the fitness value of the injection evaluation road section and the fitness value of the dredging evaluation road section to obtain the optimal fitness values of all the injection evaluation road sections and the optimal fitness of all the dredging evaluation road sections value.
  • the calculation of the optimal fitness value corresponding to the fitness value of the injected evaluation road segment or the fitness value of the dredging evaluation road segment is as follows:
  • each injection-assessment section or the diversion-assessment section is classified according to historical traffic flow data, and to classify all injection-assessment sections or diversion assessments
  • the road sections are divided into different injection evaluation road section sets or dredging evaluation road section sets according to the busy level.
  • the corresponding global optimal fitness values are compared to obtain the second smaller value of the injected assessment road section and The second smaller value of the dredging evaluation road section is used, and the respective second lower values are used as the optimal fitness values of the injection evaluation road section and the dredging evaluation road section respectively.
  • the first connection weight and the second connection weight corresponding to the injection evaluation road section and the dredging evaluation road section are calculated, and according to the first connection
  • the weight value and the second connection weight value obtain the prediction model constructed by the corresponding wavelet neural network.
  • step S140 may include:
  • the addition calculation is performed according to the direction of the traffic flow relative to the target section, and finally the prediction data of the traffic flow of the target section is obtained.
  • the traffic flow data injected into the evaluation section and the traffic flow data of the grooming evaluation section both include respective corresponding training samples, variable samples, and test samples, and their addition is for the injected evaluation sections respectively.
  • the summation of the traffic flow data obtained in different sub-time periods of the set time period of the dredging evaluation road section, and the above three samples of the injection evaluation road section and the dredging evaluation road section are respectively set in proportions according to empirical values .
  • the proportion settings of the respective samples corresponding to the injection evaluation road section and the dredging evaluation road section are the same.
  • the proportions of the training samples are all set to 65%, and the proportions of the variable samples are all Set to 10%, and the proportion of test samples is set to 25%.
  • an embodiment of the present application also provides a wavelet neural network-based traffic flow data prediction device, as shown in FIG. 3, including:
  • the obtaining module 310 is configured to set a road section directly connected to the target road section as an evaluation road section according to the determined target road section, and obtain traffic flow data of the target road section according to the evaluation road section;
  • the iterative calculation module 320 is configured to adopt a particle swarm algorithm, use the traffic flow data of each assessed road segment as an assessment parameter, calculate the fitness value of each assessed road segment according to the number of iterations, and compare the fitness value Make a comparison between them to get the optimal fitness value of all assessed road sections;
  • the construction module 330 is configured to calculate connection weights by using the optimal fitness values of all the evaluated road sections, and obtain the prediction model constructed by the wavelet neural network according to the connection weights;
  • the prediction module 340 is configured to input the test samples of the traffic flow data of each of the assessed road sections into the prediction model to obtain the traffic flow prediction data of the target road section.
  • FIG. 4 is a schematic diagram of the internal structure of the server in an embodiment.
  • the server includes a processor 410, a storage medium 420, a memory 430, and a network interface 440 connected through a system bus.
  • the storage medium 420 of the server stores an operating system, a database, and computer-readable instructions.
  • the database may store control information sequences.
  • the processor 410 can implement a According to the wavelet neural network traffic flow data prediction method, the processor 410 can implement the acquisition module 310, the iterative calculation module 320, the construction module 330 and the traffic flow data prediction device based on the wavelet neural network in the embodiment shown in FIG.
  • the function of the prediction model 340 The processor 410 of the server is used to provide computing and control capabilities to support the operation of the entire server.
  • the memory 430 of the server may store computer-readable instructions. When the computer-readable instructions are executed by the processor 410, the processor 410 can execute a method for predicting traffic flow data based on a wavelet neural network.
  • the network interface 440 of the server is used to connect and communicate with the terminal.
  • the present application also proposes a storage medium storing computer-readable instructions.
  • the computer-readable instructions When the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps: For the determined target road section, the road section directly connected to the target road section is set as the evaluation road section, and the traffic flow data of the target road section is obtained according to the evaluation road section; the particle swarm algorithm is used to calculate the traffic flow of each evaluation road section. Flow data is the evaluation parameter.
  • the fitness value of each evaluation road section is calculated, and the fitness values are compared to obtain the optimal fitness value of all evaluation road sections; use all the evaluations
  • the optimal fitness value of the road section is calculated to obtain the connection weight, and the prediction model constructed by the wavelet neural network is obtained according to the connection weight; the test samples of the traffic flow data of each evaluation road section are input into the prediction model, Obtain the traffic flow prediction data of the target road section.
  • the traffic flow data prediction method and device based on wavelet neural network converts the prediction of the traffic flow data of the target road section into the prediction of the traffic flow data of the evaluation road section directly connected to it, and uses The traffic flow data of the evaluated road section is used as the evaluation parameter, and the particle swarm algorithm is used to calculate the fitness value of the evaluated road section. After updated iterative calculation and comparison, the optimal fitness value is obtained, and according to the fitness The function obtains the connection weight of the corresponding wavelet neural network prediction model, and finally obtains the prediction model constructed by the wavelet neural network, and inputs the test sample into the prediction model to obtain the prediction data of the traffic flow of the target road section.
  • the technical solution provided in this application uses the particle swarm algorithm to obtain the connection weights of the wavelet neural network prediction model, and uses the particle swarm algorithm’s strong global search capabilities, fast convergence speed, and few parameter configurations, so that it can quickly converge
  • the global optimal solution is obtained, so the wavelet neural network traffic flow prediction model trained by the initial wavelet neural network parameters obtained by the particle swarm algorithm can achieve the goal of improving the prediction speed and prediction accuracy when predicting traffic flow.
  • the prediction method and device provided by this application have strong global search capabilities and can adapt well to data samples of different traffic flow data after updating iterations. Therefore, they can make predictions based on traffic flow data in different periods and different periods of time. This solves the problem that the prior art cannot accurately predict the long-term traffic flow.
  • this application also further technically optimizes the technical solutions of the wavelet neural network-based traffic flow data prediction method and device, and divides the injecting or diverting traffic flow from the assessed road section to the target road section into Different evaluation parameters, which are the injection evaluation section and the dredging evaluation section respectively, and the particle swarm algorithm is used to train the injection evaluation section and the dredging evaluation section respectively, and the corresponding prediction model constructed by the wavelet neural network is obtained, and the prediction model is based on The prediction model respectively predicts the traffic flow data of the injection evaluation road section and the drainage evaluation road section, and finally obtains the traffic flow prediction data of the target road section according to the traffic flow direction to the target road section. In this way, the obtained prediction model has a more accurate prediction ability for the traffic flow data of the target road section.
  • this application uses a wavelet neural network-based traffic flow data prediction method and device to train the prediction model constructed by the wavelet neural network using particle swarm algorithm, which solves the problem that the prior art cannot accurately determine the long-term traffic flow.
  • the problem of forecasting can also improve the forecasting ability of the forecasting model.
  • the computer program can be stored in a computer readable storage medium. When executed, it may include the processes of the above-mentioned method embodiments.
  • the aforementioned storage medium may be a storage medium such as a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.

Abstract

一种基于小波神经网络的交通流数据预测方法和装置,所述方法包括根据确定的目标路段,将与所述目标路段直接连接的路段设为评估路段,并根据所述评估路段获取其交通流数据(S110);采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,根据迭代更新的次数,计算每个评估路段的适应度值,并对得到的所述适应度值进行比较,得到所有评估路段的最优适应度值(S120);利用所述所有评估路段的最优适应度值计算得到连接权值,并根据所述连接权值得到所述小波神经网络构建的预测模型(S130);将各个所述评估路段的交通流数据的测试样本输入所述预测模型,得到所述目标路段的交通流的预测数据(S140)。该方法有利于对所述目标路段的交通流数据的预测能力。

Description

基于小波神经网络的交通流数据预测方法和装置
本申请要求于2019年08月15日提交中国专利局、申请号为201910755550.7、申请名称为“基于小波神经网络的交通流数据预测方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,具体而言,本申请涉及一种基于小波神经网络的交通流数据预测方法和装置。
背景技术
随着城市交通网络的发展,交通流量更容易受多方面的因素影响,随机性的特点也越来越突出。目前,针对这个问题,运用了智能交通系统,对应近期同一时间段的历史交通流数据的进行收录,并根据该收录的内容,对目前的交通流量进行预测。该方法虽然能对实时的交通流数据起到一定的预测作用,但是一般只适用于短时间的交通流数据的预测,不适合对长期的交通数据进行预测。
发明内容
为克服以上技术问题,特别是现有技术中只能从近期的同一时间段获取历史交通流数据不能很好解决对长期的交通流数据的预测效果的问题,特提出以下技术方案:
第一方面,本申请提供一种基于小波神经网络的交通流数据预测方法,其包括如下步骤:
根据确定的目标路段,将与所述目标路段直接连接的路段设为评估路段,并根据所述评估路段获取所述目标路段的交通流数据;
采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,根据迭代更新的次数,计算每个评估路段的适应度值,并对得到的所述适应度值进行比较,得到所有评估路段的最优适应度值;
利用所述所有评估路段的最优适应度值计算得到连接权值,并根据所述连接权值得到所述小波神经网络构建的预测模型;
将各个所述评估路段的交通流数据的测试样本输入所述预测模型,得到所述目标路段的交通流的预测数据。
第二方面,本申请还提供一种基于小波神经网络的交通流数据预测装置,其包括:
获取模块,用于根据确定的目标路段,将与所述目标路段直接连接的路段设为评估路段,并根据所述评估路段获取所述目标路段的交通流数据;
迭代计算模块,用于采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,根据迭代更新的次数,计算每个评估路段的适应度值,并对得到的所述适应度值进行比较,得到所有评估路段的最优适应度值;
构建模块,用于利用所述所有评估路段的最优适应度值计算得到连接权值,并根据所述连接权值得到所述小波神经网络构建的预测模型;
预测模块,用于将各个所述评估路段的交通流数据的测试样本输入所述预测模型,得到所述目标路段的交通流的预测数据。
第三方面,本申请还提供一种服务器,其包括:
一个或多个处理器;
存储器;
一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个计算机程序配置用于执行上述实施例所述基于小波神经网络的交通流数据预测方法。
第四方面,本申请还提供一种计算机非易失性可读存储介质,所述计算机非易失性可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述实施例所述基于小波神经网络的交通流数据预测方法。
本申请所提供的一种基于小波神经网络的交通流数据预测方法和装置,运用了粒子群算法得到小波神经网络的预测模型的连接权值,其运用了粒子群算法的全局搜索能力强、收敛速度快、参数配置少的特点,使得可快速收敛得到全局最优解,故利用粒子群算法得到的初始化小波神经网络参数训练出的小波神经网络交通流预测模型在对交通流进行预测时,可以达到提高预测速度和预测精度的目标。
同时,由于全局搜索能力强,通过更新迭代后,能很好适应不同的交通流数据的数据样本,因此本申请提供的技术方案能根据不同时期不同时段的交通流数据进行预测,克服了现有技术中不能对长期的交通流量做出准确预测的问题。
本申请附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本申请的实践了解到。
附图说明
本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1为本申请中的一个实施例的基于小波神经网络的交通流数据预测方法的流程图;
图2为本申请中的另一个实施例的基于小波神经网络的交通流数据预测方法的流程图;
图3为本申请中的一个实施例的基于小波神经网络的交通流数据预测装置的示意图;
图4为本申请中的一个实施例的服务器的结构示意图。
具体实施方式
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本申请,而不能解释为对本申请的限制。
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本申请所属领域中的普通技术人员的一般理解相同的意义。
针对目前只能交通系统不能对长期的交通流量做出准确预测的问题,本申请提供一种基于小波神经网络的交通流数据预测方法,请参考图1所示,图1是一个实施例的基于小波神经网络的交通流数据预测方法的流程图,包括以下步骤:
S110、根据确定的目标路段,将与所述目标路段直接连接的路段设为评估路段,并根据所述评估路段获取所述目标路段的交通流数据。
在本申请中,所述目标路段为交通流数据预测的对象。所述目标路段为一般的行车路段,其必定与其他路段形成直接或间接的连接关系,而且与所述目标路段连接的路段的交通流数据会影响到所述目标路段的交通流数据,尤其是与所述目标路段形成直接连接关系的路段。
为了简化对交通数据预测的过程,只将与所述目标路段直接连接的路段设为评估路段,即所述评估路段是对所述目标路段的交通流数据预测的 评估载体。
若需要对所述目标路段进行更为详细的预测,则可以将所述评估路段作为下一级目标路段,将与其连接的路段设定为其子评估路段。如此根据路段之间的连接关系对路网进行逐层解剖,逐层预测,最终可以得到所述目标路段的预测结果。
在本实施例中,所述交通流可具体为目标路段和/或评估路段的在设定时间段内车流量的数据。
S120、采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,根据迭代更新的次数,计算每个评估路段的适应度值,并对得到的所述适应度值进行比较,得到所有评估路段的最优适应度值。
对于该步骤,运用粒子群算法对交通流数据进行适应度值的计算,得到最优适应度值,对所述小波神经网络进行训练,以构建针对所述目标路段的交通流的预测模型。
在所述粒子群算法的过程中,将步骤S110得到的所述评估路段的交通流数据作为所述粒子群算法的粒子,即作为评估参数,计算每个评估路段的适应度值。根据迭代更新的次数,对更新后的评估路段的交通流数据进行适应度值的计算,并对得到的所述适应度值进行比较,得到最小适应度值,并以此作为最优适应度值。
其中,适应度值为在粒子群算法反应粒子当前位置优劣的一个参数。
S130、利用所述所有评估路段的最优适应度值计算得到连接权值,并根据所述连接权值得到所述小波神经网络构建的预测模型。
在本步骤中,利用步骤S120得到的最优适应度值计算得到连接权值。将所述连接权值输入至所述小波神经网络中,得到所述小波神经网络构建的预测模型。在本实施例中,利用粒子群算法对所述小波神经网络进行训练所得到的预测模型,与仅仅依靠计算连接权重的预测值与实际值比较误差,根据该误差的大小不断调整小波神经网络的参数,直至预测值越来越接近真实的值的做法相比,更容易得到与实际匹配的连接权值。
所述连接权值包括第一连接权值和第二连接权值。所述第一连接权值为所述小波神经网络构建的预测模型的输入层的连接权值,若其表示输入层的第i个节点到隐含层的第j个节点之间的连接权值,可记录为W ij,其中,j=1,2,…l,l表示隐含层的节点数。所述第二连接权值为所述小波神经网络构建的预测模型的隐含层的连接权值,若其代表隐含层的第j个节点到输出层的第k个节点之间的连接权值,可记录为W jk,其中,k=1,2,…m,m表示输出层的节点数。
S140、将各个所述评估路段的交通流数据的测试样本输入所述预测模 型,得到所述目标路段的交通流的预测数据。
根据从步骤S130得到的所述第一连接权值W ij和所述第二连接权值W jk,以及步骤S110中所获取的各个评估路段的交通流数据,将该交通流数据作为所述预测模型的输入层的输入值,最终得到所述预测模型的输出层的输出值,将所述输出值作为所述目标路段的交通流的预测数据。
本申请提供的一种基于小波神经网络的交通流数据预测方法,根据所目标路段与其他路段的直接连接关系,确定所述评估路段;利用所述粒子群算法得到所述评估路段的最优适应度值,并根据该最优适应度值训练得到所述小波神经网络构建的预测模型;将所述评估路段的交通流数据的测试样本输入字所述预测模型中,得到所述目标路段的交通流的预测数据。本申请通过粒子群算法对所述小波神经网络进行训练,得到所述预测模型,可以通过获取所述评估路段不同时期的不同时间段的交通流数据对所述目标路段的交通流进行预测,解决了现有技术中只能简单的短期内同一时间段的历史交通流进行预测,无法满足长期对所述目标路段的交通流预测的问题。
对于步骤S120中的所述根据迭代更新的次数,计算每个评估路段的适应度值,并对得到的所述适应度值进行比较,得到所有评估路段的最优适应度值的步骤,其包括以下步骤:
A1、获取每个评估路段在设定时间段的不同时间子段的部分历史交通流数据作为训练样本,并根据最大的迭代次数,对每个评估路段的所述训练样本进行更新,得到每个评估路段的更新后的适应度值。
在本实施例中,将所述目标路段的交通流的评估时间段确定为设定时间段,将所述评估时间段分隔成若干个等时间间隔的子时间段。针对每个确定的评估路段,获取其每个子时间段中的交通流数据,并以部分的该交通流数据作为训练样本x it
利用所述粒子群算法设定的最大迭代次数,对每个评估路段的所述训练样本x it进行更新。
根据所述更新后的所述训练样本x it,计算得到每个评估路段经过更新后的适应度值。
适应度值具体的计算过程如下:
适应度值:
Figure PCTCN2019117353-appb-000001
其中,y i是通过小波神经网络模型算出的,输出层的公式如下:
Figure PCTCN2019117353-appb-000002
其中,h(j)表示隐含层第j个节点的输出结果,选用的隐含层输出公式为:
Figure PCTCN2019117353-appb-000003
其中,适应度值为小波神经网络的预测误差值,y i为第i个节点的预测输出,m i为第i个节点的期望输出,该期望输出为取所获得的交通流数据的变量样本;a i为伸缩因子、b i为平移因子。
为了得到各个评估路段的适应度值,在步骤S120之前,即在利用粒子群算法得到所述评估路段的最优适应度之前,需要构建小波神经网络的预测模型,并根据经验值对上述的小波神经网络的第一连接权值W ij、第二连接权值W jk、伸缩因子a i、平移因子b i进行初始化设置,以计算得到各个评估路段的适应度值。
A2、依据更新后的适应度值分别与所述全局最优适应度值与局部适应度值比较,得到所述所有评估路段的最优适应度值。
根据更新后的适应度值,经过所有的所述评估路段的适应度值的比较得到全局最优适应度值,及经过部分的所述评估路段的适应度值的比较得到局部最优适应度值。根据更新后的适应度值分别与所述局部最优适应度值和全局最优适应度值进行比较,得到的最小适应度值作为最优的适应度值。
对于上述的所述评估路段的适应度值的获取与划分,可以依据历史交通流数据,对每个评估路段进行繁忙等级的划分,并对所有评估路段根据繁忙等级,划分为不同的评估路段集。
在此基础上,上述步骤A2可以进一步包括:
A21、根据更新后的每个评估路段集中的每个评估路段的适应度值进行比较,以每个评估路段集的最小适应度值作为对应评估路段集的局部最优适应度值。
针对设定时间段内的不同子时间段,对每个评估路段集中的每个评估路段的训练样本进行更新迭代。对应本次更新迭代的子时间段,根据对应更新后的训练样本计算对应的适应度值。
针对每个评估路段集,比较得到对应的训练样本更新迭代的局部最优适应度值。
A22、根据更新后的所有评估路段的适应度值进行比较,以所有评估路段的最小适应度值作为全局最优适应度值。
针对设定时间段内的不同子时间段,对所有评估路段的训练样本进行更新迭代。对应本次更新迭代的子时间段,根据对应更新后的训练样本计算对应的适应度值,经过对比后,得到对应训练样本更新迭代的全局最优适应度值。
A23、将所述评估路段的适应度值与所述局部最优适应度值进行比较, 得到第一较小值。
A24、根据所述第一较小值与所述全局最优适应度值进行比较,得到第二较小值,并以所述第二较小值作为最优适应度值。
在上述步骤A23-A24中,将获取同一子时间段的所述评估路段的适应度值与对应的评估路段集的局部最优适应度值进行比较,如果所述评估路段的适应度值小于局部最优适应度值,则取该评估路段的适应度值作为第一较小值用于所述全局最优适应度值进行比较,取其中的较小值,得到第二较小值,并以该第二较小值作为最优适应度值。否则,将所述局部最优适应度值与所述全局最优适应度值进行比较,取其中的较小值为第二较小值,并作为最优适应度值。
借助粒子群算法具有全局搜索能力的特点,本申请提供的交通流数据预测方法能收敛于全局最优解,所以,有利于提高预测速度和预测精度。
在上述得到的最优适应度值的前提下,对于步骤S130还可以包括以下步骤:
B1、利用适应度函数得到的最优适应度值对应的粒子位置向量。
根据从步骤S120得到的最优适应度值,并利用粒子群算法的适应度函数,得到与所述最优适应度值对应的粒子位置向量。
所述适应度函数用于表征问题中的全体个体与其适应度之间的对应关系的函数。
在本实施例中,所述粒子位置向量为:
x id=(W ij,W jk,a j,b j)      (4)
B2、根据所述粒子位置向量得到所述预测模型的连接权值的最优解。
利用适应度值函数所得到的粒子位置向量是关于小波神经网络的所述第一连接权值W ij、所述第二连接权值W jk、伸缩因子a i和平移因子b i的向量。
利用适应度函数,根据所述最优适应度值,计算得到所述第一连接权值W ij和所述第二连接权值W jk的最优解。
将得到的所述第一连接权值W ij和所述第二连接权值W jk的最优解待入所构建的小波神经网络模型中,得到针对该目标路段的最优的预测模型。
将之前获取得到的关于各个评估路段的交通流数据的测试样本输入至所述预测模型中,得到所述目标路段的交通流的预测数据。
借助粒子群算法具有全局搜索能力、收敛速度快,参数配置少的特点,本申请提供的交通流数据预测方法更容易收敛于全局最优解,有利于提高预测速度和预测精度。
在上述描述中所涉及的关于交通流数据的训练样本、测试样本、变量样本的相加是针对所述评估路段在设定时间段的不同子时间段的所获取的交通流数据的总和,根据经验值对上述三个样本进行比例设置。
在本实施例中,为了以利用尽量多的交通流数据进行训练得到所述预测能力更好的预测模型,将所述训练样本的占比设定为65%,变量样本的占比设定为10%,测试样本的占比设定为25%。
将得到的各个样本对应的交通流数据分别按照比例分配并待入,进行数据处理,得到所述目标路段的交通流的预测数据。
为了能以训练得到更为精准的预测模型,如图2所示,图2是另一个实施例的基于小波神经网络的交通流数据预测方法的流程图。在这一实施例中,将所述交通流数据根据所述设定时间段内向所述目标路段的注入或疏导车流量划分为不同的评估参数,其分别为注入评估路段和疏导评估路段。
针对上述对评估参数的划分,步骤S120可进一步包括:
S121、采用粒子群算法,分别以每个所述注入评估路段和所述疏导评估路段的交通流数据为评估参数,并计算每个所述注入评估路段或所述疏导评估路段的适应度值。
在该步骤中,同样将所述目标路段的交通流数据的评估时间段确定为设定时间段,将该设定时间段分成若干个等时间间隔的子时间段。并分别针对所述注入评估路段和所述疏导评估路段,获取其各自在每个子时间段中的交通流数据,并以该交通流数据的部分数据作为训练样本。
利用所述粒子权算法设定的最大迭代次数,对每个注入评估路段和疏导评估路段的对应的训练样本进行更新。
根据更新后的训练样本,分别计算每个注入评估路段和疏导评估路段的适应度值。
具体的计算过程参照上述的公式(1)-(3)。
S122、分别对所述注入评估路段的适应度值和所述疏导评估路段的适应度值进行更新迭代和比较,得到所有注入评估路段的最优适应度值和所有疏导评估路段的最优适应度值。
分别对应所述注入评估路段的适应度值或所述疏导评估路段的适应度值的最优适应度值的计算如下:
对于上述注入评估路段或疏导评估路段的适应度值的划分与计算,可以依据历史交通流数据,对每个注入评估路段或疏导评估路段进行繁忙等级的划分,并对所有注入评估路段或疏导评估路段根据繁忙等级,划分为不同的注入评估路段集或疏导评估路段集。
C1、分别根据更新后的每个注入评估路段集和疏导评估路段集中的每个注入评估路段和疏导评估路段的适应度值之间各自进行比较,以每个注 入评估路段和疏导评估路段集的最小适应度值作为对应注入评估路段和疏导评估路段集的局部最优适应度值。
C2、根据更新后的所有注入评估路段之间和疏导评估路段的适应度值之间分别各自进行比较,以所有注入评估路段或疏导评估路段的最小适应度值分别作为注入评估路段或疏导评估路段的全局最优适应度值。
C3、将所述注入评估路段和疏导评估路段的适应度值分别与所述注入评估路段或疏导评估路段的对应局部最优适应度值进行比较,得到各自的第一较小值。
C4、根据所述注入评估路段的第一较小值和疏导评估路段的第一较小值对应与各自的全局最优适应度值进行比较,得到所述注入评估路段的第二较小值和疏导评估路段第二较小值,并以各自的第二较小值分别作为所述注入评估路段和疏导评估路段最优适应度值。
根据所述注入评估路段和疏导评估路段最优适应度值的基础上,计算得到所述注入评估路段和疏导评估路段对应的第一连接权值和第二连接权值,并根据该第一连接权值和第二连接权值得到所述对应的小波神经网络构建的预测模型。
在此基础上,所述步骤S140可包括:
S141、分别将各个注入评估路段和疏导评估路段的交通流数据的测试样本输入对应的预测模型,分别得到所述注入评估路段的交通流数据的预测数据和所述疏导评估路段的交通流数据的预测数据;
S142、根据所述注入评估路段的交通流数据的预测数据和所述疏导评估路段的交通流数据的预测数据,计算得到所述目标路段的交通流的预测数据。
针对其注入评估路段的交通流的预测数据和疏导评估路段的预测数据,并根据相对于所述目标路段的车流量的方向进行相加计算,最终得到所述目标路段的交通流的预测数据。
在该实施例中,所述注入评估路段的交通流数据和所述疏导评估路段的交通流数据均包括各自对应的训练样本、变量样本和测试样本,其相加是分别针对所述注入评估路段和所述疏导评估路段在设定时间段的不同子时间段的所获取的交通流数据的总和,根据经验值分别对所述注入评估路段和所述疏导评估路段的上述三个样本进行比例设置。而且,为了满足对应的数据量进行数据处理,所述注入评估路段和所述疏导评估路段所各自对应样本的比例设置均相同。
在本实施例中,为了以利用尽量多的交通流数据进行训练得到所述预 测能力更好的预测模型,对将所述训练样本的占比均设定为65%,变量样本的占比均设定为10%,测试样本的占比均设定为25%。
基于与上述基于小波神经网络的交通流数据预测方法相同的发明构思,本申请实施例还提供了一种基于小波神经网络的交通流数据预测装置,如图3所示,包括:
获取模块310,用于根据确定的目标路段,将与所述目标路段直接连接的路段设为评估路段,并根据所述评估路段获取所述目标路段的交通流数据;
迭代计算模块320,用于采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,根据迭代更新的次数,计算每个评估路段的适应度值,并对所述适应度值之间做比较,得到所有评估路段的最优适应度值;
构建模块330,用于利用所述所有评估路段的最优适应度值计算得到连接权值,并根据所述连接权值得到所述小波神经网络构建的预测模型;
预测模块340,用于将各个所述评估路段的交通流数据的测试样本输入所述预测模型,得到所述目标路段的交通流的预测数据。
请参考图4,图4为一个实施例中服务器的内部结构示意图。如图4所示,该服务器包括通过系统总线连接的处理器410、存储介质420、存储器430和网络接口440。其中,该服务器的存储介质420存储有操作系统、数据库和计算机可读指令,数据库中可存储有控件信息序列,该计算机可读指令被处理器410执行时,可使得处理器410实现一种基于小波神经网络的交通流数据预测方法,处理器410能实现图3所示实施例中的一种基于小波神经网络的交通流数据预测装置中的获取模块310、迭代计算模块320、构建模块330和预测模型340的功能。该服务器的处理器410用于提供计算和控制能力,支撑整个服务器的运行。该服务器的存储器430中可存储有计算机可读指令,该计算机可读指令被处理器410执行时,可使得处理器410执行一种基于小波神经网络的交通流数据预测方法。该服务器的网络接口440用于与终端连接通信。本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的服务器的限定,具体的服务器可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,本申请还提出了一种存储有计算机可读指令的存储介质,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:根据确定的目标路段,将与所述目标路段直接连接的路段设为评估路段,并根据所述评估路段获取所述目标路段的交通流数据; 采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,根据迭代更新的次数,计算每个评估路段的适应度值,并对所述适应度值之间做比较,得到所有评估路段的最优适应度值;利用所述所有评估路段的最优适应度值计算得到连接权值,并根据所述连接权值得到所述小波神经网络构建的预测模型;将各个所述评估路段的交通流数据的测试样本输入所述预测模型,得到所述目标路段的交通流的预测数据。
综合上述实施例可知,本申请最大的有益效果在于:
本申请所提供的一种基于小波神经网络的交通流数据预测方法和装置,将对所述目标路段的交通流数据的预测转为与其直接连接的评估路段的交通流数据的预测,并以所述评估评估路段的交通流数据作为评估参数,利用粒子群算法对该评估参数对评估评估路段进行适应度值的计算,经过更新迭代计算和比较后,得到最优适应度值,并根据适应度函数求得对应的小波神经网络的预测模型的连接权值,最终得到小波神经网络构建的预测模型,并将测试样本输入至所述预测模型得到对所述目标路段的交通流的预测数据。本申请所提供的技术方案运用了粒子群算法得到小波神经网络的预测模型的连接权值,其运用了粒子群算法的全局搜索能力强、收敛速度快、参数配置少的特点,使得可快速收敛得到全局最优解,故利用粒子群算法得到的初始化小波神经网络参数训练出的小波神经网络交通流预测模型在对交通流进行预测时,可以达到提高预测速度和预测精度的目标。同时,本申请提供的预测方法和装置,由于全局搜索能力强,通过更新迭代后,能很好适应不同的交通流数据的数据样本,因此能根据不同时期不同时段的交通流数据进行预测,克服了现有技术中不能对长期的交通流量做出准确预测的问题。
在此基础上,本申请还对所述基于小波神经网络的交通流数据预测方法和装置的技术方案进行进一步的技术优化,将所述评估路段向所述目标路段的注入或疏导车流量划分为不同的评估参数,其分别为注入评估路段和疏导评估路段,并分别利用粒子群算法对所述注入评估路段和所述疏导评估路段进行训练,得到对应的小波神经网络构建的预测模型,并依据该预测模型分别对所述注入评估路段和所述疏导评估路段的交通流数据进行预测,根据向所述目标路段的交通流流向,最终得到所述目标路段的交通流的预测数据。这样,得到预测模型对所述目标路段的交通流数据的预测能力更加精准。
综上,本申请通过基于小波神经网络的交通流数据预测方法和装置,将利用粒子群算法对小波神经网络构建的预测模型进行训练,解决了现有 技术中不能对长期的交通流量做出准确预测的问题,同时也能提高预测模型的预测能力。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等存储介质,或随机存储记忆体(Random Access Memory,RAM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种基于小波神经网络的交通流数据预测方法,其特征在于,包括如下步骤:
    根据确定的目标路段,将与所述目标路段直接连接的路段设为评估路段,并根据所述评估路段获取所述目标路段的交通流数据;
    采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,根据迭代更新的次数,计算每个评估路段的适应度值,并对得到的所述适应度值进行比较,得到所有评估路段的最优适应度值;
    利用所述所有评估路段的最优适应度值计算得到连接权值,并根据所述连接权值得到所述小波神经网络构建的预测模型;
    将各个所述评估路段的交通流数据的测试样本输入所述预测模型,得到所述目标路段的交通流的预测数据。
  2. 根据权利要求1所述的方法,其特征在于:
    所述根据迭代更新的次数,计算每个评估路段的适应度值,并对得到的所述适应度值进行比较,得到所有评估路段的最优适应度值的步骤包括:
    获取每个评估路段在设定时间段的不同子时间段的部分历史交通流数据作为训练样本,并根据最大的迭代次数,对每个评估路段的所述训练样本进行更新,得到每个评估路段的更新后的适应度值;
    更新后的适应度值分别与全局最优适应度值与局部适应度值比较,得到所述所有评估路段的最优适应度值。
  3. 根据权利要求2所述的方法,其特征在于,
    根据每个评估路段的历史交通流数据进行繁忙等级划分,根据繁忙等级对所述评估路段分为不同的评估路段集;
    所述更新后的适应度值分别与全局最优适应度值与局部适应度值比较,得到所述所有评估路段的最优适应度值的步骤包括:
    根据更新后的每个评估路段集中的每个评估路段的适应度值进行比较,以每个评估路段集的最小适应度值作为对应评估路段集的局部最优适应度值;
    根据更新后的所有评估路段的适应度值进行比较,以所有评估路段的最小适应度值作为全局最优适应度值;
    将所述评估路段的适应度值与所述局部最优适应度值进行比较,得到第一较小值;
    根据所述第一较小值与所述全局最优适应度值进行比较,得到第二较小值,并以所述第二较小值作为最优适应度值。
  4. 根据权利要求3所述的方法,其特征在于:
    所述利用所述所有评估路段的最优适应度值计算得到连接权值,并根据所述连接权值得到所述小波神经网络构建的预测模型的步骤包括:
    利用适应度函数得到的最优适应度值对应的粒子位置向量;
    根据所述粒子位置向量得到所述预测模型的连接权值的最优解。
  5. 根据权利要求1所述的方法,其特征在于,
    所述评估路段可根据向所述目标路段注入车流量和疏导车流量,分设为注入评估路段和疏导评估路段;
    所述采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,计算每个评估路段的适应度值,对所述适应度值经过更新迭代和比较,得到所有评估路段的最优适应度值的步骤包括:采用粒子群算法,分别以每个所述注入评估路段和所述疏导评估路段的交通流数据为评估参数,并计算每个所述注入评估路段或所述疏导评估路段的适应度值;
    分别对所述注入评估路段的适应度值和所述疏导评估路段的适应度值进行更新迭代和比较,得到所有注入评估路段的最优适应度值和所有疏导评估路段的最优适应度值。
  6. 根据权利要求5所述的方法,其特征在于,
    所述将各个所述评估路段的测试样本的交通流数据输入所述预测模型,得到所述目标路段的交通流的预测数据的步骤包括:
    分别将各个注入评估路段和疏导评估路段的交通流数据的测试样本输入对应的预测模型,分别得到所述注入评估路段的交通流的预测数据和所述疏导评估路段的预测数据;
    根据所述注入评估路段的交通流的预测数据和所述疏导评估路段的交通流的预测数据,计算得到所述目标路段的交通流的预测数据。
  7. 根据权利要求1所述的方法,其特征在于,
    在所述采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,计算每个评估路段的适应度值,对所述适应度值经过更新迭代和比较,得到所有评估路段的最优适应度值的步骤之前,还包括:
    基于小波神经网络构建预测模型,分别根据经验值对连接权值、伸缩因子和平移因子进行初始化设置。
  8. 一种基于小波神经网络的交通流数据预测装置,其特征在于,包括:
    获取模块,用于根据确定的目标路段,将与所述目标路段直接连接的路段设为评估路段,并根据所述评估路段获取所述目标路段的交通流数据;
    迭代计算模块,用于采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,根据迭代更新的次数,计算每个评估路段的适应度值,并对所述 适应度值之间做比较,得到所有评估路段的最优适应度值;
    构建模块,用于利用所述所有评估路段的最优适应度值计算得到连接权值,并根据所述连接权值得到所述小波神经网络构建的预测模型;
    预测模块,用于将各个所述评估路段的交通流数据的测试样本输入所述预测模型,得到所述目标路段的交通流的预测数据。
  9. 根据权利要求8所述的装置,其特征在于:
    所述根据迭代更新的次数,计算每个评估路段的适应度值,并对得到的所述适应度值进行比较,得到所有评估路段的最优适应度值的步骤包括:
    获取每个评估路段在设定时间段的不同子时间段的部分历史交通流数据作为训练样本,并根据最大的迭代次数,对每个评估路段的所述训练样本进行更新,得到每个评估路段的更新后的适应度值;
    更新后的适应度值分别与全局最优适应度值与局部适应度值比较,得到所述所有评估路段的最优适应度值。
  10. 根据权利要求9所述的装置,其特征在于,
    根据每个评估路段的历史交通流数据进行繁忙等级划分,根据繁忙等级对所述评估路段分为不同的评估路段集;
    所述更新后的适应度值分别与全局最优适应度值与局部适应度值比较,得到所述所有评估路段的最优适应度值的步骤包括:
    根据更新后的每个评估路段集中的每个评估路段的适应度值进行比较,以每个评估路段集的最小适应度值作为对应评估路段集的局部最优适应度值;
    根据更新后的所有评估路段的适应度值进行比较,以所有评估路段的最小适应度值作为全局最优适应度值;
    将所述评估路段的适应度值与所述局部最优适应度值进行比较,得到第一较小值;
    根据所述第一较小值与所述全局最优适应度值进行比较,得到第二较小值,并以所述第二较小值作为最优适应度值。
  11. 根据权利要求10所述的装置,其特征在于:
    所述利用所述所有评估路段的最优适应度值计算得到连接权值,并根据所述连接权值得到所述小波神经网络构建的预测模型的步骤包括:
    利用适应度函数得到的最优适应度值对应的粒子位置向量;
    根据所述粒子位置向量得到所述预测模型的连接权值的最优解。
  12. 根据权利要求8所述的装置,其特征在于,
    所述评估路段可根据向所述目标路段注入车流量和疏导车流量,分设为注入评估路段和疏导评估路段;
    所述采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,计算每个评估路段的适应度值,对所述适应度值经过更新迭代和比较,得到所有评估路段的最优适应度值的步骤包括:采用粒子群算法,分别以每个所述注入评估路段和所述疏导评估路段的交通流数据为评估参数,并计算每个所述注入评估路段或所述疏导评估路段的适应度值;
    分别对所述注入评估路段的适应度值和所述疏导评估路段的适应度值进行更新迭代和比较,得到所有注入评估路段的最优适应度值和所有疏导评估路段的最优适应度值。
  13. 根据权利要求12所述的装置,其特征在于,
    所述将各个所述评估路段的测试样本的交通流数据输入所述预测模型,得到所述目标路段的交通流的预测数据的步骤包括:
    分别将各个注入评估路段和疏导评估路段的交通流数据的测试样本输入对应的预测模型,分别得到所述注入评估路段的交通流的预测数据和所述疏导评估路段的预测数据;
    根据所述注入评估路段的交通流的预测数据和所述疏导评估路段的交通流的预测数据,计算得到所述目标路段的交通流的预测数据。
  14. 根据权利要求8所述的装置,其特征在于,
    在所述采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,计算每个评估路段的适应度值,对所述适应度值经过更新迭代和比较,得到所有评估路段的最优适应度值的步骤之前,还包括:
    基于小波神经网络构建预测模型,分别根据经验值对连接权值、伸缩因子和平移因子进行初始化设置。
  15. 一种服务器,其特征在于,包括:
    一个或多个处理器;
    存储器;
    一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个计算机程序配置用于执行以下步骤:
    根据确定的目标路段,将与所述目标路段直接连接的路段设为评估路段,并根据所述评估路段获取所述目标路段的交通流数据;
    采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,根据迭代更新的次数,计算每个评估路段的适应度值,并对得到的所述适应度值进行比较,得到所有评估路段的最优适应度值;
    利用所述所有评估路段的最优适应度值计算得到连接权值,并根据所述连 接权值得到所述小波神经网络构建的预测模型;
    将各个所述评估路段的交通流数据的测试样本输入所述预测模型,得到所述目标路段的交通流的预测数据。
  16. 根据权利要求15所述的服务器,其特征在于,所述根据迭代更新的次数,计算每个评估路段的适应度值,并对得到的所述适应度值进行比较,得到所有评估路段的最优适应度值时,所述一个或多个计算机程序被配置用于执行以下步骤:
    获取每个评估路段在设定时间段的不同子时间段的部分历史交通流数据作为训练样本,并根据最大的迭代次数,对每个评估路段的所述训练样本进行更新,得到每个评估路段的更新后的适应度值;
    更新后的适应度值分别与全局最优适应度值与局部适应度值比较,得到所述所有评估路段的最优适应度值。
  17. 根据权利要求16所述的服务器,其特征在于,根据每个评估路段的历史交通流数据进行繁忙等级划分,根据繁忙等级对所述评估路段分为不同的评估路段集;
    所述更新后的适应度值分别与全局最优适应度值与局部适应度值比较,得到所述所有评估路段的最优适应度值时,所述一个或多个计算机程序被配置用于执行以下步骤:
    根据更新后的每个评估路段集中的每个评估路段的适应度值进行比较,以每个评估路段集的最小适应度值作为对应评估路段集的局部最优适应度值;
    根据更新后的所有评估路段的适应度值进行比较,以所有评估路段的最小适应度值作为全局最优适应度值;
    将所述评估路段的适应度值与所述局部最优适应度值进行比较,得到第一较小值;
    根据所述第一较小值与所述全局最优适应度值进行比较,得到第二较小值,并以所述第二较小值作为最优适应度值。
  18. 根据权利要求17所述的服务器,其特征在于,所述利用所述所有评估路段的最优适应度值计算得到连接权值,并根据所述连接权值得到所述小波神经网络构建的预测模型时,所述一个或多个计算机程序被配置用于执行以下步骤:
    利用适应度函数得到的最优适应度值对应的粒子位置向量;
    根据所述粒子位置向量得到所述预测模型的连接权值的最优解。
  19. 根据权利要求15所述的服务器,其特征在于,所述评估路段可根据向所述目标路段注入车流量和疏导车流量,分设为注入评估路段和疏导评估路段;
    所述采用粒子群算法,以每个所述评估路段的交通流数据为评估参数,计算每个评估路段的适应度值,对所述适应度值经过更新迭代和比较,得到所有评估路段的最优适应度值时,所述一个或多个计算机程序被配置用于执行以下步骤:
    采用粒子群算法,分别以每个所述注入评估路段和所述疏导评估路段的交通流数据为评估参数,并计算每个所述注入评估路段或所述疏导评估路段的适应度值;
    分别对所述注入评估路段的适应度值和所述疏导评估路段的适应度值进行更新迭代和比较,得到所有注入评估路段的最优适应度值和所有疏导评估路段的最优适应度值。
  20. 一种计算机非易失性可读存储介质,其特征在于,所述计算机非易失性可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现权利要求1-7任一项所述的基于小波神经网络的交通流数据预测方法。
PCT/CN2019/117353 2019-08-15 2019-11-12 基于小波神经网络的交通流数据预测方法和装置 WO2021027139A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910755550.7A CN110543978A (zh) 2019-08-15 2019-08-15 基于小波神经网络的交通流数据预测方法和装置
CN201910755550.7 2019-08-15

Publications (1)

Publication Number Publication Date
WO2021027139A1 true WO2021027139A1 (zh) 2021-02-18

Family

ID=68711447

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117353 WO2021027139A1 (zh) 2019-08-15 2019-11-12 基于小波神经网络的交通流数据预测方法和装置

Country Status (2)

Country Link
CN (1) CN110543978A (zh)
WO (1) WO2021027139A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866481A (zh) * 2022-04-29 2022-08-05 西安交通大学 空天地一体化网络的基于混沌动态拥塞预测的时变重路由方法和系统
CN115577618A (zh) * 2022-09-21 2023-01-06 中国南方电网有限责任公司超高压输电公司大理局 高压换流阀厅环境因子预测模型构建方法与预测方法
CN117541083A (zh) * 2024-01-09 2024-02-09 青岛理工大学 疏散平台疏散能力的预测方法和装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115158094A (zh) * 2022-08-02 2022-10-11 重庆大学 基于长短期soc规划的插电式混合动力汽车能量管理方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104464291A (zh) * 2014-12-08 2015-03-25 杭州智诚惠通科技有限公司 一种交通流量预测方法和系统
US20160292999A1 (en) * 2015-03-31 2016-10-06 Here Global B.V. Method and apparatus for providing dynamic strength decay for predictive traffic
CN107085941A (zh) * 2017-06-26 2017-08-22 广东工业大学 一种交通流预测方法、装置及系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103397A (zh) * 2017-06-26 2017-08-29 广东工业大学 一种基于蝙蝠算法的交通流预测方法、装置及系统
CN108091135B (zh) * 2017-12-12 2021-01-19 重庆师范大学 基于优化小波神经网络的停车泊位多步预测方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104464291A (zh) * 2014-12-08 2015-03-25 杭州智诚惠通科技有限公司 一种交通流量预测方法和系统
US20160292999A1 (en) * 2015-03-31 2016-10-06 Here Global B.V. Method and apparatus for providing dynamic strength decay for predictive traffic
CN107085941A (zh) * 2017-06-26 2017-08-22 广东工业大学 一种交通流预测方法、装置及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LI CHUNGUI, XU SHU-AN ,YAN XIANG-LEI ,WEN XIN ,ZHANG ZENG-FANG: "Traffic Flow Forecasting Based on the Wavelet Neural Network with Particle Swarm Optimization Algorithm", JOURNAL OF GUANGXI UNIVERSITY OF TECHNOLOGY (NATURAL SCIENCE), vol. 3, 1 January 2010 (2010-01-01), pages 23 - 27, XP055781219, DOI: 10.16375/j.cnki.cn45-1395/t.2010.03.017 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866481A (zh) * 2022-04-29 2022-08-05 西安交通大学 空天地一体化网络的基于混沌动态拥塞预测的时变重路由方法和系统
CN115577618A (zh) * 2022-09-21 2023-01-06 中国南方电网有限责任公司超高压输电公司大理局 高压换流阀厅环境因子预测模型构建方法与预测方法
CN115577618B (zh) * 2022-09-21 2024-04-09 中国南方电网有限责任公司超高压输电公司大理局 高压换流阀厅环境因子预测模型构建方法与预测方法
CN117541083A (zh) * 2024-01-09 2024-02-09 青岛理工大学 疏散平台疏散能力的预测方法和装置

Also Published As

Publication number Publication date
CN110543978A (zh) 2019-12-06

Similar Documents

Publication Publication Date Title
WO2021027139A1 (zh) 基于小波神经网络的交通流数据预测方法和装置
CN109902801B (zh) 一种基于变分推理贝叶斯神经网络的洪水集合预报方法
Li et al. Prediction for tourism flow based on LSTM neural network
CN109816095B (zh) 基于改进门控循环神经网络的网络流量预测方法
WO2019237440A1 (zh) 一种分位数概率性短期电力负荷预测集成方法
CN110149237B (zh) 一种Hadoop平台计算节点负载预测方法
CN108399748B (zh) 一种基于随机森林与聚类算法的道路旅行时间预测方法
WO2021027153A1 (zh) 交通流数据分析模型的构建方法和装置
CN107016464B (zh) 基于动态贝叶斯网络的威胁估计方法
CN109299812B (zh) 一种基于深度学习模型和knn实时校正的洪水预测方法
CN109242140A (zh) 一种基于LSTM_Attention网络的交通流预测方法
CN106022954B (zh) 基于灰色关联度的多重bp神经网络负荷预测方法
CN111612243A (zh) 交通速度预测方法、系统及存储介质
CN107886160B (zh) 一种bp神经网络区间需水预测方法
CN115564114B (zh) 一种基于图神经网络的空域碳排放短期预测方法及系统
CN113672865A (zh) 一种基于深度图高斯过程的交通流量预测方法
CN108280998A (zh) 基于历史数据动态选择的短时交通流预测方法
CN112766603A (zh) 一种交通流量预测方法、系统、计算机设备及存储介质
WO2022198947A1 (zh) 密接人群识别方法、装置、电子设备及存储介质
CN114399235B (zh) 一种基于雨情数据判定灾害风险等级的方法及系统
Madhiarasan et al. Analysis of artificial neural network performance based on influencing factors for temperature forecasting applications
CN112036598A (zh) 一种基于多信息耦合的充电桩使用信息预测方法
CN113035348A (zh) 一种基于gru特征融合的糖尿病诊断方法
CN116599886A (zh) 一种基于深度强化学习的网络全覆盖路径集选择方法
CN116502709A (zh) 一种异质性联邦学习方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19941579

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19941579

Country of ref document: EP

Kind code of ref document: A1