A self-construction method of deep fuzzy model for traffic path cognition

By self-constructing a deep fuzzy model through the improved Wang-Mendel algorithm and combining the spatiotemporal, periodic and external dependency characteristics, the problem of low interpretability in the traffic path cognition system is solved, and high-performance and highly interpretable traffic path cognition is achieved, which is suitable for a variety of traffic scenarios.

CN116227537BActive Publication Date: 2025-09-23HUNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310139505.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-20
Publication Date
2025-09-23
Estimated Expiration
2043-02-20

AI Technical Summary

Technical Problem

Existing traffic path recognition systems find it difficult to improve interpretability while maintaining accuracy. In particular, the black-box nature of deep learning models leads to low interpretability in traffic scenarios, and traditional statistical models are unable to effectively capture the complexity of traffic data.

Method used

The improved Wang-Mendel algorithm is used to adaptively extract fuzzy rules. The characteristics of spatiotemporal dependency, periodicity and external dependency are combined to construct a deep fuzzy model. Fuzzy theory is used to achieve highly interpretable traffic path cognition, and the A* algorithm is combined for path planning.

Benefits of technology

While maintaining the performance of the deep learning model, the model's interpretability and flexibility are improved, the model results can be effectively tracked, and it is applicable to a variety of traffic scenarios. It solves the dilemma between performance and interpretability and improves the credibility of traffic path cognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116227537B_ABST
    Figure CN116227537B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for self-constructing a deep fuzzy model for traffic path cognition. Traffic data is organized into spatiotemporal data, periodic data, and external data. The use of processed input data can improve the overall performance of the model, solving the problem that traditional statistical-based methods cannot extract deep information of multiple characteristic attributes. While maintaining excellent performance in the field of intelligent traffic path cognition, it is highly interpretable and flexible, solving the problem of low interpretability of traditional deep neural networks in the field of traffic path cognition and promoting the practical application process of traffic path cognition models. The present invention uses an improved Wang-Mendel algorithm to extract fuzzy rules from data. The extracted fuzzy rules greatly improve the interpretability of the model, reduce the number of generated fuzzy rules, improve the performance of the algorithm when facing high-dimensional problems, and significantly shorten the training time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for self-constructing a deep fuzzy model for traffic path cognition, and belongs to the technical field of intelligent transportation and artificial intelligence. Background Art

[0002] In recent years, traffic problems have become increasingly severe. Improving public understanding of traffic phenomena to effectively alleviate congestion and improve driving safety is an urgent issue. Currently, traffic path cognition has become a cutting-edge field in contemporary science and technology. Many countries are committed to researching intelligent traffic path cognition systems that integrate information technology, sensor technology, and artificial intelligence to alleviate traffic problems. Intelligent traffic path cognition systems aim to improve public understanding of traffic phenomena by extracting key features from traffic data and interpretably analyzing, analyzing, and predicting various traffic conditions. Their architecture consists of three layers. The first layer is the data collection layer, which collects traffic data through sensors such as radar and cameras. The second layer is the cognition layer, which serves as the core of the system and conducts further analysis and inference, mining the hidden information in traffic data and extracting it into key features in an interpretable manner. The final layer is the application layer, which applies the extracted key features in various scenarios to enhance public understanding of traffic scenarios and thus assist in decision-making. Traffic path cognition encompasses a variety of application scenarios, such as traffic flow prediction, traffic speed prediction, travel route planning, driving behavior analysis, decision-making based on traffic perception, and traffic decision support.

[0003] Although numerous researchers have devoted themselves to developing traffic path recognition systems and proposed various models, the interpretability of these systems remains an unresolved issue. Currently, traffic path recognition methods fall into two main categories: statistical methods and deep learning-based methods. Traditional statistical methods extract traffic patterns from traffic data and use them to guide traffic path recognition. However, due to the oversimplification of statistical models and the complexity and variability of traffic scenarios, these methods suffer from poor recognition performance. With the rapid development of deep learning, an increasing number of researchers are using deep neural network models, such as long short-term memory networks, convolutional neural networks, and graph convolutional neural networks, to capture the spatiotemporal characteristics of traffic data for traffic path recognition. These models have achieved remarkable performance. However, due to the "black box" nature of deep learning, the interpretability of these models is very low. Their superior performance comes at the expense of high model complexity, and their results are often untraceable by humans. Furthermore, the high security requirements placed on models in the transportation sector make these models difficult to trust. Furthermore, because traffic systems are complex, nonlinear, strongly coupled, and pan-spatiotemporal systems, traffic scenarios are difficult for humans to understand, making traffic path recognition challenging. Improving the interpretability of traffic path recognition methods while ensuring their accuracy is a challenge. Fortunately, many studies have proposed different methods for interpretability analysis of deep neural networks. Some of these methods, such as fuzzy neural networks, stand out due to the high interpretability of fuzzy theory. This paper proposes a method for self-constructing a deep fuzzy model based on fuzzy neural networks for traffic path recognition. This method maintains similar performance to deep learning models while also being highly interpretable, resolving the performance-interpretability dilemma in traffic path recognition.

[0004] During the experiment, the present invention extracted information from the Beijing taxi dataset and the New York taxi dataset, and adaptively generated fuzzy rules for traffic prediction and traffic path cognition, which greatly improved the flexibility and applicability of the model. Moreover, the generated fuzzy rule base can be understood by researchers, which enables the model results to be tracked, thereby improving the model's traffic path cognition ability. In addition, Wang Lixin and Mendel proposed the Wang-Mendel method for extracting fuzzy rules from data. However, this method does not take into account the differences in data between different regions, so it generates many redundant rules. In order to address the limitations of the Wang-Mendel method, the present invention improves the Wang-Mendel method based on the differences in data in different data segments, so that it has better performance and faster training speed when facing high-dimensional problems. Summary of the Invention

[0005] To solve the above problems, the present invention proposes a deep fuzzy model self-construction method for traffic path cognition.

