Real-time bus track mining method and device
By mining users' historical bus route preferences and matching bus routes in real time, the classification model is used to improve the accuracy and coverage of real-time bus information, solving the problem of low efficiency in real-time bus information matching in existing technologies and improving user experience.
Patent Information
- Application Number
- CN202510820638.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-19
AI Technical Summary
In the existing technology, real-time bus location information mainly relies on cooperation, resulting in low efficiency in real-time bus information matching and poor user experience.
By using the classification model and matching module based on the historical data and real-time trajectory of the target user, the user's historical preferred bus routes and real-time matching bus routes are mined to improve the matching degree and achieve the accuracy of real-time bus trajectory.
It reduces the cost of real-time bus trajectory mining, improves the coverage and user experience of real-time bus information, and improves the accuracy and coverage of real-time bus information.
Smart Images

Figure CN120670487A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to the field of smart transportation and deep learning technology. Background Art
[0002] Smart transportation integrates cutting-edge internet technologies such as the Internet of Things, cloud computing, big data, and mobile internet, building upon intelligent transportation. This technology aggregates traffic information and provides real-time traffic data services. Extensive use of data processing technologies such as data modeling and data mining ensures the systematic, real-time nature of smart transportation, interactive information exchange, and widespread service provision. For public transportation users, smart transportation significantly optimizes travel routes and facilitates efficient travel planning.
[0003] Real-time public transportation is one of the important functions of map applications. By providing users with vehicle location information and predicted arrival times, it can help users reduce waiting anxiety, plan their trips in advance, and reduce unnecessary waiting. It is especially suitable for commuting, transfers and other scenarios.
[0004] Acquiring real-time bus vehicle location information is key to delivering real-time bus products. Currently, vehicle location information is typically provided through a purchasing agreement, with official real-time vehicle location information provided. Travel applications use this vehicle location information to match bus routes and identify the bus routes the vehicle is traveling on. This vehicle location information provides real-time bus information for that route. Summary of the Invention
[0005] The embodiments of the present disclosure provide a real-time bus trajectory mining method, apparatus, device, storage medium, and program product.
[0006] In a first aspect, an embodiment of the present disclosure proposes a real-time bus trajectory mining method, comprising: mining historical preferred bus routes based on historical data of a target user; determining a classification result of the target user based on the real-time trajectory of the target user, wherein the classification result is used to characterize the probability that the target user is a bus user; matching the real-time trajectory of the target user with the bus route to obtain a real-time matching bus route; and determining a first matching degree between the real-time trajectory of the target user and the real-time matching bus route based on the historical preferred bus route and the classification result, wherein the first matching degree is used to characterize the probability that the real-time trajectory of the target user is a real-time bus trajectory of the real-time matching bus route.
[0007] In a second aspect, an embodiment of the present disclosure proposes a real-time bus trajectory mining device, comprising: a first mining module, configured to mine historical preferred bus routes based on historical data of a target user; a classification module, configured to determine a classification result of the target user based on the real-time trajectory of the target user, wherein the classification result is used to characterize the probability that the target user is a bus user; a first matching module, configured to match the real-time trajectory of the target user with a bus route to obtain a real-time matching bus route; a second matching module, configured to determine a first matching degree between the real-time trajectory of the target user and the real-time matching bus route based on the historical preferred bus route and the classification result, wherein the first matching degree is used to characterize the probability that the real-time trajectory of the target user is a real-time bus trajectory of the real-time matching bus route.
[0008] In a third aspect, an embodiment of the present disclosure proposes an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the first aspect.
[0009] In a fourth aspect, an embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to enable a computer to execute the method described in the first aspect.
[0010] In a fifth aspect, an embodiment of the present disclosure proposes a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.
[0011] The key or important features of the embodiments of the present disclosure are not intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Other features, objects, and advantages of the present disclosure will become more apparent upon reading the detailed description of the non-limiting embodiments made with reference to the following drawings. The drawings are provided for a better understanding of the present disclosure and do not constitute a limitation of the present disclosure. Among them: Figure 1 is a flow chart of an embodiment of a real-time bus trajectory mining method according to the present disclosure; Figure 2 is a flowchart of another embodiment of the real-time bus trajectory mining method according to the present disclosure; Figure 3 is a flowchart of another embodiment of the real-time bus trajectory mining method according to the present disclosure; Figure 4 is a structural diagram of an embodiment of a real-time bus trajectory mining device according to the present disclosure; Figure 5 4 is a block diagram of an electronic device used to implement the real-time bus trajectory mining method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0013] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0014] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0015] Figure 1 A process 100 of an embodiment of a real-time bus trajectory mining method according to the present disclosure is shown. The real-time bus trajectory mining method includes the following steps: Step 101: Mining historically preferred bus routes based on historical data of target users.
[0016] In this embodiment, the execution subject of the real-time bus trajectory mining method can mine historical preferred bus routes based on the historical data of the target user.
[0017] The real-time bus trajectory mining method is typically executed by a server. The server can be either hardware or software. If the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers or as a single server. If the server is software, it can be implemented as multiple software programs or software modules (for example, to provide distributed services) or as a single software program or software module. This is not specifically limited here.
[0018] Based on historical data such as the target user's historical trajectory and the target user's historical access behavior data in the map application, the target user's historical preferred bus routes can be fully mined in a variety of ways.
[0019] In some embodiments, the target user's historical data may be the target user's historical access behavior data within a map application. Based on the target user's access behavior data, historically preferred bus routes can be mined. For example, if a user has previously searched for a bus route from one location to another in a map application and clicked on a bus route to view its details, it can be considered that the user has historically preferred that bus route.
[0020] In some embodiments, the target user's historical data may be their historical travel history. Based on their historical travel history, historical bus route preferences can be mined. Typically, the target user's historical travel history is matched with bus routes to determine historical bus routes; based on these historical travel history, historical bus route preferences are determined. Historical travel history may be the target user's travel history during historical bus operation periods. Obtaining the target user's historical travel history during these periods for matching can filter out travel history that occurred outside of bus routes, thereby reducing the matching workload. These historical travel history are then matched with the full set of bus routes. If a historical travel history matches a bus route, it can be assumed that the target user has historically traveled that route. By mining bus routes across multiple days of the target user's historical travel history and counting the target user's historical travel frequency for each bus route, the target user's historical bus route preferences can be precisely mined. For example, if a user took bus route A five times, bus route B four times, and bus route C once in the past seven days, it can be determined that the user has historically preferred bus routes A and B.
[0021] Step 102: Determine a classification result of the target user based on the real-time trajectory of the target user.
[0022] In this embodiment, the execution entity may determine the classification result of the target user based on the real-time trajectory of the target user, wherein the classification result may be used to represent the probability that the target user is a public transportation user.
[0023] A real-time trajectory can be a trajectory generated by the target user within a recent period (e.g., the last 10 minutes, the last 20 minutes, the last 30 minutes, etc.). Pre-set policy rules or a first classification model can be used to score the probability that the target user's real-time trajectory is a bus trajectory. The higher the probability that the real-time trajectory is a bus trajectory, the higher the probability that the target user is a bus user; the lower the probability that the real-time trajectory is a bus trajectory, the lower the probability that the target user is a bus user. For example, the similarity between the speed of the real-time trajectory and the bus speed, as well as the similarity between the real-time trajectory and the bus trajectory, can be calculated, and the similarity and similarity can be weighted summed to obtain the probability that the real-time trajectory is a bus trajectory. For another example, the key features of the target user's real-time trajectory can be extracted and input into the first classification model to obtain the probability that the real-time trajectory is a bus trajectory. Key features may include, but are not limited to, at least one of the following: trajectory speed, whether the trajectory stops at a station, and similarity to a bus trajectory. The first classification model can be a binary classification model or a multi-class classification model.
[0024] Step 103 : Match the real-time trajectory of the target user with the bus route to obtain a real-time matching bus route.
[0025] In this embodiment, the execution entity may match the real-time trajectory of the target user with the bus route to obtain a real-time matching bus route.
[0026] The target user's real-time trajectory is matched against all bus routes. If a point in the real-time trajectory is less than a preset distance threshold (e.g., 5 meters) from at least one bus route, the point is considered a match and marked as 1, with the point sequence recorded. If a point in the real-time trajectory is greater than or equal to the preset distance threshold from all bus routes, the point is considered an unmatched point and marked as -1. Based on the matching points, a real-time matching bus route can be determined. For example, if the number and ratio of matching points are both greater than a preset threshold and the matching points are in order, the bus route can be determined to be a real-time matching bus route.
[0027] It should be noted that in order to reuse stations, the bus group has a very high degree of local overlap between different bus routes. Therefore, a real-time trajectory can usually be matched to multiple (e.g., 8-9) bus routes.
[0028] Step 104 : Based on the historical preferred bus routes and the classification results, determine a first matching degree between the target user's real-time trajectory and the real-time matching bus routes.
[0029] In this embodiment, the execution entity may determine a first matching degree between the target user's real-time trajectory and the real-time matching bus route based on the historical preferred bus routes and the classification results. The first matching degree may be used to represent the probability that the target user's real-time trajectory is the real-time bus trajectory of the real-time matching bus route.
[0030] The probability that the target user's real-time trajectory is a real-time bus trajectory that matches a real-time bus route can be scored using preset strategy rules or a second classification model. The higher the probability that the real-time trajectory is a real-time bus trajectory that matches a real-time bus route, the higher the first degree of match between the real-time trajectory and the real-time bus route; the lower the probability that the real-time trajectory is a real-time bus trajectory that matches a real-time bus route, the lower the first degree of match between the real-time trajectory and the real-time bus route. For example, the frequency of historical preference for bus routes and the probability that the target user is a bus user can be weighted and summed to obtain the probability that the target user's real-time trajectory is a real-time bus trajectory that matches a real-time bus route. For another example, the historical preference for bus routes and the classification results can be input into the second classification model to obtain the probability that the target user's real-time trajectory is a real-time bus trajectory that matches a real-time bus route. The second classification model can be a binary classification model or a multi-classification model.
[0031] For the real-time matching bus route with the highest first matching degree, if the first matching degree is greater than a preset matching degree threshold, it means that the target user is taking the bus route, and the real-time trajectory of the target user can be used as the real-time bus trajectory of the bus route.
[0032] The embodiments of the present disclosure provide a real-time bus trajectory mining method, which mines real-time bus trajectories based on massive user trajectories, reduces the cost of real-time bus trajectory mining, effectively improves the coverage of real-time bus information, and provides users with a better experience.
[0033] Continue to refer Figure 2 , which shows a process 200 of another embodiment of the real-time bus trajectory mining method according to the present disclosure. The real-time bus trajectory mining method includes the following steps: Step 201 : mining historical preferred bus routes based on historical data of the target user.
[0034] In this embodiment, the specific operation of step 201 has been Figure 1 In the embodiment shown, step 101 is described in detail and will not be repeated here.
[0035] Step 202 : Mining real-time preferred bus routes based on the target user's real-time access behavior data within the map application.
[0036] In this embodiment, the execution subject of the real-time bus trajectory mining method can mine real-time preferred bus routes based on the real-time access behavior data of the target user in the map application.
[0037] If the target user is a map app user, real-time preferred bus routes can also be mined based on their real-time access behavior data within the map app. This real-time access behavior data can include the target user's access behavior within the map app over a recent period of time (e.g., the last 10 minutes, the last 20 minutes, the last 30 minutes, etc.). For example, if a user recently searched for bus routes from one location to another in a map app and clicked on a particular bus route to view its details, it can be considered that the user has a real-time preference for that bus route.
[0038] Step 203: Determine the classification result of the target user based on the real-time trajectory of the target user.
[0039] Step 204 : Match the target user's real-time trajectory with the bus route to obtain a real-time matching bus route.
[0040] In this embodiment, the specific operations of steps 203-204 are already described in Figure 1 In the illustrated embodiment, steps 102-103 are described in detail and will not be repeated here.
[0041] Step 205 : Input the historical preferred bus routes, the real-time preferred bus routes, and the classification results into a second classification model to obtain a first matching degree.
[0042] In this embodiment, the execution entity may input the historical preferred bus routes, the real-time preferred bus routes, and the classification results into the second classification model to obtain a first matching degree.
[0043] The second classification model can be used to score the probability that the target user's real-time trajectory is a real-time bus trajectory that matches the real-time bus route. The higher the probability that the real-time trajectory is a real-time bus trajectory that matches the real-time bus route, the higher the first matching degree between the real-time trajectory and the real-time bus route; the lower the probability that the real-time trajectory is a real-time bus trajectory that matches the real-time bus route, the lower the first matching degree between the real-time trajectory and the real-time bus route. For example, the historical preferred bus routes, the real-time preferred bus routes, and the classification results are input into the second classification model to obtain the probability that the target user's real-time trajectory is a real-time bus trajectory that matches the real-time bus route. The second classification model can be a binary classification model or a multi-classification model.
[0044] For map app users, the second classification model can be used to score users by inputting not only historical bus route preferences and classification results, but also real-time bus route preferences. This allows for more information to be used in real-time bus trajectory mining, improving its accuracy.
[0045] Step 206 : Determine inter-group statistical features based on the preferred frequencies of the real-time matched bus routes and the first matching degree.
[0046] In this embodiment, the execution subject of the real-time bus trajectory mining method may determine inter-group statistical features based on the preference frequency and the first matching degree of the real-time matching bus routes.
[0047] Adding inter-group statistical features for user preferences and second classification model scores can effectively distinguish the differences between the target users' bus route preference frequencies, for example, 5, 0, 0 and 5, 4, 4, as well as the differences between the second classification model scores, for example, 0.8, 0.1, 0.1 and 0.8, 0.7, 0.7. Among them, the inter-group statistical features may include but are not limited to at least one of the following: the ratio and global difference of the preference frequency of the real-time matching bus route with the highest first matching degree to the sum of the preference frequencies of all real-time matching bus routes, the ratio and difference of the preference frequency of the real-time matching bus route with the highest first matching degree to the sum of the preference frequencies of the real-time matching bus routes that are not the highest first matching degree, the ratio and difference of the preference frequency of the real-time matching bus route with the highest first matching degree to the preference frequency of the real-time matching bus route with the second highest first matching degree, the difference between the highest first matching degree and the sum of all first matching degrees, the ratio and difference between the highest first matching degree and the sum of the non-highest first matching degrees, the ratio and difference between the highest first matching degree and the second highest first matching degree, etc. The calculation formula thereof may be as follows: The ratio of the preference frequency of the first real-time matching bus route with the highest matching degree to the sum of the preference frequencies of all real-time matching bus routes = the target user's preference frequency for the Top 1 real-time matching bus route / the sum of the target user's preference frequencies for all real-time matching bus routes.
[0048] The global difference between the preference frequency of the first real-time matching bus route with the highest matching degree and the sum of the preference frequencies of all real-time matching bus routes = the sum of the target user's preference frequencies for all real-time matching bus routes - the target user's preference frequency for the top 1 real-time matching bus route.
[0049] The ratio of the preference frequency of the real-time matching bus route with the highest first matching degree to the sum of the preference frequencies of the real-time matching bus routes that are not the highest first matching degree = the target user's preference frequency for the Top1 real-time matching bus route / the sum of the target user's preference frequencies for the non-Top1 real-time matching bus routes.
[0050] The difference between the preference frequency of the real-time matching bus route with the highest first matching degree and the sum of the preference frequencies of the real-time matching bus routes that are not the highest first matching degree = the target user's preference frequency for the Top1 real-time matching bus route - the sum of the target user's preference frequencies for the non-Top1 real-time matching bus routes.
[0051] The ratio of the preference frequency of the real-time matching bus route with the highest first matching degree to the preference frequency of the real-time matching bus route with the second highest first matching degree = the target user's preference frequency for the Top1 real-time matching bus route / the target user's preference frequency for the Top2 real-time matching bus route.
[0052] The difference between the preference frequency of the real-time matching bus route with the highest first matching degree and the preference frequency of the real-time matching bus route with the second highest first matching degree = the target user's preference frequency for the Top1 real-time matching bus route - the target user's preference frequency for the Top2 real-time matching bus route.
[0053] The ratio of the highest first matching degree to the sum of all first matching degrees = the score of the Top1 real-time matching bus route model / the sum of the scores of all real-time matching bus route models.
[0054] The difference between the highest first matching degree and the sum of all first matching degrees = the score of the Top1 real-time matching bus route model - the sum of the scores of all real-time matching bus route models.
[0055] The ratio of the highest first matching degree to the sum of the non-highest first matching degrees = the score of the top 1 real-time matching bus route model / the sum of the scores of the non-top 1 real-time matching bus route models.
[0056] The difference between the highest first matching degree and the sum of the non-highest first matching degrees = the score of the Top1 real-time matching bus route model - the sum of the scores of the non-Top1 real-time matching bus route models.
[0057] The ratio of the highest first matching degree to the second highest first matching degree = Top1 real-time matching bus route model score / Top2 real-time matching bus route model score.
[0058] The difference between the highest first matching degree and the second highest first matching degree = the score of the Top1 real-time matching bus route model - the score of the Top2 real-time matching bus route model.
[0059] Step 207 : performing spatiotemporal aggregation on the target user's real-time trajectory and the real-time trajectories of other users to obtain a multi-trajectory aggregation feature.
[0060] In this embodiment, the execution entity may perform spatiotemporal aggregation on the real-time trajectory of the target user and the real-time trajectories of other users to obtain a multi-trajectory aggregation feature.
[0061] Since buses carry many passengers, the real-time trajectories of multiple passengers on the same bus will also conform to the temporal and spatial order of the bus route. Therefore, we can add multiple real-time trajectories of other users that match the target user's real-time trajectory in temporal and spatial order, and then aggregate them to obtain multi-trajectory aggregation features.
[0062] For example, if two real-time trajectories are spatiotemporally ordered and have points at the same time and location, then they are considered to be the trajectories of two passengers on the same bus. In this case, the two real-time trajectories can be spatiotemporally aggregated, that is, the two real-time trajectories can be merged into a single trajectory.
[0063] It should be noted that the more real-time trajectories of other users that can be spatiotemporally aggregated with the real-time trajectory of the target user, the greater the probability that the real-time trajectory of the target user is a real-time bus trajectory.
[0064] Step 208 : Based on the historical preferred bus routes, the real-time preferred bus routes, the classification results, the inter-group statistical features, and the multi-trajectory aggregation features, a second matching degree between the target user's real-time trajectory and the real-time matching bus route with the highest first matching degree is determined.
[0065] In this embodiment, the execution entity may determine a second degree of matching between the target user's real-time trajectory and the real-time matching bus route with the highest first degree of matching based on historical preferred bus routes, real-time preferred bus routes, classification results, inter-group statistical features, and multi-trajectory aggregation features. The second degree of matching may be used to represent the probability that the target user's real-time trajectory is the real-time bus trajectory of the real-time matching bus route with the highest first degree of matching.
[0066] The probability that the target user's real-time trajectory is the real-time bus trajectory of the real-time matching bus route with the highest first matching degree can be re-scored using preset strategy rules or a second classification model. The higher the probability that the real-time trajectory is the real-time bus trajectory of the real-time matching bus route with the highest first matching degree, the higher the second matching degree of the real-time trajectory with the real-time matching bus route with the highest first matching degree. The lower the probability that the real-time trajectory is the real-time bus trajectory of the real-time matching bus route with the highest first matching degree, the lower the second matching degree of the real-time trajectory with the real-time matching bus route with the highest first matching degree. For example, a weighted sum of historical preferred bus routes, real-time preferred bus routes, classification results, inter-group statistical features, and multi-trajectory aggregate features can be used to determine the probability that the target user's real-time trajectory is the real-time bus trajectory of the real-time matching bus route with the highest first matching degree. For another example, the historical preferred bus routes, real-time preferred bus routes, classification results, inter-group statistical features, and multi-trajectory aggregate features can be input into the second classification model to determine the probability that the target user's real-time trajectory is the real-time bus trajectory of the real-time matching bus route with the highest first matching degree. The second classification model can be a binary classification model or a multi-class classification model.
[0067] For the real-time matching bus route with the second highest matching degree, if the second matching degree is greater than the preset matching degree threshold, it means that the target user is taking the bus route, and the real-time trajectory of the target user can be used as the real-time bus trajectory of the bus route.
[0068] The disclosed embodiments provide a real-time bus trajectory mining method that adds inter-group statistical features and multi-trajectory aggregation features for secondary scoring. This method can effectively distinguish the difference between target users' bus route preference frequencies, for example, 5, 0, 0 and 5, 4, 4, as well as the difference between the second classification model scores, for example, 0.8, 0.1, 0.1 and 0.8, 0.7, 0.7, thereby effectively improving the accuracy of real-time bus trajectory mining.
[0069] Further references Figure 3 , which shows a process 300 of another embodiment of the real-time bus trajectory mining method according to the present disclosure. The real-time bus trajectory mining method includes the following steps: Step 301 : Match the historical trajectory of the target user with the bus routes to obtain matching trajectory points, unmatched trajectory points, and historical matching bus routes.
[0070] In this embodiment, the execution subject of the real-time bus trajectory mining method can match the historical trajectory of the target user with the bus routes to obtain matching trajectory points, unmatched trajectory points and historical matching bus routes.
[0071] Among them, historical trajectories are usually the trajectories generated by the target user during the historical bus operation period. Obtaining the target user's trajectory during the historical bus operation period for matching can filter out trajectories generated by the target user on non-bus routes, thereby reducing the matching workload. These historical trajectories are matched with the full set of bus routes. If the distance between a trajectory point in the historical trajectory and at least one bus route is less than a preset distance threshold (such as 5 meters), then the trajectory point is a matching trajectory point and can be marked as 1, and the point sequence is recorded; if the distance between a trajectory point in the historical trajectory and all bus routes is greater than or equal to the preset distance threshold, then the trajectory point is an unmatched trajectory point and can be marked as -1. Based on the matching trajectory points, the historical matching bus routes can be determined. For example, if the number and ratio of matching trajectory points are both greater than a preset threshold, and the matching trajectory points are in order, then the bus route can be determined to be a historical matching bus route.
[0072] Step 302: Determine the maximum matching trajectory segment based on the matching trajectory points and the non-matching trajectory points.
[0073] In this embodiment, the execution entity may determine the maximum matching trajectory segment based on the matching trajectory points and the non-matching trajectory points.
[0074] In the real world, historical trajectories generally only match bus routes for a period of time, and trajectory positioning is prone to drift. Therefore, it is necessary to mine the maximum trajectory segment that matches the historical trajectory with the bus route, and consider a certain degree of fault tolerance. Based on the matching trajectory points and non-matching trajectory points of the historical trajectory, the matching rate can be calculated, and then the maximum matching trajectory segment can be mined. Among them, the maximum matching trajectory segment can be divided into a first maximum matching trajectory segment and a second maximum matching trajectory segment. The first maximum matching trajectory segment can be determined by traversing the subsequent trajectory points of the matching trajectory point. The second maximum matching trajectory segment can be determined by traversing the subsequent trajectory points of the first maximum matching trajectory segment.
[0075] In some embodiments, for each matching trajectory point, the first subsequent estimated point of the matching trajectory point can be traversed backwards, the number of matching points and the number of non-matching points of the first subsequent trajectory point can be counted, and a first matching rate can be calculated based on the number of matching points and the number of non-matching points of the first subsequent trajectory point. When the first matching rate is less than a preset matching rate threshold, the traversal is stopped to obtain the first maximum matching trajectory segment.
[0076] In some embodiments, for each first maximum matching trajectory segment, its second subsequent trajectory points can be traversed backward from the end point of the first maximum matching trajectory segment, the number of matching points and the number of non-matching points of the second subsequent trajectory points can be counted, and the second matching rate can be calculated based on the number of matching points and the number of non-matching points of the second subsequent trajectory points. When the second matching rate is less than a preset matching rate threshold, the traversal is stopped to obtain the second maximum matching trajectory segment.
[0077] The first matching rate is equal to the quotient of the number of matching points of the first subsequent trajectory point and the total number of points of the first subsequent trajectory point. The second matching rate is equal to the quotient of the number of matching points of the second subsequent trajectory point and the total number of points of the first subsequent trajectory point. The preset matching rate threshold can vary depending on the road scene. For example, for ordinary highway scenes, the preset matching rate threshold will be higher and can be set to 70%-80%; for scenes such as tunnels, elevated roads, and parallel roads that are prone to positioning drift, the preset matching rate threshold will be lower and can be set to 30-50%.
[0078] Splitting historical trajectories into maximum matching segments effectively preserves the most likely bus trajectories and reduces the trajectory size. Compared to traditional methods that split trajectories by fixed time, this approach offers higher performance and matching results.
[0079] Step 303 : Perform spatiotemporal matching on the maximum matching trajectory segment and the historical bus trajectory of the historical matching bus route to obtain a spatiotemporal matching degree.
[0080] In this embodiment, the execution entity may perform spatiotemporal matching on the maximum matching trajectory segment and the historical bus trajectory of the historical matching bus route to obtain a spatiotemporal matching degree.
[0081] For each maximum matching trajectory segment, time matching and space matching are performed between the maximum matching trajectory segment and the historical bus trajectory of each bus on the historical matching bus route to obtain the spatiotemporal matching degree.
[0082] In some embodiments, for each maximum matching trajectory segment and the historical bus trajectory of each bus on the historical matching bus route, the trajectory points of the maximum matching trajectory segment are temporally matched with the trajectory points of the historical bus trajectory to obtain a time matching trajectory point pair; and the time matching trajectory point pair is spatially matched to obtain a spatiotemporal matching degree.
[0083] Each track point in the maximum matching trajectory segment and each track point in the historical bus trajectory contain a timestamp and coordinates. Temporal matching can be performed by matching the timestamps of the track points in the maximum matching trajectory segment with those of the historical bus trajectory. The track point pair with the smallest timestamp difference is identified as the temporally matching track point pair. Spatial matching can be performed by matching the coordinates of the found temporally matching track point pair. If the distance between the two track points is less than a preset distance threshold (e.g., 50 meters), the two track points are spatially matched, i.e., a spatiotemporally matching track point pair. If the distance between the two track points is greater than or equal to the preset distance threshold, the two track points are spatially mismatched. After the spatiotemporal matching of all track points in the maximum matching trajectory segment and all track points in the historical bus trajectory is completed, the number of spatiotemporally matching track point pairs can be counted. Based on this number of spatiotemporally matching track point pairs, the spatiotemporal matching degree can be determined. The spatiotemporal matching degree can be calculated as the quotient of the number of spatiotemporally matching track point pairs and the total number of track points in the maximum matching trajectory segment.
[0084] Step 304 : Determine the confidence level based on the historical bus trajectory with the highest spatiotemporal matching degree.
[0085] In this embodiment, the execution entity may determine the confidence level based on the real-time bus trajectory with the highest spatiotemporal matching level.
[0086] In some embodiments, the real-time bus trajectory with the highest spatiotemporal matching degree is selected, and a confidence level can be calculated based on the number and ratio of matching points of the real-time bus trajectory with the highest spatiotemporal matching degree. The confidence level can comprehensively consider factors such as the road scene, the number and ratio of matching points, etc.
[0087] Step 305 : In response to the confidence level meeting a preset condition, the bus route corresponding to the historical bus trajectory with the highest spatiotemporal matching level is determined as the historical bus route.
[0088] In this embodiment, the execution entity may determine whether the confidence level meets a preset condition. If the preset condition is met, the bus route corresponding to the historical bus trajectory with the highest spatiotemporal matching degree may be determined as the historical bus route.
[0089] The preset conditions may be conditions pre-set based on the road scene. Different road scenes may correspond to different preset conditions. For example, the number of matching points is compared with a preset matching point threshold, and the matching point ratio is compared with a preset matching point ratio threshold; if the number of matching points is greater than the preset matching point threshold, and the matching point ratio is greater than the preset matching point ratio threshold, then it is determined that the confidence level meets the preset conditions; if the number of matching points is less than or equal to the preset matching point threshold, or the matching point ratio is less than or equal to the preset matching point ratio threshold, then it is determined that the confidence level does not meet the preset conditions. Different road scenes may correspond to different preset matching point thresholds and preset matching point ratio thresholds. For ordinary highway scenes, the preset matching point threshold and the preset matching point ratio threshold will be higher; for scenes prone to positioning drift, such as tunnels, elevated roads, and parallel roads, the preset matching point threshold and the preset matching point ratio threshold will be lower.
[0090] Only when the confidence level meets the preset conditions will the bus route corresponding to the target user's historical bus trajectory with the highest spatiotemporal matching be determined, and the target user's historical trajectory matching that bus route will be mined once. Compared with traditional mining solutions that rely on spatial matching of trajectory matching routes, this significantly improves the accuracy of preference mining.
[0091] Step 306: Determine historical preferred bus routes based on historical bus routes.
[0092] In this embodiment, the execution entity may determine a historical preferred bus route based on historical bus routes.
[0093] By mining bus routes based on the target user's multi-day history and counting the frequency of each bus route, we can accurately identify the target user's historical bus route preferences. For example, if a user took bus route A five times, bus route B four times, and bus route C once in the past seven days, we can determine that the user has historically preferred bus routes A and B.
[0094] Step 307: Determine the classification result of the target user based on the real-time trajectory of the target user.
[0095] Step 308: Match the target user's real-time trajectory with the bus route to obtain a real-time matching bus route.
[0096] Step 309 : Based on the historical preferred bus routes and the classification results, determine a first matching degree between the target user's real-time trajectory and the real-time matching bus routes.
[0097] In this embodiment, the specific operations of steps 307-309 are already described in Figure 1 In the illustrated embodiment, steps 102 to 104 are described in detail and will not be repeated here.
[0098] The disclosed embodiments provide a real-time bus trajectory mining method. By matching the target user's historical trajectory with historical bus trajectories in time and space, the method accurately identifies whether the target user's single historical trajectory matches the historical bus trajectory of a certain route. By accumulating matching data over multiple days, the method accurately mines the user's historical frequently used routes, and further accurately mines the user's historical preferred bus routes.
[0099] Further references Figure 4 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a real-time bus trajectory mining device. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0100] like Figure 4 As shown, the real-time bus trajectory mining device 400 of this embodiment may include: a first mining module 401, a classification module 402, a first matching module 403, and a second matching module 404. The first mining module 401 is configured to mine historically preferred bus routes based on the historical data of a target user; the classification module 402 is configured to determine a classification result of the target user based on the target user's real-time trajectory, wherein the classification result is used to represent the probability that the target user is a bus user; the first matching module 403 is configured to match the target user's real-time trajectory with a bus route to obtain a real-time matching bus route; and the second matching module 404 is configured to determine a first matching degree between the target user's real-time trajectory and the real-time matching bus route based on the historically preferred bus routes and the classification result, wherein the first matching degree is used to represent the probability that the target user's real-time trajectory is a real-time matching bus route.
[0101] In this embodiment, in the real-time bus trajectory mining device 400, the specific processing of the first mining module 401, the classification module 402, the first matching module 403 and the second matching module 404 and the technical effects thereof can be referred to respectively. Figure 1 The relevant descriptions of steps 101-104 in the corresponding embodiment are not repeated here.
[0102] In some optional implementations of this embodiment, the real-time bus trajectory mining device 400 further includes: a second mining module configured to mine real-time preferred bus routes based on the real-time access behavior data of the target user in the map application; and a second matching module 404 further configured to: determine a first matching degree between the real-time trajectory of the target user and the real-time matching bus route based on the historical preferred bus routes, the real-time preferred bus routes and the classification results.
[0103] In some optional implementations of this embodiment, the real-time bus trajectory mining device 400 further includes: a determination module configured to determine inter-group statistical features based on the preference frequency and the first matching degree of the real-time matching bus routes; an aggregation module configured to perform spatiotemporal aggregation on the real-time trajectory of the target user and the real-time trajectories of other users to obtain a multi-trajectory aggregation feature; and a third matching module configured to determine a second matching degree between the real-time trajectory of the target user and the real-time matching bus route with the highest first matching degree based on the historical preferred bus routes, the classification results, the inter-group statistical features, and the multi-trajectory aggregation feature, wherein the second matching degree is used to represent the probability that the real-time trajectory of the target user is the real-time bus trajectory of the real-time matching bus route with the highest first matching degree.
[0104] In some optional implementations of this embodiment, the inter-group statistical features include at least one of the following: the ratio and global difference of the preference frequency of the real-time matching bus line with the highest first matching degree to the sum of the preference frequencies of all real-time matching bus lines, the ratio and difference of the preference frequency of the real-time matching bus line with the highest first matching degree to the sum of the preference frequencies of the real-time matching bus lines that are not the highest first matching degree, the ratio and difference of the preference frequency of the real-time matching bus line with the highest first matching degree to the preference frequency of the real-time matching bus line with the second highest first matching degree, the difference between the highest first matching degree and the sum of all first matching degrees, the ratio and difference of the highest first matching degree to the sum of the non-highest first matching degrees, and the ratio and difference of the highest first matching degree to the second highest first matching degree.
[0105] In some optional implementations of this embodiment, the first mining module 401 is further configured to mine historical preferred bus routes based on the target user's historical access behavior data within the map application.
[0106] In some optional implementations of this embodiment, the first mining module 401 is further configured to mine historical preferred bus routes based on the historical trajectory of the target user.
[0107] In some optional implementations of this embodiment, the first mining module 401 is further configured to: match the target user's historical trajectory with bus routes to determine historical bus routes; and determine historical preferred bus routes based on the historical bus routes.
[0108] In some optional implementations of this embodiment, the first mining module 401 is further configured to: match the target user's historical trajectory with the bus route to obtain matching trajectory points, unmatched trajectory points, and the historical matching bus route; determine the maximum matching trajectory segment based on the matching trajectory points and the unmatched trajectory points; perform spatiotemporal matching between the maximum matching trajectory segment and the historical bus trajectory of the historical matching bus route to obtain a spatiotemporal matching degree; determine a confidence level based on the historical bus trajectory with the highest spatiotemporal matching degree; and in response to the confidence level satisfying a preset condition, determine the bus route corresponding to the historical bus trajectory with the highest spatiotemporal matching degree as the historical bus route.
[0109] In some optional implementations of this embodiment, the first mining module 401 is further configured to: traverse the first subsequent trajectory point of the matching trajectory point, count the number of matching points and the number of non-matching points of the first subsequent trajectory point, and calculate a first matching rate based on the number of matching points and the number of non-matching points of the first subsequent trajectory point, until the first matching rate is less than a preset matching rate threshold, stop traversal, and obtain the first maximum matching trajectory segment.
[0110] In some optional implementations of this embodiment, the first mining module 401 is further configured to: traverse the second subsequent trajectory points of the first maximum matching trajectory segment, count the number of matching points and the number of non-matching points of the second subsequent trajectory points, and calculate a second matching rate based on the number of matching points and the number of non-matching points of the second subsequent trajectory points, until the second matching rate is less than a preset matching rate threshold, stop traversal, and obtain the second maximum matching trajectory segment.
[0111] In some optional implementations of this embodiment, the first mining module 401 is further configured to: perform time matching on the trajectory points of the maximum matching trajectory segment and the trajectory points of the historical bus trajectory of the historical matching bus line to obtain a time matching trajectory point pair; and perform spatial matching on the time matching trajectory point pair to obtain a spatiotemporal matching degree.
[0112] In some optional implementations of this embodiment, the first mining module 401 is further configured to: perform spatial matching on the time-matching trajectory point pairs to obtain the number of time-space matching trajectory point pairs; and determine the time-space matching degree based on the number of time-space matching trajectory point pairs.
[0113] In some optional implementations of this embodiment, the first mining module 401 is further configured to calculate the confidence level based on the number of matching points and the proportion of matching points of the historical bus trajectory with the highest spatiotemporal matching level.
[0114] In some optional implementations of this embodiment, the classification module 402 is further configured to: extract key features of the real-time trajectory of the target user, where the key features include at least one of the following: trajectory speed, whether the trajectory stops at a station, and similarity with the bus trajectory; input the key features into the first classification model to obtain a classification result.
[0115] In some optional implementations of this embodiment, the second matching module 404 is further configured to: input the historical preferred bus routes, the real-time preferred bus routes, and the classification results into a second classification model to obtain a first matching degree.
[0116] In some optional implementations of this embodiment, the third matching module is further configured to: input the historical preferred bus routes, the real-time preferred bus routes, the classification results, the inter-group statistical features, and the multi-trajectory aggregation features into the second classification model to obtain a second matching degree.
[0117] In the technical solutions disclosed herein, the acquisition, storage, and application of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0118] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0119] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0120] like Figure 5 As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. Computing unit 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to bus 504.
[0121] Various components in device 500 are connected to I / O interface 505, including: an input unit 506, such as a keyboard, mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, optical disk, etc.; and a communication unit 509, such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows device 500 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0122] The computing unit 501 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the real-time bus trajectory mining method. For example, in some embodiments, the real-time bus trajectory mining method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the real-time bus trajectory mining method described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the real-time bus trajectory mining method through any other suitable means (e.g., via firmware).
[0123] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0124] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0125] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0126] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0127] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0128] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0129] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions provided by this disclosure can be achieved. This is not limited herein.
[0130] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A real-time bus trajectory mining method, comprising: Based on the historical data of target users, mine historical preferred bus routes; Determining a classification result of the target user based on the real-time trajectory of the target user, wherein the classification result is used to represent the probability that the target user is a public transportation user; Matching the real-time trajectory of the target user with the bus route to obtain a real-time matching bus route; Based on the historical preferred bus routes and the classification result, a first matching degree between the real-time trajectory of the target user and the real-time matching bus route is determined, wherein the first matching degree is used to represent a probability that the real-time trajectory of the target user is the real-time bus trajectory of the real-time matching bus route.
2. The method according to claim 1, wherein The method further comprises: Mining real-time preferred bus routes based on the target user's real-time access behavior data within the map application; and The determining, based on the historical preferred bus route and the classification result, a first matching degree between the real-time trajectory of the target user and the real-time matching bus route includes: Based on the historical preferred bus routes, the real-time preferred bus routes, and the classification result, a first matching degree between the real-time trajectory of the target user and the real-time matching bus routes is determined.
3. The method according to claim 1, wherein The method further comprises: Determining inter-group statistical features based on the preferred frequency of the real-time matched bus routes and the first matching degree; Performing spatiotemporal aggregation on the real-time trajectory of the target user and the real-time trajectories of other users to obtain a multi-trajectory aggregation feature; Based on the historical preferred bus routes, the classification results, the inter-group statistical features, and the multi-trajectory aggregation features, a second matching degree between the target user's real-time trajectory and the real-time matching bus route with the highest first matching degree is determined, wherein the second matching degree is used to represent a probability that the target user's real-time trajectory is the real-time bus trajectory of the real-time matching bus route with the highest first matching degree.
4. The method according to claim 3, wherein: The inter-group statistical features include at least one of the following: the ratio and global difference of the preference frequency of the real-time matching bus route with the highest first matching degree to the sum of the preference frequencies of all real-time matching bus routes, the ratio and difference of the preference frequency of the real-time matching bus route with the highest first matching degree to the sum of the preference frequencies of the real-time matching bus routes that are not the highest first matching degrees, the ratio and difference of the preference frequency of the real-time matching bus route with the highest first matching degree to the preference frequency of the real-time matching bus route with the second highest first matching degree, the ratio and difference of the highest first matching degree to the sum of all first matching degrees, the ratio and difference of the highest first matching degree to the sum of the non-highest first matching degrees, and the ratio and difference of the highest first matching degree to the second highest first matching degree.
5. The method according to claim 1, wherein The method of mining historical preferred bus routes based on the historical data of the target user includes: Based on the historical access behavior data of the target user in the map application, the historical preferred bus routes are mined.
6. The method according to claim 1, wherein The method of mining historical preferred bus routes based on the historical data of the target user includes: Based on the historical trajectory of the target user, the historical preferred bus routes are mined.
7. The method according to claim 6, wherein: Mining the historical preferred bus routes based on the historical trajectory of the target user includes: Match the target user's historical trajectory with the bus routes to determine the historical bus routes; The historical preferred bus route is determined based on the historical bus route.
8. The method according to claim 7, wherein: The matching of the target user's historical trajectory with the bus routes to determine the historical bus routes includes: Matching the target user's historical trajectory with the bus route to obtain matching trajectory points, unmatched trajectory points, and historical matching bus routes; determining a maximum matching trajectory segment based on the matching trajectory points and the non-matching trajectory points; Performing spatiotemporal matching on the maximum matching trajectory segment and the historical bus trajectory of the historical matching bus route to obtain a spatiotemporal matching degree; Determine the confidence level based on the historical bus trajectory with the highest spatiotemporal matching degree; In response to the confidence level meeting a preset condition, the bus route corresponding to the historical bus trajectory with the highest spatiotemporal matching level is determined as the historical bus route.
9. The method according to claim 8, wherein The determining of a maximum matching trajectory segment based on the matching trajectory points and the non-matching trajectory points includes: Traversing the first subsequent trajectory point of the matching trajectory point, counting the number of matching points and the number of non-matching points of the first subsequent trajectory point, and calculating a first matching rate based on the number of matching points and the number of non-matching points of the first subsequent trajectory point. Traversing is stopped until the first matching rate is less than a preset matching rate threshold, thereby obtaining a first maximum matching trajectory segment.
10. The method according to claim 9, wherein: The determining of a maximum matching trajectory segment based on the matching trajectory points and the non-matching trajectory points further includes: Traversing the second subsequent trajectory points of the first maximum matching trajectory segment, counting the number of matching points and the number of non-matching points of the second subsequent trajectory points, and calculating a second matching rate based on the number of matching points and the number of non-matching points of the second subsequent trajectory points. Traversing stops until the second matching rate is less than a preset matching rate threshold, thereby obtaining the second maximum matching trajectory segment.
11. The method according to claim 8, wherein The step of performing spatiotemporal matching on the maximum matching trajectory segment and the historical bus trajectory of the historical matching bus route to obtain a spatiotemporal matching degree includes: Performing time matching on the trajectory points of the maximum matching trajectory segment and the trajectory points of the historical bus trajectory of the historical matching bus route to obtain a time matching trajectory point pair; The time matching trajectory point pairs are spatially matched to obtain the time-space matching degree.
12. The method according to claim 11, wherein The spatially matching the time-matching trajectory point pairs to obtain the spatiotemporal matching degree includes: Performing spatial matching on the time-matching trajectory point pairs to obtain the number of space-time matching trajectory point pairs; The spatiotemporal matching degree is determined based on the number of spatiotemporal matching trajectory point pairs.
13. The method according to claim 8, wherein The confidence level is determined based on the historical bus trajectory with the highest spatiotemporal matching, including: The confidence level is calculated based on the number of matching points and the proportion of matching points of the historical bus trajectory with the highest spatiotemporal matching level.
14. The method according to claim 1, wherein The determining the classification result of the target user based on the real-time trajectory of the target user includes: Extracting key features of the target user's real-time trajectory, wherein the key features include at least one of the following: trajectory speed, whether the trajectory stops at a station, and similarity with a bus trajectory; The key features are input into a first classification model to obtain the classification result.
15. The method according to claim 3, wherein The determining, based on the historical preferred bus route, the real-time preferred bus route, and the classification result, a first matching degree between the real-time trajectory of the target user and the real-time matching bus route includes: The historical preferred bus routes, the real-time preferred bus routes, and the classification results are input into a second classification model to obtain the first matching degree.
16. The method according to claim 15, wherein The determining, based on the historical preferred bus routes, the classification results, the inter-group statistical features, and the multi-trajectory aggregation features, a second matching degree between the real-time trajectory of the target user and the real-time matching bus route with the highest first matching degree includes: The historical preferred bus routes, the classification results, the inter-group statistical features, and the multi-trajectory aggregation features are input into the second classification model to obtain the second matching degree.
17. A real-time bus trajectory mining device, comprising: The first mining module is configured to mine historical preferred bus routes based on historical data of the target user; a classification module configured to determine a classification result of the target user based on the real-time trajectory of the target user, wherein the classification result is used to represent the probability that the target user is a public transportation user; A first matching module is configured to match the real-time trajectory of the target user with the bus route to obtain a real-time matching bus route; The second matching module is configured to determine a first matching degree between the real-time trajectory of the target user and the real-time matching bus route based on the historical preferred bus route and the classification result, wherein the first matching degree is used to represent a probability that the real-time trajectory of the target user is the real-time bus trajectory of the real-time matching bus route.
18. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 16.
19. A non-transitory computer-readable storage medium storing computer instructions, the computer instructions being configured to cause the computer to execute the method of any one of claims 1 to 16.
20. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 16.