Traffic flow prediction method based on trigeminal fuzzy system

By combining the Trident fuzzy system with linear regression and the ANFIS model, the problem of high-dimensional data processing in traffic flow prediction was solved, achieving efficient and interpretable traffic flow prediction and improving the robustness and prediction accuracy of the model.

CN121365375APending Publication Date: 2026-01-20FUJIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411776247.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

Existing traffic flow prediction models struggle to effectively handle high-dimensional data, exhibiting problems such as high model complexity, high computational complexity, poor long-term prediction accuracy, and poor interpretability.

Method used

The Trident fuzzy system is adopted. By randomly shuffling the feature order and grouping them according to odd and even indices, linear regression is used for dimensionality reduction. Combined with the ANFIS model for nonlinear fitting, linear and nonlinear relationships are gradually extracted to improve the robustness and interpretability of the model.

Benefits of technology

It effectively reduces model complexity, improves prediction accuracy and computational efficiency, enhances model interpretability, and can better handle high-dimensional traffic flow data, providing a scientific basis for traffic management and planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365375A_ABST
    Figure CN121365375A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic flow prediction method based on a trigeminal fuzzy system, and the method comprises the steps: firstly, carrying out the first fitting of the grouped data through random disruption of a feature sequence and grouping according to odd-even indexes through linear regression, so as to extract linear features and reduce the data dimension; thirdly, taking three groups of results obtained by the first round of prediction as input, entering an ANFIS model for nonlinear fitting, and finally obtaining a predicted value containing a data linear and nonlinear relationship, thereby improving the robustness of the model; and finally, the stability and accuracy of the model are ensured through multiple times of random grouping, so that the prediction method is more efficient when processing mass traffic flow data, and a scientific basis is provided for traffic management and planning.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of traffic flow prediction, and particularly relates to a traffic flow prediction method based on a trident fuzzy system. BACKGROUND

[0002] Traffic flow prediction is crucial for intelligent transportation systems, as it not only affects traffic management and planning but also directly relates to road usage efficiency and driving safety. With the acceleration of urbanization, traffic flow data is large, complex, and multi-dimensional, making it difficult for traditional prediction models to effectively handle these challenges. Additionally, the interpretability of traffic flow prediction models is also important, as it helps transportation planners and managers understand the factors that influence traffic patterns, enabling them to make more rational decisions.

[0003] Currently, research on traffic flow prediction mainly focuses on traditional machine learning, recurrent neural networks, and hybrid models. While these models can capture the historical patterns of traffic data to some extent, they suffer from issues such as gradient explosion, high computational complexity, and poor accuracy in long-term prediction. Furthermore, although graph neural networks and multi-factor fusion networks have advantages in considering the spatiotemporal correlation of road networks and traffic flow data, the interpretability of neural network methods is generally poor, limiting the improvement and application of the models.

[0004] Fuzzy systems, particularly ANFIS (Adaptive Neuro-Fuzzy Inference System), are classic algorithms that balance interpretability and accuracy, and excel in handling uncertainty and complexity. ANFIS combines the advantages of fuzzy logic and neural networks, automatically extracting rules from sample data to build a model, effectively addressing uncertainty issues. However, ANFIS faces the problem of "rule explosion" when dealing with high-dimensional data, making the model difficult to manage and optimize. SUMMARY

[0005] To address the deficiencies in the prior art, the present application provides a traffic flow prediction method based on a trident fuzzy system, which can be applied to traffic flow prediction problems, solving the problem of current model systems being difficult to handle high-dimensional data and balancing the contradiction between precision and model complexity.

[0006] To achieve the above technical purposes, the technical solution adopted by the present application is as follows: a traffic flow prediction method based on a trident fuzzy system, comprising:

[0007] Firstly, by randomly shuffling the feature order and grouping by odd and even indexes, a first round of fitting is performed on the grouped data using linear regression to extract linear features and reduce data dimensionality; then, the three sets of results obtained from the first round of prediction are taken as input to the ANFIS model for nonlinear fitting, and finally the prediction value containing the linear and nonlinear relationship of the data is obtained, thereby improving the robustness of the model; finally, the stability and accuracy of the model are ensured by multiple random grouping.

[0008] Further, the traffic flow prediction method based on the Trident fuzzy system specifically comprises the following steps:

[0009] Step 1): Load the traffic flow dataset and preprocess the data, then divide the preprocessed dataset into a training set and a test set;

