Path driving rhythm pattern analysis method and system based on DNA sequence characterization
By constructing an OD cost matrix and analyzing taxi trajectory data using the Smith-Waterman algorithm, this study addresses the problem that existing path planning algorithms fail to accurately reflect actual road conditions. It also enables the mining of path selection patterns and sentiment tendencies, thereby improving the accuracy and personalization of path planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNIV OF GEOSCIENCES (WUHAN)
- Filing Date
- 2022-10-28
- Publication Date
- 2026-05-22
Smart Images

Figure CN115687949B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of spatiotemporal trajectory data mining, and in particular to a method and system for analyzing path driving rhythm patterns based on DNA sequence characterization. Background Technology
[0002] The rapid development of positioning technology and the widespread application of location services have generated a vast amount of vehicle trajectory data. Among these, taxi data stands out for its advantages, including fewer constraints from objective factors, large data volume, minimal privacy concerns, and high spatial coverage, making it an excellent resource for trajectory data research. In real life, taxi drivers choose the optimal route based on dynamic road capacity. Therefore, the large amount of trajectory data generated during taxi operations reveals real-time traffic conditions and the taxi drivers' route-choosing experience. Since this experience includes considerations of factors such as road capacity, traffic conditions, street conditions, and weather conditions, it is more closely aligned with actual conditions and thus has significant reference value for route planning. Extracting taxi drivers' route-choosing experience from massive amounts of taxi driving data has become a key research direction in trajectory data mining and route planning algorithms.
[0003] Traditional path planning algorithms often focus on calculating the time and distance costs between two points within a road network to find the path with the lowest time cost, the path with the lowest distance cost, and the path with the optimal balance between time and distance costs as the recommended path. However, road conditions are highly complex, and road costs are affected by factors such as traffic volume, lane distribution, road surface conditions, traffic rules, real-time congestion, street conditions along the route, and weather conditions. Using only time cost and spatial distance cost as factors influencing path selection cannot accurately reflect the optimal path under actual conditions.
[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a method for analyzing path driving rhythm patterns based on DNA sequence characterization, comprising:
[0006] S1: Obtain the original taxi trajectory dataset, preprocess the original taxi trajectory dataset, and obtain the preprocessed taxi trip trajectory stream dataset;
[0007] S2: Construct the OD cost matrix. Input the preprocessed taxi trip trajectory flow dataset into the OD cost matrix to obtain the distance cost between each trajectory point in the road network in each trajectory flow.
[0008] S3: Based on the distance cost of the trajectory in the road network, combined with the transit time and average speed between trajectory points, a driving rhythm sequence for the trajectory is constructed;
[0009] S4: The Smith-Waterman algorithm is used to compare the similarity of driving rhythm sequences in each scenario and calculate the degree of similarity between driving rhythm sequences in each scenario.
[0010] S5: Using similarity as a score, cluster analysis is performed on the driving rhythm sequences in each scenario to obtain the taxi drivers' route selection patterns and emotional tendencies in each scenario.
[0011] Preferably, step S1 specifically includes:
[0012] The original taxi trajectory dataset is cleaned by removing trajectory data of non-operating vehicles, malfunctioning vehicles, and empty vehicles. The cleaned dataset is the trip trajectory dataset. The valid trajectory point data is divided into passenger trips according to passenger status, and the trajectory point data of each passenger trip is obtained. The trajectory point data that are offset in the passenger trip are fitted to the road network. At this time, the trajectory point data of each passenger trip constitutes the trajectory flow of the corresponding trip. The trajectory flows of all trips constitute the taxi trip trajectory flow dataset.
[0013] Preferably, step S2 specifically includes:
[0014] An OD cost matrix is constructed using road network data. The starting and ending points of each trajectory point in the trajectory flow are then loaded into the OD cost matrix in turn, and the distance cost between each trajectory point in all trajectory flows is calculated.
[0015] Preferably, step S3 specifically includes:
[0016] S31: Read each trajectory point in the trajectory flow data of the taxi trip trajectory flow dataset in chronological order, calculate the passage time of two trajectory points before and after adjacent time points; obtain the distance cost corresponding to the two trajectory points, and divide the distance cost by the passage time to obtain the average speed of the segment corresponding to the two trajectory points.
[0017] S32: If the average velocity of a segment is less than or equal to a preset value, then retain the two trajectory points of that segment; otherwise, discard the two trajectory points of that segment.
[0018] S33: Establish the correspondence between congestion level, speed range and symbol. Based on the average speed of each segment, use a specific symbol to represent the congestion level of the current segment. All segments in the trajectory flow are symbolized in sequence, which constitutes a symbol sequence similar to a DNA sequence. This symbol sequence is the driving rhythm sequence of the trajectory flow.
[0019] Preferably, step S4 specifically includes:
[0020] S41: Divide the driving rhythm sequence into different scenarios based on the starting and ending points, travel distance, and time period;
[0021] S42: For two driving rhythm sequences p and q, establish a scoring rule, expressed as follows:
[0022]
[0023] Among them, S(p i ,q j ) represents the score of comparing the (i-1)th symbol in the driving rhythm sequence p with the (j-1)th symbol in the driving rhythm sequence q, where 3 is the score when symbol p i With q j When the scores are the same, p i With q j Neither is '-', -3 is when the symbol p i With q j Different times or p i With q j A score is awarded when at least one of the values is '-';
[0024] S43: |p| and |q| are the lengths of the two driving rhythm sequences, respectively. A scoring matrix of size (|p|+1)*(|q|+1) is constructed using the scoring rules. The elements M in the scoring matrix... i,j The expression is:
[0025]
[0026] Where i represents the row number of the score matrix, j represents the column number of the score matrix, and M i-1,j -w indicates the driving rhythm sequence p i Add a shift character, M, at the position. i,j-1 -w indicates the driving rhythm sequence q j Add a shift character at the position and record the empty space penalty score w = 2;
[0027] S44: Traverse the score matrix, find the highest score point, and backtrack from the highest score point to the top left corner; if the backtracking direction is diagonal, it means the two symbols match; if the backtracking direction is to the right, it means a shift symbol is added to the driving rhythm sequence q at that position; if the backtracking direction is upward, it means a shift symbol is added to the driving rhythm sequence p at that position; until the score matrix element is 0, the backtracking path is the longest similar subsequence of the two driving rhythm sequences;
[0028] S45: Define the longest similar subsequence as V, and construct a scoring method for the longest similar subsequence: score(V)u The expression is:
[0029]
[0030] Where u is the element number in the longest similarity sequence, V u The element at position u in the longest similarity sequence;
[0031] The formula for calculating the similarity between driving rhythm sequences in different scenarios is as follows:
[0032]
[0033] Where |V| is the length of the longest similar subsequence, and maxLen is the length of the longest sequence among the two driving rhythm sequences p and q.
[0034] Preferably, step S5 specifically includes:
[0035] S51: For a set of driving rhythm sequences with n driving rhythm sequences, select k driving rhythm sequences as the central driving rhythm sequence, where k <n;
[0036] S52: Calculate the similarity between each non-central driving rhythm sequence and each central driving rhythm sequence in turn, and add the non-central driving rhythm sequence to the driving rhythm sequence subset containing the central driving rhythm sequence with the highest similarity.
[0037] S53: In each subset of driving rhythm sequences, calculate the similarity score F for each driving rhythm sequence using the following formula:
[0038]
[0039] Where a and b are the numbers of the driving rhythm sequences in the current driving rhythm sequence subset, and m is the total number of driving rhythm sequences in the current driving rhythm sequence subset.
[0040] Set the driving rhythm sequence with the highest similarity score as the new central driving rhythm sequence;
[0041] S54: Repeat steps S52 to S53 until the central driving rhythm sequence no longer changes, and obtain the clustered driving rhythm sequence set.
[0042] S55: The number of clusters in the driving rhythm sequence set is determined by the sum of squared errors of the clusters, and the calculation formula is as follows:
[0043]
[0044] Where e is the number of the cluster center driving rhythm sequence, r is the number of the cluster non-center driving rhythm sequence, and C eFor the cluster center driving rhythm sequence, C r This is a clustered, non-central driving rhythm sequence;
[0045] S56: Using the central sequence of each cluster as a feature sequence, analyze the path selection pattern and sentiment tendency of the feature sequence.
[0046] A path driving rhythm pattern analysis system based on DNA sequence characterization includes:
[0047] The preprocessing module is used to obtain the original taxi trajectory dataset, preprocess the original taxi trajectory dataset, and obtain the preprocessed taxi trip trajectory stream dataset.
[0048] The distance cost acquisition module is used to construct the OD cost matrix. The preprocessed taxi trip trajectory flow dataset is input into the OD cost matrix to obtain the distance cost between each trajectory point in the road network in each trajectory flow.
[0049] The driving rhythm sequence construction module is used to construct the driving rhythm sequence of a trajectory based on the distance cost of the trajectory in the road network, combined with the transit time and average speed between trajectory points.
[0050] The similarity calculation module is used to compare the similarity of driving rhythm sequences in various scenarios using the Smith-Waterman algorithm, and calculate the similarity between driving rhythm sequences in various scenarios.
[0051] The clustering analysis module is used to perform clustering analysis on driving rhythm sequences in various scenarios, using similarity as a score, to obtain taxi drivers' route selection patterns and emotional tendencies in each scenario.
[0052] The present invention has the following beneficial effects:
[0053] This invention utilizes taxi trajectory data to mine and analyze people's route selection patterns and emotional tendencies, proposing a novel method for analyzing route driving rhythm patterns based on DNA sequence representation. This method can uncover excellent route selection patterns and typical route selection emotional tendencies, contributing to the improvement and personalization of route planning algorithms, providing travelers with a better travel experience, and also offering a reference for urban transportation planning. Attached Figure Description
[0054] Figure 1 This is a flowchart of a method according to an embodiment of the present invention;
[0055] Figure 2 A schematic diagram of a taxi trip trajectory flow dataset;
[0056] Figure 3 This is a diagram illustrating the score matrix and backtracking path;
[0057] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0058] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0059] Reference Figure 1 This invention provides a method for analyzing path driving rhythm patterns based on DNA sequence characterization. Taxi drivers are considered as an excellent group for optimal path decision-making. The driving experience of taxi drivers has high reference value for road selection. The method of this invention can obtain excellent path selection patterns and emotional tendencies, which helps to improve path planning algorithms and also provides a reference for urban road planning.
[0060] include:
[0061] S1: Obtain the original taxi trajectory dataset, preprocess the original taxi trajectory dataset, and obtain the preprocessed taxi trip trajectory stream dataset;
[0062] S2: Construct the OD cost matrix. Input the preprocessed taxi trip trajectory flow dataset into the OD cost matrix to obtain the distance cost between each trajectory point in the road network in each trajectory flow.
[0063] S3: Based on the distance cost of the trajectory in the road network, combined with the transit time and average speed between trajectory points, a driving rhythm sequence for the trajectory is constructed;
[0064] S4: The Smith-Waterman algorithm is used to compare the similarity of driving rhythm sequences in each scenario and calculate the degree of similarity between driving rhythm sequences in each scenario.
[0065] S5: Using similarity as a score, cluster analysis is performed on the driving rhythm sequences in each scenario to obtain the taxi drivers' route selection patterns and emotional tendencies in each scenario.
[0066] In this embodiment, step S1 specifically includes:
[0067] The original taxi trajectory dataset is cleaned by removing trajectory data of non-operating vehicles, malfunctioning vehicles, and empty vehicles. The cleaned dataset is the trip trajectory dataset. The valid trajectory point data is divided into passenger trips according to passenger status, and the trajectory point data of each passenger trip is obtained. The trajectory point data that are offset in the passenger trip are fitted to the road network. At this time, the trajectory point data of each passenger trip constitutes the trajectory flow of the corresponding trip. The trajectory flows of all trips constitute the taxi trip trajectory flow dataset.
[0068] Specifically, the original taxi trajectory dataset consists of taxi trajectory GPS data. The taxi trajectory dataset records information such as vehicle number, recording time, point coordinates, vehicle status, passenger status, and fault status.
[0069] For the original taxi trajectory dataset, the dataset is first divided according to vehicle number. Each data entry is read sequentially, discarding data for disabled or inactive vehicles. For the remaining data, the vehicle number, coordinates, reporting time, and passenger status are extracted. Since some redundant data remains in the extracted dataset, and multiple trips are contained within the same vehicle number, the dataset must be segmented into trips. The dataset is sorted by time, and the first recorded loaded vehicle is found. The dataset is then traversed; if the record is still a loaded vehicle, the trip is not yet finished; if it is an empty vehicle, the trip is finished, thus obtaining a complete passenger trip. All passenger trips are segmented in this way. Finally, the offset trip points are fitted onto the road network. The resulting taxi trip trajectory stream dataset is illustrated in the diagram below. Figure 2 As shown.
[0070] In this embodiment, step S2 specifically includes:
[0071] An OD cost matrix is constructed using road network data. The starting and ending points of each trajectory point in the trajectory flow are then loaded into the OD cost matrix in turn, and the distance cost between each trajectory point in all trajectory flows is calculated.
[0072] In this embodiment, step S3 specifically includes:
[0073] S31: Read each trajectory point in the trajectory flow data of the taxi trip trajectory flow dataset in chronological order, calculate the passage time of two trajectory points before and after adjacent time points; obtain the distance cost corresponding to the two trajectory points, and divide the distance cost by the passage time to obtain the average speed of the segment corresponding to the two trajectory points.
[0074] S32: If the average velocity of a segment is less than or equal to a preset value, then retain the two trajectory points of that segment; otherwise, discard the two trajectory points of that segment.
[0075] Specifically, when the average speed within a segment is less than or equal to 120, the data is considered valid and the average speed of the segment is recorded; when the average speed within a segment is greater than 120, the data is considered invalid and is not recorded, and the segment is discarded.
[0076] S33: Establish the correspondence between congestion level, speed range and symbol; based on the average speed of each segment, use a specific symbol to represent the congestion level of the current segment; symbolize all segments in the trajectory flow in sequence, thus forming a symbol sequence resembling a DNA sequence, which is the driving rhythm sequence of the trajectory flow.
[0077] Specifically, based on the correspondence between average vehicle speed and congestion level in the "Road Traffic Congestion Evaluation Method" (GA / T 115-2020), the correspondence between average speed and traffic congestion level for road segments and their sequence representation are defined. According to the correspondence between average vehicle speed and congestion level, the driving rhythm sequence of independent travel trajectories is represented by corresponding characters based on the average speed, and the average speed, travel distance, starting coordinates, ending coordinates, and driving rhythm sequence of the entire trajectory are recorded.
[0078] In this embodiment, step S4 specifically includes:
[0079] S41: Divide the driving rhythm sequence into different scenarios based on the starting and ending points, travel distance, and time period;
[0080] Specifically, in order to control the impact of different scenarios, different travel distances and different time periods on route selection sentiment, we first divided the scenarios, travel distances and time periods, and selected OD grid pairs with larger sequence data in different situations as research objects, and divided the sequences in the selected OD grid pairs into empirical groups;
[0081] The scene division method is as follows:
[0082] First, the OD grid pairs are divided into main urban areas and suburban areas according to administrative divisions. This further divides the OD grid pair scenarios into four groups: main urban area-main urban area, main urban area-suburban area, suburban area-main urban area, and suburban area-suburban area. Within these four different scenarios, the OD grid pairs are further divided according to travel distance into three groups: short-distance, medium-distance, and long-distance. OD grid pairs with a distance of no more than 3km (i.e., the sum of the differences in grid coordinate numbers is less than 2) are classified as the short-distance group. OD grid pairs with a distance greater than 3km but not more than 10km (i.e., the sum of the differences in grid coordinate numbers is greater than 2 but less than 5) are classified as the medium-distance group. OD grid pairs with a distance greater than 10km (i.e., the sum of the differences in grid coordinate numbers is greater than 5) are classified as the long-distance group. The travel distance classification table is shown in Table 1.
[0083] Table 1. Trip Distance Division Table
[0084]
[0085]
[0086] Based on the segmentation of scenarios and travel distances, the sequences within the grid are further divided into peak and off-peak traffic periods according to the start and end times. Based on people's travel patterns, the periods 7:00-9:00, 12:00-14:00, 17:00-19:00, and 20:00-22:00 are identified as peak traffic periods, while the periods 9:00-12:00, 14:00-17:00, 19:00-20:00, and 22:00-7:00 are identified as off-peak traffic periods. If both the start and end times of a sequence fall within a peak traffic period, it is classified as a peak traffic period group; otherwise, it is classified as an off-peak traffic period group. The classification table for peak and off-peak traffic periods is shown in Table 2.
[0087] Table 2. Classification of Peak and Off-Peak Traffic Hours
[0088]
[0089] Experimental and control groups were set up during different traffic periods. The first 30% of the average trip speed was set up as the experimental group, named the experienced group. The last 30% of the average trip speed was set up as a control group, named the inexperienced group. The middle 40% of the average trip speed was set up as another control group, named the semi-experienced group. The division of the experience groups is shown in Table 3.
[0090] Table 3. Experience Group Classification Table
[0091]
[0092] S42: Since most driving rhythm sequences are of unequal length, and this invention aims to identify path selection features within driving rhythm sequences, the Smith-Waterman algorithm is adopted. Scoring rules and recursive formulas are established, and the similarity score matrix for each pair of sequences is calculated based on these rules. The longest matching driving rhythm sequence segment is then identified by backtracking, and the similarity between each pair of sequences is calculated. A similarity table for the sequence set is then constructed. The specific construction process is as follows:
[0093] For two driving rhythm sequences p and q, a scoring rule is established, expressed as follows:
[0094]
[0095] Among them, S(p i ,q j ) represents the score of comparing the (i-1)th symbol in the driving rhythm sequence p with the (j-1)th symbol in the driving rhythm sequence q, where 3 is the score when symbol p i With q j When the scores are the same, p i With qj Neither is '-', -3 is when the symbol p i With q j Different times or p i With q j A score is awarded when at least one of the values is '-';
[0096] S43: |p| and |q| are the lengths of the two driving rhythm sequences, respectively. A scoring matrix of size (|p|+1)*(|q|+1) is constructed using the scoring rules. The elements M in the scoring matrix... i,j The expression is:
[0097]
[0098] Where i represents the row number of the score matrix, j represents the column number of the score matrix, and M i-1,j -w indicates the driving rhythm sequence p i Add a shift character, M, at the position. i,j-1 -w indicates the driving rhythm sequence q j Add a shift character at the position and record the empty space penalty score w = 2;
[0099] S44: Traverse the score matrix, find the highest score point, and backtrack from the highest score point to the top left corner. If the backtracking direction is diagonal, it means the two symbols match. If the backtracking direction is to the right, it means a shift symbol is added to the driving rhythm sequence q at that position. If the backtracking direction is upward, it means a shift symbol is added to the driving rhythm sequence p at that position. Continue until the score matrix element is 0, and the backtracking path is the longest similar subsequence of the two driving rhythm sequences. Finally, the score matrix and backtracking path are obtained as follows: Figure 3 As shown;
[0100] S45: Define the longest similar subsequence as V, and construct a scoring method for the longest similar subsequence: score(V) u The expression is:
[0101]
[0102] Where u is the element number in the longest similarity sequence, V u The element at position u in the longest similarity sequence;
[0103] The formula for calculating the similarity between driving rhythm sequences in different scenarios is as follows:
[0104]
[0105] Where |V| is the length of the longest similar subsequence, and maxLen is the length of the longest sequence among the two driving rhythm sequences p and q.
[0106] In this embodiment, the similarity between driving rhythm sequences is used as the distance, and the K-centroid clustering idea is used to perform sequence clustering analysis on the driving rhythm sequences;
[0107] Step S5 is as follows:
[0108] S51: For a set of driving rhythm sequences with n driving rhythm sequences, select k driving rhythm sequences as the central driving rhythm sequence, where k <n;
[0109] S52: Calculate the similarity between each non-central driving rhythm sequence and each central driving rhythm sequence in turn, and add the non-central driving rhythm sequence to the driving rhythm sequence subset containing the central driving rhythm sequence with the highest similarity.
[0110] S53: In each subset of driving rhythm sequences, calculate the similarity score F for each driving rhythm sequence using the following formula:
[0111]
[0112] Where a and b are the numbers of the driving rhythm sequences in the current driving rhythm sequence subset, and m is the total number of driving rhythm sequences in the current driving rhythm sequence subset.
[0113] Set the driving rhythm sequence with the highest similarity score as the new central driving rhythm sequence;
[0114] S54: Repeat steps S52 to S53 until the central driving rhythm sequence no longer changes, and obtain the clustered driving rhythm sequence set.
[0115] S55: The number of clusters in the driving rhythm sequence set is determined by the sum of squared errors of the clusters, and the calculation formula is as follows:
[0116]
[0117] Where e is the number of the cluster center driving rhythm sequence, r is the number of the cluster non-center driving rhythm sequence, and C e For the cluster center driving rhythm sequence, C r This is a clustered, non-central driving rhythm sequence;
[0118] S56: Using the central sequence of each cluster as a feature sequence, analyze the path selection pattern and sentiment tendency of the feature sequence.
[0119] This invention provides a path driving rhythm pattern analysis system based on DNA sequence characterization, comprising:
[0120] The preprocessing module is used to obtain the original taxi trajectory dataset, preprocess the original taxi trajectory dataset, and obtain the preprocessed taxi trip trajectory stream dataset.
[0121] The distance cost acquisition module is used to construct the OD cost matrix. The preprocessed taxi trip trajectory flow dataset is input into the OD cost matrix to obtain the distance cost between each trajectory point in the road network in each trajectory flow.
[0122] The driving rhythm sequence construction module is used to construct the driving rhythm sequence of a trajectory based on the distance cost of the trajectory in the road network, combined with the transit time and average speed between trajectory points.
[0123] The similarity calculation module is used to compare the similarity of driving rhythm sequences in various scenarios using the Smith-Waterman algorithm, and calculate the similarity between driving rhythm sequences in various scenarios.
[0124] The clustering analysis module is used to perform clustering analysis on driving rhythm sequences in various scenarios, using similarity as a score, to obtain taxi drivers' route selection patterns and emotional tendencies in each scenario.
[0125] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0126] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. In the unit claims listing several devices, several of these devices may be embodied by the same hardware item. The use of the terms first, second, and third, etc., does not indicate any order and can be interpreted as identifiers.
[0127] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for analyzing path driving rhythm patterns based on DNA sequence characterization, characterized in that, include: S1: Obtain the original taxi trajectory dataset, preprocess the original taxi trajectory dataset, and obtain the preprocessed taxi trip trajectory stream dataset; S2: Construct the OD cost matrix. Input the preprocessed taxi trip trajectory flow dataset into the OD cost matrix to obtain the distance cost between each trajectory point in the road network in each trajectory flow. S3: Based on the distance cost of the trajectory in the road network, combined with the transit time and average speed between trajectory points, a driving rhythm sequence for the trajectory is constructed; Step S3 is as follows: S31: Read each trajectory point in the trajectory flow data of the taxi trip trajectory flow dataset in chronological order, calculate the passage time of two trajectory points before and after adjacent time points; obtain the distance cost corresponding to the two trajectory points, and divide the distance cost by the passage time to obtain the average speed of the segment corresponding to the two trajectory points. S32: If the average velocity of a segment is less than or equal to a preset value, then retain the two trajectory points of that segment; otherwise, discard the two trajectory points of that segment. S33: Establish the correspondence between congestion level, speed range and symbol; based on the average speed of each segment, use a specific symbol to represent the congestion level of the current segment; symbolize all segments in the trajectory flow in sequence, thus forming a symbol sequence resembling a DNA sequence, which is the driving rhythm sequence of the trajectory flow. S4: The Smith-Waterman algorithm is used to compare the similarity of driving rhythm sequences in each scenario and calculate the degree of similarity between driving rhythm sequences in each scenario. S5: Using similarity as a score, cluster analysis is performed on the driving rhythm sequences in each scenario to obtain the taxi drivers' route selection patterns and emotional tendencies in each scenario.
2. The method for analyzing path driving rhythm patterns based on DNA sequence characterization according to claim 1, characterized in that, Step S1 is as follows: The original taxi trajectory dataset is cleaned by removing trajectory data of non-operating vehicles, malfunctioning vehicles, and empty vehicles. The cleaned dataset is the trip trajectory dataset. The valid trajectory point data is divided into passenger trips according to passenger status, and the trajectory point data of each passenger trip is obtained. The trajectory point data that are offset in the passenger trip are fitted to the road network. At this time, the trajectory point data of each passenger trip constitutes the trajectory flow of the corresponding trip. The trajectory flows of all trips constitute the taxi trip trajectory flow dataset.
3. The method for analyzing path driving rhythm patterns based on DNA sequence characterization according to claim 1, characterized in that, Step S2 is as follows: An OD cost matrix is constructed using road network data. The starting and ending points of each trajectory point in the trajectory flow are then loaded into the OD cost matrix in turn, and the distance cost between each trajectory point in all trajectory flows is calculated.
4. The method for analyzing path driving rhythm patterns based on DNA sequence characterization according to claim 1, characterized in that, Step S4 is as follows: S41: Divide the driving rhythm sequence into different scenarios based on the starting and ending points, travel distance, and time period; S42: For two driving rhythm sequences p and q, establish a scoring rule, expressed as follows: in, S(p) i ,q j ) Indicates driving rhythm sequence p The Middle i -1 symbol and driving rhythm sequence q The Middle j -1 is the score for comparing symbols, 3 is the score when the symbol is... p i and q j When scores are the same, at this time p i and q j None of them are '-', -3 is when the symbol is '-'. p i and q j Not at the same time or p i and q j A score is awarded when at least one of the values is '-'; S43: |p| and |q| are the lengths of the two driving rhythm sequences, respectively. A scoring matrix of size (|p|+1)*(|q|+1) is constructed using the scoring rules. The elements of the scoring matrix... The expression is: Where i represents the row number of the score matrix, and j represents the column number of the score matrix. M i-1,j -w Indicating in driving rhythm sequence p i Add a shift character at the position. M i,j-1 -w Indicating in driving rhythm sequence q j Add a shift character at the position and record the empty space penalty score w=2; S44: Traverse the score matrix, find the highest score point, and backtrack from the highest score point to the top left corner; if the backtracking direction is diagonal, it means the two symbols match; if the backtracking direction is to the right, it means a shift symbol is added to the driving rhythm sequence q at that position; if the backtracking direction is upward, it means a shift symbol is added to the driving rhythm sequence p at that position; until the score matrix element is 0, the backtracking path is the longest similar subsequence of the two driving rhythm sequences; S45: Define the longest similar subsequence as V, and construct a scoring method for the longest similar subsequence. The expression is: Where u is the element number in the longest similarity sequence, V u The element at position u in the longest similarity sequence; The formula for calculating the similarity between driving rhythm sequences in different scenarios is as follows: Where |V| is the length of the longest similar subsequence, and maxLen is the length of the longest sequence among the two driving rhythm sequences p and q.
5. The method for analyzing path driving rhythm patterns based on DNA sequence characterization according to claim 1, characterized in that, Step S5 is as follows: S51: For a set of driving rhythm sequences with n driving rhythm sequences, select k driving rhythm sequences as the central driving rhythm sequence, where k <n; S52: Calculate the similarity between each non-central driving rhythm sequence and each central driving rhythm sequence in turn, and add the non-central driving rhythm sequence to the driving rhythm sequence subset containing the central driving rhythm sequence with the highest similarity. S53: In each subset of driving rhythm sequences, calculate the similarity score F for each driving rhythm sequence using the following formula: Where a and b are the numbers of the driving rhythm sequences in the current driving rhythm sequence subset, and m is the total number of driving rhythm sequences in the current driving rhythm sequence subset. Set the driving rhythm sequence with the highest similarity score as the new central driving rhythm sequence; S54: Repeat steps S52 to S53 until the central driving rhythm sequence no longer changes, and obtain the clustered driving rhythm sequence set. S55: The number of clusters in the driving rhythm sequence set is determined by the sum of squared errors of the clusters, and the calculation formula is as follows: Where e is the number of the cluster center driving rhythm sequence, and r is the number of the cluster non-center driving rhythm sequence. For the driving rhythm sequence of the cluster center, This is a clustered, non-central driving rhythm sequence; S56: Using the central sequence of each cluster as a feature sequence, analyze the path selection pattern and sentiment tendency of the feature sequence.
6. A path driving rhythm pattern analysis system based on DNA sequence characterization, used to implement the path driving rhythm pattern analysis method based on DNA sequence characterization as described in any one of claims 1-5, characterized in that, include: The preprocessing module is used to obtain the original taxi trajectory dataset, preprocess the original taxi trajectory dataset, and obtain the preprocessed taxi trip trajectory stream dataset. The distance cost acquisition module is used to construct the OD cost matrix. The preprocessed taxi trip trajectory flow dataset is input into the OD cost matrix to obtain the distance cost between each trajectory point in the road network in each trajectory flow. The driving rhythm sequence construction module is used to construct the driving rhythm sequence of a trajectory based on the distance cost of the trajectory in the road network, combined with the travel time and average speed between trajectory points. The specific steps are as follows: Read each trajectory point in the trajectory flow data of the taxi trip trajectory flow dataset in chronological order, calculate the passage time of two trajectory points before and after adjacent time points, obtain the distance cost corresponding to the two trajectory points, and divide the distance cost by the passage time to obtain the average speed of the segment corresponding to the two trajectory points. If the average velocity of a segment is less than or equal to a preset value, then retain the two trajectory points of that segment; otherwise, discard the two trajectory points of that segment. Establish the correspondence between congestion level, speed range and symbol. Based on the average speed of each segment, use a specific symbol to represent the congestion level of the current segment. All segments in the trajectory flow are symbolized in sequence, which constitutes a symbol sequence similar to a DNA sequence. This symbol sequence is the driving rhythm sequence of the trajectory flow. The similarity calculation module is used to compare the similarity of driving rhythm sequences in various scenarios using the Smith-Waterman algorithm, and calculate the similarity between driving rhythm sequences in various scenarios. The clustering analysis module is used to perform clustering analysis on driving rhythm sequences in various scenarios, using similarity as a score, to obtain taxi drivers' route selection patterns and emotional tendencies in each scenario.