[0006] The principle of the present invention is that the designed self-constructed deep fuzzy model uses the improved Wang-Mendel algorithm to adaptively extract fuzzy rules from the data, wherein the self-constructed fuzzy rules can greatly improve the flexibility and interpretability of the model. At the same time, the model also has excellent performance comparable to the deep learning model, solving the dilemma between performance and interpretability in traffic path cognition. In addition, the improved Wang-Mendel algorithm has better performance and shorter training time when facing high-dimensional problems. Based on the three characteristics of spatiotemporal dependence, periodicity and external dependence of traffic data, the present invention fully explores the relationship between the effects of multiple features on traffic data, and uses fuzzy theory to achieve highly interpretable traffic path cognition. Finally, the key descriptive features of path cognition are constructed in combination with the predicted traffic data, based on which path planning based on the A* algorithm is carried out, making full use of the information carried by the predicted traffic data.

[0007] The technical solution of the present invention comprises the following steps:

[0008] Step 1.1, an input data processing algorithm for self-built deep blur model:

[0009] These include processing algorithms for spatiotemporal data describing the relationships between traffic scene regions, periodic data describing the temporal periodicity of traffic scenes, external data describing weather, holidays, and weekdays, and an improved Wang-Mendel algorithm for adaptively extracting fuzzy rules from data;

[0010] Step 1.2, a self-built deep blur model structure design, including four parts:

[0011] The first part is the spatiotemporal module, which can effectively extract the spatiotemporal dependencies between traffic data in different areas and express them as spatiotemporal data;

[0012] The second part is the periodic module, which extracts periodic dependencies from traffic data at three different time intervals: weekly, daily, and hourly, and presents them as periodic data;

[0013] The third part is the external module, which contains holiday data, weekend data and weather data of different regions. These data are collectively referred to as external data.

[0014] The output data of the first, second and third parts will be concatenated into the total feature data and input into the network of the fourth part;

[0015] The fourth part is a self-constructed deep fuzzy model that is built layer by layer. Its input is the total feature data. The network uses the improved Wang-Mendel algorithm to reason and learn fuzzy rules on the feature data, thereby self-constructing the network structure.

[0016] Step 1.3: training the self-built deep fuzzy model, including setting up the corresponding training data and training environment to train the model; Step 1.4: conducting a traffic path recognition experiment based on the trained model;

[0017] Step 1.5: Construct key descriptive features of path cognition based on the results of the traffic path cognition experiment;

[0018] Step 1.6: Perform traffic route planning based on key description features of path cognition.

[0019] The input data processing algorithm in step 1.1 is specifically defined as follows:

[0020] 1.1.1 Historical and predicted traffic data for all areas of the predicted traffic scenario:

[0021] The predicted scenario city is divided into an I×J grid map based on longitude and latitude, where I is the number of map rows and J is the number of map columns. Each grid represents an area, and the position of the grid is described using (i, j). The (i, j) grid represents the grid in the i-th row and j-th column of the map, where 0≤i≤I-1 and 0≤j≤I-1. The historical traffic data consists of traffic data from T historical time steps:

[0022] in is a tensor of shape T×I×J×2, representing the total historical traffic data, P t represents the historical traffic data of time step t, 1≤t≤T, is a set of real numbers, P t The specific form is:

[0023]

[0024] in represents the vehicle inflow and outflow of the (i, j) grid at time t, which is specifically defined as: Card means to find the number of elements in the collection.

[0025] in g represents vehicle, That is, the set of vehicles that are not in the (i, j) grid at time t-1, but enter the (i, j) grid at time t; That is, the set of vehicles that are in the (i, j) grid at time t-1 and leave the (i, j) grid at time t;

[0026] 1.1.2 Spatiotemporal data describing spatiotemporal dependencies:

[0027] For the inflow of grid (i, j) at time t Its inflow at time t usually comes from the outflow of nearby grids, while its outflow comes from the inflow of nearby grids; by calculating the sum of the outflow of its neighboring and distant neighboring grids at the previous s time To reflect the spatiotemporal dependency of traffic data:

[0028]

[0029] Where (i neighbor1 ,j neighbor1 ) satisfies i neighbor1 =i±1 or j neighbor1 =j±1, representing the eight grids adjacent to the (i, j) grid,

[0030] (i neighbor2 ,j neighbor2 ) satisfies i neighbor2 =i±2 or j neighbor2 =j±2, representing the sixteen grids that are one circle apart from the (i, j) grid.

[0031] In an I×J grid map, some grids at the edge of the map may have neighboring grids or distant neighboring grids that do not exist. In this case, the inflow and outflow of the neighboring grid or distant neighboring grid are set to 0;

[0032] For the predicted The spatiotemporal data module will output 2×s data, where s is a custom parameter, namely:

[0033]

[0034] If you want to predict The spatiotemporal data module will output the corresponding 2×s data, which is:

[0035]

[0036] 1.1.3 Cycle data describing cycle dependencies:

[0037] Traffic data is time series data, and the results of traffic path recognition are affected by data from adjacent times. Traffic data also exhibits significant weekly and daily periodicity. Based on the above analysis, we collect three types of data from traffic data: proximity, cycle, and trend, to reflect the cyclical characteristics of traffic data.

[0038] For prediction The network selects the inflow data of the latest c moments, that is, To extract its neighboring dependency features; select the inflow data at the same time in the last p days, that is To extract its day cycle dependent features, where T pRepresents the time of day; select the inflow data of the same time in the last q weeks, that is To extract its cycle-dependent features, where T q Represents the number of hours in a week. c, p, and q are all custom parameters. If you want to predict Then change the above inflow data to the corresponding outflow data;

[0039] 1.1.4 External data describing external dependencies:

[0040] In addition to traffic data, select some external data; use isH t Indicates whether time t is a holiday, isW t Indicates whether time t is a working day, where isH t ,isW t When it is 1, it means the corresponding time is a holiday or a weekday, and when it is 0, it means it is not a holiday or a weekend;

[0041] At the same time, since the time of the traffic peak in a day is usually fixed, the traffic data is closely related to the sample timestamp, so the time t Indicates the position of time t in a day. If there are 24 samples in a day, then time t An integer value between 1 and 24.