[0010] Wherein, the traffic flow dataset contains n-dimensional input dataset Data={X, Y}, X=(x1,…,x n ) represents the features, and Y represents the corresponding output;

[0011] Step 2): Randomly shuffle the dimensions of X to form a new input X′=(X′1,X′2,…,X′ n ), then group the shuffled features X′ by odd and even indexes to obtain odd index group Group odd and even index group Group even :

[0012]

[0013] Wherein, the odd and even index groups represent two mutually exclusive feature groups;

[0014] Step 3): The original input X, Group odd and Group even form three feature groups, then perform multiple linear regression on the three feature groups X, Group odd and Group even and Y respectively to obtain three intermediate values f0, f1, f2;

[0015] Step 4): Reduce the high-dimensional input X to three-dimensional three intermediate values f0, f1, f2 and input them into the ANFIS model for prediction;

[0016] Step 5): Iterate 4*n times, and after the iteration is completed, take the optimal model as the final model;

[0017] Step 6): After training the model, input the traffic flow data into the model to obtain the traffic flow prediction result.

[0018] Further, the preprocessing step in step 1) specifically includes: using Z-scroe method to standardize the data, while detecting and processing abnormal values and missing values.

[0019] Further, step 2) specifically includes the following steps:

[0020] Step 2.1): randomly shuffle the dimensions of X to form a new input X' = (X'1, X'2, …, X'n); ′ ,…,X′ n );

[0021] Step 2.2): use the randperm() function to generate n non-repeating random numbers in the range [1, n], and then group them according to their sorted numbers;

[0022] If the sorted position is odd, it is divided into the odd index group, and if the sorted position is even, it is divided into the even index group, expressed as:

[0023]

[0024] Where i is the sorted position of the feature after randomization, Group odd and Group even are the two groups of feature values obtained after random grouping, and mod(i,2) represents the remainder of n modulo 2.

[0025] Further, step 4) specifically includes the following steps:

[0026] Initialize the grid division for the input data, set the membership and membership function for the variables; when the input data is n-dimensional, each dimension has m membership degrees, then there are membership values;

[0027] In the first layer of the ANFIS model, the input features f are fuzzified using the membership function to obtain a membership degree in the interval [0, 1];

[0028] In the second layer, the membership degrees of each feature are multiplied to obtain the triggering strength of each rule;

[0029] In the third layer, the triggering strength of each rule obtained in the previous layer is normalized to represent the triggering proportion of the rule in the entire rule base;

[0030] In the fourth layer, the result of the rule is calculated according to the linear combination of the input features f i = c0 + c1x1 + c2x2 + … + c n x n , where c0, c1, …, c n are the coefficients of the linear equation;

[0031] In the fifth layer of the model, the deblurring obtains the exact output, and the final system output result is the weighted average of the results of each rule.

[0032] Further, the specific steps of step 5) are as follows:

[0033] Iterate 4*n times, each time randomly reassign the order of the input dimension, train the model and compare the prediction error, and select the round with the smallest error after the iteration, and the model trained in this round is selected as the optimal model.

[0034] The application also provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to realize the traffic flow prediction method based on the trident fuzzy system.

[0035] Compared with the prior art, the application has the beneficial effects that:

[0036] 1) The trident fuzzy system (TFS) provided by the application combines linear regression and ANFIS model, effectively solving the modeling problem of high-dimensional data. TFS reduces the dimension of the features through random grouping, and inputs the grouped data and the original data into the linear regression model for the first round of prediction. This process not only increases feature redundancy and improves model prediction accuracy, but also inputs the three sets of results of the first round of prediction into the ANFIS model, which effectively solves the nonlinear relationship and obtains the final prediction value. This method not only maintains the interpretability, but also effectively reduces the model complexity and improves the operation efficiency, providing a new and effective solution for traffic flow prediction problems.

[0037] 2) Compared with other algorithms, TFS has better robustness and prediction accuracy; TFS processes high-dimensional data through random shuffling and odd-even index grouping, which can increase feature redundancy and improve the robustness of the model to outliers; at the same time, by inputting the grouped data and the original data into the linear regression model in the form of trident, TFS can retain the main linear relationship and important information in the data, thereby improving the prediction accuracy.

