Trajectory data query method and device, medium and equipment
By maintaining the connection between the terminal device and the vehicle in the server device and actively pushing the trajectory data, the problem of terminal devices frequently querying the server is solved, real-time trajectory data and network resource conservation are achieved.
Patent Information
- Application Number
- CN202510511787.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-07-22
AI Technical Summary
In intelligent driving technology, terminal devices frequently call server query services to obtain vehicle trajectory data, resulting in waste of network resources and low real-time queries.
Maintain the connection state between the terminal device and the vehicle in the server device, and actively push the track data to the corresponding terminal device based on the pre-stored connection channel and the vehicle, reduce the query request frequency of the terminal device, and meet the real-time needs of users by controlling the push cycle.
It reduces the frequency of query service calls by terminal devices to server devices, reduces the waste of network resources, and improves the real-timeness of trajectory data.
Smart Images

Figure CN120354014A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to intelligent driving and testing technologies, and in particular, to a method, apparatus, medium, and device for querying trajectory data. Background Art
[0002] In the research and development stage of intelligent driving technology, the management of vehicles such as test vehicles and data collection vehicles is an important task. Among them, querying the historical and / or real-time trajectories of vehicles is an important function, and users such as operation product personnel or other relevant personnel need to view the driving trajectories of each vehicle through a terminal device (such as a browser). In the related art, users usually initiate a query request for vehicle trajectories through a terminal device, and the server responds to the query request, reads the trajectory data of the vehicle to be queried, and returns it to the terminal device. This query method requires frequent and regular calls to the query service of the server, which is likely to cause waste of network resources. Summary of the Invention
[0003] Embodiments of the present disclosure provide a method, apparatus, medium, and device for querying trajectory data, which can reduce the call frequency of the query service of the server by the terminal device, reduce the waste of network resources, and improve the real-time performance of the queried trajectory data.
[0004] In a first aspect of the embodiments of the present disclosure, a method for querying trajectory data is provided, which is applied to a server device. The method includes: determining trajectory data respectively corresponding to at least one vehicle; determining connection channels respectively corresponding to at least one terminal device currently connected to the server device; the terminal device includes a terminal device that initiates a trajectory data query request to the server device; based on the correspondence relationship between the connection channels and the vehicles stored in advance, determining the terminal devices respectively corresponding to the trajectory data; based on the terminal devices respectively corresponding to the trajectory data, pushing the trajectory data to the corresponding terminal devices respectively, so that the terminal devices display the trajectory data of the vehicles.
[0005] In a second aspect of the embodiments of the present disclosure, a device for querying trajectory data is provided, which is applied to a server device. The device includes: a determination module, configured to determine trajectory data respectively corresponding to at least one vehicle; a first processing module, configured to determine connection channels respectively corresponding to at least one terminal device currently connected to the server device; the terminal device includes a terminal device that initiates a trajectory data query request to the server device; a second processing module, configured to determine the terminal devices respectively corresponding to the trajectory data based on the correspondence relationship between the connection channels and the vehicles stored in advance; a third processing module, configured to push the trajectory data to the corresponding terminal devices respectively based on the terminal devices respectively corresponding to the trajectory data, so that the terminal devices display the trajectory data of the vehicles.
[0006] In a third aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the method for querying trajectory data according to any one of the foregoing embodiments of the present disclosure.
[0007] In a fourth aspect of the embodiments of the present disclosure, there is provided an electronic device, including: a processor; a memory for storing executable instructions of the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method for querying trajectory data according to any one of the foregoing embodiments of the present disclosure.
[0008] In a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, when the instructions in the computer program product are executed by a processor, the method for querying trajectory data provided in any one of the foregoing embodiments of the present disclosure is executed.
[0009] Based on the query method, apparatus, medium and device for trajectory data provided by the above embodiments of the present disclosure, in the server device, for the terminal device that initiates the trajectory data query request, by maintaining the connection status between the terminal device and the server device, and storing the corresponding relationship between the connection channel corresponding to the terminal device and the queried vehicle, when the server device obtains the trajectory data of the vehicle, the terminal device corresponding to the trajectory data can be determined in time according to the pre-stored corresponding relationship between the connection channel and the vehicle, and then the trajectory data can be pushed to the corresponding terminal device in time. On the one hand, after the terminal device initiates a trajectory data query request once, it is no longer necessary to frequently initiate trajectory data query requests, thereby reducing the frequent calls of the terminal device to the query service of the server device, thereby reducing the waste of network resources. On the other hand, the server device actively pushes the newly obtained trajectory data to the terminal device, so as to meet the real-time requirements of the user to query the trajectory data by controlling the size of the push cycle. For example, the server device can push the newly obtained vehicle trajectory data to the terminal device once every 1 minute or several minutes, or the server device can obtain the location information of the vehicle at one or more times, and push the one or more time positions as trajectory data to the terminal device in time. In the related art, each time the terminal device initiates a trajectory data query request, it can view the trajectory data obtained within a period of time. For example, the terminal device initiates a trajectory data query request every 10 minutes. The trajectory data query request is initiated at time T1. The server device responds to the trajectory data query request, obtains the trajectory data within 10 minutes before time T1 and sends it to the terminal device. At time T2, 10 minutes after time T1, the terminal device initiates another trajectory data query request. The server device responds to the query request of the terminal device, obtains the trajectory data within 10 minutes from time T1 to time T2 and sends it to the terminal device. By analogy, if the cycle of initiating the request is small, the frequency of the terminal device calling the query service of the server device will increase. If the cycle of initiating the request is large, the real-time performance of the queried trajectory data will be low. Compared with the related art, the method of the disclosed embodiment can effectively improve the real-time performance of the trajectory data by actively pushing the trajectory data on the basis of reducing the number of requests initiated by the terminal device. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 This is an exemplary application scenario of the trajectory data query method provided by the present disclosure;
[0011] Figure 2 is a flowchart of a method for querying trajectory data provided by an exemplary embodiment of the present disclosure;
[0012] Figure 3 is a flowchart of a method for querying trajectory data provided by another exemplary embodiment of the present disclosure;
[0013] Figure 4 It is a schematic flowchart of a method for querying trajectory data provided by another exemplary embodiment of the present disclosure;
[0014] Figure 5 It is a schematic flowchart of a method for querying trajectory data provided by another exemplary embodiment of the present disclosure;
[0015] Figure 6 It is a schematic flowchart of a method for determining the correspondence between a connection channel and a vehicle provided by an exemplary embodiment of the present disclosure;
[0016] Figure 7 It is a schematic flowchart of a method for querying trajectory data provided by another exemplary embodiment of the present disclosure;
[0017] Figure 8 It is a schematic flowchart of a method for querying trajectory data provided by another exemplary embodiment of the present disclosure;
[0018] Figure 9 It is a schematic flowchart of a method for querying trajectory data provided by another exemplary embodiment of the present disclosure;
[0019] Figure 10 It is a schematic diagram of the principle of trajectory data query in the related art;
[0020] Figure 11 It is a schematic diagram of the principle of trajectory data query provided by an exemplary embodiment of the present disclosure;
[0021] Figure 12 It is a schematic structural diagram of a device for querying trajectory data provided by an exemplary embodiment of the present disclosure;
[0022] Figure 13 It is a schematic structural diagram of a device for querying trajectory data provided by another exemplary embodiment of the present disclosure;
[0023] Figure 14 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure. Detailed Description of the Embodiment
[0024] To explain the present disclosure, exemplary embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. It should be understood that the present disclosure is not limited by the exemplary embodiments.
[0025] It should be noted that: Unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
[0026] Overview of the present disclosure
[0027] In the process of implementing the present disclosure, the inventors found that during the research and development stage of intelligent driving technology, the management of vehicles such as test vehicles and data collection vehicles is an important task. Among them, querying the historical trajectory and / or real-time trajectory of vehicles is an important function, and users such as operation product personnel or other relevant personnel need to view the driving trajectories of each vehicle through a terminal device (such as a browser). In the related art, users usually initiate a query request for vehicle trajectories through a terminal device. In response to the query request, the server reads the trajectory data of the vehicle to be queried and returns it to the terminal device. Taking the terminal device initiating a trajectory data query request every 10 minutes as an example, the terminal device initiates a trajectory data query request at time T1. The server device, in response to the trajectory data query request, obtains the trajectory data within 10 minutes before time T1 and sends it to the terminal device. At time T2, which is 10 minutes after time T1, the terminal device initiates a trajectory data query request again. The server device, in response to the query request of the terminal device, obtains the trajectory data within 10 minutes from time T1 to time T2 and sends it to the terminal device, and so on. If the request initiation period is small, it will increase the call frequency of the terminal device for the query service of the server device, resulting in a waste of network resources. If the request initiation period is large, the timeliness of the queried trajectory data is low.
[0028] Exemplary overview
[0029] Figure 1 is an exemplary application scenario of the method for querying trajectory data provided by the present disclosure. As Figure 1As shown, users such as operation product personnel or other relevant personnel can log in to the trajectory data query interface of the relevant platform (such as the test platform, vehicle management platform, etc.) through the terminal device 11, trigger the trajectory data query request through the trajectory data query interface, and the terminal device sends the trajectory data query request to the server device 12 corresponding to the relevant platform. The server device 12 uses the trajectory data query method of the embodiment of the present disclosure to provide users with trajectory data query services. Specifically, the server device 12 can communicate with one or more vehicles 13, and the positioning system on the vehicle 13 can collect the location information of the vehicle 13 and report it to the server device 12. The positioning system on the vehicle 13 may include, for example, GPS (Global Positioning System) and / or other positioning sensors. The server device 12 can determine the connection channels corresponding to at least one terminal device 11 currently connected to the server device 12 when obtaining the trajectory data corresponding to at least one vehicle 13; the terminal device 11 includes a terminal device that initiates a trajectory data query request to the server device 12; based on the pre-stored correspondence between the connection channel and the vehicle, the terminal device 11 corresponding to each trajectory data is determined; based on the terminal device 11 corresponding to each trajectory data, each trajectory data is pushed to the corresponding terminal device 11, so that the terminal device 11 displays the trajectory data of the vehicle 13. Among them, the connection channel of each terminal device 11 can correspond to one or more vehicles 13, and each vehicle 13 can correspond to one or more connection channels. That is to say, the same terminal device 11 can query the trajectory data of one or more vehicles 13, and the trajectory data of the same vehicle 13 can be queried by one or more terminal devices 11. In the query method of trajectory data of the disclosed embodiment, after initiating a trajectory data query request, the terminal device 11 can maintain the connection state with the server device, and there is no need to frequently initiate trajectory data query requests, thereby reducing the frequent calls of the terminal device to the query service of the server device, thereby reducing the waste of network resources. In addition, the server device maintains a connection with the terminal device and actively pushes the newly obtained trajectory data to the terminal device, so as to meet the real-time requirements of the user's query of trajectory data by controlling the size of the push cycle. For example, the server device can push the newly obtained vehicle trajectory data to the terminal device once every 1 minute or several minutes, or the server device can obtain the vehicle's location information at one or more times, and use the one or more time locations as trajectory data and push them to the terminal device in a timely manner. Compared with the related art, the method of the embodiment of the present disclosure can effectively improve the real-time nature of the trajectory data by actively pushing the trajectory data on the basis of effectively reducing the number of requests initiated by the terminal device.
[0030] Exemplary method
[0031] Figure 2 This is a schematic flowchart of a method for querying trajectory data provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to an electronic device, specifically, a server device such as a server or a cloud server. For example, Figure 2 As shown, the method of the embodiment of the present disclosure may include the following steps:
[0032] Step 210, determine the trajectory data corresponding to at least one vehicle respectively.
[0033] Among them, the vehicle can be a test vehicle, a data collection vehicle, or other vehicles for which trajectory data needs to be queried. The number of vehicles can be any number, and it can be determined according to the vehicle situation communicating with the server device. For example, currently, N (N is a positive integer) data collection vehicles are collecting data on the road, and each vehicle reports its own position information (or state information) to the server device according to a certain position reporting period. The position reporting period can be set to any period according to actual needs. For example, the vehicle reports the position information every m (m is a positive number) seconds. Taking GPS position information as an example, the position information can include one or more of the longitude, latitude, altitude, time information, etc. of the vehicle's location. The time information is the time corresponding to the vehicle's position. Optionally, the position information can also include information such as the vehicle's speed, acceleration, and angular velocity. The trajectory data corresponding to the vehicle can include one or more position information of the vehicle within a certain duration (or preset push period or push period). For example, the trajectory data can include the position information of the vehicle within the most recent n (n is a positive integer) minutes.
[0034] In some alternative embodiments, the push period can be set according to the user's real-time requirement for querying trajectory data. For example, the push period is n minutes, where n is 1, 2, 3, etc., and specific values are not limited.
[0035] In some alternative embodiments, the minimum push period can be the vehicle's position reporting period, that is, every time a position information reported by the vehicle is obtained, the position information can be used as the trajectory data corresponding to the vehicle, or the position information can be corrected based on historical position information and then used as the trajectory data, or if the vehicle misses reporting position information, the position information can be compensated or estimated based on historical position information and then used as the trajectory data. In practical applications, in order to balance real-time performance and data transmission efficiency, etc., the push period is usually greater than the vehicle's position reporting period.
[0036] In some alternative embodiments, in the case where the push period is greater than the vehicle's position reporting period, each time the server device receives the position information reported by the vehicle, the position information can be cached, or the position information can be corrected and then cached. When the current moment meets the push period condition, the trajectory data corresponding to the vehicle is determined based on the cached position information within the most recent push period.
[0037] In some optional embodiments, for the case of multiple vehicles, the push cycles corresponding to each vehicle may be the same or different, and the push times corresponding to each vehicle may be synchronized or asynchronous. That is to say, the trajectory data of different vehicles can be pushed to the terminal device at different times, or can be pushed to the terminal device at the same time. For example, the terminal device A11 starts to query the trajectory data of vehicle C11 from time T1, and the trajectory data of C11 is pushed to the terminal device A11 at a push cycle of every 1 minute starting from time T1; the terminal device A12 starts to query the trajectory data of vehicle C12 from time T2, and the trajectory data of C12 is pushed to the terminal device A12 at a push cycle of every 2 minutes starting from time T2. For another example, each vehicle is pushed according to a unified push cycle and push time. That is, starting from the global time T0, the trajectory data of each vehicle within the 1 minute is determined every 1 minute.
[0038] In some optional embodiments, each time the server device receives location information reported by a vehicle, it can store the location information or the corrected location information corresponding to the location information in an online storage engine in the server device, so that users can query the historical trajectory of the vehicle at a subsequent time.
[0039] Step 220: Determine the connection channels corresponding to at least one terminal device currently connected to the server device.
[0040] Among them, the terminal device includes a terminal device that initiates a trajectory data query request to the server device. The connection state means that the connection channel remains open so that data can be transmitted at any time. The server device can be a physical server, a cloud server, a server cluster, etc., which is not specifically limited. The connection channel corresponding to the terminal device in the connected state with the server device can be determined based on the information of the connection channel in the connected state maintained in real time. For example, when the terminal device initiates a trajectory data query request, the server device responds to the trajectory data query request of the terminal device, establishes a connection channel with the terminal device, and records the connection channel corresponding to the terminal device in real time, such as recording the correspondence between the identification information of the terminal device and the identification information of the connection channel, so that the connection channels corresponding to each terminal device in the connected state with the server device can be determined based on the correspondence between the identification information of the terminal device and the identification information of the connection channel. The identification information of the terminal device can be, for example, the device ID of the terminal device, and the identification information of the connection channel can be, for example, the channel ID of the connection channel.
[0041] In some alternative embodiments, the terminal device may include any device capable of displaying the trajectory data of a vehicle, such as a computer, a mobile phone, a tablet, etc. The user may initiate a trajectory data query request through a client such as a browser or an application (APP) on the terminal device. The server device establishes a connection channel between the local service and the client and maintains the connection status to facilitate the push of trajectory data.
[0042] Step 230: Based on the pre-stored correspondence between the connection channel and the vehicle, determine the terminal device corresponding to each trajectory data.
[0043] Among them, the pre-stored correspondence between the connection channel and the vehicle (which may be referred to as the first correspondence) may be stored after establishing the connection channel according to the trajectory data query request of the terminal device. The correspondence between the connection channel and the vehicle indicates the vehicle for which the terminal device corresponding to the connection channel needs to query the trajectory data. The correspondence between the connection channel and the vehicle is a many-to-many relationship, that is, one connection channel may correspond to multiple vehicles, and each vehicle may correspond to multiple connection channels. For example, connection channel R11 corresponds to vehicles C11, C12, and C13, and connection channel R12 corresponds to vehicles C12 and C14.
[0044] In some alternative embodiments, the vehicle corresponding to the trajectory data may be matched with the pre-stored correspondence between the connection channel and the vehicle (i.e., the first correspondence) to obtain a matching result, and then the terminal device corresponding to each trajectory data may be determined according to the matching result. Among them, the matching result may include the target vehicle in the first correspondence that matches the vehicle corresponding to the trajectory data. Matching means that the target vehicle and the vehicle corresponding to the trajectory data are the same vehicle. For example, the vehicle corresponding to the trajectory data is C11, and the connection channel corresponding to vehicle C11 (such as R11) is determined from the first correspondence. C11 is the target vehicle, and the connection channel R11 (referred to as the target connection channel) corresponding to this target vehicle is the target connection channel corresponding to this trajectory data. Since the connection channel and the terminal device are in one-to-one correspondence, the terminal device corresponding to this target connection channel is the terminal device corresponding to this trajectory data. According to the above correspondence between the connection channel and the vehicle, the number of connection channels corresponding to each vehicle may be one or more. Therefore, the number of terminal devices corresponding to each trajectory data may be one or more. For example, the terminal devices corresponding to the trajectory data of vehicle C12 above include the terminal devices corresponding to connection channels R11 and R12 respectively.
[0045] Step 240: Based on the terminal device corresponding to each trajectory data, push each trajectory data to the corresponding terminal device so that the terminal device can display the trajectory data of the vehicle.
[0046] For each piece of trajectory data, for each terminal device corresponding to the trajectory data, the trajectory data is pushed to the terminal device through the connection channel between the terminal device and the server device.
[0047] In some optional embodiments, the terminal device may display the track data in a chart, curve or other manner. For example, the map data and the track data of the vehicle may be combined to display the track of the vehicle on a map.
[0048] In some optional embodiments, after receiving the trajectory data, the terminal device can display the corresponding trajectory on the display screen based on the trajectory data, or incrementally display the trajectory corresponding to the trajectory data based on the displayed historical trajectory. For example, the terminal device can display a 10-minute trajectory in each frame, and the currently received trajectory data is the trajectory data of the most recent 1 minute. The terminal device can refresh the screen to display the historical trajectory of the previous 9 minutes and the trajectory of the most recent 1 minute in the screen, and so on. Every time the trajectory data of the most recent minute is received from the server device, the screen is updated so that the user can continue to view the vehicle's trajectory in the most recent 10 minutes. Here are only some examples of displaying trajectory data. In actual applications, the specific display method of trajectory data is not limited.
[0049] According to the query method for trajectory data provided by the embodiment of the present disclosure, in a server device, for a terminal device that initiates a trajectory data query request, by maintaining the connection status between the terminal device and the server device, and storing the corresponding relationship between the connection channel corresponding to the terminal device and the queried vehicle, when the server device obtains the trajectory data of the vehicle, the terminal device corresponding to the trajectory data can be determined in time according to the pre-stored corresponding relationship between the connection channel and the vehicle, and then the trajectory data can be pushed to the corresponding terminal device in time. On the one hand, after the terminal device initiates a trajectory data query request once, there is no need to frequently initiate trajectory data query requests, thereby reducing the frequent calls of the terminal device to the query service of the server device, thereby reducing the waste of network resources. On the other hand, the server device actively pushes the newly obtained trajectory data to the terminal device, so as to meet the real-time requirements of the user for querying the trajectory data by controlling the size of the push cycle. For example, the server device can push the newly obtained vehicle trajectory data to the terminal device once every 1 minute or several minutes, or the server device can obtain the location information of the vehicle at one or more times, and push the one or more time positions as trajectory data to the terminal device in time. Compared with the related art, the method of the embodiment of the present disclosure can effectively improve the real-time performance of trajectory data by actively pushing trajectory data on the basis of reducing the number of times the terminal device initiates requests.
[0050] Figure 3It is a schematic flowchart of a method for querying trajectory data provided by another exemplary embodiment of the present disclosure.
[0051] In some optional embodiments, based on the above Figure 2 illustrated embodiment, as Figure 3 shown, determining the trajectory data corresponding to at least one vehicle in step 210 may include the following steps:
[0052] Step 2110, for any one of the vehicles, receive the current position information from the vehicle.
[0053] Among them, any vehicle reports the position information of the vehicle according to a certain position reporting period, and the server device can receive the current position information from the vehicle.
[0054] In some optional embodiments, for multiple vehicles, the position reporting periods of each vehicle may be the same or different, the times for each vehicle to report position information may be synchronized or unsynchronized, and the server device can determine the moment when the vehicle should report position information according to the respective start times and position reporting periods of each vehicle, and then can determine whether the vehicle has missed reporting position information based on the moment when the vehicle should report position information. For example, when the current position information of the vehicle has not been received after a certain period of time exceeding its position reporting period, it can be determined that the vehicle has missed reporting the current position information.
[0055] In some optional embodiments, after receiving the current position information of the vehicle, based on the historical position information of the vehicle within the first period of time before the current moment, the current position information can be corrected to obtain the corrected position information, and the corrected position information is used as the current position information of the vehicle to ensure the accuracy of the current position information.
[0056] Step 2120, in response to the current moment satisfying the preset push period condition, based on the historical position information and the current position information of the vehicle within the current push period, determine the trajectory data corresponding to the vehicle.
[0057] Among them, the current push period is the time period between the previous moment of pushing trajectory data and the current moment.
[0058] In some optional embodiments, the preset push period condition may be that the time interval between the current moment and the previous moment of pushing trajectory data is greater than or equal to the preset push period. For example, every time the position information reported by the vehicle is received, it is judged whether the current moment satisfies the preset push period condition. If the current moment satisfies the preset push period condition, based on the historical position information and the current position information of the vehicle within the current push period, the trajectory data corresponding to the vehicle is determined.
[0059] In some alternative embodiments, the preset push cycle condition may be that the time interval between the current moment and the moment when the trajectory data was last pushed is equal to the preset push cycle. For example, a timer may trigger the push process of the trajectory data according to the preset push cycle, that is, based on the timing of the timer, it is determined that the current moment meets the preset push cycle condition, and based on the position information of the vehicle within the current push cycle, the trajectory data corresponding to the vehicle is determined. The position information of the vehicle within the current push cycle includes the position information of the vehicle at each moment within the current push cycle. In this case, the above-mentioned current position information is the most recently received position information. That is to say, the push process of the trajectory data may be triggered at the moment when a position information is received or after a short period of time.
[0060] In some alternative embodiments, for the case of multiple vehicles, if the preset push cycles corresponding to each vehicle are the same and the push times are synchronized, then in response to the current moment meeting the preset push cycle condition, based on the historical position information and the current position information of each vehicle within the current push cycle, the trajectory data corresponding to the vehicle is determined. If the preset cycles corresponding to each vehicle are different and / or the push times are not synchronized, that is, the preset push cycle conditions are different, then it is possible to determine whether the current moment meets the preset push cycle condition of the vehicle according to the preset push cycle and the push time corresponding to each vehicle. In response to the current moment meeting the preset push cycle condition of the vehicle, the trajectory data corresponding to the vehicle is determined.
[0061] In the embodiments of the present disclosure, by determining the trajectory data of the vehicle according to a certain push cycle and pushing it to the terminal device, the terminal device can timely display the trajectory data within the current push cycle, which is convenient for meeting different real-time requirements of the trajectory data queried by the user by controlling the size of the push cycle, and can avoid the terminal device from frequently invoking the services of the server device.
[0062] Figure 4 It is a schematic flowchart of a method for querying trajectory data provided by another exemplary embodiment of the present disclosure.
[0063] In some alternative embodiments, as Figure 4 shown, the step of, in response to the current moment meeting the preset push cycle condition, determining the trajectory data corresponding to the vehicle based on the historical position information and the current position information of the vehicle within the current push cycle in step 2120 may include:
[0064] Step 21210, based on the historical position information of the vehicle within the first time period before the current moment, correct the current position information to obtain the corrected position information corresponding to the current position information.
[0065] Wherein, the first time period is greater than or equal to the duration of the current push cycle.
[0066] In some alternative embodiments, the first duration can be any duration, which can be specifically set according to actual requirements. For example, if the duration of the current push cycle is 1 minute, the first duration can be 2 minutes, 3 minutes, …, 10 minutes, 11 minutes, etc., and there is no specific limitation.
[0067] In some alternative embodiments, the historical position information within the first duration is the accurate position information of the vehicle at each historical moment within the first duration before the current moment. For example, it can be the corrected accurate position information or the position information reported by the vehicle that is determined to be available.
[0068] In some alternative embodiments, since the change in the position of the vehicle within a very short period of time is not large, based on this, curve fitting can be performed on the trajectory of the vehicle based on the historical position information within the first duration and a pre-configured fitting algorithm to obtain a fitting curve. Based on the position relationship between the current position information and the fitting curve, the current position information is corrected to obtain the corrected position information corresponding to the current position information, so that the error between the corrected position information and the fitting position information at the corresponding moment on the fitting curve is within a preset threshold range. The fitting algorithm for curve fitting can be any implementable algorithm, such as the least squares method or other algorithms, and there is no specific limitation.
[0069] In some alternative embodiments, the first duration is greater than the duration of the current push cycle to ensure that the historical position information used for correction includes the historical position information before the current push cycle, thereby ensuring the coherence and smoothness of the trajectory data within the current push cycle and the trajectory data of the historical push cycle, and avoiding the drift of the vehicle trajectory. For example, if the duration of the current push cycle is 1 minute, the first duration is 10 minutes, 11 minutes, etc.
[0070] In some alternative embodiments, the historical position information within the first duration can be determined based on a sliding window. For example, for each vehicle, a sliding window corresponding to the vehicle can be set, and the sliding window corresponds to the cached vehicle position information within a certain duration. For example, the sliding window corresponds to the cached position information of the vehicle within 10 minutes, and the sliding period of the sliding window is the preset push cycle, that is, when the sliding window slides once, the trajectory data is pushed to the terminal device once.
[0071] In some alternative embodiments, taking the case where the duration of the sliding window is S times the duration of the push period as an example, after each slide of the sliding window, the historical location information within the sliding window may include the historical location information within S - 1 historical push periods. The most recent part of a push period within the sliding window corresponds to the current push period, waiting to cache the new location information of the current push period. For example, if the duration of the sliding window is 10 minutes and the push period is 1 minute, before the sliding window slides, the sliding window includes the historical location information of the previous 9 minutes and the location information of the current push period (i.e., the most recent 1 minute). Based on the location information within the current push period, the trajectory data within the current push period is determined and pushed to the terminal device, and the window sliding operation is performed. After the sliding window slides, it enters a new current push period. Since the location information of the current push period has not been obtained yet, at this time, the first 9 minutes within the sliding window correspond to the historical location information of 9 minutes, and the last 1 minute corresponds to the current push period, waiting to cache the new location information of the current push period. In this case, the first duration may be the duration of the sliding window, i.e., 10 minutes. Each time the current location information of the vehicle is received, the current location information is corrected based on the existing historical location information within the sliding window to obtain the corrected location information. The corrected location information is cached into the sliding window. If the sliding window cache is full, it indicates that the sliding window has reached the sliding moment, triggering the push of the trajectory data of the most recent 1 minute and the sliding operation of the sliding window, so as to push the trajectory data of the most recent 1 minute to the corresponding terminal device and perform the sliding operation of the sliding window, causing the earliest 1 minute of historical location information within the sliding window to slide out of the sliding window, leaving the last 1 minute within the sliding window empty, and continuing to cache the location information of the next push period (i.e., the new current push period) within the sliding window, and so on, to achieve the continuous push of the trajectory data.
[0072] In some alternative embodiments, after each slide of the sliding window, the historical location information within the sliding window includes the historical location information within S historical push cycles. That is to say, the location information of the current push cycle enters the sliding window and becomes historical location information only after the sliding window slides. Still taking the sliding window duration of 10 minutes and the push cycle of 1 minute as an example, the sliding window corresponds to 10 minutes of historical location information. The location information of the current push cycle is cached and has not yet entered the sliding window. When the preset push cycle condition is met at the current moment, that is, after caching the location information within the most recent 1 minute, when the push time arrives, the push of the location information within the most recent 1 minute and the sliding operation of the sliding window are triggered. As a result, the earliest 1 minute of historical location information within the sliding window slides out of the sliding window, and the location information within the most recent 1 minute is added to the sliding window, entering the next push cycle, and so on, to achieve continuous push of trajectory data. In this case, the above-mentioned first duration may include the sum of the sliding window duration and the current push cycle duration. For example, the first duration is 11 minutes, that is, 10 minutes of historical push cycle and the most recent 1 minute push cycle. The specific implementation manner of the sliding window is not limited.
[0073] In some alternative embodiments, when it is determined that there is a large deviation (i.e., unavailable) in the current location information, the current location information may be corrected based on the historical location information of the vehicle within the first duration before the current moment to obtain the corrected location information corresponding to the current location information. In the case where the location information reported by the vehicle is accurate location information, there is no need for correction to avoid unnecessary processing procedures. Optionally, it may be determined whether there is a large deviation in the current location information based on the position change amount of the current location information relative to the historical location information, the vehicle driving time (which may refer to the vehicle's location reporting cycle), etc. For example, if the vehicle driving time is 2 seconds, the maximum position change amount of the vehicle position can be determined according to the vehicle-supported driving speed and driving time. Based on the error size between the maximum position change amount and the position change amount of the current location information relative to the historical location information, it can be determined whether there is a large deviation in the current location information.
[0074] Step 21220, in response to the current moment meeting the preset push cycle condition, determine the trajectory data based on the historical location information within the current push cycle and the corrected location information corresponding to the current location information.
[0075] In some alternative embodiments, the historical location information within the current push cycle and the corrected location information corresponding to the current location information may be used as the trajectory data of the vehicle within the current push cycle, and then the trajectory data is pushed to the corresponding terminal device.
[0076] In some alternative embodiments, the location information (including historical location information and current location information) within the current push cycle may be further processed, and the processed location information is used as the trajectory data within the current push cycle. The further processing may include processing such as compensating for and predicting the location information of missed reports to ensure the integrity of the trajectory data. A missed report means that due to problems on the vehicle side, during the transmission process, or on the server device side, etc., the location information reported by the vehicle is not received or temporarily not received.
[0077] In the embodiments of the present disclosure, for the received current location information of the vehicle, by correcting the current location information with the historical location information within the first duration before the current moment, the accuracy of the current location information can be effectively improved, and the situation where inaccurate trajectory data occurs due to inaccurate location information reported by the vehicle can be avoided. In addition, by making the first duration greater than the duration of the current push cycle, the correction of the location information within the current push cycle can refer to the historical location information of the historical push cycle, so as to comprehensively consider the correlation between each push cycle, and the situation where a large deviation occurs in the trajectory of the current push cycle relative to the trajectory of the historical push cycle, resulting in jumps or drifts in the overall trajectory of the vehicle, can be avoided, and the smoothness and coherence of the overall trajectory can be improved.
[0078] In some alternative embodiments, step 21210 of correcting the current location information based on the historical location information of the vehicle within the first duration before the current moment to obtain the corrected location information corresponding to the current location information may include:
[0079] Determine the available state of the current location information based on the historical location information and the current location information within the first duration; in response to the available state being unavailable, correct the current location information based on the historical location information within the first duration to obtain the corrected location information corresponding to the current location information.
[0080] Among them, the available state may include two states: available and unavailable. The available state of the current location information may be available or unavailable. If the available state is unavailable, it means that the current location information is inaccurate and deviates from the normal trajectory of the vehicle, which may cause drift or jump in the trajectory data of the vehicle. Then, correct the current location information based on the historical location information within the first duration before the current moment to obtain the corrected location information corresponding to the current location information. If the available state is available, there is no need to correct the current location information. For the specific operation of correcting the current location information, reference may be made to the foregoing embodiments, and details are not described herein.
[0081] In some alternative embodiments, curve fitting processing may be performed based on historical position information within a first duration to obtain a fitting curve. Then, based on the current position information and the fitting position information corresponding to the current position information on the fitting curve, the available state of the current position information may be determined. For example, if the error between the current position information and the fitting position information is greater than a preset error threshold, it is determined that the available state of the current position information is unavailable; if the error is less than or equal to the preset error threshold, it is determined that the available state of the current position information is available. The specific manner of determining the available state of the current position information may also be other ways, not limited to the above manner.
[0082] In some alternative embodiments, based on the position change amount between the current position information and the previous position information, and the travel time between the current position information and the previous position information (i.e., the position reporting period of the vehicle), the available state of the current position information may be determined. If the error between the position change amount and the possible maximum position change amount of the vehicle is greater than a preset threshold, it is determined that there is a large deviation in the current position information, and thus it is determined that the available state of the current position information is unavailable, thereby simplifying the process of determining the available state and improving the processing efficiency. The specific manner of determining the available state of the current position information may be set according to actual requirements.
[0083] In the embodiments of the present disclosure, by first determining the available state of the current position information and only correcting the unavailable current position information, unnecessary correction processes can be avoided, ensuring the processing efficiency.
[0084] In some alternative embodiments, as Figure 4 shown, the method of the embodiments of the present disclosure may further include:
[0085] Step 310, caching the corrected position information and / or storing the corrected position information in an online storage engine.
[0086] In some alternative embodiments, for the corrected position information corresponding to any position information reported by the vehicle, the corrected position information may be cached in a local data cache. For position information that does not need to be corrected, the position information may be cached in the data cache, so as to obtain the position information of the vehicle within the current push cycle from the cache at the push time and push it to the terminal device as the trajectory data of the vehicle. The data cache may be any type of cache, such as a FIFO (First In First Out) cache or other types of caches, and is not specifically limited.
[0087] In some alternative embodiments, for the corrected position information corresponding to any position information reported by a vehicle, the corrected position information may be stored in an online storage engine. For position information that does not need to be corrected, the position information is stored in the online storage engine. The online storage engine is a component (or service) in the server device responsible for data storage, retrieval, and management. In the embodiments of the present disclosure, the online storage engine is responsible for the storage, retrieval, and management of the trajectory data of the vehicle. By storing the position information of the vehicle in the online storage engine, a query function for the historical trajectory data of the vehicle can be provided for users.
[0088] In the embodiments of the present disclosure, by caching the position information of the vehicle, it is convenient to provide effective position information for the periodic push of trajectory data. By storing the position information of the vehicle in the online storage engine, effective data support is provided for users to query the historical trajectory data of the vehicle.
[0089] Figure 5 It is a schematic flowchart of a method for querying trajectory data provided by another exemplary embodiment of the present disclosure.
[0090] In some alternative embodiments, based on any of the above embodiments, the step 2120 of determining the trajectory data corresponding to the vehicle based on the historical position information and the current position information of the vehicle within the current push cycle in response to the current moment satisfying the preset push cycle condition may include:
[0091] Step 21201, in response to the current moment satisfying the preset push cycle condition, determining the missing report status of the historical position information and the current position information within the current push cycle based on the position reporting cycle corresponding to the vehicle.
[0092] Wherein, the position reporting cycle corresponding to the vehicle is the time interval for the vehicle to report position information. For example, if the vehicle reports once every 2 seconds, the position reporting cycle is 2 seconds.
[0093] In some alternative embodiments, the missing report status of the location information (including historical location information and current location information) within the current push cycle may be determined based on the time information corresponding to each piece of historical location information and the current location information within the current push cycle, as well as the location reporting cycle. For example, if the current push cycle is 1 minute and the location reporting cycle of the vehicle is 2 seconds, if there is no missing location information, the current push cycle should include 30 or 31 pieces of location information. For example, at the 0th second, 2nd second, 4th second, …, 60th second within this 1 minute, each corresponds to a piece of location information. Based on this, the missing report status is determined according to the situation of the location information included in the current push cycle. If there is no location information corresponding to one or more moments within the current push cycle, it may be determined that the missing report status indicates that there are missing locations. If there is location information corresponding to each moment within the current push cycle, it is determined that the missing report status indicates that there are no missing locations.
[0094] In some alternative embodiments, the time interval between the time information corresponding to two pieces of location information may be determined according to the location information arranged in chronological order within the current push cycle, and the missing report status may be determined based on the time interval and the location reporting cycle. The specific manner of determining the missing report status is not limited to the above manner, and the embodiments of the present disclosure do not make any limitations.
[0095] Step 21202, in response to the missing report status indicating that there are missing locations, perform location information compensation or estimation processing on the missing locations based on the historical location information of the vehicle within the first duration before the current moment, to obtain the complete processed location information within the current push cycle.
[0096] Among them, if the missing report status indicates that there are missing locations, it means that the trajectory data within the current push cycle is incomplete. The location information of the missing locations may be further compensated or estimated based on the historical location information of the vehicle within the first duration before the current moment, so as to obtain the complete processed location information. Compensation (i.e., compensation processing) refers to, for the missing locations, according to the existing location information, through interpolation or curve fitting, etc., to obtain the location information corresponding to the missing locations. The location information obtained through compensation is called compensated location information. Estimation refers to, according to the existing location information, combined with map road information, vehicle speed information, etc., estimating the location information corresponding to the missing locations. The location information obtained through estimation is called estimated location information.
[0097] In some alternative embodiments, for the situation where the number of missing locations (or simply referred to as the number of missing reports) is small or the duration of missing reports is short, for example, the number of missing reports is less than a preset quantity threshold and the duration of missing reports is less than a preset duration threshold, the location information of the missing locations may be determined through compensation processing. For example, based on the existing location information before and after the missing locations, the location information of the missing locations may be obtained through interpolation. For example, at the location information at time T i and time Tj If there are d (d is a positive integer) missing position information between the position information at a certain moment, then T can be determined. i From the position information at a certain moment to T j The first position change amount of the position information at a certain moment to the position information at T. Based on this first position change amount and the number of missing positions, determine the second position change amount between two adjacent position information, that is, divide the first position change amount by (d + 1) to obtain the second position change amount. Add the position information at T i The sum of the position information and the second position change amount as the compensated position information of the first missing position adjacent to T i Based on the position information at T i The position information at a certain moment or the position information of the first missing position, and the second position change amount, determine the position information of the second missing position; and so on, to obtain the compensated position information of d missing positions. Or it can be based on the position information at T j The position information at a certain moment and the second position change amount to determine the compensated position information of d missing positions. Here are only some exemplary compensation methods, and the specific compensation method is not limited to the above method. For example, it is also possible to perform position information compensation processing on the missing positions based on the existing position information and in combination with the speed of the vehicle to obtain complete trajectory data.
[0098] In some alternative embodiments, if the number of missing reports is greater than a preset number threshold, or the duration of missing reports is greater than a preset duration threshold, it means that there are too many missing positions, and it is impossible to obtain complete position information through the compensation method, or the accuracy of the position information obtained through the compensation method is poor. Then, the complete position information can be obtained through an estimation method. For example, when the vehicle passes through a tunnel, there may be a long-term missing report situation. Based on the map road information, the existing position information within the first duration, and in combination with the vehicle speed information, according to the pre-configured estimation algorithm, estimate the position information of the missing positions to obtain complete position information. The estimation algorithm can adopt any implementable algorithm. For example, the estimation algorithm can include filtering algorithms, optimization algorithms, machine learning models, etc. Among them, the filtering algorithm can include, for example, the Kalman filtering algorithm, the particle filtering algorithm, etc. The optimization algorithm can include, for example, the genetic algorithm, the simulated annealing algorithm, etc. The machine learning model can include, for example, the convolutional neural network model, the Transformer neural network model, etc. The specific estimation algorithm is not limited.
[0099] Step 21203, determine the trajectory data based on the processed position information.
[0100] Among them, after obtaining the processed position information (i.e., complete position information) within the current push cycle through compensation or estimation processing, the complete processed position information can be used as the trajectory data of the vehicle and pushed to the corresponding terminal device.
[0101] In some alternative embodiments, since the accuracy of the compensated and predicted position information cannot be guaranteed, the compensated position information and the predicted position information are only used for trajectory data pushing, and the compensated position information and the predicted position information may not be cached, nor stored in the online storage engine.
[0102] In some alternative embodiments, for the missed reported positions, the vehicle may perform a supplementary reporting operation at a subsequent time. According to the available status of the supplementary reported position information, the available supplementary reported position information can be cached and / or stored in the online storage engine, or the unavailable supplementary reported position information can be corrected and then cached and / or stored in the online storage engine.
[0103] In an embodiment of the present disclosure, when pushing trajectory data, for the positions missed reported in the current pushing cycle, the complete trajectory data in the current pushing cycle is obtained through compensation or prediction processing to ensure the integrity of the trajectory data.
[0104] Figure 6 It is a schematic flowchart of determining the correspondence between the connection channel and the vehicle provided by an exemplary embodiment of the present disclosure.
[0105] In some alternative embodiments, based on any of the above embodiments, as Figure 6 shown, the correspondence between the pre-stored connection channel and the vehicle is determined in the following manner:
[0106] Step 410, in response to receiving a trajectory data query request from the terminal device, based on the trajectory data query request, establish a connection channel with the terminal device and maintain the connection state of the connection channel.
[0107] Among them, the user can trigger a trajectory data query request through the terminal device. For example, the user selects or enters a time interval to be queried (or the type of trajectory data to be queried), the vehicle to be queried, etc. on the trajectory data query interface of the terminal device. The terminal device generates a trajectory data query request according to the user's triggering operation. The trajectory data query request may include one or more of information such as the device identifier of the terminal device, the time interval to be queried by the user, and the vehicle to be queried. The terminal device sends the trajectory data query request to the server device. After receiving the trajectory data query request from the terminal device, the server device establishes a connection channel with the terminal device based on the trajectory data query request and maintains the connection state with the terminal device, or is referred to as establishing a long connection with the terminal device. The connection channel is a communication channel between the terminal device and the server device. When the connection channel is in a connected state, data can be transmitted in real time.
[0108] In some optional embodiments, after the connection channel is established, the correspondence between the terminal device and the connection channel may be stored, for example, the correspondence between the device identifier of the terminal device and the channel identifier of the connection channel may be stored. The terminal device and the connection channel correspond one to one.
[0109] Step 420 : determining a vehicle to be queried based on the trajectory data query request.
[0110] Wherein, the trajectory data query request includes the vehicle to be queried selected or input by the user, and the vehicle to be queried can be extracted from the trajectory data query request. For example, the identification information of the vehicle to be queried can be extracted from the trajectory data query request, and the vehicle to be queried can be determined based on the identification information of the vehicle. The identification information of the vehicle can be a vehicle ID with a unique identifier set for the vehicle.
[0111] Step 430: store the corresponding relationship between the connection channel and the vehicle to be queried.
[0112] The corresponding relationship between the connection channel and the vehicle to be queried is the corresponding relationship between the connection channel and the vehicle. After the vehicle to be queried is determined, the corresponding relationship between the connection channel and the vehicle to be queried can be established, and the corresponding relationship can be stored in a preset storage space for use in subsequent trajectory data push.
[0113] In some optional embodiments, it is possible to first determine whether the type of the queried trajectory data is a real-time type based on the trajectory data query request of the terminal device, and if it is determined to be a real-time type, establish a connection channel with the terminal device, and maintain the connection state of the connection channel. If the trajectory data query request is a historical type, the trajectory data query request can be directly responded to, and the historical trajectory data of the time interval corresponding to the trajectory data query request can be sent to the terminal device through network resources, without establishing a connection channel between the server device and the terminal device, and without maintaining a connection state.
[0114] In the embodiments of the present disclosure, when a terminal device initiates a trajectory data query request, a connection channel is established with the terminal device and the connection state is maintained, so that the server device can actively push the newly acquired vehicle trajectory data to the terminal device, thereby improving the real-time performance of the trajectory data and reducing the waste of network resources.
[0115] Figure 7 It is a flowchart of a method for querying trajectory data provided by yet another exemplary embodiment of the present disclosure.
[0116] In some optional embodiments, based on any of the above embodiments, Figure 7 As shown, before determining the trajectory data corresponding to at least one vehicle, the method of the embodiment of the present disclosure may further include:
[0117] Step 510: For any one of the terminal devices, in response to receiving a trajectory data query request from the terminal device, based on the trajectory data query request, determine the time interval to be queried and the vehicle to be queried.
[0118] Among them, the time interval to be queried can be a historical interval, or the time interval to be queried can be a real-time interval or information indicating a real-time type, or the time interval to be queried can be a mixed interval, that is, including a historical interval and a real-time interval. The historical interval can be, for example, any interval before the current moment, and the real-time interval can be, for example, any interval after the current moment. For example, if the current moment is a year, b months, c days, d hours, e minutes, and f seconds, where a, b, c, d, e, and f are all integers greater than or equal to 0, and the user selects the time interval to be queried as from d - i hours, 0 minutes, 0 seconds to d - j hours, 0 minutes, 0 seconds on a year, b months, c days, and both i and j are positive integers and i > j, then this time interval is a historical interval. If the user selects the time interval to be queried as from the current time on a year, b months, c days to d + k hours, 0 minutes, 0 seconds, where k is a positive integer, then this time interval is a real-time interval. Or the user selects the time interval to be queried as information indicating "real-time", for example, there are options such as "latest" and "real-time" in the time interval selection item to indicate the time interval for querying real-time trajectory data. The specific time interval and representation method are not limited.
[0119] Step 520: Based on the time interval to be queried, determine the type of the trajectory data to be queried.
[0120] Among them, the types include real-time type and historical type. If the time interval to be queried is an interval before the current moment, then determine that the type of the trajectory data to be queried is the historical type. If the time interval to be queried includes a future interval after the current moment, or the time interval to be queried is relevant information indicating a real-time type, then determine that the type of the trajectory data to be queried is the real-time type. Optionally, the type can also include a mixed type. For the mixed type, the historical trajectory data within the historical sub-interval can be sent to the terminal device first, and then the real-time trajectory data can be pushed to the terminal device in a push manner.
[0121] Step 530: In response to the type of the trajectory data to be queried being the real-time type, obtain the first historical trajectory data of the vehicle to be queried within the most recent preset duration, and send the first historical trajectory data to the terminal device.
[0122] Among them, the most recent preset duration can be determined according to the specific situation of the time interval selected by the user. For example, if no historical sub-interval other than the real-time interval is specified in the user's time interval, the preset duration can adopt a preset value configured in advance, such as 10 minutes or other values. If a historical sub-interval other than the real-time interval is specified in the user's time interval, the preset duration is the duration of the historical sub-interval specified by the user. For example, if the start time of the user's time interval is before the current time and the end time is after the current time, the preset duration is the duration from the start time to the current time.
[0123] In some alternative embodiments, the first historical trajectory data of the vehicle to be queried within the most recent preset duration can be obtained from the online storage engine, and then the first historical trajectory data is sent to the terminal device. After that, the trajectory data is pushed to the terminal device according to the pushing method of the foregoing embodiments.
[0124] In some alternative embodiments, the first historical trajectory data of the vehicle to be queried within the most recent preset duration can be obtained based on the historical location information locally cached by the server device. For example, when the most recent preset duration is less than or equal to the above-mentioned first duration and the server device locally caches the historical location information within the most recent first duration, the historical location information for the preset duration can be obtained from the cached historical location information within the first duration as the first historical trajectory data. The specific method for obtaining the first historical trajectory data is not limited.
[0125] In some alternative embodiments, before sending the first historical trajectory data to the terminal device, the missing report status of the location information in the first historical trajectory data can also be determined. If there are missing locations in the first historical trajectory data, position information compensation or estimation processing is performed on the missing locations in the first historical trajectory data to obtain the complete processed historical trajectory data, and the processed historical trajectory data is used as the first historical trajectory data and sent to the terminal device, so that the terminal device can first display the complete trajectory for the most recent preset duration. The specific operations of the compensation and estimation processing can refer to the foregoing embodiments and will not be elaborated here.
[0126] Step 540, in response to the type of the trajectory data to be queried being the historical type, read the second historical trajectory data of the vehicle to be queried within the time interval to be queried from the online storage engine according to the time interval to be queried and the vehicle to be queried.
[0127] Among them, the second historical trajectory data includes at least one historical location information within the time interval to be queried.
[0128] In some alternative embodiments, an access request for the online storage engine may be generated according to the time interval to be queried and the vehicle to be queried. The online storage engine retrieves the position information of the vehicle to be queried within the time interval to be queried from the storage space as the second historical trajectory data.
[0129] In some alternative embodiments, similar to the first historical trajectory data, the second historical trajectory data may be compensated or predicted, and the processed historical trajectory data is used as the second historical trajectory data.
[0130] Step 550: Send the second historical trajectory data to the terminal device so that the terminal device displays the historical trajectory corresponding to the vehicle based on the second historical trajectory data.
[0131] In some alternative embodiments, the server device may send the second historical trajectory data to the terminal device through network resources so that the terminal device displays the historical trajectory corresponding to the second historical trajectory data.
[0132] In some alternative embodiments, sending the second historical trajectory data to the terminal device in step 550 may include:
[0133] Determine the missing report status of the historical position information in the second historical trajectory data; in response to the missing report status indicating that there are missing positions, perform position information compensation or prediction processing on the missing positions based on the existing historical position information in the historical trajectory data to obtain the complete trajectory data corresponding to the historical trajectory data; send the complete trajectory data to the terminal device. The specific operations of the compensation and prediction processing can refer to the foregoing embodiments and will not be elaborated here.
[0134] In the embodiments of the present disclosure, for the historical type of trajectory data query request (referred to as a request or query request) of the terminal device, historical trajectory data can be obtained from the online storage engine to respond to the request of the terminal device in a timely manner. For the real-time type of request of the terminal device, the historical trajectory data of a certain duration recently can be sent to the terminal device first, and then the real-time trajectory data is pushed in an active push manner, thereby avoiding frequent calls to the query service of the server device for the real-time type of trajectory data query and reducing the waste of network resources.
[0135] Figure 8 It is a schematic flowchart of a method for querying trajectory data provided by another exemplary embodiment of the present disclosure.
[0136] In some alternative embodiments, based on any of the foregoing embodiments, as Figure 8 shown, the method of the embodiments of the present disclosure may further include:
[0137] Step 250: For any one of the terminal devices, in response to the end of the trajectory data query request of the terminal device, close the connection channel corresponding to the terminal device, and delete the corresponding relationship between the connection channel corresponding to the terminal device and the vehicle.
[0138] In some alternative embodiments, the end of the trajectory data query request of the terminal device can be determined by an end notification sent by the terminal device. For example, when the terminal device performs a close operation on the trajectory data query interface, it triggers the sending of an end notification to the server device, or in other ways, triggers the terminal device to send an end notification to the server device. The server device determines the end of the trajectory data query request of the terminal device in response to receiving the end notification.
[0139] In some alternative embodiments, it can be determined according to the real-time interval corresponding to the trajectory data query request. For example, if the real-time interval corresponding to the trajectory data query request specifies an end time, then when the current time reaches the end time, it can be determined that the terminal device ends the trajectory data query request. The specific way to determine the end of the trajectory data query request of the terminal device is not limited to the above methods, and the embodiments of the present disclosure do not make any limitations.
[0140] In some alternative embodiments, for any one of the terminal devices, if the terminal device ends the trajectory data query request, the connection channel corresponding to the terminal device can be closed. For example, update the status of the connection channel from the open state to the closed state, delete the corresponding relationship between the terminal device and the connection channel, and release the channel resources for subsequent use by other terminal devices. For example, in the case of establishing a connection channel between the terminal device and the server device through a socket, the channel resources can be released by closing the socket.
[0141] In some alternative embodiments, after the terminal device ends the trajectory data query request, in order to ensure the accuracy and reliability of the trajectory data push, it is necessary to maintain the corresponding relationship between the connection channel and the vehicle in real time, and delete the corresponding relationship between the connection channel corresponding to the terminal device and the vehicle to ensure the validity of the stored corresponding relationship between the connection channel and the vehicle.
[0142] It should be noted that the execution of step 250 and the steps from step 210 to step 240 do not have a sequential order. That is to say, if any terminal device ends the trajectory data query request at any time, the connection channel corresponding to the terminal device is closed in real time, and the corresponding relationship between the connection channel corresponding to the terminal device and the vehicle is deleted to ensure the validity of the stored corresponding relationship.
[0143] In an embodiment of the present disclosure, after the terminal device finishes the trajectory data query request, the connection channel corresponding to the terminal device is closed in a timely manner to release the channel resources in a timely manner, which is convenient for subsequent trajectory data query of the terminal device. In addition, by deleting the correspondence between the connection channel corresponding to the terminal device and the vehicle, the real-time maintenance of the correspondence between the connection channel and the vehicle is realized, ensuring the effectiveness of the stored correspondence between the connection channel and the vehicle, and providing an accurate and effective correspondence for the subsequent push of trajectory data.
[0144] Figure 9 It is a schematic flowchart of a method for querying trajectory data provided by another exemplary embodiment of the present disclosure.
[0145] In some optional embodiments, on the basis of any of the above embodiments, as Figure 9 shown, pushing each trajectory data to the corresponding terminal device in step 240 may include:
[0146] Step 2410, for each trajectory data, based on the transmission protocol of the terminal device corresponding to the trajectory data, convert the trajectory data into trajectory data in a target format supported by the terminal device.
[0147] The transmission protocol is a communication protocol pre-configured on the server device according to the data format supported by the terminal device. The transmission protocol describes the rules for the server device to communicate with the terminal device. The server device can convert the trajectory data into trajectory data in a target format supported by the terminal device based on this transmission protocol, so that the terminal device can obtain effective trajectory data for display. The specific transmission protocol is not limited.
[0148] Step 2420, push the trajectory data in the target format to the terminal device.
[0149] In the embodiment of the present disclosure, by converting the trajectory data based on the transmission protocol, the trajectory data sent from the server device to the terminal device is the trajectory data in the target format supported by the terminal device, ensuring the effectiveness of data transmission.
[0150] Figure 10 It is a schematic diagram of the principle of trajectory data query in the related art. As Figure 10As shown, in the related art, the server device 12 receives the location information reported by the vehicle 13 and stores the location information in the online storage engine. For the case where the user needs to view the real-time trajectory of the vehicle, the terminal device 11 initiates a trajectory data query request at a certain period (or a preset duration), for example, initiates a query request every 10 minutes to query the trajectory data within these 10 minutes. Each time the terminal device 11 initiates a trajectory data query request, the server device 12 invokes the query service. The query service responds to the trajectory data query request, accesses the underlying online storage engine, and reads the location information of the vehicle to be queried within 10 minutes (the location information for the preset duration relative to the current moment is historical location information), and sends it to the terminal device 11 as real-time trajectory data. The terminal device 11 can display the trajectory of the vehicle to be queried within 10 minutes for the user to view. The server device 12 continues to collect the location information of the vehicle and stores it in the online storage engine. When the terminal device 11 initiates a trajectory data query request again, the server device 12 invokes the query service again. The query service accesses the online storage engine again and reads the latest historical location information within 10 minutes, and sends it to the terminal device 11 as trajectory data. The terminal device can display the trajectory within these 10 minutes, or incrementally display the data within these 10 minutes based on the trajectory in the previous 10 minutes, that is, display the trajectory for 20 minutes or more. However, since each query request is stateless and does not know the context, that is, there is no association between the location information for the previous 10 minutes of query and the location information for the next 10 minutes of query. When one or some of the location information reported by the vehicle is inaccurate, the displayed trajectory will drift, thus affecting the accuracy of the trajectory. Moreover, frequent invocation of the query service will cause waste of network overhead resources and result in unstable connection between the terminal device and the query service.
[0151] Figure 11 is a schematic diagram of the trajectory data query principle provided by an exemplary embodiment of the present disclosure. As Figure 11As shown in the figure, the method for querying trajectory data according to the embodiments of the present disclosure is equivalent to dividing the query process of trajectory data into a window calculation process and a trajectory data query process. The window calculation process corresponds to the window calculation service, and the trajectory data query process corresponds to the trajectory data query service. For the case where a user queries the historical trajectory of a vehicle (i.e., the type of the trajectory data to be queried is of the historical type), the trajectory data query service can read the historical trajectory data within the query time range from the online storage engine and send it to the terminal device 11. For the case where a user needs to query the real-time trajectory of a vehicle (i.e., the type of the trajectory data to be queried is of the real-time type), after the user sends a trajectory data query request to the server device 12 through the terminal device 11, the server device establishes a connection channel with the terminal device 11 and maintains the connection state with the terminal device 11. First, it obtains the first historical trajectory data of the vehicle to be queried within the most recent preset duration from the online storage engine or the window calculation service, and sends the first historical trajectory data to the terminal device 11 for display. Then, the window calculation service obtains the trajectory data of the vehicle within the latest push period (i.e., the current push period) according to a certain push period (i.e., the preset push period, such as 1 minute). The trajectory data can be optimized trajectory data obtained by processing the position information within the current push period through correction, compensation, prediction, etc. based on the historical position information within a time window of a certain duration (i.e., the first duration, such as 10 minutes), so as to ensure the accuracy, smoothness, and integrity of the trajectory. The trajectory data is transmitted to the trajectory data query service, and the trajectory data query service determines the terminal device corresponding to the trajectory data and pushes the trajectory data to the terminal device 11, so that the terminal device 11 can incrementally display the trajectory within the latest 1 minute on the basis of the already displayed trajectory. Compared with 10 minutes in the related art, the real-time performance of the trajectory data queried by the user is effectively improved. And through calculations such as correction, compensation, and prediction by the window calculation service, the drift situation of the displayed trajectory is effectively avoided, and the display effect of the trajectory is improved. The window calculation service can perform an availability judgment on each position information reported by the vehicle. For the available position information, it can be directly cached and stored in the online storage engine. For the unavailable position information, it is cached after being corrected based on the historical available position information, and the corrected position information is stored in the online storage engine to ensure the accuracy of the subsequent historical trajectory query of the vehicle by the user. The cached position information is used to be pushed to the trajectory data query service at the push moment, so that the trajectory data query service can push the trajectory data to the terminal device 11. For the compensated and predicted position information, it is only used for pushing, not stored in the online storage engine, and does not participate in the correction, compensation, and prediction of the subsequent position information, so as to avoid the adverse impact of the deviation caused by compensation and prediction on the subsequent position information.
[0152] In summary, compared with the related art, the method for querying trajectory data according to the embodiments of the present disclosure can effectively avoid the terminal device from frequently invoking the query service of the server device for querying real-time trajectory data, reducing the waste of network resources. Secondly, after the terminal device initiates a trajectory data query request, by maintaining the connection and actively pushing the trajectory data, the real-time performance of the queried trajectory data is effectively improved. Thirdly, the location information reported by the vehicle is first corrected by the window calculation service and then stored in the online storage engine, which can improve the accuracy of the stored trajectory data. In addition, before the window calculation service pushes the trajectory data to the trajectory data query service, position information compensation and estimation processing are performed on the missed positions, effectively improving the integrity of the pushed trajectory data.
[0153] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information comply with the provisions of relevant laws and regulations and do not violate public order and good customs. Moreover, in the technical solution of the present disclosure, the collection and use of user personal information are carried out with the knowledge and authorization of the user, and do not involve the illegal collection and illegal use of user personal information.
[0154] Each of the above embodiments of the present disclosure can be implemented alone or in any combination without conflict, and can be specifically set according to actual needs. The embodiments of the present disclosure do not make limitations.
[0155] Any method for querying trajectory data provided by the embodiments of the present disclosure can be executed by any suitable electronic device with data processing capabilities, including but not limited to: electronic devices such as terminal devices and servers. Alternatively, any method for querying trajectory data provided by the embodiments of the present disclosure can be executed by a processor. For example, the processor executes any method for querying trajectory data mentioned in the embodiments of the present disclosure by calling the corresponding instructions stored in the memory. This will not be elaborated below.
[0156] Exemplary device
[0157] Figure 12 It is a schematic structural diagram of a device for querying trajectory data provided by an exemplary embodiment of the present disclosure. The device of this embodiment can be used to implement the corresponding method embodiment of the present disclosure. The device of this embodiment is applied to a server device, such as Figure 12 The device shown can include: a determination module 61, a first processing module 62, a second processing module 63, and a third processing module 64.
[0158] The determination module 61 is configured to obtain trajectory data corresponding to at least one vehicle respectively.
[0159] The first processing module 62 is used to determine the connection channels corresponding to at least one terminal device currently connected to the server device; the terminal device includes a terminal device that initiates a trajectory data query request to the server device.
[0160] The second processing module 63 is used to determine the terminal device corresponding to each track data based on the pre-stored correspondence between the connection channel and the vehicle.
[0161] The third processing module 64 is used to push each track data to the corresponding terminal device based on the terminal device corresponding to each track data, so that the terminal device displays the track data of the vehicle.
[0162] Figure 13 is a schematic diagram of the structure of a trajectory data query device provided by another exemplary embodiment of the present disclosure.
[0163] In some optional embodiments, Figure 12 Based on the embodiment shown, Figure 13 As shown, the determination module 61 may include: a receiving unit 611 and a first determination unit 612 .
[0164] The receiving unit 611 is used to receive the current position information from any vehicle among the vehicles.
[0165] The first determining unit 612 is used to determine the trajectory data corresponding to the vehicle based on the historical position information and current position information of the vehicle in the current push cycle in response to the current moment satisfying the preset push cycle condition.
[0166] The current push cycle is the time period from the last time the trajectory data was pushed to the current time.
[0167] In some optional embodiments, the first determining unit 612 may also be configured to: cache the current location information, and / or store the current location information in an online storage engine.
[0168] In some optional embodiments, the first determining unit 612 is specifically configured to:
[0169] Based on the historical position information of the vehicle within a first time period before the current moment, the current position information is corrected to obtain the corrected position information corresponding to the current position information. The first time period is greater than or equal to the time period of the current push cycle. In response to the current moment satisfying the preset push cycle condition, the trajectory data is determined based on the historical position information within the current push cycle and the corrected position information corresponding to the current position information.
[0170] In some optional embodiments, the historical location information within the first duration is determined based on a sliding window.
[0171] In some alternative embodiments, the first determination unit 612 is specifically configured to:
[0172] Based on the historical position information and the current position information within the first time period, determine the available state of the current position information; in response to the available state being unavailable, correct the current position information based on the historical position information within the first time period to obtain corrected position information corresponding to the current position information.
[0173] In some alternative embodiments, as Figure 13 shown, the device or determination module 61 of the embodiments of the present disclosure may further include:
[0174] A first processing unit 613, configured to cache the corrected position information and / or store the corrected position information into an online storage engine.
[0175] In some alternative embodiments, the first processing unit 613 may further be configured to: in response to the available state of the current position information being available, cache the current position information and / or store the current position information into an online storage engine.
[0176] In some alternative embodiments, based on any of the above embodiments, the first determination unit 612 is specifically configured to:
[0177] In response to the current moment satisfying a preset push cycle condition, based on the position reporting cycle corresponding to the vehicle, determine the omission state of the historical position information and the current position information within the current push cycle. In response to the omission state indicating an omitted position, perform position information compensation or estimation processing on the omitted position based on the historical position information of the vehicle within the first time period before the current moment to obtain complete processed position information within the current push cycle. Based on the processed position information, determine trajectory data.
[0178] In some alternative embodiments, based on any of the above embodiments, as Figure 13 shown, the device of the embodiments of the present disclosure may further include:
[0179] A fourth processing module 71, configured to, in response to receiving a trajectory data query request from a terminal device, establish a connection channel with the terminal device based on the trajectory data query request and maintain the connection state of the connection channel.
[0180] A fifth processing module 72, configured to determine a vehicle to be queried based on the trajectory data query request.
[0181] A sixth processing module 73, configured to store the correspondence between the connection channel and the vehicle to be queried.
[0182] In some alternative embodiments, based on any of the above embodiments, as Figure 13 shown, the device according to an embodiment of the present disclosure may further include: a fifth processing module 72, a seventh processing module 74, and an eighth processing module 75
[0183] The fifth processing module 72 is configured to, for any one of the terminal devices, in response to receiving a trajectory data query request from the terminal device, determine a time interval to be queried and a vehicle to be queried based on the trajectory data query request.
[0184] The seventh processing module 74 is configured to determine the type of the trajectory data to be queried based on the time interval to be queried.
[0185] Wherein, the type includes a real-time type and a historical type.
[0186] The eighth processing module 75 is configured to, in response to the type of the trajectory data to be queried being the real-time type, obtain first historical trajectory data of the vehicle to be queried within a recent preset time period, and send the first historical trajectory data to the terminal device.
[0187] The ninth processing module 76 is configured to, in response to the type of the trajectory data to be queried being the historical type, read second historical trajectory data of the vehicle to be queried within the time interval to be queried from the online storage engine according to the time interval to be queried and the vehicle to be queried.
[0188] Wherein, the second historical trajectory data includes at least one historical position information within the time interval to be queried.
[0189] The eighth processing module 75 is further configured to send the second historical trajectory data to the terminal device, so that the terminal device displays the historical trajectory corresponding to the vehicle based on the second historical trajectory data.
[0190] In some alternative embodiments, the eighth processing module 75 is specifically configured to:
[0191] Determine the missing report status of the historical position information in the second historical trajectory data; in response to the missing report status indicating that there is a missing position, perform position information compensation or estimation processing on the missing position based on the existing historical position information in the historical trajectory data to obtain complete trajectory data corresponding to the historical trajectory data; and send the complete trajectory data to the terminal device.
[0192] In some alternative embodiments, based on any of the above embodiments, as Figure 13 shown, the device according to an embodiment of the present disclosure may further include:
[0193] The tenth processing module 65 is configured to, for any one of the terminal devices, in response to the end of the trajectory data query request of the terminal device, close the connection channel corresponding to the terminal device, and delete the corresponding relationship between the connection channel corresponding to the terminal device and the vehicle.
[0194] In some alternative embodiments, based on any of the above embodiments, as Figure 13 shown, the third processing module 64 may include: a second processing unit 641 and a pushing unit 642.
[0195] The second processing unit 641 is configured to, for each trajectory data, based on the transmission protocol of the terminal device corresponding to the trajectory data, convert the trajectory data into trajectory data in a target format supported by the terminal device.
[0196] The pushing unit 642 is configured to push the trajectory data in the target format to the terminal device.
[0197] In some alternative embodiments, referring to Figure 11 shown, the window calculation service may include the above-mentioned defect module 61. The trajectory data query service may include the above-mentioned first processing module 62, second processing module 63, third processing module 64, fourth processing module 71, fifth processing module 72, sixth processing module 73, seventh processing module 74, eighth processing module 75, ninth processing module 76, and tenth processing module 65.
[0198] Each of the above embodiments of the present disclosure may be implemented alone or in any combination without conflict, and may be specifically set according to actual needs. The embodiments of the present disclosure are not limited.
[0199] For the beneficial technical effects corresponding to the exemplary embodiments of the present device, reference may be made to the corresponding beneficial technical effects in the above-mentioned exemplary method section, which will not be elaborated herein.
[0200] Exemplary electronic device
[0201] Figure 14 is a structural diagram of an electronic device provided by an embodiment of the present disclosure, including at least one processor 91 and a memory 92.
[0202] The processor 91 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 90 to perform desired functions.
[0203] The memory 92 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage media, and the processor 91 may run one or more computer program instructions to implement the methods of the various embodiments of the present disclosure above and / or other desired functions.
[0204] In one example, the electronic device 90 may further include: an input device 93 and an output device 94, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown).
[0205] The input device 93 may further include, for example, a touch screen, a microphone, various sensors, etc. The sensors may include, for example, an image sensor (such as a camera, a webcam, etc.), lidar, millimeter wave radar, ultrasonic radar, a positioning sensor, a pressure sensor, an air quality sensor, a temperature sensor, etc. The image sensor, lidar, millimeter wave radar, ultrasonic radar, etc. may be used for the perception of the surrounding environment, that is, to detect dynamic and static objects in the surrounding environment. The dynamic and static objects may include, for example, static objects such as lane lines, curbs, arrows, signs, trees, buildings, etc., and dynamic objects such as surrounding vehicles, pedestrians, cyclists, etc. The positioning sensor is used to implement the positioning of the movable device where the electronic device is located (such as a vehicle, a robot, etc.). The positioning sensor may include, for example, an inertial measurement unit (IMU), a global positioning system (GPS), etc. The pressure sensor may be used to detect the seat pressure. The temperature sensor may be used to detect the temperature inside the vehicle cockpit. The air quality sensor may be used to detect the air quality inside the vehicle cockpit.
[0206] The output device 94 may output various information to the outside, and it may include, for example, a display, a speaker, and a communication network and its connected remote output devices, etc.
[0207] Of course, for simplicity, Figure 14 only some of the components related to the present disclosure in the electronic device 90 are shown, and components such as buses, input / output interfaces, etc. are omitted. In addition, according to specific application scenarios, the electronic device 90 may further include any other appropriate components.
[0208] Exemplary computer program product and computer-readable storage medium
[0209] In addition to the above methods and devices, embodiments of the present disclosure may also provide a computer program product, including computer program instructions, which when run by a processor cause the processor to execute the steps in the methods of various embodiments of the present disclosure described in the above "Exemplary Method" section.
[0210] The computer program product may be written in any combination of one or more programming languages for programming code to perform the operations of the embodiments of the present disclosure. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The programming code may be executed entirely on the user computing device, partially on the user device, executed as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0211] Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium, on which computer program instructions are stored, which when run by a processor cause the processor to execute the steps in the methods of various embodiments of the present disclosure described in the above "Exemplary Method" section.
[0212] The computer-readable storage medium may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium, for example but not limited to, includes systems, devices or components of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0213] The basic principles of the present disclosure have been described above in combination with specific embodiments. However, the advantages, benefits, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that they are essential for each embodiment of the present disclosure. In addition, the above specific details are only for the purpose of illustration and easy understanding, rather than limitations. The above details do not limit the present disclosure to necessarily adopt the above specific details for implementation.
[0214] Those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present disclosure and their equivalent technologies, the present disclosure also intends to include these changes and modifications.
Claims
1. A method for querying trajectory data, applied to a server device, the method comprising: Determine trajectory data corresponding to at least one vehicle; Determine the connection channels respectively corresponding to at least one terminal device currently connected to the server device; The terminal device includes a terminal device that initiates a trajectory data query request to the server device; Based on the pre-stored correspondence between the connection channel and the vehicle, determining the terminal device corresponding to each of the trajectory data; Based on the terminal devices corresponding to each of the trajectory data, each of the trajectory data is pushed to the corresponding terminal device, so that the terminal device displays the trajectory data of the vehicle.
2. The method according to claim 1, wherein The determining of the trajectory data corresponding to at least one vehicle includes: For any one of the vehicles, receiving current position information from the vehicle; In response to the current moment satisfying a preset push cycle condition, the trajectory data corresponding to the vehicle is determined based on the historical position information and the current position information of the vehicle in the current push cycle; the current push cycle is the time period from the last time the trajectory data was pushed to the current moment.
3. The method according to claim 2, wherein The determining the trajectory data corresponding to the vehicle based on the historical location information of the vehicle in the current push cycle and the current location information includes: Based on the historical position information of the vehicle within a first time period before the current moment, the current position information is corrected to obtain the corrected position information corresponding to the current position information; the first time period is greater than or equal to the time period of the current push cycle; The trajectory data is determined based on the historical position information in the current push cycle and the corrected position information corresponding to the current position information.
4. The method according to claim 3, wherein, The correcting the current position information based on the historical position information of the vehicle within a first time period before the current moment to obtain the corrected position information corresponding to the current position information includes: Determining an available state of the current location information based on the historical location information within the first duration and the current location information; In response to the available status being unavailable, the current location information is corrected based on the historical location information within the first time period to obtain the corrected location information corresponding to the current location information.
5. The method according to claim 3, wherein, Also includes: The corrected position information is cached, and / or the corrected position information is stored in an online storage engine.
6. The method according to claim 2, wherein The determining the trajectory data corresponding to the vehicle based on the historical location information of the vehicle in the current push cycle and the current location information includes: Based on the position reporting cycle corresponding to the vehicle, determining the underreporting status of the historical position information and the current position information within the current push cycle; In response to the missing report status indicating that there is a missing report position, performing position information compensation or estimation processing on the missing report position based on historical position information of the vehicle within a first time period before the current moment, to obtain complete processed position information within the current push cycle; Based on the processed position information, the trajectory data is determined.
7. According to the method described in any one of claims 1-6, wherein The pre-stored correspondence between the connection channel and the vehicle is determined in the following manner: In response to receiving a trajectory data query request from the terminal device, establishing a connection channel with the terminal device based on the trajectory data query request, and maintaining a connection state of the connection channel; Based on the trajectory data query request, determining a vehicle to be queried; The corresponding relationship between the connection channel and the vehicle to be queried is stored.
8. According to the method of any one of claims 1-6, wherein Before determining the trajectory data corresponding to at least one vehicle, the method further includes: For any terminal device among the terminal devices, in response to receiving the trajectory data query request from the terminal device, determining a time interval to be queried and a vehicle to be queried based on the trajectory data query request; Based on the time interval to be queried, determining the type of trajectory data to be queried; the type includes a real-time type and a historical type; In response to the type of the trajectory data to be queried being a real-time type, obtaining first historical trajectory data of the vehicle to be queried within a recent preset time period, and sending the first historical trajectory data to the terminal device; or, In response to the type of the trajectory data to be queried being a historical type, second historical trajectory data of the vehicle to be queried within the time interval to be queried is read from an online storage engine according to the time interval to be queried and the vehicle to be queried; the second historical trajectory data includes at least one historical position information within the time interval to be queried; The second historical trajectory data is sent to the terminal device, so that the terminal device displays the historical trajectory corresponding to the vehicle based on the second historical trajectory data.
9. The method according to any one of claims 1-6, wherein Also includes: For any of the terminal devices, in response to the terminal device ending the trajectory data query request, the connection channel corresponding to the terminal device is closed, and the corresponding relationship between the connection channel corresponding to the terminal device and the vehicle is deleted.
10. The method according to any one of claims 1-6, wherein, The step of pushing each of the trajectory data to a corresponding terminal device includes: For each of the trajectory data, based on a transmission protocol of the terminal device corresponding to the trajectory data, converting the trajectory data into trajectory data in a target format supported by the terminal device; The trajectory data in the target format is pushed to the terminal device.
11. A device for querying trajectory data, applied to a server device, the device comprising: A determination module, used to determine trajectory data corresponding to at least one vehicle; A first processing module is used to determine the connection channels respectively corresponding to at least one terminal device currently connected to the server device; the terminal device includes a terminal device that initiates a trajectory data query request to the server device; A second processing module is used to determine the terminal device corresponding to each of the trajectory data based on the pre-stored correspondence between the connection channel and the vehicle; The third processing module is used to push each of the trajectory data to the corresponding terminal device based on the terminal device corresponding to each of the trajectory data, so that the terminal device displays the trajectory data of the vehicle.
12. A computer-readable storage medium storing a computer program for performing the method according to any one of claims 1-10 above.
13. An electronic device, comprising: a processor; a memory for storing executable instructions executable by the processor; the processor for reading the executable instructions from the memory and executing the instructions to implement the method according to any one of claims 1-10 above.