[0042] The improved Wang-Mendel algorithm for self-constructing the model structure in step 1.2 is specifically defined as follows: The Wang-Mendel algorithm was proposed by Wang Lixin and Mendel in 1992 and improved by Wang Lixin in 2003. This method was first used to extract rules from data as a rule base for fuzzy systems. The advantage of this method is that it only needs to use data once, which makes it much shorter than the training time of iterative algorithms. However, the dimensional membership function generated by this method is uniform, and it does not take into account the differences in data in different data segments. Therefore, when faced with high-dimensional problems, this method will be difficult to sustain due to the explosion in the number of rules. The membership function generation method of the Wang-Mendel algorithm has been improved so that the membership functions generated in different data segments are different, thereby greatly reducing the number of rules generated by the algorithm and significantly shortening the training time. Therefore, the improved Wang-Mendel algorithm can extract fuzzy rules from data more efficiently.

[0043] The membership function generation method of the Wang-Mendel algorithm in step 1.2 is improved so that the membership functions generated in different data segments are different. The improved Wang-Mendel algorithm for training fuzzy neural networks includes the following steps: Step 1.2.1: Given N input-output data pairs:

[0044] [x1(k),x2(k),…,x n(k); y(k)],

[0045] where k∈1,2,…,N,x1(k),x2(k),…,x n (k) is the n-dimensional input of the k-th data, y(k) is the output of the k-th data; for each input dimension x i Determine a preset membership function partition number, expressed as m i ; This preset value is related to the physical meaning of the input dimension. The more complex the input dimension, the larger the value should be set.

[0046] Step 1.2.2: Get the input variable x for each dimension of N data from the training data i The maximum value of max x i and the minimum value min x i , and the data segment [min x i ,max x i ] is divided equally into m i -1 block data segment:

[0047] [x1,x2],…,[x mi-1 ,x mi ],

[0048] where x1 = min x i , x mi =max x i ; Calculate the variance of the output y(k) corresponding to the sample in each data segment, recorded as MSE j (y),

[0049] where j = 1, 2…m i -1; Note:

[0050] MSE′(y)=minMSE j (y)+k×(maxMSE j (y)-minMSE j (y)),

[0051] where maxMSE j (y), minMSE j (y) are MSE j The maximum and minimum values ​​in (y), k is a custom parameter, 0 <k<1;