[0038] 3) Existing deep learning models are usually considered as "black box" models, and it is difficult to explain and understand the working principle and decision-making process inside the model. The trident fuzzy system is based on IF-THEN fuzzy rules and membership functions, and has good interpretability and transparency, which can help traffic planners and managers make more reasonable decisions on traffic flow prediction problems.

[0039] 4) Through effective dimension reduction processing, TFS can overcome the problem of "rule explosion" that the traditional ANFIS will face when processing high-dimensional data. This kind of dimension reduction method reduces the training difficulty and cost of the model, and can effectively solve the high-dimensional nonlinear problem. BRIEF DESCRIPTION OF DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and all other drawings obtained by those skilled in the art without creative labor on the premise of the drawings are within the scope of the present application.

[0041] Figure 1 It is a schematic diagram of the Trident fuzzy system;

[0042] Figure 2 It is a structural diagram of the Trident fuzzy system;

[0043] Figure 3 It is a flowchart of the implementation of the Trident fuzzy system. DETAILED DESCRIPTION

[0044] The present application will be further described in detail below in combination with the drawings and embodiments. It is particularly pointed out that the following embodiments are only used to illustrate the present application, but do not limit the scope of the present application. Similarly, the following embodiments are only some embodiments of the present application, not all embodiments, and all other embodiments obtained by those skilled in the art without creative labor are within the scope of the present application.

[0045] The present embodiment provides a traffic flow prediction method based on a Trident fuzzy system, wherein when the Trident fuzzy system processes high-dimensional data, the complex high-dimensional data is decomposed into several simple sub-problems by the idea of "divide and conquer", the linear characteristics of the sub-problems are extracted by using the multiple linear regression method, and the effect of reducing the dimension and maintaining high interpretability is achieved; and then the ANFIS model is used to nonlinearly fit the sub-problems. The present method can be applied to the traffic flow prediction problem, solves the deficiency that the current model system is difficult to process high-dimensional data, balances the contradiction between the precision and the model complexity. Compared with the current mainstream neural network method, the present method has better interpretability, and also provides a new development idea for the next generation of artificial intelligence.

[0046] Referring to the drawings Figure 1 As shown in the drawings, 3 The traffic flow prediction method based on the Trident fuzzy system in the present embodiment comprises:

[0047] First, by randomly shuffling the feature order and grouping them according to odd and even indices, linear regression is used to perform the first round of fitting on the grouped data to extract linear features and reduce data dimensionality. Next, the three sets of results obtained from the first round of prediction are used as input to the ANFIS model for nonlinear fitting, ultimately obtaining predicted values ​​that include both linear and nonlinear relationships in the data, thereby improving the robustness of the model. Finally, multiple random groupings are used to ensure the stability and accuracy of the model, making this prediction method more efficient in processing massive traffic flow data and providing a scientific basis for traffic management and planning.

[0048] The traffic flow prediction method based on the Trident fuzzy system described above specifically includes the following steps:

[0049] Step 1) Data Preprocessing

[0050] Load the traffic flow dataset, where the traffic flow dataset contains an n-dimensional input dataset Data=

[0051] {X, Y}, X = (x1, ..., x) n ) represents the feature, and Y represents the corresponding output; the data is standardized using the Z-scroe method to avoid the attributes in the large value range from overly dominating the attributes in the small value range and to avoid numerical complexity in the calculation process; at the same time, outliers and missing values ​​are detected and processed, and then the standardized dataset is divided into training set and test set according to a certain ratio.

[0052] Step 2) Determine the number of random groupings and randomly group the training set.

[0053] See attached document Figure 2 As shown, to ensure randomness and avoid fixed feature relationships, Trident dimensionality reduction first randomly shuffles the dimensions of X to form a new input X′=(X′1,X′2,…,X′) n Then, the shuffled features X′ are grouped according to odd and even indices to obtain the odd-indexed group Group. odd and even index group even :

[0054]

[0055] Among them, the odd and even index groups represent two non-repeating feature groups, which can be combined in different ways under random initialization conditions.

[0056] The specific steps are as follows:

[0057] Step 2.1): Randomly shuffle the dimensions of X to form a new input X′=(X′1,X′2,…,X′) n );

[0058] Step 2.2): First, it is necessary to determine the number of features n in the high-dimensional dataset and the number of random groupings to ensure that the number of random groupings is not too high, which would cause computational complexity, and that the number of random groupings is not too low, which would cause randomness in the results. Use the randperm() function to generate n unique random numbers R in the range [1, n], and then group the data according to the sort number of this dataset;

