Vehicle trajectory visualized cruise playback method, computer device and medium
Patent Information
- Application Number
- CN202610931083.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2046-06-26
AI Technical Summary
[0004]然而,当定位点过多时,轨迹采用单一颜色渲染,无法直观区分超速、拥堵等驾驶状态,影响回放连贯性,导致车辆轨迹的回放效率较低
本申请提供一种车辆轨迹可视化巡航回放方法、计算机设备及介质,获取通过网页应用中网页界面的车辆列表页面输入的待查询的车辆标识以及查询时间范围;根据车辆标识以及查询时间范围,从后端服务器获取对应目标车辆的多条历史定位轨迹数据以及预设配色方案;根据多条历史定位轨迹数据以及预设配色方案,调用预设地图软件,生成并在网页界面的轨迹回放页面上渲染各条历史定位轨迹数据。本申请通过车辆列表页面自然触发查询,实现了意图获取的高准确性,根据车辆标识以及查询时间范围返回轨迹数据与预设配色方案,既保障了数据完整性,又使可视化逻辑与业务管理策略实时同步,生成并在网页界面的轨迹回放页面上渲染各条历史定位轨迹数据,让运营人员无需解析原始数据即可直观识别行驶状态、定位异常路段,从而实现了轨迹回放操作便捷性以及数据可靠性。
Smart Images

