Real-time trajectory data processing methods, devices, systems and electronic equipment
By using a variable sliding window and a hidden Markov model combined with the Viterbi algorithm in trajectory data processing, the problem of poor real-time performance caused by high computational load in existing technologies is solved, achieving high-precision, low-latency real-time map matching and saving storage resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINGDONG CITY BEIJING DIGITS TECH CO LTD
- Filing Date
- 2022-07-29
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies involve a large amount of computation when acquiring the trajectory points of moving objects, resulting in poor real-time performance and an inability to achieve high-precision, low-latency real-time map matching.
A variable sliding window and a hidden Markov model combined with the Viterbi algorithm are used for map matching. By obtaining M candidate road network points of the current trajectory point, the variable sliding window is used for map matching, thereby reducing the amount of computation.
It achieves high-precision, low-latency real-time map matching, reduces algorithm complexity, and minimizes storage resource consumption.
Smart Images

Figure CN115168527B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a real-time trajectory data processing method, apparatus, system, electronic device, and storage medium. Background Technology
[0002] In related technologies, when a new trajectory point of a moving object is obtained, this trajectory point is typically added to the set of trajectory points previously cached in memory for that moving object. Then, based on an offline map matching Hidden Markov Model, the probability model of all points in the cached trajectory point set at the current time is calculated, and all possible candidate trajectories after map matching are output. The disadvantage of this technical solution is that it requires a large amount of computation, resulting in high latency and poor real-time performance. Summary of the Invention
[0003] This application provides a real-time trajectory data processing method, apparatus, system, electronic device, and storage medium. It can process the acquired trajectory of a moving object to achieve high-precision, low-latency real-time map matching.
[0004] In a first aspect, embodiments of this application provide a real-time trajectory data processing method, comprising: acquiring trajectory data of a moving object and performing noise reduction processing on the trajectory data to obtain effective trajectory point data; acquiring M candidate road network points of the current trajectory point from the effective trajectory point data; wherein, M is a positive integer; determining a variable sliding window corresponding to the current trajectory point; wherein, the length of the variable sliding window is K, the variable sliding window includes N first transition probabilities of the previous trajectory point and a first candidate road network point combination corresponding to each first transition probability, each first candidate road network point combination including K historical candidate road network points, wherein N and K are positive integers; performing map matching processing on the M candidate road network points based on the variable sliding window to obtain the road network points of the current trajectory point.
[0005] This technical solution allows for the acquisition of road network points based on the current trajectory point and its corresponding sliding window, reducing the amount of computation required and thus enabling high-precision, low-latency real-time map matching of trajectory data for moving objects.
[0006] In one implementation, the step of performing map matching processing on the M candidate road network points based on the variable sliding window to obtain the road network points of the current trajectory point includes: using the variable sliding window to perform map matching processing on the M candidate road network points based on a hidden Markov model and the Viterbi algorithm to obtain the road network points of the current trajectory point.
[0007] In one optional implementation, the step of using the variable sliding window to perform map matching processing on the M candidate road network points based on the Hidden Markov Model and Viterbi algorithm to obtain the road network points of the current trajectory point includes: inserting the M candidate road network points into the tail of each first candidate road network point combination to obtain N second candidate road network point combinations corresponding to each candidate road network point; determining N second transition probabilities of the N second candidate road network point combinations corresponding to each candidate road network point, and selecting the second candidate road network point combination with the highest second transition probability from the N second candidate road network point combinations; determining the second candidate road network point combination with the highest second transition probability from the N second candidate road network point combinations corresponding to each candidate road network point as a third candidate road network point combination to obtain M third candidate road network point combinations; removing the first candidate road network point from each third candidate road network point combination to obtain M first candidate road network points; and determining the road network points of the current trajectory point from the M first candidate road network points based on the transition probabilities of each of the M third candidate road network point combinations.
[0008] This technical solution utilizes the Viterbi algorithm based on the Hidden Markov Model in the map matching process, which can significantly reduce the algorithm complexity.
[0009] Optionally, determining the road network point of the current trajectory point from the M first candidate road network points based on the respective transition probabilities of the M third candidate road network point combinations includes: selecting the first candidate road network point removed from the third candidate road network point combination with the highest transition probability from the M first candidate road network points, and determining it as the road network point of the current trajectory point.
[0010] Optionally, the method further includes: determining the combination of M third candidate road network points after removing the first candidate road network points as a variable sliding window corresponding to the next trajectory point; taking the next trajectory point as the new current trajectory point, performing the step of map matching processing on the M candidate road network points based on the variable sliding window to obtain the road network points of the current trajectory point, until all trajectory points in the effective trajectory point data have completed map matching.
[0011] In one implementation, the method further includes: using an Upsert statement to store the obtained trajectory points' road network points into a cache database.
[0012] In an optional implementation, the method further includes: in response to a trajectory query request for the mobile object, querying the road network information of the mobile object from the cache database based on the trajectory query request; and / or, in response to a road network information display request for the mobile object, visualizing the road network information of the mobile object.
[0013] This technical solution allows the obtained trajectory points to be stored in a cache database for trajectory querying and visualization, thereby enabling real-time querying and display of the trajectory of moving objects.
[0014] In one implementation, the method further includes: obtaining the road network points of each trajectory point in the valid trajectory data, and storing the road network points of each trajectory point in the valid trajectory data in a storage database.
[0015] In one optional implementation, storing the road network points of each trajectory point in the valid trajectory data into a storage database includes: performing trajectory truncation processing on each trajectory point in the valid trajectory data according to preset trajectory truncation conditions, and storing the truncated road network points into the storage database.
[0016] This technical solution allows road network points of each trajectory point to be stored in a storage database, reducing the storage space occupied by the cache database and system memory, and saving storage resources.
[0017] Secondly, embodiments of this application provide a real-time trajectory data processing apparatus, the apparatus comprising: a first processing module, configured to acquire trajectory data of a moving object and perform noise reduction processing on the trajectory data to obtain effective trajectory point data; an acquisition module, configured to acquire M candidate road network points of the current trajectory point from the effective trajectory point data; wherein, M is a positive integer; a second processing module, configured to determine a variable sliding window corresponding to the current trajectory point; wherein, the length of the variable sliding window is K, the variable sliding window includes N first transition probabilities of the previous trajectory point and a first candidate road network point combination corresponding to each first transition probability, each first candidate road network point combination including K historical candidate road network points, wherein N and K are positive integers; and a third processing module, configured to perform map matching processing on the M candidate road network points based on the variable sliding window to obtain the road network points of the current trajectory point.
[0018] In one implementation, the third processing module is specifically used to: perform map matching processing on the M candidate road network points using the variable sliding window based on the Hidden Markov Model and the Viterbi algorithm, to obtain the road network points of the current trajectory point.
[0019] In an optional implementation, the third processing module is specifically used to: insert the M candidate road network points into the tail of each first candidate road network point combination to obtain N second candidate road network point combinations corresponding to each candidate road network point; determine N second transition probabilities of the N second candidate road network point combinations corresponding to each candidate road network point, and select the second candidate road network point combination with the largest second transition probability from the N second candidate road network point combinations; determine the second candidate road network point combination with the largest second transition probability from the N second candidate road network point combinations corresponding to each candidate road network point as a third candidate road network point combination to obtain M third candidate road network point combinations; remove the first candidate road network point from each third candidate road network point combination to obtain M first candidate road network points; and determine the road network point of the current trajectory point from the M first candidate road network points based on the respective transition probabilities of the M third candidate road network point combinations.
[0020] Optionally, the third processing module is specifically used to: select, from the M candidate road network points, the first candidate road network point removed from the combination of the third candidate road network points with the highest transition probability, and determine it as the road network point of the current trajectory point.
[0021] Optionally, the device further includes: a fourth processing module, configured to determine the combination of M third candidate road network points after the first candidate road network points are removed as a variable sliding window corresponding to the next trajectory point; and a fifth processing module, configured to take the next trajectory point as the new current trajectory point, and perform the step of performing map matching processing on the M candidate road network points based on the variable sliding window to obtain the road network points of the current trajectory point, until all trajectory points in the valid trajectory point data have completed map matching.
[0022] In one implementation, the apparatus further includes a storage module for storing the obtained trajectory points' road network points into a cache database using an Upsert statement.
[0023] In an optional implementation, the apparatus further includes: a query module, configured to query road network information of the mobile object from the cache database based on the trajectory query request in response to a trajectory query request for the mobile object; and / or a visualization module, configured to visualize the road network information of the mobile object in response to a road network information display request for the mobile object.
[0024] In one implementation, the device further includes a fourth processing module, configured to acquire road network points of each trajectory point in the valid trajectory data, and store the road network points of each trajectory point in the valid trajectory data in a storage database.
[0025] In one optional implementation, the fourth processing module is specifically used to: perform trajectory truncation processing on each trajectory point in the valid trajectory data according to preset trajectory truncation conditions, and store the truncated road network points in the storage database.
[0026] Thirdly, embodiments of this application provide a real-time trajectory data processing system, including: a distributed stream processing engine, the distributed stream processing engine including multiple keyed stream partitions; wherein, the multiple keyed stream partitions perform real-time processing of trajectory data of different moving objects using the method described in the first aspect.
[0027] Fourthly, embodiments of this application provide an electronic device, including: 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, the instructions being executed by the at least one processor to enable the at least one processor to perform the real-time trajectory data processing method as described in the first aspect.
[0028] Fifthly, embodiments of this application provide a non-transitory computer-readable storage medium storing computer instructions, for storing instructions that, when executed, cause the method described in the first aspect to be implemented.
[0029] In a sixth aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the real-time trajectory data processing method as described in the first aspect.
[0030] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0031] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this application. Wherein:
[0032] Figure 1 A flowchart illustrating a real-time trajectory data processing method provided in this application embodiment;
[0033] Figure 2 This is a schematic diagram of a real-time trajectory data processing method provided in an embodiment of this application;
[0034] Figure 3 A flowchart illustrating another real-time trajectory data processing method provided in this application embodiment;
[0035] Figure 4 A flowchart illustrating yet another real-time trajectory data processing method provided in this application embodiment;
[0036] Figure 5 A flowchart illustrating yet another real-time trajectory data processing method provided in this application embodiment;
[0037] Figure 6 This is a schematic diagram of the structure of a real-time trajectory data processing device provided in an embodiment of this application;
[0038] Figure 7 A schematic diagram of another real-time trajectory data processing device provided in the embodiments of this application;
[0039] Figure 8 A schematic diagram of the structure of another real-time trajectory data processing device provided in the embodiments of this application;
[0040] Figure 9 A schematic diagram of the structure of another real-time trajectory data processing device provided in the embodiments of this application;
[0041] Figure 10 A schematic diagram of the structure of another real-time trajectory data processing device provided in the embodiments of this application;
[0042] Figure 11 A schematic diagram of a real-time trajectory data processing system provided in an embodiment of this application;
[0043] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0044] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0045] In the description of this application, unless otherwise stated, " / " means "or", for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The various numerical designations such as "first", "second", etc., involved in this application are only for the convenience of description and are not used to limit the scope of the embodiments of this application, nor do they indicate the order of events.
[0046] With the expansion of cities and the rapid development of IoT technology, applications such as in-vehicle navigation, car sharing, and logistics delivery have become deeply integrated into people's daily lives, generating an ever-increasing amount of trajectory data. These applications inevitably rely on trajectory data recorded by positioning systems such as GPS (Global Positioning System) and BeiDou. However, ordinary civilian GPS positioning systems suffer from meter-level errors and unstable signal reception. Furthermore, the sampling frequency of trajectory points cannot be too high due to limitations in data transmission and storage. These factors lead to a certain distance deviation between the collected location of a moving object and its actual location on the road. Therefore, to ensure that the received location data accurately reflects the trajectory of a moving object and can be displayed on a map in real time for users to more intuitively perceive the vehicle's location and route, various trajectory preprocessing tasks need to be performed in real time. The most important and time-consuming of these is real-time map matching.
[0047] Please see Figure 1 , Figure 1 This is a flowchart illustrating a real-time trajectory data processing method provided in an embodiment of this application. Figure 1 As shown, this real-time trajectory data processing method may include, but is not limited to, the following steps:
[0048] Step S101: Obtain the trajectory data of the moving object and perform noise reduction processing on the trajectory data to obtain valid trajectory point data.
[0049] In the embodiments of this application, the mobile object can be understood as a mobile object with a positioning device, such as a car equipped with a GPS device, or other mobile objects with positioning functions, without being specifically limited here.
[0050] For example, one can acquire trajectory data sent by a mobile object that contains the mobile object's location information (e.g., GPS data, BeiDou positioning data, etc.), and then use preset denoising conditions to denoise the trajectory data.
[0051] In the embodiments of this application, the preset denoising conditions may include, but are not limited to, the following items 1)-5): 1) The coordinates of the trajectory data are within a preset spatial range; 2) The generation time of the trajectory data is after the generation time of the previous trajectory data; 3) The speed of the moving object between the current trajectory data and the previous trajectory data is less than a preset first speed threshold; 4) The Euclidean distance between the current trajectory data and the previous trajectory data is less than a preset Euclidean distance threshold; 5) There is a real road segment within a preset range near the coordinates of the trajectory data.
[0052] In other words, after obtaining the trajectory data of the moving object, the trajectory data can be denoised. The denoising logic includes the following steps: 1. Determine if the trajectory point is within a preset spatial range; if not, remove the trajectory point. 2. Determine if the generation time of the trajectory data is after the generation time of the previously acquired trajectory data; if not, remove the trajectory point data. 3. Determine if the speed of the moving object between the current trajectory point data and the previously acquired trajectory point data is less than a preset first speed threshold; if it is greater than or equal to the preset speed threshold, remove the trajectory point data. 4. Determine if the Euclidean distance between the current trajectory point data and the previous trajectory point data is less than a preset Euclidean distance threshold; if it is greater than or equal to the preset Euclidean distance threshold, remove the trajectory point data. 5. Determine if there is a real road segment within a preset range near the coordinates of the trajectory point data; if not, remove the trajectory point data. After denoising the trajectory data based on the above logic, valid trajectory point data can be obtained.
[0053] Step S102: Obtain M candidate road network points for the current trajectory point from the valid trajectory point data.
[0054] In the embodiments of this application, M is a positive integer.
[0055] For example, suppose that the current trajectory point z is obtained at time t. t It can be based on the current trajectory point z t Using the location coordinates as a reference, a spatial range query is performed within a preset spatial range (e.g., 50 meters) to obtain all road network points within that spatial range. For example, road network points within a distance of no more than 50 meters from the current trajectory point are used as the current trajectory point z. t Candidate road network points.
[0056] In the embodiments of this application, a road network point refers to a point in an actual road network.
[0057] Step S103: Determine the variable sliding window corresponding to the current trajectory point.
[0058] In this embodiment, the length of the variable sliding window is K. The variable sliding window includes N first transition probabilities of the previous trajectory point and a corresponding first candidate road network point combination under each first transition probability. Each first candidate road network point combination includes K historical candidate road network points, where N and K are positive integers. The first transition probability is the maximum transition probability from the first historical candidate road network point to the corresponding previous trajectory point in the first candidate road network point combination.
[0059] It should be noted that in the embodiments of this application, the length K of the variable sliding window can be preset, and the larger the value of K, the more accurate the final map matching effect. In an optional implementation, the value of K is recommended to be between 10 and 20. It is understood that since the value of K is small, the delay caused by calculating the road network points of the first K trajectory points can be basically ignored.
[0060] As an example, please see Figure 2 , Figure 2 This is a schematic diagram illustrating a real-time trajectory data processing method provided in an embodiment of this application. Figure 2 As shown, let T be the time corresponding to the current trajectory point data, and P be... 1A P 1C ... P 1D Let P be the N different historical candidate road network points corresponding to the trajectory point data acquired at time TK. 2A P 2B ... P 2C For the N different historical candidate road network points corresponding to the trajectory point data acquired at time T-(K-1), P 3A P 3B ... P 3C For the trajectory point data acquired at time T-(K-2), there are N different historical candidate road network points, and so on, [P K1 P K2 ... P KN [P] represents the N historical candidate road network points corresponding to the trajectory point data acquired at time T-1. 1A P 2B P 3A ... P K1 ], [P 1C P 2C P 3B ... P K2 ]…[P 1D P 2A P 3A ... P KN [These are] arrival points P in the historical candidate road network. K1 P K2 …P KN The set of historical candidate road network points with the highest transition probability at K different times.
[0061] Step S104: Perform map matching processing on M candidate road network points based on a variable sliding window to obtain the road network points of the current trajectory point.
[0062] Optionally, a hidden Markov model can be used to perform map matching processing on M candidate road network points to obtain the road network points of the current trajectory point.
[0063] In one possible implementation, a variable sliding window can be used to perform map matching processing on M candidate road network points based on a hidden Markov model and the Viterbi algorithm to obtain the road network points of the current trajectory point.
[0064] According to the real-time trajectory data processing method of this application embodiment, the road network points of the current trajectory point can be obtained based on the current trajectory point and the corresponding sliding window, reducing the amount of calculation required, thereby realizing high-precision and low-latency real-time map matching of trajectory data of moving objects.
[0065] To further reduce algorithm complexity, the Viterbi algorithm can be applied to the Hidden Markov Model (HMM) in the map matching process. The Viterbi algorithm is essentially an optimal choice problem in a multi-step, multi-choice model. At each step, all choices are stored in terms of the minimum total cost (or maximum value) from all previous steps to the current choice, along with the choices made in the previous steps given the current cost. After calculating all steps sequentially, the optimal path is found through backtracking. Problems conforming to this model can be solved using the Viterbi algorithm. Using the Viterbi algorithm, the final number of trajectory point combinations equals the number of candidate road network points from the original trajectory point. The following will combine... Figure 3 The map matching process is described in detail.
[0066] Figure 3 A flowchart illustrating a map matching method based on a Hidden Markov Model and Viterbi algorithm, provided for embodiments of this application. Figure 3 As shown, the specific implementation of obtaining the road network points of the current trajectory point by performing map matching processing on M candidate road network points based on Hidden Markov Models and Viterbi Algorithm using a variable sliding window may include the following steps:
[0067] Step S301: Insert the M candidate road network points into the tail of each first candidate road network point combination to obtain N second candidate road network point combinations corresponding to each candidate road network point.
[0068] Step S302: Determine the N second transition probabilities of the N second candidate road network point combinations corresponding to each candidate road network point, and select the second candidate road network point combination with the largest second transition probability from the N second candidate road network point combinations.
[0069] Step S303: Determine the second candidate road network point combination with the highest second transition probability among the N second candidate road network point combinations corresponding to each candidate road network point as the third candidate road network point combination, so as to obtain M third candidate road network point combinations.
[0070] Step S304: Remove the first candidate road network point from each third candidate road network point combination to obtain M first candidate road network points.
[0071] Step S305: Based on the transition probabilities of the M third candidate road network point combinations, determine the road network point of the current trajectory point from the M first candidate road network points.
[0072] Optionally, the process of determining the road network point of the current trajectory point from the M first candidate road network points based on the respective transition probabilities of the M third candidate road network point combinations may include the following steps: selecting the first candidate road network point removed from the third candidate road network point combination with the highest transition probability from the M first candidate road network points and determining it as the road network point of the current trajectory point.
[0073] As an example, please see Figure 2 .like Figure 2 As shown, P1, P2...PM are the M candidate road network points corresponding to the current trajectory point obtained at the current time. P1, P2...PM are inserted at the end of each first candidate road network point combination to obtain N second candidate road network point combinations corresponding to each candidate road network point. Assuming that the combination with the highest transition probability is selected from the N second candidate road network point combinations corresponding to P1, let [P...] 1A P 2B P 3A …P K1 Let P1] be the combination of the N second candidate road network points corresponding to P2, where the one with the highest transition probability is selected. 1C P 2C P 3B …P K2 [P2], assuming that the combination of the N second candidate road network points corresponding to PM is selected, the one with the highest transition probability is [P 1D P 2A P 3A …P KN [P], thus obtaining M third candidate road network point combinations. The first candidate road network point is removed from each third candidate road network point combination, resulting in M first candidate road network points [P]. 1A P 1C ...P 1D ], where it is assumed that P 1C The corresponding third candidate road network point combination [P] 1C P 2C P 3B …P K2 If the transition probability of P2 is the highest, then P... 1C This refers to the road network point of the current trajectory point.
[0074] It should be noted that the calculation of the second candidate road network point combination [P] 1A P 2B P 3A …P K1[P1], [P] 1C P 2C P 3B …P K2 [P2], ..., [P] 1D P 2A P 3A …P KN When calculating the transition probability of [P], due to the first candidate road network point combination [P], 1A P 2B P 3A …P k1 ]、[P 1C P 2C P 3B …P K2 ]、…、[P 1D P 2A P 3A …P KN The first transition probability of [P] is known, therefore it is only necessary to calculate [P] separately. K1 [P1], [P] K2 [P2] and [P] KN The transition probabilities of [PM] are calculated, and then added to the corresponding first transition probabilities to obtain the transition probabilities of each second candidate road network point combination. This calculation method is the Viterbi algorithm. Therefore, by using the Viterbi algorithm on the basis of the Hidden Markov Model, the algorithm complexity can be further reduced.
[0075] Optionally, the real-time trajectory data processing method further includes: determining the combination of M third candidate road network points after removing the first candidate road network points as a variable sliding window corresponding to the next trajectory point; taking the next trajectory point as the new current trajectory point, performing map matching processing on the M candidate road network points based on the variable sliding window to obtain the road network points of the current trajectory point, until all trajectory points in the valid trajectory point data have completed map matching.
[0076] For example, the combination of M third candidate road network points after removing the first candidate road network point can be used as a variable sliding window corresponding to the next trajectory point, such as... Figure 2 As shown, the first candidate road network point [P] 1A P 1C ...P 1D After removing each candidate road network point from the corresponding third candidate road network point combination, a new M candidate road network point combination is obtained. This new M candidate road network point combination is used as a variable sliding window for the next trajectory point. The obtained next trajectory point is used as the new current trajectory point. The above steps of performing map matching processing on the M candidate road network points based on the variable sliding window are repeated until all trajectory points in all valid trajectory point data of the obtained moving object have completed map matching.
[0077] By implementing the embodiments of this application, candidate road network point combinations with the highest transition probability of the current trajectory point can be obtained based on the Hidden Markov Model and the Viterbi algorithm, thereby determining the road network point of the current trajectory point and realizing high-precision, low-latency real-time map matching of trajectory data of moving objects.
[0078] Please participate Figure 4 , Figure 4 This is a flowchart illustrating another real-time trajectory data processing method provided in an embodiment of this application. This real-time trajectory data processing method can store the obtained trajectory points' road network points in a cache database. For example... Figure 4 As shown, this real-time trajectory data processing method may include, but is not limited to, the following steps:
[0079] Step S401: Obtain the trajectory data of the moving object and perform noise reduction processing on the trajectory data to obtain valid trajectory point data.
[0080] In the embodiments of this application, step S401 can be implemented in any of the ways described in the embodiments of this application. The embodiments of this application do not limit this, nor will they be described in detail.
[0081] Step S402: Obtain M candidate road network points for the current trajectory point from the valid trajectory point data.
[0082] In the embodiments of this application, M is a positive integer.
[0083] In the embodiments of this application, step S402 can be implemented in any of the ways described in the various embodiments of this application. The embodiments of this application do not limit this, nor will they be described in detail.
[0084] Step S403: Determine the variable sliding window corresponding to the current trajectory point.
[0085] In the embodiments of this application, step S403 can be implemented in any of the ways described in the embodiments of this application. The embodiments of this application do not limit this, nor will they be described in detail.
[0086] The variable sliding window has a length of K. It includes N first transition probabilities of the previous trajectory point and a combination of first candidate road network points corresponding to each first transition probability. Each combination of first candidate road network points includes K historical candidate road network points. N and K are positive integers.
[0087] Step S404: Perform map matching processing on M candidate road network points based on a variable sliding window to obtain the road network points of the current trajectory point.
[0088] In the embodiments of this application, step S404 can be implemented in any of the ways described in the various embodiments of this application. The embodiments of this application do not limit this, nor will they be described in detail.
[0089] Step S405: Use the Upsert statement to store the obtained trajectory points' road network points into the cache database.
[0090] For example, when the road network points of a moving object are stored in the cache database for the first time, the Insert statement is used to create a road network point set corresponding to the moving object in the cache database and store the road network point in the road network point set; or, when the road network points of a moving object are not stored in the cache database for the first time, the Update statement is used to write the road network point to the road network point set corresponding to the moving object.
[0091] It should be noted that frequent I / O (input / output) operations on the cache database will waste a lot of resources. Therefore, the frequency of storing the road network points of the trajectory points in the cache database is also important. The real-time trajectory data processing method provided in this application embodiment can customize the operation frequency according to actual needs.
[0092] As an example, it can be set to store the obtained trajectory points into the cache database every 5 seconds.
[0093] In one implementation, the real-time trajectory data processing method further includes: in response to a trajectory query request for a moving object, querying the road network information of the moving object from a cached database based on the trajectory query request; and / or, in response to a request to display the road network information of the moving object, visualizing the road network information of the moving object.
[0094] For example, in response to a trajectory query request for a moving object, the road network point set of the moving object is retrieved from the cached database based on the trajectory query request, and the road network point set is fed back as the road network information result of the trajectory query request; and / or, in response to a request to display the road network information of the moving object, the various road network points in the road network point set of the moving object are connected on a preset map based on the road network point set of the moving object, so as to realize the visualization processing of the road network information of the moving object.
[0095] It should be noted that a threshold for the number of road network points in the road network point set of the moving object in the cache database can be preset. When the length of the road network point set reaches the threshold, the road network point at the head of the road network point set queue will be automatically removed to free up storage space, making it easier to add new road network points to the set.
[0096] By implementing the embodiments of this application, the road network points of the obtained trajectory points can be stored in a cache database for trajectory query and visualization processing, thereby realizing real-time query and display of the trajectory of moving objects.
[0097] Please see Figure 5 The figure shows a flowchart of another real-time trajectory data processing method provided in an embodiment of this application. This real-time trajectory data processing method can store the road network points of trajectory points into a storage database. Figure 5 As shown, this real-time trajectory data processing method may include, but is not limited to, the following steps:
[0098] Step S501: Obtain the trajectory data of the moving object and perform noise reduction processing on the trajectory data to obtain valid trajectory point data.
[0099] In the embodiments of this application, step S501 can be implemented in any of the various embodiments of this application. The embodiments of this application do not limit this, nor will they be described in detail.
[0100] Step S502: Obtain M candidate road network points for the current trajectory point from the valid trajectory point data.
[0101] In the embodiments of this application, M is a positive integer.
[0102] In the embodiments of this application, step S502 can be implemented in any of the embodiments of this application. The embodiments of this application do not limit this and will not be described in detail.
[0103] Step S503: Determine the variable sliding window corresponding to the current trajectory point.
[0104] The variable sliding window has a length of K. The variable sliding window includes N first transition probabilities of the previous trajectory point and the first candidate road network point combination corresponding to each first transition probability. Each first candidate road network point combination includes K historical candidate road network points, where N and K are positive integers.
[0105] In the embodiments of this application, step S503 can be implemented in any of the embodiments of this application. The embodiments of this application do not limit this and will not be described in detail.
[0106] Step S504: Perform map matching processing on M candidate road network points based on a variable sliding window to obtain the road network points of the current trajectory point.
[0107] In the embodiments of this application, step S504 can be implemented in any of the ways described in the various embodiments of this application. The embodiments of this application do not limit this, nor will they be described in detail.
[0108] Step S505: Obtain the road network points of each trajectory point in the valid trajectory data, and store the road network points of each trajectory point in the valid trajectory data into the storage database.
[0109] For example, obtain the road network points of each trajectory point in the valid trajectory data of the moving object, and store the road network points in the road network point set corresponding to the moving object in the storage database.
[0110] In one implementation, the real-time trajectory data processing method further includes: performing trajectory truncation processing on each trajectory point in the effective trajectory data according to preset trajectory truncation conditions, and storing the truncated road network points in a storage database.
[0111] For example, when any trajectory point in the valid trajectory data in memory meets the preset trajectory truncation condition, the historical trajectory points before that trajectory point are removed and stored in the storage database.
[0112] In this embodiment of the application, the preset trajectory truncation conditions may include, but are not limited to: the speed of the moving object between the trajectory point and the previous trajectory point is greater than a preset second speed threshold; and / or, the time interval between the production time of the trajectory point and the acquisition time of the previous trajectory point is greater than a preset time threshold; and / or, there is no road network connecting the trajectory point and the previous trajectory point; and / or, the time interval between the acquisition time of the trajectory point and the acquisition time of the trajectory point at the head of the trajectory point sequence is greater than a preset third time threshold; and / or, the number of historical trajectory points in the trajectory sequence is greater than a preset quantity threshold.
[0113] In other words, after adding valid trajectory points of a moving object to the trajectory point set of that moving object in memory, the trajectory points can be processed as follows: Determine if the speed of the moving object between the current trajectory point and the previous trajectory point is greater than a preset second speed threshold. If it is greater than the preset second speed threshold, remove the historical trajectory points preceding this trajectory point and store them in the storage database; and / or, determine if the time interval between the acquisition time of this trajectory point and the acquisition time of the previous trajectory point is greater than a preset time threshold. If it is greater than the preset time threshold, remove the historical trajectory points preceding this trajectory point and store them in the storage database; and / or, determine if there is a connectable road network between this trajectory point and the previous trajectory point. If not, If the road network you can connect to is available, then remove the historical trajectory points preceding the current trajectory point and store them in the storage database; and / or, determine whether the time interval between the acquisition time of the current trajectory point and the acquisition time of the trajectory point at the head of the queue in the trajectory point sequence is greater than a preset third time threshold. If it is greater than the preset third time threshold, then remove the historical trajectory points preceding the current trajectory point and store them in the storage database; and / or, determine whether the number of historical trajectory points in the trajectory sequence is greater than a preset number threshold. If it is greater than the preset number threshold, then remove the historical trajectory points preceding the current trajectory point and store them in the storage database. After processing the trajectory points of the moving object based on the above conditions, the trajectory points removed from memory are stored in the storage database to save memory space.
[0114] By implementing the embodiments of this application, the road network points of each trajectory point can be stored in the storage database, and the trajectory points in memory can be processed in stages to reduce the storage space occupied by the cache database and memory, thereby saving storage resources.
[0115] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a real-time trajectory data processing device provided in this application. Figure 6 As shown, the real-time trajectory data processing device 600 includes: a first processing module 601, an acquisition module 602, a second processing module 603, and a third processing module 604.
[0116] The first processing module 601 is used to: acquire trajectory data of the moving object and perform noise reduction processing on the trajectory data to obtain valid trajectory point data; the acquisition module 602 is used to: acquire M candidate road network points of the current trajectory point from the valid trajectory point data; where M is a positive integer; the second processing module 603 is used to: determine the variable sliding window corresponding to the current trajectory point; where the length of the variable sliding window is K, the variable sliding window includes N first transition probabilities of the previous trajectory point and the first candidate road network point combination corresponding to each first transition probability, each first candidate road network point combination includes K historical candidate road network points, where N and K are positive integers; the third processing module 604 is used to: perform map matching processing on the M candidate road network points based on the variable sliding window to obtain the road network points of the current trajectory point.
[0117] In one implementation, the third processing module 604 is specifically used to: perform map matching processing on M candidate road network points based on the Hidden Markov Model and Viterbi algorithm, and obtain the road network points of the current trajectory point.
[0118] In an optional implementation, the third processing module 604 is specifically used to: insert M candidate road network points into the tail of each first candidate road network point combination to obtain N second candidate road network point combinations corresponding to each candidate road network point; determine N second transition probabilities of the N second candidate road network point combinations corresponding to each candidate road network point, and select the second candidate road network point combination with the largest second transition probability from the N second candidate road network point combinations; determine the second candidate road network point combination with the largest second transition probability from the N second candidate road network point combinations corresponding to each candidate road network point as the third candidate road network point combination to obtain M third candidate road network point combinations; remove the first candidate road network point from each third candidate road network point combination to obtain M first candidate road network points; and determine the road network point of the current trajectory point from the M first candidate road network points based on the transition probabilities of each of the M third candidate road network point combinations.
[0119] Optionally, the third processing module 604 is specifically used to: select, from the M candidate road network points, the first candidate road network point removed from the combination of the third candidate road network points with the highest transition probability, and determine it as the road network point of the current trajectory point.
[0120] As an example, please see Figure 7 , Figure 7 This is a schematic diagram of another real-time trajectory data processing device provided in an embodiment of this application. Figure 7As shown, the real-time trajectory data processing device 700 further includes a fourth processing module 705, used to determine the combination of M third candidate road network points after the first candidate road network points are removed as a variable sliding window corresponding to the next trajectory point; and a fifth processing module 706, used to take the next trajectory point as the new current trajectory point, perform map matching processing on the M candidate road network points based on the variable sliding window, and obtain the road network points of the current trajectory point, until all trajectory points in the valid trajectory point data have completed map matching. Figure 7 Modules 701-704 in Figure 6 Modules 601-604 in the series have the same structure and function.
[0121] As an example, please see Figure 8 , Figure 8 This is a schematic diagram of the structure of another real-time trajectory data processing device provided in an embodiment of this application. Figure 8 As shown, the real-time trajectory data processing device 800 further includes a storage module 805, used to store the road network points of the obtained trajectory points into a cache database using an Upsert statement. Figure 8 Modules 801-804 in Figure 6 Modules 601-604 in the series have the same structure and function.
[0122] As an example, please see Figure 9 , Figure 9 This is a schematic diagram of the structure of another real-time trajectory data processing device provided in an embodiment of this application. Figure 9 As shown, the real-time trajectory data processing device further includes a query module 905, used to query the road network information of the moving object from the cached database based on the trajectory query request in response to a trajectory query request for the moving object; and / or, a visualization module 906, used to visualize the road network information of the moving object in response to a request to display the road network information of the moving object. Figure 9 Modules 901-904 in Figure 6 Modules 01-5604 in the series have the same structure and function.
[0123] As an example, please see Figure 10 , Figure 10 This is a schematic diagram of the structure of another real-time trajectory data processing device provided in an embodiment of this application. Figure 10 As shown, the real-time trajectory data processing device also includes a fourth processing module 1005, used to acquire the road network points of each trajectory point in the valid trajectory data and store the road network points of each trajectory point in the valid trajectory data into a storage database. Figure 10 Modules 1001-1004 in Figure 6Modules 601-506 in the series have the same structure and function.
[0124] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0125] The real-time trajectory data processing device according to the embodiments of this application can obtain the road network points of the current trajectory point based on the current trajectory point and the corresponding sliding window, thereby reducing the required amount of calculation and realizing high-precision, low-latency real-time map matching of trajectory data of moving objects.
[0126] Based on embodiments of this application, this application also provides a real-time trajectory data processing system, the system comprising: a distributed stream processing engine, the distributed stream processing engine comprising multiple keyed stream partitions; wherein, the multiple keyed stream partitions perform real-time processing of trajectory data of different moving objects using the method described in any embodiment of this application.
[0127] As an example, a distributed stream processing engine could be the Apache Flink distributed stream data stream engine.
[0128] Please see Figure 11 , Figure 11 This is a schematic diagram of a real-time trajectory data processing system provided in an embodiment of this application. Figure 11 As shown, trajectory data of multiple mobile objects can be obtained through a message middleware (e.g., the distributed message middleware Kafka) and fed into Apache Flink in real time. The trajectory data of these mobile objects is then divided into multiple keyed stream partitions based on the identification information of each mobile object (e.g., license plate number). Simultaneously, the road network data required for real-time map matching is distributed to each keyed stream partition via a broadcast stream to avoid redundant reading and construction of road network data. For each keyed stream partition, real-time preprocessing (e.g., noise reduction) and map matching are performed. At a pre-set frequency, the matched trajectories are output from the Apache Flink side and stored in a cache database for subsequent trajectory queries and visualization. The main output accumulates the trajectory points of multiple mobile objects after map matching and outputs them to the storage database after reaching a certain threshold.
[0129] Based on the embodiments of this application, this application also provides an electronic device, including: 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, the instructions being executed by the at least one processor to enable the at least one processor to perform the real-time trajectory data processing method of any of the foregoing embodiments.
[0130] Based on embodiments of this application, this application also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute a real-time trajectory data processing method according to any of the foregoing embodiments provided in this application.
[0131] Please see Figure 12 ,like Figure 12 The diagram shown is a schematic block diagram of an example electronic device that can be used to implement embodiments of the present application. 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 components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.
[0132] like Figure 12 As shown, device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 1202 or a computer program loaded from storage unit 1208 into random access memory (RAM) 1203. The RAM 1203 may also store various programs and data required for the operation of device 1200. The computing unit 1201, ROM 1202, and RAM 1203 are interconnected via bus 1204. Input / output (I / O) interface 1205 is also connected to bus 1204.
[0133] Multiple components in device 1200 are connected to I / O interface 1205, including: input unit 1206, such as keyboard, mouse, etc.; output unit 1207, such as various types of monitors, speakers, etc.; storage unit 1208, such as disk, optical disk, etc.; and communication unit 1209, such as network card, modem, wireless transceiver, etc. Communication unit 1209 allows device 1200 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0134] The computing unit 1201 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose 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 1201 performs the various methods and processes described above, such as real-time trajectory data processing methods. For example, in some embodiments, the real-time trajectory data processing method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on device 1200 via ROM 1202 and / or communication unit 1209. When the computer program is loaded into RAM 1203 and executed by the computing unit 1201, one or more steps of the real-time trajectory data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 1201 may be configured to perform a real-time trajectory data processing method by any other suitable means (e.g., by means of firmware).
[0135] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard parts (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0136] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0137] In the context of this application, a machine-readable medium can 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 can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fiber, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0138] 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 cathode ray tube (CRT) 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 provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).
[0139] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
[0140] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers integrated with blockchain technology.
[0141] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.
[0142] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A real-time trajectory data processing method, characterized in that, include: Acquire the trajectory data of the moving object, and perform noise reduction processing on the trajectory data to obtain valid trajectory point data; Obtain M candidate road network points for the current trajectory point from the valid trajectory point data; where M is a positive integer; Determine a variable sliding window corresponding to the current trajectory point; wherein, the length of the variable sliding window is K, the variable sliding window includes N first transition probabilities of the previous trajectory point and a first candidate road network point combination corresponding to each first transition probability, each first candidate road network point combination includes K historical candidate road network points, and N and K are positive integers; Based on the variable sliding window, map matching processing is performed on the M candidate road network points to obtain the road network points of the current trajectory point; The step of performing map matching processing on the M candidate road network points based on the variable sliding window to obtain the road network points of the current trajectory point includes: Based on the Hidden Markov Model and Viterbi algorithm, the variable sliding window is used to perform map matching processing on the M candidate road network points to obtain the road network points of the current trajectory point. The method, based on Hidden Markov Models and Viterbi Algorithm, uses a variable sliding window to perform map matching processing on the M candidate road network points to obtain the road network points of the current trajectory point, including: The M candidate road network points are inserted into the end of each first candidate road network point combination to obtain N second candidate road network point combinations corresponding to each candidate road network point; Determine N second transition probabilities for N combinations of second candidate road network points corresponding to each candidate road network point, and select the second candidate road network point combination with the largest second transition probability from the N combinations of second candidate road network points; The second candidate road network point combination with the highest second transition probability among the N second candidate road network point combinations corresponding to each candidate road network point is determined as the third candidate road network point combination, so as to obtain M third candidate road network point combinations; Remove the first candidate road network point from each of the third candidate road network point combinations to obtain M first candidate road network points; Based on the transition probabilities of the M third candidate road network point combinations, the road network points of the current trajectory point are determined from the M first candidate road network points.
2. The method of claim 1, wherein, The step of determining the road network points of the current trajectory point from the M head candidate road network points based on the transition probabilities of each of the M third candidate road network point combinations includes: From the M candidate road network points, select the candidate road network point that was removed from the third candidate road network point combination with the highest transition probability, and determine it as the road network point of the current trajectory point.
3. The method according to claim 1 or 2, characterized in that, Also includes: The combination of M third candidate road network points after removing the first candidate road network point is determined as a variable sliding window corresponding to the next trajectory point; The next trajectory point is taken as the new current trajectory point, and the step of performing map matching processing on the M candidate road network points based on the variable sliding window to obtain the road network points of the current trajectory point is executed until all trajectory points in the effective trajectory point data have completed map matching.
4. The method according to claim 1, characterized in that, Also includes: The Upsert statement is used to store the obtained trajectory points' road network points into the cache database.
5. The method according to claim 4, characterized in that, Also includes: In response to a trajectory query request for the moving object, the road network information of the moving object is queried from the cache database based on the trajectory query request; And / or, in response to a request to display road network information of the mobile object, to visualize the road network information of the mobile object.
6. The method according to claim 1, characterized in that, Also includes: Obtain the road network points of each trajectory point in the valid trajectory data, and store the road network points of each trajectory point in the valid trajectory data in the storage database.
7. The method according to claim 6, characterized in that, The step of storing the road network points of each trajectory point in the valid trajectory data into the storage database includes: According to the preset trajectory truncation conditions, each trajectory point in the valid trajectory data is truncated, and the truncated road network points are stored in the storage database.
8. A real-time trajectory data processing device, characterized in that, The device includes: The first processing module is used to acquire trajectory data of the moving object and perform noise reduction processing on the trajectory data to obtain effective trajectory point data. The acquisition module is used to acquire M candidate road network points of the current trajectory point from the valid trajectory point data; wherein M is a positive integer; The second processing module is used to determine a variable sliding window corresponding to the current trajectory point; wherein, the length of the variable sliding window is K, the variable sliding window includes N first transition probabilities of the previous trajectory point and a first candidate road network point combination corresponding to each first transition probability, each first candidate road network point combination includes K historical candidate road network points, and N and K are positive integers; The third processing module is used to perform map matching processing on the M candidate road network points based on the variable sliding window to obtain the road network points of the current trajectory point; The third processing module is specifically used for: Based on the Hidden Markov Model and Viterbi algorithm, the variable sliding window is used to perform map matching processing on the M candidate road network points to obtain the road network points of the current trajectory point. The third processing module is specifically used for: The M candidate road network points are inserted into the end of each first candidate road network point combination to obtain N second candidate road network point combinations corresponding to each candidate road network point; Determine N second transition probabilities for N combinations of second candidate road network points corresponding to each candidate road network point, and select the second candidate road network point combination with the largest second transition probability from the N combinations of second candidate road network points; The second candidate road network point combination with the highest second transition probability among the N second candidate road network point combinations corresponding to each candidate road network point is determined as the third candidate road network point combination, so as to obtain M third candidate road network point combinations; Remove the first candidate road network point from each of the third candidate road network point combinations to obtain M first candidate road network points; Based on the transition probabilities of the M third candidate road network point combinations, the road network points of the current trajectory point are determined from the M first candidate road network points.
9. The apparatus according to claim 8, characterized in that, The third processing module is specifically used for: From the M candidate road network points, select the candidate road network point that was removed from the third candidate road network point combination with the highest transition probability, and determine it as the road network point of the current trajectory point.
10. The apparatus according to claim 8 or 9, characterized in that, The device further includes: The fourth processing module is used to determine the combination of M third candidate road network points after the first candidate road network point is removed as a variable sliding window corresponding to the next trajectory point; The fifth processing module is used to take the next trajectory point as the new current trajectory point, and perform the step of map matching processing on the M candidate road network points based on the variable sliding window to obtain the road network points of the current trajectory point, until all trajectory points in the effective trajectory point data have completed map matching.
11. The apparatus according to claim 8, characterized in that, The device further includes: The storage module is used to store the obtained trajectory points' road network points into the cache database using the Upsert statement.
12. The apparatus according to claim 11, characterized in that, The device further includes: The query module is used to respond to a trajectory query request for the moving object and query the road network information of the moving object from the cache database based on the trajectory query request; And / or, a visualization module, used to visualize the road network information of the moving object in response to a request to display the road network information of the moving object.
13. The apparatus according to claim 8, characterized in that, The device further includes: The fourth processing module is used to obtain the road network points of each trajectory point in the valid trajectory data and store the road network points of each trajectory point in the valid trajectory data into the storage database.
14. The apparatus according to claim 13, characterized in that, The fourth processing module is specifically used for: According to the preset trajectory truncation conditions, each trajectory point in the valid trajectory data is truncated, and the truncated road network points are stored in the storage database.
15. A real-time trajectory data processing system, characterized in that, include: A distributed stream processing engine, comprising multiple keyed stream partitions; wherein the multiple keyed stream partitions perform real-time processing of trajectory data of different moving objects using the method described in any one of claims 1 to 7.
16. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the real-time trajectory data processing method as described in any one of claims 1 to 7.
17. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the real-time trajectory data processing method as described in any one of claims 1 to 7.
18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the real-time trajectory data processing method as described in any one of claims 1 to 7.