[0059] If the sort position is odd, it is assigned to the odd index group; if the sort position is even, it is assigned to the even index group. The expression is as follows:

[0060]

[0061] Where i is the sorting position of the feature after randomization, Group odd and Group even These are two sets of feature values ​​obtained after random grouping, and mod(i,2) represents the remainder when n is modulo 2.

[0062] Step 3) Multiple linear regression processing

[0063] See attached document Figure 2 As shown, the original input X and Group odd and Group even Composing three feature groups not only enhances the model's learning of feature distributions but also increases its robustness to outliers. Considering that human reasoning is based on a 3-dimensional world, 3 was chosen as the final number of feature groups.

[0064] Dimensionality reduction, a crucial step in data processing, is required to preserve as many characteristic relationships as possible from the original data. Multiple linear regression is a method for extracting linear relationships between features; it is not only easy to interpret and visualize but also highly efficient at extracting key features. Therefore, three feature groups X, Group... odd and Group even Multiple linear regression was performed with Y to obtain three intermediate values ​​f0, f1, and f2.

[0065] Randomly shuffling the order of features is a non-linear process that increases data diversity and helps avoid model dependence on specific feature combinations. Extracting features through multiple linear regression preserves the main linear relationships and important information in the data while simplifying the data structure and reducing computational complexity. This dimensionality reduction method, combining non-linear and linear approaches, fully leverages the advantages of both to improve the overall performance of the model. Non-linear processing captures complex patterns, while linear methods simplify the structure and retain key information. Using the aforementioned trident dimensionality reduction method, the high-dimensional input X is reduced to a three-dimensional intermediate representation f = (f0, f1, f2), providing ANFIS with an interpretable and easily processed input.

[0066] Step 4), ANFIS model prediction

[0067] By using the Trident dimension reduction method, the high-dimensional input X is reduced to three intermediate values f0, f1, f2, which are input into the ANFIS model for prediction. The specific steps include the following:

[0068] Before inputting the ANFIS model, the input data is first initialized and grid partitioned, and the membership and membership function are set for the variables. When the input data is n-dimensional, each dimension has m membership degrees, and there are membership degree values.

[0069] In the first layer of the ANFIS model, the membership function is used to fuzz the input features f to obtain a membership degree in the interval [0, 1]. In the second layer, the membership degrees of each feature are multiplied to obtain the triggering strength of each rule. In the third layer, the triggering strength of each rule obtained in the previous layer is normalized to represent the triggering proportion of the rule in the entire rule base, i.e., the probability of using this rule in the entire reasoning process. In the fourth layer, the linear combination of the input features f i = c0 + c1x1 + c2x2 + … + c n x n is calculated (where c0, c1…c n are the coefficients of the linear equation); in the fifth layer of the model, the exact output is obtained by de-fuzzification, and the final system output result is the weighted average of the results of each rule.

[0070] ANFIS uses a hybrid learning algorithm (usually a combination of gradient descent and least squares method) to adaptively adjust the model parameters according to the input and output data, improving the prediction accuracy. The fuzzy rules in the system have good interpretability, making the decision-making process of the model transparent and helping to understand the relationship between features and outputs. It can effectively handle complex nonlinear problems by capturing the nonlinear relationships in the data through fuzzy logic rules and neural network learning capabilities. The combination of the Trident dimension reduction method and ANFIS can take advantage of both methods to achieve better overall performance.

[0071] Step 5), iteration and optimization

[0072] This method requires multiple iterations of training, and each random initialization of the group will result in different model results. If the number of iterations is listed using the exhaustive method, the computational complexity will increase exponentially, resulting in a sharp increase in the number of combinations, making the calculation cost and time too high. Therefore, it is crucial for this method to convert this factorial problem into a more manageable linear problem, i.e., the number of iterations is 4*n (n is the data dimension), and the optimal model is taken as the final model after the iteration is completed. The specific steps are as follows:

[0073] Iterate 4*n times, each time re-randomly allocate the order of the input dimension, train the model and compare the prediction error, after the iteration, select the round with the smallest error, the model trained in this round is selected as the optimal model.

[0074] Step 6), after the training of the model is completed, the traffic flow data is input into the model (in this embodiment, the test set data is input), and the traffic flow prediction result can be obtained.