Figure CN122451053B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a method for visualizing and replaying vehicle trajectory cruises, a computer device, and a medium. Background Technology
[0002] With the large-scale operation of new energy commercial vehicles and the continuous development of vehicle-to-everything (V2X) technology, fleet management platforms need to possess the capability to visually analyze operational data from multiple vehicles. This enables the tracking of new energy logistics fleet trajectories and the diagnosis of driving behavior compliance. Operators need to quickly load complete trajectories from multiple location points into a web browser, providing strong support for refined operational decision-making.
[0003] Currently, the main approach is to use a trajectory visualization solution based on a web map software development kit. This solution obtains an array of vehicle GPS location points by calling a backend interface. The frontend uses a vector line drawing component to connect all the location points sequentially into a continuous polyline, and a cruise component at a fixed speed drives the vehicle icon to move along the path to achieve playback.
[0004] However, when there are too many location points, the trajectory is rendered with a single color, which makes it impossible to intuitively distinguish driving states such as speeding and congestion, affecting the continuity of playback and resulting in low playback efficiency of vehicle trajectory. Summary of the Invention
[0005] The purpose of this application is to address the shortcomings of the prior art by providing a vehicle trajectory visualization cruise playback method, computer equipment, and medium to improve the continuity and playback efficiency of vehicle trajectory playback.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, one embodiment of this application provides a method for visualizing and replaying vehicle trajectory cruise, applied to a front-end device with a web application, the method comprising: Obtain the vehicle identifier and query time range entered through the vehicle list page of the web application's web interface; Based on the vehicle identifier and the query time range, obtain multiple historical location trajectory data of the corresponding target vehicle and a preset color scheme from the backend server; Based on the multiple historical positioning trajectory data and the preset color scheme, the preset map software is invoked to generate and render each of the historical positioning trajectory data on the trajectory playback page of the web page interface.
[0007] Optionally, the historical positioning trajectory data includes: multiple historical positioning points and the time of each historical positioning point; the preset color scheme includes: a speed color scheme; The step of generating and rendering each of the historical positioning trajectory data on the trajectory playback page of the web page by calling a preset map software based on multiple historical positioning trajectory data and the preset color scheme includes: The speed information of the historical positioning points is determined based on multiple historical positioning points and the time of each historical positioning point. Based on the speed information of the historical positioning points, the color information of the historical positioning points is determined using the speed color scheme. Based on the color information of each historical location point, the preset map software is invoked to generate and render the color of each historical location trajectory data on the trajectory playback page.
[0008] Optionally, the step of calling the preset map software based on the color information of each historical location point to generate and color-render each of the historical location trajectory data on the trajectory playback page includes: Based on the color information of each historical location point, adjacent historical location points with the same color information are merged to generate a continuous line segment array; Based on the color information of each line segment array, the line segment arrays are classified by color to obtain multiple color arrays; wherein, each color array includes at least one of the line segment arrays; Based on the multiple color arrays, the preset map software is invoked to generate and render the colors of each of the historical positioning trajectory data on the trajectory playback page.
[0009] Optionally, the method further includes: Based on the vehicle identifier and the query time range, event data for each historical location trajectory is obtained from the backend server; the event data includes: event type, the occurrence time of the corresponding event, and the location point where the event occurred; Obtain the target location point corresponding to the location point from the historical location trajectory data rendered on the trajectory playback page; Using the preset map software, the event type and the occurrence time of the corresponding event are rendered at the location corresponding to the target positioning point on the trajectory playback page.
[0010] Optionally, the step of obtaining multiple historical location trajectory data of the corresponding target vehicle and a preset color scheme from the backend server based on the vehicle identifier and the query time range includes: Based on the vehicle identifier and the query time range, a navigation event for the target vehicle is published using a preset event bus, wherein the navigation event includes: trajectory acquisition event, event data acquisition event, and color scheme acquisition event; Based on the trajectory acquisition event, the trajectory data service is invoked to obtain multiple historical location trajectory data from the backend server; Based on the color scheme acquisition event, the dictionary configuration service is invoked to obtain the preset color scheme from the backend server; The event is obtained based on the event data, and the event data service is invoked to obtain the event data of each of the historical positioning trajectory data from the backend server.
[0011] Optionally, the step of generating and rendering each of the historical positioning trajectory data on the trajectory playback page of the web page by calling a preset map software based on multiple historical positioning trajectory data and the preset color scheme includes: The historical positioning trajectory data is sampled using a preset sampling rule to obtain multiple sampling points; Based on the number of sampling points and their location coordinates, the address information of the sampling points is obtained by calling the reverse geocoding service. The address information of the non-sampling points is determined based on the location coordinates and address information of the sampling points and the location coordinates of the non-sampling points. Based on the location coordinates and address information of the sampling points, the location coordinates and address information of the non-sampling points, and the preset color scheme, the preset map software is invoked to generate and render each of the historical location trajectory data on the trajectory playback page of the web page.
[0012] Optionally, the preset sampling rules include: equidistant sampling rules, dwell point sampling rules, event sampling rules, and sparse region sampling rules; The equidistant sampling rule is used to indicate that the historical positioning points are sampled at equidistant reference intervals according to a preset distance interval; The stop point sampling rule is used to indicate that points in the historical positioning points with a speed less than a preset speed threshold and a stop duration greater than a preset time threshold are used as stop points, and the stop points are sampled. The event sampling rules are used to indicate the sampling of the location point where the event occurs; The sparse region sampling rule is used to indicate that for historical positioning points whose adjacent historical positioning points are greater than a preset sparse distance threshold, supplementary sampling points are generated by linear interpolation, and the supplementary sampling points are sampled.
[0013] Optionally, determining the address information of the non-sampling point based on the location coordinates and address information of the sampling point and the location coordinates of the non-sampling point includes: Based on the location coordinates of the non-sampling point and the location coordinates of the sampling point, determine the address information of the nearest sampling point in front of the non-sampling point; The address information of the sampling point that is closest to the non-sampling point is used as the address information of the non-sampling point.
[0014] Optionally, the step of generating and rendering each of the historical positioning trajectory data on the trajectory playback page of the web page by calling a preset map software based on multiple historical positioning trajectory data and the preset color scheme includes: Based on the historical positioning trajectory data, a preset playback speed calculation formula is used to call a preset trajectory playback event to determine the playback speed information of the historical positioning trajectory data; Based on the historical location trajectory data, the playback speed information, and the preset color scheme, the preset map software is invoked to generate and render each of the historical location trajectory data on the trajectory playback page.
[0015] Secondly, another embodiment of this application provides a vehicle trajectory visualization cruise playback device, the device comprising: The first acquisition module is used to acquire the vehicle identifier to be queried and the query time range entered through the vehicle list page of the web page interface of the web application. The second acquisition module is used to acquire multiple historical location trajectory data of the corresponding target vehicle and a preset color scheme from the backend server based on the vehicle identifier and the query time range. The generation module is used to generate and render each of the historical positioning trajectory data on the trajectory playback page of the web page by calling a preset map software based on multiple historical positioning trajectory data and the preset color scheme.
[0016] Thirdly, another embodiment of this application provides a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the vehicle trajectory visualization cruise playback method as described in any of the first aspects above.
[0017] Fourthly, another embodiment of this application provides a storage medium storing a computer program, which, when executed by a processor, performs the steps of the vehicle trajectory visualization cruise playback method described in any of the first aspects above.
[0018] The beneficial effects of this application are: This application provides a vehicle trajectory visualization cruise playback method, computer equipment, and medium. It acquires the vehicle identifier and query time range input through a vehicle list page on a web application's web interface; based on the vehicle identifier and query time range, it retrieves multiple historical positioning trajectory data and a preset color scheme for the corresponding target vehicle from a backend server; based on the multiple historical positioning trajectory data and the preset color scheme, it calls preset map software to generate and render each historical positioning trajectory data on the trajectory playback page of the web interface. This application achieves high accuracy in intent acquisition by naturally triggering queries through the vehicle list page. Returning trajectory data and a preset color scheme based on the vehicle identifier and query time range ensures data integrity and allows real-time synchronization between visualization logic and business management strategies. Generating and rendering each historical positioning trajectory data on the trajectory playback page of the web interface allows operators to intuitively identify driving status and locate abnormal road sections without parsing raw data, thus achieving convenient trajectory playback operation and data reliability. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating a vehicle trajectory visualization cruise playback method provided in an embodiment of this application; Figure 2 A schematic diagram of the trajectory rendering process in a vehicle trajectory visualization cruise playback method provided in an embodiment of this application; Figure 3 A schematic diagram of the color rendering process in a vehicle trajectory visualization cruise playback method provided in an embodiment of this application; Figure 4 This is a flowchart illustrating the process of acquiring event data in a vehicle trajectory visualization cruise playback method provided in an embodiment of this application. Figure 5 A schematic diagram of the data retrieval process in a vehicle trajectory visualization cruise playback method provided in an embodiment of this application; Figure 6 A schematic diagram of the trajectory rendering process in another vehicle trajectory visualization cruise playback method provided in this application embodiment; Figure 7 This is a flowchart illustrating the process of determining address information in a vehicle trajectory visualization cruise playback method provided in an embodiment of this application. Figure 8This is a flowchart illustrating the process of determining playback speed information in a vehicle trajectory visualization cruise playback method provided in an embodiment of this application. Figure 9 This is a schematic diagram of the structure of a vehicle trajectory visualization cruise playback device provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0022] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0023] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0024] In vehicle-to-everything (V2X) operation and management scenarios, vehicles generate numerous GPS location data points daily. Operators need to use visualization techniques to reconstruct vehicle trajectories, analyze driving behavior, and trace abnormal events. However, current display solutions typically use a single color to render the entire trajectory, failing to intuitively reflect changes in vehicle speed across different road sections. This also hinders accurate analysis of data generated during vehicle operation.
[0025] To address this, this application provides a method for visualizing vehicle trajectory cruise playback. By obtaining the vehicle identifier and query time range, multiple historical positioning trajectory data and a preset color scheme are retrieved from a backend server. Based on these historical positioning trajectory data and the preset color scheme, each historical positioning trajectory data is generated and rendered on a trajectory playback page within a web interface. This application improves the efficiency of vehicle playback and the accuracy of trajectory analysis.
[0026] This application provides a vehicle trajectory visualization cruise playback method applied to a front-end device with a web application. The front-end device is built on a TypeScript technology stack, runs in a web browser environment, and includes multiple business function modules, an event communication bus, and a technical support base. The business function modules generate and render historical positioning trajectory data on the trajectory playback page of the web interface. The event communication bus is the communication hub of the front-end device, using a publish-subscribe model to achieve cross-component and cross-page message transmission. When a user clicks to view the trajectory on the vehicle list page, the event communication bus publishes a navigation event carrying parameters such as the vehicle identifier to be queried and the query time range. After subscribing to this event, the trajectory playback page automatically executes the query and map loading, realizing a navigation experience of clicking to view the trajectory, automatic redirection, and trajectory loading. The technical support base includes: TypeScript, preset map software, and a preset map application programming interface (API) facade layer. TypeScript provides a component-based development framework and type security guarantees, and its concurrent rendering features ensure the responsiveness of the User Interface (UI) in scenarios with large amounts of data. The preset map software provides underlying map capabilities, integrating a PathSimplifier navigation engine and a vector drawing engine to offer basic capabilities such as map projection, coordinate transformation, and event handling. The preset map application programming interface (API) facade layer uses the facade design pattern to uniformly encapsulate the various sub-modules of the preset map software development kit, providing a consistent application programming interface and decoupling map capabilities from business logic.
[0027] The method of this application will be described below with reference to several accompanying drawings. Figure 1 This is a flowchart illustrating a vehicle trajectory visualization cruise playback method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes: Step 101: Obtain the vehicle identifier and query time range entered through the vehicle list page of the web application's web interface.
[0028] The web interface is the actual display interface, which includes a vehicle list page and a trajectory playback page. The vehicle list page and the trajectory playback page can be the same web interface or different web interfaces; this embodiment does not impose such restrictions. The vehicle list page displays a real-time status list of all vehicles in the fleet. Vehicles can be filtered by license plate number, Vehicle Identification Number (VIN) code, online status, etc. The license plate number is the legal certificate number allowing the vehicle to drive on the road. The VIN code is the vehicle identification code, and the online status is the real-time network connection status between the vehicle terminal and the platform server. The online status reflects whether the vehicle can communicate with the backend. The vehicle list page also displays a shortcut to view the trajectory. The trajectory playback interface is the core interactive interface for trajectory visualization, integrating multiple functional modules such as right-side map display, playback control panel, event annotation list, and data statistics information.
[0029] The vehicle identifier to be queried can be a license plate number, a VIN code, or a vehicle number in a fleet; this application embodiment does not impose any restrictions on this.
[0030] The query time range is used to indicate the start and end times specified by the user, and is used to limit the driving records to be retrieved within the corresponding time period, such as all location data between 8:00 AM and 6:00 PM on a certain day.
[0031] Optionally, users can determine the vehicle identifier and time range to be queried by directly entering the vehicle identifier and query time range on the vehicle list page, or by selecting the corresponding vehicle and time range through the vehicle selection module and time selection module on the vehicle list page.
[0032] Step 102: Based on the vehicle identification and the query time range, obtain multiple historical location trajectory data of the corresponding target vehicle and the preset color scheme from the backend server.
[0033] The backend server is deployed on the network platform application server and interacts with the frontend application layer via the HTTP (Hypertext Transfer Protocol) protocol. The backend server is used for data storage, business processing, and command response.
[0034] Historical location trajectory data refers to the collection of vehicle location information continuously collected and uploaded by the vehicle terminal within the query time range, with each trajectory corresponding to an independent driving process. Location information may include geographic coordinates, collection time, cumulative mileage, battery state of charge parameters, etc., but this application embodiment does not impose limitations on these parameters. Historical location trajectory data is used to reflect the vehicle's actual driving path and operating status.
[0035] The preset color scheme can be a speed color scheme, a risk color scheme, a task type color scheme, a travel time color scheme, or an event color scheme, etc., and this application embodiment does not limit this. The preset color scheme can be dynamically configured according to vehicle type, fleet attributes, or other business rules to realize differentiated visualization strategies. Different types of vehicles correspond to different color schemes, and different fleets correspond to different color schemes, and this application embodiment does not limit this.
[0036] Optionally, the front-end device requests the historical location trajectory data and preset color scheme of the corresponding target vehicle from the back-end server based on the obtained vehicle identifier and query time range.
[0037] Step 103: Based on multiple historical positioning trajectory data and preset color schemes, call the preset map software to generate and render each historical positioning trajectory data on the trajectory playback page of the web interface.
[0038] The preset map software can be Gaode Maps, Baidu Maps, Tencent Maps, or open-source electronic map services; this application embodiment does not impose any restrictions on this. Rendering refers to the process of converting historical location trajectory data into visual graphics based on a preset color scheme and displaying it on a web page interface.
[0039] Optionally, a preset map software is invoked to render multiple historical location trajectory data according to a preset color scheme, generating rendered historical location trajectory data. If a user triggers a view trajectory operation, the rendered historical location trajectory data is displayed on the trajectory playback page.
[0040] In this embodiment, the system obtains the vehicle identifier and query time range input through the vehicle list page of a web application; based on the vehicle identifier and query time range, it retrieves multiple historical location trajectory data and a preset color scheme for the corresponding target vehicle from the backend server; based on the multiple historical location trajectory data and the preset color scheme, it calls a preset map software to generate and render each historical location trajectory data on the trajectory playback page of the web application. This application improves the accuracy of user intent recognition by naturally triggering the query through the vehicle list page. Returning trajectory data and a preset color scheme based on the vehicle identifier and query time range ensures data integrity and allows for real-time synchronization of visualization logic and business management strategies. Generating and rendering each historical location trajectory data on the trajectory playback page of the web application allows operators to intuitively identify driving status and locate abnormal road sections without parsing raw data, thus achieving convenient trajectory playback operation and data reliability.
[0041] Based on the above embodiments, the historical positioning trajectory data includes: multiple historical positioning points and the time of each historical positioning point; the preset color scheme includes: a speed color scheme. This application also provides a trajectory rendering process in a vehicle trajectory visualization cruise playback method. Figure 2 This is a flowchart illustrating the trajectory rendering process in a vehicle trajectory visualization cruise playback method provided in an embodiment of this application, as shown below. Figure 2 As shown, in step 103 above, based on multiple historical positioning trajectory data and a preset color scheme, a preset map software is called to generate and render each historical positioning trajectory data on the trajectory playback page of the web interface, including: Step 201: Determine the speed information of the historical positioning points based on multiple historical positioning points and the time of each historical positioning point.
[0042] The historical location trajectory data is organized in a two-dimensional array. The outer layer represents different travel segments or time periods, and the inner layer contains multiple historical location points and their coordinates within that time period. Multiple historical location points constitute a complete trajectory data set, and each location point has a specific timestamp indicating its acquisition. The velocity information of the historical location points is their instantaneous velocity, obtained by calculating the ratio of the spatial distance between two adjacent location points to the time interval.
[0043] Optionally, based on multiple historical positioning points and the time of each historical positioning point, the instantaneous velocity of each historical positioning point is calculated by dividing the distance between the positioning coordinates of two consecutive historical positioning points by the time interval between the two historical positioning points, and is used as the velocity information of the historical positioning point.
[0044] Step 202: Based on the speed information of historical positioning points, use a speed color scheme to determine the color information of historical positioning points.
[0045] The speed color scheme refers to the rule of mapping different speed ranges to different colors. That is, different speed ranges correspond to different rendering colors. For example, purple (0-30km / h, low speed / congestion), blue (30-60km / h, normal driving), gray (60-80km / h, medium speed), green (80-100km / h, fast), and red (>100km / h, speeding). The speed color scheme can be flexibly adjusted according to business needs, and this application embodiment does not impose any restrictions on it. The color information indicates the color that should be rendered for the location point, which is obtained by referring to the speed color scheme based on its instantaneous speed.
[0046] Optionally, the speed information of each historical positioning point is traversed, and the speed is mapped to the corresponding color range according to the speed color scheme, thereby determining the color information of each positioning point.
[0047] Step 203: Based on the color information of each historical location point, call the preset map software to generate and render the color of each historical location trajectory data on the trajectory playback page.
[0048] Optionally, the color information of each historical location point is transmitted to the preset map software. The path simplifier cruise engine of the trajectory history query module of the preset map software generates trajectory lines with the color information corresponding to the historical location points. The trajectory lines are then superimposed on the map base map, and the driving path that changes with speed is displayed on the trajectory playback page.
[0049] In this system, the built-in path lines of the path simplifier cruise engine are set to complete transparency. This means that by setting the transparency channel to zero, the path lines function solely as a path container and cruise engine, with all visual rendering handled entirely by a custom vector line component. This avoids potential visual conflicts between the path simplifier's built-in lines and vector lines, such as layer occlusion or color overlap, achieving complete decoupling between the rendering engine and visual presentation. The path simplifier cruise engine is only responsible for calculations related to path navigation, vehicle coordinate interpolation, and cruise speed control; it does not participate in any visual rendering.
[0050] The path simplifier is configured with path point simplification parameters, which reduces the number of positioning points that need to be rendered while ensuring the accuracy of the trajectory shape. Combined with the configuration of disabling point-by-point rendering, it reduces the node pressure of the Document Object Model (DOM) and achieves the effect of segmented and color-coded rendering of the trajectory based on the speed range.
[0051] In this embodiment, the color mapping and visualization of speed information are unified. Based on real geographic coordinates and event-autonomous calculation information, distortion caused by sensor errors or data packet loss is effectively avoided. The color is accurately represented as the visual presentation of trajectory line segments through map software, which not only preserves the spatial accuracy of the original path, but also superimposes dynamic behavioral characteristics. The trajectory data can be quickly analyzed by the change of trajectory color, which improves the efficiency of trajectory analysis.
[0052] Based on the above embodiments, this application also provides a color rendering process in a vehicle trajectory visualization cruise playback method. Figure 3 This is a flowchart illustrating the color rendering process in a vehicle trajectory visualization cruise playback method provided in an embodiment of this application, as shown below. Figure 3 As shown, in step 203 above, based on the color information of each positioning point, a preset map software is invoked to generate and render the historical positioning trajectory data in color on the trajectory playback page, including: Step 301: Merge adjacent historical positioning points with the same color information according to the color information of each historical positioning point to generate a continuous line segment array.
[0053] Adjacent historical location points refer to a pair of historical location points that are consecutive in time and whose spatial distance does not change abnormally in historical location trajectory data. A continuous line segment array is a coordinate sequence formed by connecting two or more adjacent location points with the same color information in chronological order.
[0054] Optionally, all historical positioning points are traversed, and the color information of the current point is compared with that of the previous point. It is also determined whether the two points are continuous in time and space. If the condition is met, the current point is added to the current line segment; otherwise, the accumulated points are saved as a complete array of continuous line segments, and the construction of new line segments begins. After processing all positioning points, multiple arrays of continuous line segments of different lengths but with the same color information are finally obtained.
[0055] Step 302: Based on the color information of each line segment array, classify the line segment arrays by color to obtain multiple color arrays.
[0056] The color array is a collection formed by classifying all continuous line segment arrays according to their corresponding color information, and each color array contains at least one line segment array.
[0057] Optionally, all line segment arrays are traversed, their color information is extracted, and they are grouped into the corresponding color groups accordingly. This results in multiple non-overlapping color arrays, where the line segments in each array have the same color information and contain at least one line segment. For example, all line segment arrays marked with the color corresponding to "low speed / congestion" are placed in the first color array; all line segment arrays marked with the color corresponding to "normal driving" are placed in the second color array.
[0058] Step 303: Based on multiple color arrays, call the preset map software to generate and render the colors of each historical positioning trajectory data on the trajectory playback page.
[0059] Optionally, based on each color array, a preset map software is called to create corresponding color vector line instances, and continuous vector trajectory lines are generated based on each group of line segments of the same color. Finally, the overall color rendering is completed on the trajectory playback page.
[0060] In this embodiment of the application, by merging line segments and classifying colors of positioning points that are of the same color and spatiotemporally continuous, the number of map vector line instances that need to be created is reduced, the front-end rendering load is reduced, and thus the overall efficiency of trajectory rendering and system performance are effectively improved.
[0061] Based on the above embodiments, this application also provides a process for obtaining event data in a vehicle trajectory visualization cruise playback method. Figure 4This is a flowchart illustrating the process of acquiring event data in a vehicle trajectory visualization cruise playback method provided in an embodiment of this application, as shown below. Figure 4 As shown, based on steps 101-103 above, the method further includes: Step 401: Based on the vehicle identifier and the query time range, obtain the event data of each historical location trajectory data from the backend server.
[0062] Event data refers to discrete records with clear business meanings generated during vehicle operation by either proactive reporting from the onboard terminal or automatic identification by the platform system. Event data includes: event type, the time of occurrence of the corresponding event, and the location of occurrence. The event type is used to distinguish different types of vehicle business behaviors. Event types can be vehicle-related events such as parking events, charging events, safety alarm events, loading / unloading events, and engine shutdown events; this application embodiment does not impose any limitations on this. The time of occurrence refers to the specific moment when the event is confirmed to have occurred; the location of occurrence is the vehicle's coordinates at the time the event occurred, used for precise positioning on a map.
[0063] Optionally, a data request is sent to the backend server based on the vehicle identifier and the query time range. Upon receiving the request, the backend server retrieves all event records reported by the vehicle within the specified time range based on the vehicle identifier, and organizes these records into structured data and returns them.
[0064] Step 402: Obtain the target location point corresponding to the location point from the historical location trajectory data rendered on the trajectory playback page.
[0065] Among them, the target location point refers to the location point that is closest to the location point in the event data, selected from historical location trajectory data.
[0066] Optionally, after receiving all event data, the latitude and longitude coordinates of the occurrence location are determined for each event data. Then, in the currently loaded and rendered historical location trajectory data, all historical location points are traversed, the geographical distance between each historical location point and the occurrence location is calculated, and the similarity of their timestamps is compared. The location point with the shortest geographical distance and the smallest time deviation is determined as the target location point corresponding to the event.
[0067] Optionally, if there are multiple candidate positioning points that are very close in both distance and time, the positioning point with the earlier time is determined as the target positioning point.
[0068] Step 403: Using preset map software, render the event type and the corresponding event occurrence time on the target location on the trajectory playback page.
[0069] The location corresponding to the target positioning point can be a position next to the target positioning point that does not overlap with the trajectory on the trajectory playback page.
[0070] Optionally, the annotation interface provided by a preset map software can be invoked to create a clickable graphical marker with the target location point as the geographic anchor point. Simultaneously, the time of the event is displayed next to this icon. The graphical marker is determined by the event type; for example, a blue dot icon is used for parking events, a lightning bolt icon for charging events, and a red exclamation mark icon for safety alarm events. This embodiment does not impose any limitations on this.
[0071] Optionally, all event labels are added to the map layer according to uniform rules and set reasonable display levels to ensure that they are not obscured by trajectory lines or key elements such as vehicle cruise icons, thereby forming a clear event distribution view in the map area.
[0072] In this embodiment, the spatiotemporal matching of event data and trajectory visualization ensures the accuracy of event labeling locations, improving the intuitiveness and efficiency of operational analysis. By comprehensively considering spatial distance and temporal deviation, the target positioning point is accurately matched, effectively avoiding positioning offsets caused by factors such as signal drift and asynchronous sampling. This ensures that events are accurately anchored on the actual driving path, providing reliable support for fleet scheduling, driving behavior assessment, and safety management.
[0073] Based on the above embodiments, this application also provides a data retrieval process in a vehicle trajectory visualization cruise playback method. Figure 5 This is a schematic diagram of the data retrieval process in a vehicle trajectory visualization cruise playback method provided in an embodiment of this application, as shown below. Figure 5 As shown, in step 102 above, based on the vehicle identifier and the query time range, multiple historical location trajectory data and preset color schemes for the corresponding target vehicle are obtained from the backend server, including: Step 501: Based on the vehicle identifier and the query time range, publish navigation events for the target vehicle using the preset event bus.
[0074] The preset event bus refers to a cross-module communication mechanism built in the front-end device, operating on a publish-subscribe basis. It does not directly handle business logic or participate in data calculation; instead, it acts as a message relay hub, responsible for receiving structured event notifications and distributing them to all other modules that have subscribed to that type of event. Navigation events refer to comprehensive operation commands generated and published after a user clicks the "View Track" button for a vehicle on the vehicle list page. Navigation events include: track acquisition events, event data acquisition events, and color scheme acquisition events. Track acquisition events trigger the loading process of historical location track data. Event data acquisition events trigger the loading of supporting business events. Color scheme acquisition events trigger the dynamic loading of track color rules.
[0075] Optionally, when a user clicks the "View Track" button for a vehicle on the vehicle list page, a structured navigation event is generated and published via a preset event bus. All modules on the front-end device that have subscribed to this type of event will receive a notification simultaneously, each parsing the content relevant to its own responsibilities and obtaining the corresponding data.
[0076] Step 502: Based on the trajectory acquisition event, call the trajectory data service to obtain multiple historical location trajectory data from the backend server.
[0077] The trajectory data service provides a standard data interface to the backend server, responding to frontend queries for vehicle historical location trajectories. The trajectory data service receives the vehicle identifier and the query time range, extracts GPS location point data organized by trip segments within the corresponding time period from the database, and returns it in a structured format. Multiple historical location trajectory data refer to the set of trajectories formed by several independent driving processes of the vehicle within the query time range. Each trip from start to stop is considered a complete trip, organized in a two-dimensional structure: the outer layer represents the trip segment, and the inner layer represents the continuous location points within that segment.
[0078] Optionally, after receiving the trajectory acquisition event from the navigation event, the trajectory history query module extracts the vehicle identifier and query time range, encapsulates them into standard request parameters, calls the trajectory data service interface provided by the backend, and returns multiple historical positioning trajectory data organized by trip segments. The historical positioning trajectory data can include complete information such as the start and end time of each trip, total mileage, latitude and longitude of each positioning point, instantaneous speed, and collection time. The trajectory history query module integrates a route simplifier cruise engine to achieve smooth movement of the vehicle icon along the trajectory, dynamic speed calculation, bidirectional synchronization of the progress bar, and automatic switching between multiple trip segments.
[0079] Optionally, the backend device also includes a data quality verification module. This module determines the speed information of historical positioning points based on multiple historical positioning trajectory data. If the result of multiplying the maximum speed of a historical positioning point by the travel time is less than the total mileage, an anomaly warning is triggered. This is usually caused by GPS signal drift, manifesting as the vehicle not actually traveling that far, but the recorded total mileage being abnormally high. An anomaly warning is also triggered when the average speed of the historical positioning trajectory data is greater than the maximum speed, or when the average speed exceeds 120 kilometers per hour. An average speed greater than the maximum speed violates physical laws, and an average speed exceeding 120 kilometers per hour exceeds the reasonable speed limit for commercial vehicles; both indicate potential sensor data malfunctions. The data quality verification module automatically verifies the historical positioning trajectory data before playback begins, identifying data quality issues such as abnormal speed and mileage, and providing visual warnings.
[0080] Step 503: Obtain events based on the color scheme, call the dictionary configuration service, and obtain the preset color scheme from the backend server.
[0081] The dictionary configuration service is a configuration management interface provided by the backend server for the centralized storage and distribution of variable business rules related to the interface display. Variable business rules can include numerical thresholds for each speed range, corresponding display colors, selected highlight colors, etc., which can be adjusted online by operations personnel without modifying the program code.
[0082] Optionally, after receiving the color scheme acquisition event from the navigation event, the trajectory history query module sends a request to the dictionary configuration service in the backend server, and the backend dictionary service returns the currently globally effective color scheme rules.
[0083] Step 504: Obtain events based on event data, call the event data service, and obtain event data for each historical location trajectory from the backend server.
[0084] The event data service is an interface provided by the backend server specifically for responding to frontend query requests for vehicle-related event records. This event data service returns multiple types of event data based on the vehicle identifier and the query time range.
[0085] Optionally, after receiving the event data retrieval instruction from the navigation event, the event annotation management module extracts the vehicle identifier and query time range, calls the event data service interface provided by the backend server, and the backend service retrieves various event records accordingly, encapsulates them into a structured list, and returns them. The event annotation management module is used to manage the annotation rendering, selection state switching, and information window display of various event types.
[0086] In this embodiment, multiple data acquisition tasks are uniformly triggered and coordinated through a preset event bus, ensuring synchronous startup based on the same vehicle identifier and the same query time range. This avoids time window misalignment and data version inconsistency caused by step-by-step calls, and also prevents process interruption due to partial data loading failure. Different modules acquire different data, reducing the coupling and maintenance complexity of the front-end code, shortening the page initialization waiting time, and improving the consistency of system response and the smoothness of the operation experience.
[0087] Based on the above embodiments, this application also provides a trajectory rendering process in another vehicle trajectory visualization cruise playback method. Figure 6 This is a schematic diagram of the trajectory rendering process in another vehicle trajectory visualization cruise playback method provided in this application embodiment, as shown below. Figure 6 As shown, in step 103 above, based on multiple historical positioning trajectory data and a preset color scheme, a preset map software is called to generate and render each historical positioning trajectory data on the trajectory playback page of the web interface, including: Step 601: Use preset sampling rules to sample the historical positioning trajectory data to obtain multiple sampling points.
[0088] The preset sampling rules include: equidistant sampling rules, stop point sampling rules, event sampling rules, and sparse area sampling rules. The total number of sampling points is less than the number of historical location points, covering key locations and general road sections.
[0089] The equidistant sampling rule is used to indicate that historical positioning points are sampled at equidistant intervals according to a preset distance interval. The preset distance interval can be 500 meters or other data. This application embodiment does not limit this.
[0090] For example, equidistant sampling is performed along historical location trajectory data at 500-meter intervals to generate a basic set of sampling points. The 500-meter sampling interval is determined based on the average density of the urban road network, setting the spacing between main urban roads. The sampling interval is typically 500-800 meters, and the 500-meter sampling interval ensures coverage of the vast majority of address change nodes.
[0091] The stop point sampling rule is used to specify points in the historical positioning data where the speed is less than a preset speed threshold and the stop duration is greater than a preset time threshold as stop points for sampling. The preset speed threshold can be 5 km / h, and the preset time threshold can be 60 seconds. Stop points can correspond to positioning scenarios such as parking, waiting at a red light, and traffic congestion.
[0092] Event sampling rules are used to indicate whether to sample the location points where events occur. For example, the location of an event is spatiotemporally matched with its trajectory points, and then the location points are sampled.
[0093] The sparse region sampling rule is used to instruct that for historical positioning points whose adjacent historical positioning points are greater than a preset sparse distance threshold, supplementary sampling points are generated through linear interpolation, and these supplementary sampling points are then sampled. The preset sparse distance threshold can be 1000 meters.
[0094] Optionally, for areas with sparse positioning points due to weak GPS signals, supplementary sampling points are generated by linear interpolation between the two points, and these supplementary sampling points are sampled.
[0095] Step 602: Based on the location coordinates of the sampling point, call the reverse geocoding service to obtain the address information of the sampling point.
[0096] Among them, reverse geocoding service refers to the network service interface that converts latitude and longitude coordinates into readable address information, which is provided by the default map software.
[0097] Optionally, the sampling points can be grouped into batches according to a preset number, and multiple requests can be initiated concurrently. After each batch returns, the address text corresponding to each positioning coordinate is determined, and a mapping relationship is established between it and the original coordinates to form a lookup table of sampling point coordinates and addresses. The preset number can be twenty per group.
[0098] Optionally, if the request fails, an exponential backoff retry is performed to ensure that all sampled points eventually obtain valid addresses.
[0099] Step 603: Determine the address information of the non-sampling points based on the location coordinates and address information of the sampling points and the location coordinates of the non-sampling points.
[0100] Among them, non-sampling points are all other positioning points that were not selected by the preset sampling rules.
[0101] Optionally, by calculating the spatial distance between each non-sampling point and all sampling points, the address information of its nearest sampling point is assigned to the non-sampling point.
[0102] Optionally, administrative boundary data or custom geofence data can be loaded. For each non-sampling point, the system uses an algorithm to determine which geofence it falls within, thereby directly obtaining the corresponding address name or area identifier. The geofence can be, for example, a polygon defining street boundaries, community boundaries, or operational areas.
[0103] Step 604: Based on the location coordinates and address information of the sampling points and the location coordinates and address information of the non-sampling points, as well as the preset color scheme, call the preset map software to generate and render each historical location trajectory data on the trajectory playback page of the web interface.
[0104] Optionally, a preset map software is invoked to assign color labels to each historical location point according to speed range. Multiple vector trajectory lines of different colors are used to overlay the address labels of the corresponding historical location points at the corresponding positions of each trajectory line. The data is then divided according to confidence level, and the historical location trajectory data is generated and rendered on the trajectory playback page of the web interface.
[0105] Optionally, high-confidence addresses can be displayed using a regular font, medium-confidence addresses can be added with a light-colored background, and low-confidence addresses can be temporarily left un-text displayed, with only the location anchor remaining.
[0106] In this embodiment, a combination of multi-dimensional intelligent sampling and address association filling avoids the problems of low address parsing efficiency, slow response, and high cost under massive trajectory data. This reduces the consumption of map service provider call quotas and the pressure on backend services. For non-sampled points, a forward nearest matching and confidence-leveling strategy is used to derive addresses, ensuring that all positioning points have available addresses while also ensuring the accuracy of addresses at key locations, thus improving operational consistency and business analysis efficiency.
[0107] Based on the above embodiments, this application also provides a process for determining address information in a vehicle trajectory visualization cruise playback method. Figure 7 This is a flowchart illustrating the process of determining address information in a vehicle trajectory visualization cruise playback method provided in an embodiment of this application, as shown below. Figure 7 As shown, in step 603 above, the address information of the non-sampling point is determined based on the location coordinates and address information of the sampling point and the location coordinates of the non-sampling point, including: Step 701: Based on the location coordinates of the non-sampling point and the location coordinates of the sampling point, determine the address information of the nearest sampling point in front of the non-sampling point.
[0108] Among them, the closest proximity is a combination of the preceding relationship in time sequence and spatial proximity, that is, the sampling point that is the closest in time to the non-sampling point.
[0109] Optionally, from multiple sampling points before the sampling time of the non-sampling point, the sampling point with the closest spatial distance is determined from the multiple sampling points before the sampling time of the non-sampling point based on the positioning coordinates of the non-sampling point, and the address information of the sampling point is obtained.
[0110] Step 702: Use the address information of the sampling point that is closest to the non-sampling point as the address information of the non-sampling point.
[0111] Optionally, the address information of the nearest sampling point in front of the non-sampling point is used as the address information of the non-sampling point. The corresponding confidence level is then determined based on the spatial distance between the non-sampling point and the sampling point, which serves as the address information of the non-sampling point.
[0112] For example, a spatial distance of less than 100 meters between a non-sampled point and a sampled point indicates high confidence; a spatial distance between 100 and 300 meters indicates medium confidence; and a spatial distance greater than 300 meters indicates low confidence. Low-confidence addresses are indicated by a special identifier in the user interface.
[0113] Optionally, if there are multiple historical positioning trajectory data, for non-sampling points at the boundary of a trajectory segment, sampling points within the same segment should be determined first for address filling to avoid cross-segment address errors.
[0114] In this embodiment, by selecting addresses from preceding sampling points based solely on the vehicle's actual travel time sequence, geographic logic errors caused by using subsequent locations are avoided. Calculating spatial distances to select the nearest preceding sampling point ensures that the inherited address physically reflects the vehicle's current location, improving the accuracy and readability of address information and guaranteeing the precision of critical location addresses and the usability of general location addresses. Since there is no need to call the map interface separately for each location point, the number of network requests is reduced, alleviating backend service pressure and map service provider quota limitations.
[0115] Based on the above embodiments, this application also provides a process for determining playback speed information in a vehicle trajectory visualization cruise playback method. Figure 8 This is a flowchart illustrating the process of determining playback speed information in a vehicle trajectory visualization cruise playback method provided in an embodiment of this application, as shown below. Figure 8 As shown, in step 103 above, based on multiple historical positioning trajectory data and a preset color scheme, a preset map software is called to generate and render each historical positioning trajectory data on the trajectory playback page of the web interface, including: Step 801: Based on the historical positioning trajectory data, use the preset playback speed calculation formula to call the preset trajectory playback event to determine the playback speed information of the historical positioning trajectory data.
[0116] The preset playback speed calculation formula is used to ensure that the playback time for each segment of historical positioning trajectory data is the same. The preset playback speed calculation formula is: Playback speed information = (Distance traveled / 60 seconds) × 3.6; where distance traveled is the distance of each segment of historical positioning trajectory data, in meters.
[0117] Step 802: Based on multiple historical positioning trajectory data, playback speed information, and preset color scheme, call the preset map software to generate and render each historical positioning trajectory data on the trajectory playback page.
[0118] Based on the same inventive concept, this application also provides a vehicle trajectory visualization cruise playback device corresponding to the vehicle trajectory visualization cruise playback method. Since the principle of the device in this application is similar to the vehicle trajectory visualization cruise playback method described above in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0119] Figure 9 This is a structural schematic diagram of a vehicle trajectory visualization cruise playback device provided in an embodiment of this application, as shown below. Figure 9 As shown, the device includes: a first acquisition module 901, a second acquisition module 902, and a generation module 903; wherein: The first acquisition module 901 is used to acquire the vehicle identifier to be queried and the query time range entered through the vehicle list page of the web interface in the web application. The second acquisition module 902 is used to obtain multiple historical location trajectory data of the corresponding target vehicle and a preset color scheme from the backend server based on the vehicle identification and the query time range. The generation module 903 is used to generate and render each historical positioning trajectory data on the trajectory playback page of the web interface by calling a preset map software based on multiple historical positioning trajectory data and preset color scheme.
[0120] In one possible implementation, the historical positioning trajectory data includes: multiple historical positioning points and the time of each historical positioning point; the preset color scheme includes: a speed color scheme; the generation module 903 is specifically used to: determine the speed information of the historical positioning points based on the multiple historical positioning points and the time of each historical positioning point; Based on the speed information of historical positioning points, a speed color scheme is adopted to determine the color information of historical positioning points; Based on the color information of each historical location point, a preset map software is invoked to generate and render the color of each historical location trajectory data on the trajectory playback page.
[0121] In one possible implementation, the generation module 903 is specifically used to: merge adjacent historical positioning points with the same color information according to the color information of each historical positioning point to generate a continuous line segment array; Based on the color information of each line segment array, the line segment arrays are classified by color to obtain multiple color arrays; each color array includes at least one line segment array. Based on multiple color arrays, a preset map software is invoked to generate and render the colors of each historical positioning trajectory data on the trajectory playback page.
[0122] In one possible implementation, the device further includes a third acquisition module, which is specifically used to: acquire event data of each historical location trajectory data from the backend server based on the vehicle identifier and the query time range; the event data includes: event type, the occurrence time of the corresponding event, and the location point where the event occurred; Obtain the target location point corresponding to the location point that occurred from the historical location trajectory data rendered on the trajectory playback page; Using pre-set map software, the event type and the corresponding event occurrence time are rendered on the trajectory playback page at the location corresponding to the target positioning point.
[0123] In one possible implementation, the second acquisition module 902 is specifically used to: publish navigation events for the target vehicle using a preset event bus based on the vehicle identifier and the query time range, wherein the navigation events include: trajectory acquisition events, event data acquisition events, and color scheme acquisition events; Based on the trajectory acquisition event, call the trajectory data service to obtain multiple historical location trajectory data from the backend server; Based on the color scheme, the event is obtained, and the dictionary configuration service is called to retrieve the preset color scheme from the backend server. The event is obtained by retrieving the event data, calling the event data service, and retrieving the event data of each historical location trajectory from the backend server.
[0124] In one possible implementation, the generation module 903 is specifically used to: sample the historical positioning trajectory data using a preset sampling rule to obtain multiple sampling points; Based on the number of sampling points and their location coordinates, the address information of the sampling points is obtained by calling the reverse geocoding service. The address information of the non-sampling points is determined based on the location coordinates and address information of the sampling points and the location coordinates of the non-sampling points. Based on the location coordinates and address information of the sampling points, as well as the location coordinates and address information of the non-sampling points and the preset color scheme, the preset map software is called to generate and render the historical location trajectory data on the trajectory playback page of the web interface.
[0125] In one possible implementation, the preset sampling rules include: equidistant sampling rules, dwell point sampling rules, event sampling rules, and sparse region sampling rules; The equidistant sampling rule is used to indicate that historical positioning points are sampled at equidistant reference intervals according to a preset distance interval; The stop point sampling rule is used to indicate that points in the historical positioning points with a speed less than a preset speed threshold and a stop duration greater than a preset time threshold are used as stop points and sampled. Event sampling rules are used to indicate whether to sample the location where the event occurred; The sparse region sampling rule is used to indicate that for historical positioning points whose adjacent historical positioning points are greater than the preset sparse distance threshold, supplementary sampling points are generated by linear interpolation, and the supplementary sampling points are sampled.
[0126] In one possible implementation, the generation module 903 is specifically used to: determine the address information of the nearest sampling point in front of the non-sampling point based on the positioning coordinates of the non-sampling point and the positioning coordinates of the sampling point; The address information of the non-sampling point is taken as the address information of the nearest sampling point in front of it.
[0127] In one possible implementation, the generation module 903 is specifically used to: determine the playback speed information of the historical positioning trajectory data by calling a preset trajectory playback event based on the historical positioning trajectory data and using a preset playback speed calculation formula; Based on multiple historical location trajectory data, playback speed information, and preset color schemes, the system calls preset map software to generate and render each historical location trajectory data on the trajectory playback page.
[0128] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0129] This application also provides a computer device. Figure 10 This application provides a schematic diagram of the structure of a computer device, as shown in the embodiment of the present application. Figure 10 As shown, the system includes a processor 1001 and a memory 1002, and optionally, a bus 1003. The memory 1002 stores machine-readable instructions executable by the processor 1001. When the computer device is running, the processor 1001 and the memory 1002 communicate via the bus 1003. When the machine-readable instructions are executed by the processor 1001, the steps of the above-described vehicle trajectory visualization cruise playback method are performed.
[0130] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the above-described vehicle trajectory visualization cruise playback method.
[0131] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0132] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0133] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for visualizing and replaying vehicle trajectory cruise, characterized in that, Applied to front-end devices with web applications, the method includes: Obtain the vehicle identifier and query time range entered through the vehicle list page of the web application's web interface; Based on the vehicle identifier and the query time range, obtain multiple historical location trajectory data of the corresponding target vehicle and a preset color scheme from the backend server; Based on the multiple historical positioning trajectory data and the preset color scheme, the preset map software is invoked to generate and render each of the historical positioning trajectory data on the trajectory playback page of the web page interface; The historical positioning trajectory data includes: multiple historical positioning points and the time of each historical positioning point; the preset color scheme includes: a speed color scheme; The step of generating and rendering each of the historical positioning trajectory data on the trajectory playback page of the web page by calling a preset map software based on multiple historical positioning trajectory data and the preset color scheme includes: The speed information of the historical positioning points is determined based on multiple historical positioning points and the time of each historical positioning point. Based on the speed information of the historical positioning points, the color information of the historical positioning points is determined using the speed color scheme. Based on the color information of each historical location point, the preset map software is invoked to generate and render the color of each historical location trajectory data on the trajectory playback page. The step of generating and rendering each of the historical positioning trajectory data on the trajectory playback page of the web page by calling a preset map software based on multiple historical positioning trajectory data and the preset color scheme includes: The historical positioning trajectory data is sampled using preset sampling rules to obtain multiple sampling points. These preset sampling rules include: equidistant sampling rules, dwell point sampling rules, event sampling rules, and sparse region sampling rules. The equidistant sampling rules instruct that historical positioning points be sampled at preset distance intervals. The dwell point sampling rules instruct that points among the historical positioning points with speeds less than a preset speed threshold and dwell times greater than a preset time threshold be designated as dwell points and sampled. The event sampling rules instruct that location points where events occur be sampled. The sparse region sampling rules instruct that for historical positioning points adjacent to a historical positioning point with a distance greater than a preset sparse distance threshold, supplementary sampling points are generated through linear interpolation and sampled. Based on the number of sampling points and their location coordinates, the address information of the sampling points is obtained by calling the reverse geocoding service. The address information of the non-sampling points is determined based on the location coordinates and address information of the sampling points and the location coordinates of the non-sampling points. Based on the location coordinates and address information of the sampling points, the location coordinates and address information of the non-sampling points, and the preset color scheme, the preset map software is invoked to generate and render each of the historical location trajectory data on the trajectory playback page of the web page.
2. The method according to claim 1, characterized in that, The step of calling the preset map software based on the color information of each historical location point to generate and color-render each of the historical location trajectory data on the trajectory playback page includes: Based on the color information of each historical location point, adjacent historical location points with the same color information are merged to generate a continuous line segment array; Based on the color information of each line segment array, the line segment arrays are classified by color to obtain multiple color arrays; wherein, each color array includes at least one of the line segment arrays; Based on the multiple color arrays, the preset map software is invoked to generate and render the colors of each of the historical positioning trajectory data on the trajectory playback page.
3. The method according to claim 1, characterized in that, The method further includes: Based on the vehicle identifier and the query time range, event data for each historical location trajectory is obtained from the backend server; the event data includes: event type, the occurrence time of the corresponding event, and the location point where the event occurred; Obtain the target location point corresponding to the location point from the historical location trajectory data rendered on the trajectory playback page; Using the preset map software, the event type and the occurrence time of the corresponding event are rendered at the location corresponding to the target positioning point on the trajectory playback page.
4. The method according to claim 3, characterized in that, The step of obtaining multiple historical location trajectory data and a preset color scheme for the corresponding target vehicle from the backend server based on the vehicle identifier and the query time range includes: Based on the vehicle identifier and the query time range, a navigation event for the target vehicle is published using a preset event bus, wherein the navigation event includes: trajectory acquisition event, event data acquisition event, and color scheme acquisition event; Based on the trajectory acquisition event, the trajectory data service is invoked to obtain multiple historical location trajectory data from the backend server; Based on the color scheme acquisition event, the dictionary configuration service is invoked to obtain the preset color scheme from the backend server; The event is obtained based on the event data, and the event data service is invoked to obtain the event data of each of the historical positioning trajectory data from the backend server.
5. The method according to claim 1, characterized in that, The step of determining the address information of the non-sampling point based on the location coordinates and address information of the sampling point and the location coordinates of the non-sampling point includes: Based on the location coordinates of the non-sampling point and the location coordinates of the sampling point, determine the address information of the nearest sampling point in front of the non-sampling point; The address information of the sampling point that is closest to the non-sampling point is used as the address information of the non-sampling point.
6. The method according to claim 1, characterized in that, The step of generating and rendering each of the historical positioning trajectory data on the trajectory playback page of the web page by calling a preset map software based on multiple historical positioning trajectory data and the preset color scheme includes: Based on the historical positioning trajectory data, a preset playback speed calculation formula is used to call a preset trajectory playback event to determine the playback speed information of the historical positioning trajectory data; Based on the historical location trajectory data, the playback speed information, and the preset color scheme, the preset map software is invoked to generate and render each of the historical location trajectory data on the trajectory playback page.
7. A computer device, characterized in that, include: The processor and memory, the memory storing machine-readable instructions executable by the processor, which, when the computer device is running, are executed by the processor to perform the steps of the vehicle trajectory visualization cruise playback method as described in any one of claims 1 to 6.
8. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the steps of the vehicle trajectory visualization cruise playback method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Vehicle travel information processing method and device
CN121901518A
Trace playback long-distance client end supporting method
CN1937793A