[0052] Step 1.2.3: For the number of partitions m i Satisfy m i >m′ dimension, where m′ is a custom parameter, and pruning is performed on it: starting from the first data segment [x1, x2], all data segments are traversed sequentially. If the current traversed data segment is [x a ,xb , followed immediately by the un-traversed data segment [x b , x c , and satisfying:

[0053] MSE ab (y) < MSE′(y), MSE bc (y) < MSE′(y) and then the data segment [x a , x b and the data segment [x b , x c are merged into the data segment [x a , x c and continue to examine whether the next data segment can be merged. After merging:

[0054]

[0055] where MSE ab (y), MSE bc (y) and MSE ac (y) are the variances corresponding to the outputs of the data segments [x a , x b , [x b , x c and [x a , x c respectively. z′ is a user-defined parameter, meaning that the length of the merged data segment is at most z′ times that of the original data segment. If the condition is not satisfied, then continue to traverse the next data segment until all data segments have been traversed;

[0056] Step 1.2.4: For each merged data segment, construct a triangular membership function with the center of the data segment as the vertex of the membership function and the centers of adjacent data segments as the endpoints of the membership function. For the two data segments at the edges, the left endpoint and the right endpoint of their corresponding membership functions are taken as -∞ and +∞ respectively;

[0057] After construction, q i membership functions will be obtained, denoted by , where 1 ≤ j i ≤ q i ; each membership function represents a semantics, denoted by ;

[0058] Step 1.2.5: Maintain a rule space with a size of Use (j1, j2, …, j n ) to represent a certain rule in the rule space, where j i (1 ≤ i ≤ n) represents that this rule corresponds to the j i in the i-th dimensional rule space.Membership function. Each space will save a rule successor parameter The corresponding rules are:

[0059]

[0060] Translated into Chinese:

[0061] If x1 is And x2 is …and x n yes Then y is

[0062] Step 1.2.6: Traverse all data, whenever a pair of data [x1(k),x2(k),…,x n (k); y(k)] arrives, according to:

[0063]

[0064] To calculate the activation strength of each rule And save the corresponding activation intensity for the rule with the largest activation intensity With the output y k If a rule has at least one rule strength after N training data, then the subsequent parameter of the rule

[0065] Step 1.2.7: For the rule that does not obtain the successor parameter in step 1.2.6, obtain its successor parameter from its neighboring rules. Its successor parameter is equal to the arithmetic mean of the successor parameters of its neighboring rules that have successor parameters. Repeat this step until all rules in the rule space have obtained the successor parameters. The rule (j1, j2, ..., j n ) and (j′1,j′2,…,j′ n ) is a necessary and sufficient condition for the neighbor rule to exist and only have one r∈1,2,…,n such that j r =j′ r +1 or j r =j′ r -1;

[0066] Step 1.2.8: At this point, the fuzzy neural network training is completed. For the trained fuzzy neural network, use the formula:

[0067] To calculate the output.

[0068] The self-constructed fuzzy rule base greatly improves the interpretability of the model. The results of model-guided predictions or analyses can all find corresponding rules in the rule base, which provides researchers with the ability to track model results. Therefore, this method provides a guarantee for the high interpretability of the present invention in traffic path cognition problems.

[0069] The training data and training environment in step 1.3 are set as follows:

[0070] Use real traffic data as the dataset for model training, such as the public datasets - Beijing Taxi Dataset and New York Taxi Dataset, and divide them into training set and test set according to a certain ratio; customize the parameter m Time =30,m Spatial =30,m is_h =2,m is_w =2,m time =24,m weather =4,m L =30, (L≥2), m′=5, k=0.75, where m Time and m Spatial is the number of initial membership function divisions of the time-related module and the space-related module in the spatiotemporal module, m is_h 、m is_w 、m time and m weather The number of initial membership function divisions corresponding to external data "whether it is a holiday", "whether it is a weekend", timestamp and weather data, m L is the number of initial membership function partitions above the second layer, m′ is the pruning threshold, if the number of initial membership function partitions exceeds this number, pruning is required, and k is the merging threshold.

[0071] In step 1.5, the key descriptive features of path cognition are constructed using the traffic path cognition experiment results:

[0072] First calculate the arithmetic mean of inflow and outflow The calculation formula is Used to indicate traffic flow level; calculate the difference between inflow and outflow, Δx, using the formula Δx = x in -x out , used to reflect the vehicle accumulation trend in the area; average flow rate It can well characterize the traffic flow level in the area at the current moment. Generally, the larger its value, the longer it takes for vehicles to pass through the area. The vehicle cumulative trend Δx can characterize the traffic flow level in the area at future moments. Generally, the longer the time, the greater its impact.

[0073] In step 1.6, traffic route planning is performed based on the key description features of route cognition:

[0074] Based on the A* algorithm (a classic path planning algorithm in the prior art), three variables {F, G, H} are defined for each region, where F represents the comprehensive priority of the region, and F = G + H. G represents the cost from the starting region to the current region, and H represents the estimated cost from the current region to the target region.

[0075] In the present invention, the regional key description features are used to calculate G, and the specific formula is: H is calculated using the Chebyshev distance. The distance between a region and its eight adjacent regions is defined as λ3. The Chebyshev distance between the (i1, j1) grid and the (i2, j2) grid is max(|i1-i2|,|j1-j2|)×λ3. G′ is the G value of the parent region of the current region. λ1, λ2, and λ3 are custom parameters whose actual values ​​vary depending on the scenario.

[0076] The beneficial effects of the present invention are:

[0077] (1) The deep fuzzy model self-construction method for traffic path cognition proposed in this invention utilizes fuzzy theory. It can maintain excellent performance in the field of intelligent traffic path cognition while being highly interpretable. It solves the problem of low interpretability of traditional deep neural networks in the field of traffic path cognition, greatly improves the credibility of the model, and promotes the practical application process of the traffic path cognition model.

[0078] (2) The input data processing algorithm proposed in the present invention, including processing algorithms for spatiotemporal data, periodic data and external data, can effectively extract the three characteristics of traffic data: spatiotemporal dependence, periodicity and external data dependence. This can effectively combat the high complexity of the traffic flow prediction problem. The use of processed input data can improve the overall performance of the model and solve the problem that traditional statistical-based methods cannot extract deep information of multiple feature attributes.

[0079] (3) This paper uses an improved Wang-Mendel algorithm to extract fuzzy rules from data. The fuzzy rules extracted by the improved Wang-Mendel algorithm greatly improve the flexibility and interpretability of the model, provide researchers with the ability to track model results, and make the method applicable to a variety of fields. In addition, the improved Wang-Mendel algorithm has fewer rules than the ordinary Wang-Mendel algorithm, and has better performance and shorter training time when facing high-dimensional problems.

[0080] (4) The present invention extracts key descriptive features of path recognition from the results of traffic path recognition experiments and performs path planning based on these key descriptive features. This method fully considers the interaction between the traffic flow level and the cumulative flow trend in the target area, and based on this, performs path planning based on the A* algorithm, fully utilizing the information contained in the predicted traffic data.

[0081] (5) This paper provides a specific training method and related hyperparameters for the self-construction of the deep fuzzy model, as well as details of the internal structure of the network. This ensures the efficiency and accuracy of model training and effectively avoids underfitting and overfitting during model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 This is a patent structure diagram.

[0083] Figure 2 This is a diagram of the self-built deep blur model structure.

[0084] Figure 3 The following diagrams show three data organization methods.

[0085] Figure 4 This is the structure diagram of the fuzzy neural network.

[0086] Figure 5 Flowchart of path planning for path recognition applications. DETAILED DESCRIPTION

[0087] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion about the concepts of the present invention. In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other. The present invention will be described in more detail below with reference to the accompanying drawings.

[0088] The following is combined with Figures 1 to 5 The preferred embodiment of the present invention is further described. Figure 1 As shown, the specific steps include:

[0089] Step 1: Model input data processing

[0090] Before model training, data needs to be processed into a specific form. After data processing, traffic data will be obtained into spatiotemporal data and cycle data. These two parts of data will be integrated with external data as the input of the self-built deep fuzzy model. Figure 3 As shown, they are introduced below.

[0091] (1) Traffic data:

[0092] The original traffic data has two tables, one is a four-dimensional table, each row is a data sampling point, and the sampling data in is the set of real numbers, represents the vehicle inflow and outflow of the (i, j) grid at time t, which is specifically defined as: card means to find the number of elements in the set, where g represents vehicle, That is, the set of vehicles that are not in the (i, j) grid at time t-1, but enter the (i, j) grid at time t; That is, the set of vehicles that are in the (i, j) grid at time t-1 and leave the (i, j) grid at time t; the other is a one-dimensional table, and the data is the specific time of the corresponding data in the first table;

[0093] The two datasets used are the Beijing Taxi Dataset and the New York Taxi Dataset. The Beijing Taxi Dataset is a dataset of Beijing taxis, with a grid size of 32×32, a time period of four periods from July 2013 to April 2016, a sampling frequency of 30 minutes, and a total number of samples of 22,459. The New York Taxi Dataset is a dataset of New York taxis, with a grid size of 15×5, a time period of continuous time from January 2014 to December 2014, a sampling frequency of 30 minutes, and a total number of samples of 17,520.

[0094] For each sample in the Beijing taxi dataset, we select the data of the previous c = 4 moments as its neighboring data, the data of the previous p = 1 day as its periodic data, and the data of the previous q = 1 week as its trend data. If the above data of the sample is incomplete, we ignore this sample point. At the same time, we select the data of the neighboring nodes within two circles around the sample point as its spatiotemporal data. Specifically, we take the inflow / outflow of the data of the nearest 8 neighboring grids as the sum of the inflow / outflow The sum of the inflow / outflow of 16 grids with an interval of 1 grid is taken as If the above neighbor grid is beyond the sample map, the data is taken as 0; for each sample in the New York taxi dataset, the data before c = 8 moments are selected as its neighboring data, the data before p = 1 day is selected as its periodic data, and the data before q = 1 week is selected as its trend data. If the above data of the sample is incomplete, the sample point is ignored. Similarly, the data before s = 2 moments of the neighbor nodes within a circle around the sample point are selected as its spatiotemporal data. The specific method is to remove the inflow / outflow of the data of the nearest 8 neighbor grids and take it as the trend data. If the neighbor grid is beyond the sample map, the data is set to 0;

[0095] in, (i neighbor1 ,j neighbor1 ) satisfies i neighbor1 =i±1 or jneighbor1 =j±1, representing the eight grids adjacent to the (i,j) grid, (i neighbor2 ,j neighbor2 ) satisfies i neighbor2 =i±2 or j neighbor2 =j±2, representing the sixteen grids that are one circle apart from the (i, j) grid. That is, the sum of the outflow of the eight grids adjacent to the (i, j) grid at time t, That is, the sum of the outflow of the sixteen grids separated by one circle from the (i, j) grid at time t; and is the sum of the corresponding inflows.

[0096] (2) External data:

[0097] In addition to traffic data, some external data are also selected as the input of this model. t Indicates whether time t is a holiday, isW t Indicates whether time t is a working day, where isH t ,isW t When it is 1, it means the corresponding time is a holiday or a weekday, and when it is 0, it means it is not a holiday or a weekend;

[0098] The Beijing taxi dataset has weather data, which has 17 data points. They are mapped to numbers 0 to 16 and are represented by Weather. t represents the weather at time t. For the New York taxi dataset, do the same process;

[0099] At the same time, since the time of the traffic peak in a day is usually fixed, the traffic data is closely related to the sample timestamp, so the time t Indicates the timestamp at time t. For the Beijing taxi dataset, there are 48 samples per day, time t The value range is 1 to 48. The same process is performed on the New York taxi dataset.

[0100] Step 2: Build the model

[0101] (1) Overall structure of the model:

[0102] After the input traffic data is processed into specific spatiotemporal data, periodic data and external data in the data processing part, the data will be input into the self-built deep fuzzy model according to a certain rule. The traffic data is first divided into spatiotemporal data and periodic data, and a sliding window of size 2 is used to map these two types of data to the first layer of the self-built deep fuzzy neural network. At the same time, the external data at the corresponding moment is embedded into the first layer of the self-built deep fuzzy neural network. Finally, a sliding window of size 3 is used to build the deep fuzzy neural network layer by layer until the last fuzzy neural network is built in the last layer. The structure diagram of the self-built deep fuzzy model is shown as follows: Figure 2 As shown;

[0103] The overall network structure consists of four components: the first is a spatiotemporal module, which effectively extracts spatiotemporal dependencies from traffic data in different regions and presents them as spatiotemporal data. The second is a periodic module, which extracts periodic dependencies from traffic data at weekly, daily, and hourly intervals, presenting them as three types of data: trend data, periodic data, and proximity data. The third is an external module, which contains holiday data, weekend data, and weather data for different regions (collectively referred to as external data). The output data of the first, second, and third components are concatenated into total feature data, which is input to the fourth component of the network. The fourth component is a self-constructed deep fuzzy model constructed layer by layer, taking the total feature data as input. The network uses a modified Wang-Mendel algorithm to infer and learn fuzzy rules based on the feature data. The output of the network is the predicted regional traffic flow, from which key features for path recognition are extracted.

[0104] (2) Space-time module structure:

[0105] From the sample at time t, the previous s moments Extract spatiotemporal dependency features from data. Use a sliding window of size 2 to The data is mapped to the first s-1 fuzzy neural networks, and the s The data is mapped to the next s-1 fuzzy neural networks. Then, the external data at the corresponding moment is embedded into each fuzzy neural network. The external data here includes isH n ,isW n ,time n ,Weather n .

[0106] (3) Cycle module structure:

[0107] The periodic module consists of three submodules, which extract adjacent data, periodic data, and trend data. The adjacent data consists of traffic data from the last c moments. Similar to the spatiotemporal module, a sliding window of size 2 is used to map these c data points into c-1 fuzzy neural networks.

[0108] For periodic data, it includes traffic data at p moments, and each data interval is T p , in the specific implementation, T p Equal to one day. Similarly, use a sliding window of size 2 to map these p data into p-1 fuzzy neural networks;

[0109] Trend data is similar to periodic data, which includes traffic data at q moments, with each data interval being T q , T q Equal to one week. Similarly, use a sliding window of 2 to map these q data to q-1 fuzzy neural networks. In actual experiments, it is found that when p and q are 1, the effect is the best and the training time is the fastest. That is, only Mapped into two fuzzy neural networks respectively;

[0110] In this module, the external data of the corresponding time, including isH n ,isW n ,time n ,Weather n , embedded in each fuzzy neural network. It is worth mentioning that in the fuzzy neural network corresponding to periodic data and trend data, an additional and In the periodic data, we also added

[0111] (4) Self-built deep fuzzy model structure:

[0112] After the above two modules, we can get the first layer g1 fuzzy neural networks, where g1 = 2s + c + p + q - 5. Use the data pairs [input; y] of the training set to train each fuzzy neural network with the improved Wang-Mendel method, where input is the input of each fuzzy neural network. is the output of the model. After the training is completed, the training set data is passed through the first layer of fuzzy neural network, and the obtained data is used as the input of the second layer of fuzzy neural network. A moving window with a length of L = 3 and a step size of Step = 1 is used to map the first layer of fuzzy neural network to the second layer of fuzzy neural network. The output of the first layer of fuzzy neural network in each moving window is used as the input data of the corresponding second layer of fuzzy neural network. For the second layer of fuzzy neural network, the same method is used. As the network output, the improved Wang-Mendel method is used to train the network layer. This step will be repeated to build a deep fuzzy neural network layer by layer from the bottom up until the entire deep fuzzy neural network is built. The output of the fuzzy neural network in the last layer is used as the output of the entire model, and the key features of path recognition will be extracted from the output of the model. The structure of the fuzzy neural network using the improved Wang-Mendel method for rule learning is as follows Figure 4 shown.

[0113] Step 3: Model training

[0114] (1) Training data:

[0115] Two public datasets, the Beijing Taxi Dataset and the New York Taxi Dataset, were used to verify the model performance.

[0116] The Beijing Taxi Dataset includes GPS data, weather data, and holiday data for Beijing taxis. It covers four time periods: July 1, 2013, to October 30, 2013; March 1, 2014, to June 30, 2014; March 1, 2015, to June 30, 2015; and November 1, 2015, to April 10, 2016. Each sample has a 30-minute interval, resulting in 22,459 available time points. Each sample in the Beijing Taxi Dataset is accompanied by a corresponding weather data value, ranging from 0 to 16. Based on empirical data, weather types are ranked according to their impact on travel, with greater impact assigned to higher values, such as 0 for sunny days and 16 for dusty days. The Beijing Taxi Dataset also includes holiday data, with 41 days marked, and samples corresponding to these 41 days are labeled as holiday samples. For this dataset, the most recent four weeks of data are used as test data, and all previous data is used as training data.

[0117] The New York Taxi Dataset includes trip data, weather data, and holiday data for New York City taxis. It covers a single time period: January 1, 2014, to December 31, 2014. Each sample has a 30-minute interval, resulting in 17,520 available time points. The dataset also includes data for 17 types of weather. Similar to the Beijing taxi data, weather types are ranked based on their impact on travel based on empirical experience, with values ​​assigned to higher impacts, such as 0 for sunny days and 16 for dusty days. It also includes holiday data, with 11 days marked, and samples corresponding to these 11 days are labeled as holiday samples. For this dataset, the most recent three weeks are used as test data, and all previous data is used as training data.

[0118] (2) Training environment

[0119] The training environment is a personal platform with a 12th Gen Intel(R) Core(TM) i9-12900K 3.19GHz, 64GB of RAM, and an NVIDIA GeForce RTX 3090 graphics card with 24GB of VRAM. Development is done using Python 3.8 and NumPy 1.20.1. The model is trained using real-world traffic data from the publicly available Beijing Taxi Dataset and the New York Taxi Dataset, which are divided into training and test sets according to a specific ratio.

[0120] (3) Model operation process

[0121] The overall structure of the model is as follows Figure 1 As shown. The data first enters the spatiotemporal module and the periodic module. After integration, it is mapped to the first layer of the fuzzy neural network in the self-built deep fuzzy model with a sliding window of size 2, and external data information is embedded at the same time. After entering the first layer of the fuzzy neural network in the self-built deep fuzzy model, the fuzzy neural network is learned using the improved Wang-Mendel algorithm. After the first layer of the fuzzy neural network is learned, the output of the first layer of the fuzzy neural network is mapped to the second layer of the fuzzy neural network with a sliding window of size 3 and a step size of 1, and the second layer of the fuzzy neural network is trained in the same way. Repeat the above process of constructing the self-built deep fuzzy neural network layer by layer until the training of the fuzzy neural network of the last layer is completed. The output of the fuzzy neural network of the last layer is used as the output of the entire model, that is, the predicted traffic inflow or outflow at the corresponding location. The key features of path cognition will be extracted from the predicted traffic data for subsequent path cognition and planning.

[0122] Step 4: Traffic path recognition

[0123] Input the traffic data to be tested into the trained self-built deep fuzzy model. The input format is consistent with the input during training, namely spatiotemporal data, periodic data and external data. The model outputs the predicted traffic flow. P n Represents the historical traffic data of the next n time steps, in the same form as the aforementioned P t same, is a set of real numbers. The predicted traffic flow can be used to calculate model performance indicators. Key features for path recognition are extracted from the predicted traffic data and further used in downstream tasks to perform intelligent traffic path recognition and planning in the predicted area.

[0124] The deep fuzzy model will generate a fuzzy rule base in the self-construction process, which contains rules in the form of:

[0125]

[0126] Translated into Chinese:

[0127] If x1 is And x2 is …and x n yes Then y is Such rules can be described in natural language, which can naturally be understood by researchers, and thus enable the output of the model to be tracked by humans, which greatly improves the interpretability of the model, that is, improves the model's ability to recognize traffic paths.

[0128] Step 5: Construct key descriptive features of path recognition based on the results of the traffic path recognition experiment to output the predicted traffic flow The characteristics describing the regional vehicle flow level and vehicle accumulation trend are constructed as a feature matrix. The characteristics describing the regional vehicle flow level are the arithmetic mean of the inflow and outflow. The calculation formula is The characteristic describing the regional vehicle accumulation trend is the difference between the inflow and outflow, Δx, calculated as Δx = x in -x out ;

[0129] Traffic average It can well characterize the traffic flow level in the area at the current moment. Generally, the larger its value, the longer it takes for vehicles to pass through the area. The vehicle cumulative trend Δx can characterize the traffic flow level in the area at future moments. Generally, the longer the time, the greater its impact.

[0130] Step 6: Path planning based on key descriptive features

[0131] A path planning algorithm based on the A* algorithm and using key description features is defined. According to the A* algorithm, three variables {F, G, H} are defined for each region, where F represents the comprehensive priority of the region, and F = G + H, G represents the cost value from the starting region to the current region, and H represents the cost estimate from the current region to the target region. In the present invention, key description features are used. and Δx to calculate G, the specific formula is The Chebyshev distance is used to calculate H. The distance between a region and its eight adjacent regions is defined as λ3, where G′ is the G value of the parent region, and λ1, λ2, and λ3 are custom parameters whose actual values ​​vary depending on the scenario. The Chebyshev distance between the (i1, j1) grid and the (i2, j2) grid is max(|i1-i2|,|j1-j2|).

[0132] In the experiment of the present invention, for the Beijing taxi dataset, λ1 is 1.04, λ2 is 0.25, and λ3 is 10. For the New York taxi dataset, λ1 is 1.02, λ2 is 0.5, and λ3 is 4. At the same time, the open list and the closed list are defined for path planning. The flow chart of the path planning algorithm is as follows Figure 5 As shown, the specific steps are as follows:

[0133] Step 6.1 Add the starting point to the open list;

[0134] Step 6.2 Repeat the following process:

[0135] a) Traverse the open list, find the area with the smallest F value, and use it as the current area to be processed.

[0136] b) Move the area to be processed to the closed list.

[0137] c) For each of the eight adjacent regions of the current region:

[0138] If the area is unreachable or already in the closed list, ignore it.

[0139] ii. If the region is not in the open list, add it to the open list, set the current region as its parent region, and record the F, G, and H values ​​of the current region;

[0140] iii. If the region is already in the open list, check whether the G value obtained using the current path is smaller. If it is smaller, it means that the current path is better. If so, set its parent region to be the current region, recalculate its G value and F value, and re-sort the open list in ascending order by F value.

[0141] d) Stop step 6.2 if you encounter any of the following two situations:

[0142] i. The destination is added to the open list, indicating that the path has been found;

[0143] ii. The search for the endpoint fails and the open list is empty, indicating that there is no path.

[0144] Step 6.3 moves from the end point to the starting point along the parent area of ​​each area to obtain the calculated path.

[0145] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention. They are not intended to limit the scope of protection of the present invention. Any equivalent methods or changes that do not deviate from the technology of the present invention should be included in the scope of protection of the present invention.

Claims

1. A deep fuzzy model self-construction method for traffic path cognition, characterized by: The following steps are involved: Step 1.1, an input data processing algorithm for self-built deep blur model: These include processing algorithms for spatiotemporal data describing the relationships between traffic scene regions, periodic data describing the temporal periodicity of traffic scenes, external data describing weather, holidays, and weekdays, and an improved Wang-Mendel algorithm for adaptively extracting fuzzy rules from data. The algorithm improves the membership function generation method of the Wang-Mendel algorithm so that different membership functions are generated for different data segments. Step 1.2, a self-built deep blur model structure design, including four parts: The first part is the spatiotemporal module, which can effectively extract the spatiotemporal dependencies between traffic data in different areas and express them as spatiotemporal data; The second part is the periodic module, which extracts periodic dependencies from traffic data at three different time intervals: weekly, daily, and hourly, and presents them as periodic data; The third part is the external module, which contains holiday data, weekend data and weather data of different regions. These data are collectively referred to as external data. The output data of the first, second and third parts will be concatenated into the total feature data and input into the network of the fourth part; The fourth part is a self-constructed deep fuzzy model that is built layer by layer. Its input is the total feature data. The network uses the improved Wang-Mendel algorithm to reason and learn fuzzy rules on the feature data, thereby self-constructing the network structure. Step 1.3: training the self-built deep blur model, including setting up corresponding training data and training environment to train the model; Step 1.4: Conduct a traffic path recognition experiment based on the trained model; Step 1.5: Construct key descriptive features of path cognition based on the results of the traffic path cognition experiment; Step 1.6: Perform traffic route planning based on key description features of path cognition.

2. The method for self-constructing a deep fuzzy model for traffic path cognition according to claim 1 is characterized in that: The input data processing algorithm in step 1.1 is specifically defined as follows: 1.1.1 Historical and predicted traffic data for all areas of the predicted traffic scenario: The predicted scenario city is divided into an I×J grid map based on longitude and latitude, where I is the number of map rows and J is the number of map columns. Each grid represents an area, and the position of the grid is described using (i, j). The (i, j) grid represents the grid in the i-th row and j-th column of the map, where 0≤i≤I-1 and 0≤j≤I-1. The historical traffic data consists of traffic data from T historical time steps: in is a tensor of shape T×I×J×2, representing the total historical traffic data, P t represents the historical traffic data of time step t, 1≤t≤T, is a set of real numbers, P t The specific form is: in represents the vehicle inflow and outflow of the (i, j) grid at time t, which is specifically defined as: Card means to find the number of elements in the collection. in g represents vehicle, That is, the set of vehicles that are not in the (i, j) grid at time t-1, but enter the (i, j) grid at time t; That is, the set of vehicles that are in the (i, j) grid at time t-1 and leave the (i, j) grid at time t; 1.1.2 Spatiotemporal data describing spatiotemporal dependencies: For the inflow of grid (i, j) at time t Its inflow at time t usually comes from the outflow of nearby grids, while its outflow comes from the inflow of nearby grids; by calculating the sum of the outflow of its neighboring and distant neighboring grids at the previous s time To reflect the spatiotemporal dependency of traffic data: Where (i neighbor1 ,j neighbor1 ) satisfies i neighbor1 =i±1 or j neighbor1 =j±1, representing the eight grids adjacent to the (i, j) grid, (i neighbor2 ,j neighbor2 ) satisfies i neighbor2 =i±2 or j neighbor2 =j±2, representing the sixteen grids that are one circle apart from the (i, j) grid. That is, the sum of the outflow of the eight grids adjacent to the (i, j) grid at time t, That is, the sum of the outflow of the sixteen grids separated by one circle from the (i, j) grid at time t; For the predicted The spatiotemporal data module will output 2×s data, where s is a custom parameter, namely: If you want to predict The spatiotemporal data module will output the corresponding 2×s data, which is: 1.1.3 Cycle data describing cycle dependencies: Collect three types of data from traffic data: proximity, cycle, and trend to reflect the periodic characteristics of traffic data; For prediction The network selects the inflow data of the latest c moments, that is, To extract its neighboring dependency features; select the inflow data at the same time in the last p days, that is To extract its day cycle dependent features, where T p Represents the number of moments in a day; select the inflow data at the same moment in the last q weeks, that is, To extract its cycle-dependent features, where T q Represents the number of hours in a week. c, p, and q are all custom parameters. If you want to predict Then change the above inflow data to the corresponding outflow data; 1.1.4 External data describing external dependencies: In addition to traffic data, select some external data; use isH t Indicates whether time t is a holiday, isW t Indicates whether time t is a working day, where isH t ,isW t When it is 1, it means the corresponding time is a holiday or a weekday, and when it is 0, it means it is not a holiday or a weekend; At the same time, since the time of the traffic peak in a day is usually fixed, the traffic data is closely related to the sample timestamp, so the time t Indicates the position of time t in a day. If there are 24 samples in a day, then time t An integer value between 1 and 24.

3. The method for self-constructing a deep fuzzy model for traffic path cognition according to claim 1 is characterized in that: The improved Wang-Mendel algorithm for training fuzzy neural networks includes the following steps: Step 1.2.1: Given N input-output data pairs: [x1(k),x2(k),…,x n (k) (y(k)], where k∈1,2,…,N,x1(k),x2(k),…,x n (k) is the n-dimensional input of the k-th data, y(k) is the output of the k-th data; for each input dimension x i Determine a preset membership function partition number, expressed as m i ; This preset value is related to the physical meaning of the input dimension. The more complex the input dimension, the larger the value should be set. Step 1.2.2: Get the input variable x for each dimension of N data from the training data i The maximum value of max x i and the minimum value min x i , and the data segment [min x i ,max x i ] is divided equally into m i -1 block data segment: where x1 = min x i , Calculate the variance of the output y(k) corresponding to the sample in each data segment, recorded as MSE j (y), where j = 1, 2…m i -1; remember: MSE′(y)=minMSE j (y)+k×(maxMSE j (y)-minMSE j (and)), where maxMSE j (y), minMSE j (y) are MSE j The maximum and minimum values ​​in (y), k is a custom parameter, 0 <k<1; Step 1.2.3: For the number of partitions m i Satisfy m i >m′ dimension, where m′ is a custom parameter, and pruning is performed on it: starting from the first data segment [x1, x2], all data segments are traversed sequentially. If the current traversed data segment is [x a ,x b ], followed by the untraversed data segment [x b ,x c ], and satisfy: MSE ab (y) < MSE′(y), MSE bc (y) < MSE′(y) and Then the data segment [x a , x b and the data segment [x b , x c are merged into the data segment [x a , x c and continue to examine whether the next data segment can be merged. After merging: where MSE ab (y), MSE bc (y) and MSE ac (y) are the data segments [x a ,x b ]、[x b ,x c ] and [x a ,x c ] corresponds to the variance of the output, z′ is a custom parameter, which means that the longest data segment after merging is z′ times the original data segment. If the condition is not met, the next data segment will be traversed until all data segments are traversed; Step 1.2.4: For each merged data segment, construct a triangular membership function with the center of the data segment as the vertex of the membership function and the centers of the adjacent data segments as the endpoints of the membership function. For the two data segments at the edge, the left endpoint and right endpoint of the corresponding membership function are -∞ and +∞ respectively; After construction, we will get q i membership function, μj i (x) represents, where 1≤j i ≤q i ; Each membership function represents a semantic, express; Step 1.2.5: Maintain a rule space with a size of Use (j1,j2,…,j n ) represents a block of rules in the rule space, where j i (1≤i≤n) indicates that the rule corresponds to the jth rule in the i-th dimension rule space. i membership function, each space will store a rule successor parameter The corresponding rules are: Translated into Chinese: If x1 is And x2 is …and x n yes Then y is Step 1.2.6: Traverse all data, whenever a pair of data [x1(k),x2(k),…,x n (k); y(k)] arrives, according to: To calculate the activation strength of each rule And save the corresponding activation intensity for the rule with the largest activation intensity With the output y k If a rule has at least one rule strength after N training data, then the subsequent parameter of the rule Step 1.2.7: For the rule that does not obtain the successor parameter in step 1.2.6, obtain its successor parameter from its neighboring rules. Its successor parameter is equal to the arithmetic mean of the successor parameters of its neighboring rules that have successor parameters. Repeat this step until all rules in the rule space have obtained the successor parameters. The rule (j1, j2, ..., j n ) and (j1′,j2′,…,j n ′) is a necessary and sufficient condition for the neighbor rule to exist if there is only one r∈1,2,…,n such that j r =j r ′+1 or j r =j r ′-1; Step 1.2.8: At this point, the fuzzy neural network training is completed. For the trained fuzzy neural network, use the formula: To calculate the output.

4. The method for self-constructing a deep fuzzy model for traffic path cognition according to claim 1 is characterized in that: The training data and training environment in step 1.3 are set as follows: Use real traffic data as the dataset for model training and divide it into training set and test set according to a certain ratio; customize the parameter m Time =30,m Spatial =30,m is_h =2,m is_w =2,m time =24,m weather =4,m L =30, (L≥2), m′=5, k=0.75, where m Time and m Spatial is the number of initial membership function divisions of the time-related module and the space-related module in the spatiotemporal module, m is_h 、m is_w 、m time and m weather The number of initial membership function divisions corresponding to external data "whether it is a holiday", "whether it is a weekend", timestamp and weather data, m L is the number of initial membership function partitions above the second layer, m′ is the pruning threshold, if the number of initial membership function partitions exceeds this number, pruning is required, and k is the merging threshold.

5. The method for self-constructing a deep fuzzy model for traffic path cognition according to claim 1 is characterized in that: In step 1.5, the key descriptive features of path cognition are constructed using the traffic path cognition experiment results: first Calculate the arithmetic mean of inflow and outflow The calculation formula is Used to indicate traffic flow level; calculate the difference between inflow and outflow, Δx, using the formula Δx = x in -x out , used to reflect the vehicle accumulation trend in the area; average flow rate It can well characterize the traffic flow level in the area at the current moment. Generally, the larger its value, the longer it takes for vehicles to pass through the area. The vehicle cumulative trend Δx can characterize the traffic flow level in the area at future moments. Generally, the longer the time, the greater its impact.

6. The method for self-constructing a deep fuzzy model for traffic path cognition according to claim 1 is characterized in that: In step 1.6, traffic route planning is performed based on the key description features of route cognition: Based on the A* algorithm, three variables {F, G, H} are defined for each region, where F represents the comprehensive priority of the region and F = G + H. G represents the cost from the starting region to the current region, and H represents the estimated cost from the current region to the target region. G is calculated using the key descriptive features of the region. The specific formula is: The Chebyshev distance is used to calculate H. The distance between a region and its eight adjacent regions is defined as λ3. The Chebyshev distance between the (i1, j1) grid and the (i2, j2) grid is max(|i1-i2|,|j1-j2|)×λ3. G′ is the G value of the parent region of the current region. λ1, λ2, and λ3 are custom parameters whose actual values ​​vary depending on the scenario.

Citation Information

Patent Citations

  • Large-scale real-time traffic flow prediction method based on fuzzy logic and depth LSTM

    CN112561146A

  • Road traffic jam early warning method and system

    US20220222556A1