[0075] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0076] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0077] The above only describes some embodiments of the present application, and does not limit the protection scope of the present application, and any equivalent device or equivalent process transformation made by using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A traffic flow prediction method based on a Trident fuzzy system, characterized by, The method comprises the following steps: Firstly, a first round of fitting is performed on the grouped data by linear regression to extract linear features and reduce data dimension by randomly shuffling the feature order and grouping according to odd and even indexes; then, three groups of results obtained by the first round of prediction are taken as inputs to enter an ANFIS model for nonlinear fitting, and finally, a prediction value containing linear and nonlinear relationships of the data is obtained, thereby improving the robustness of the model; finally, the stability and accuracy of the model are ensured by multiple random grouping.

2. The traffic flow prediction method based on the Trident fuzzy system according to claim 1, characterized in that, The method comprises the following steps: Step 1): loading a traffic flow dataset, preprocessing the data, and then dividing the preprocessed dataset into a training set and a test set; wherein the traffic flow dataset comprises an n-dimensional input dataset Data = {X, Y}, X = (xl,..., xn) represents features, and Y represents corresponding outputs; n ) represents features, and Y represents corresponding outputs; Step 2): Randomly shuffle the dimensions of X to form a new input X' = (X'1, X'2,..., X'n), then group the shuffled features X' by odd and even indices to obtain odd index group Group n and even index group Group odd . even : The odd and even index groups represent two non-repeating feature groups; Step 3): The original input X, Group odd and Group even constitute three feature groups, then the three feature groups X, Group odd and Group even respectively perform multiple linear regression with Y, to obtain three intermediate values f0, f1, f2; Step 4): reducing the high-dimensional input X to three intermediate values f0, f1 and f2, and inputting them into an ANFIS model for prediction; Step 5): iterating 4*n times, and taking the optimal model as the final model after the iteration ends; Step 6): after the training of the model is completed, inputting the traffic flow data into the model to obtain the result of traffic flow prediction.

3. The traffic flow prediction method based on the Trident fuzzy system according to claim 2, characterized in that, In step 1), the preprocessing step specifically includes: standardizing the data by using the Z-scroe method, and detecting and processing abnormal values and missing values.

4. The traffic flow prediction method based on the Trident fuzzy system according to claim 2, wherein, Step 2) specifically comprises the following steps: Step 2.1): Randomly shuffle the dimensions of X to form a new input X' = (X'1, X'2,..., X'p) where X'1, X'2,..., X'p are random permutations of X1, X2,..., Xp respectively. n ) Step 2.2): generating n non-repeating random numbers R in the range [1, n] by using the randperm() function, and then grouping according to the ordering numbers of the data; If the ordering position is odd, it is divided into the odd index group, and if the ordering position is even, it is divided into the even index group, and the expression is as follows: where i is the ranking position of the feature after randomization, Groupod d and Groupeve n are the two groups of feature values obtained after randomization, and mod(i, 2) represents the remainder of n modulo 2.

5. The traffic flow prediction method based on the Trident fuzzy system according to claim 2, wherein, Step 4) specifically comprises the following steps: The input data is initialized grid division, and the membership and membership function are set for the variable; when the input data is n-dimensional, each dimension has m memberships, and there are membership values; In the first layer of the ANFIS model, the membership function is used to fuzz the input features f to obtain a membership degree in the interval [0, 1]; In the second layer, the membership degrees of each feature are multiplied to obtain the triggering strength of each rule; In the third layer, the triggering strength of each rule obtained in the last layer is normalized to represent the triggering proportion of the rule in the entire rule base; In the fourth layer, a linear combination f of the input features is calculated i = c0+ c1x1+ c2x2+... + c n x n The result of the calculation rule, where c0, c1... c n are the coefficients of the linear equation; In the fifth layer of the model, the fuzzification is removed to obtain the exact output, and the final system output result is the weighted average of the results of each rule.

6. The traffic flow prediction method based on the Trident fuzzy system according to claim 2, wherein, Step 5) specifically comprises the following steps: Iterate 4*n times, randomly allocate the ordering of the input dimension each time, train the model and compare the prediction error, and select the round with the smallest error as the optimal model after the iteration ends.

7. A computer-readable storage medium having stored thereon a computer program, characterized in that The program is executed by a processor to implement the traffic flow prediction method based on the trident fuzzy system according to any one of claims 1-6.