Vehicle track generation method and device, vehicle and medium
Through real-time grouping and merging of vehicle condition data, the calculation errors caused by improper processing of vehicle condition data in vehicle trajectory generation are solved, and higher accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202510094872.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-04-25
AI Technical Summary
The existing vehicle trajectory generation methods lack effective processing of vehicle condition data, resulting in trajectory calculation errors and affecting accuracy and efficiency.
By obtaining real-time vehicle condition data, data conversion is performed to generate trajectory point data, and grouping it based on frame number, generating the initial trajectory and merging it to obtain the final trajectory.
It effectively solves the problem of trajectory calculation errors caused by disorderly reporting or repeated reporting of vehicle condition data and data abnormalities, and improves the accuracy and efficiency of vehicle trajectory generation.
Smart Images

Figure CN119889043A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle networking, and in particular to a vehicle trajectory generation method, device, vehicle and medium. Background Art
[0002] At present, the processing of vehicle driving trajectory includes but is not limited to trajectory prediction, trajectory correction and trajectory generation; among them, the vehicle trajectory generation needs to combine the vehicle condition data during the vehicle driving process to generate its own movement trajectory, which can be used to record background data or collect data. Specifically, the existing generation method of vehicle trajectory includes generating the target trajectory of the vehicle based on the point group of the reference front vehicle position of the vehicle; or collecting vehicle images through camera devices set at intervals on the road, and identifying the vehicle license plate number based on the vehicle image; recording the corresponding vehicle passing time and vehicle passing position at the same time, and finally generating the corresponding vehicle driving trajectory based on the recorded vehicle passing time, vehicle passing position and license plate number; or collecting the actual driving point data during the vehicle driving process and fitting it to obtain the vehicle driving route trajectory.
[0003] However, when the cloud processes vehicle driving data to generate corresponding driving trajectories, due to the large amount of vehicle condition data reported by different vehicles, there may be disordered or repeated reporting of vehicle condition data, as well as false reports of data such as collection time, cumulative mileage, and latitude and longitude signal collection anomalies, which can easily lead to incorrect calculation of vehicle trajectories and make it difficult to accurately calculate batch trajectories. Summary of the invention
[0004] In view of this, the present invention provides a vehicle trajectory generation method, device, vehicle and medium to solve the problem that the existing vehicle trajectory generation proposed in the above technical background lacks effective processing of vehicle condition data, which easily leads to erroneous calculation of vehicle trajectory, thereby seriously affecting the accuracy and efficiency of trajectory generation and making it difficult to meet trajectory generation requirements.
[0005] In a first aspect, the present invention provides a vehicle trajectory generation method, which is applied to the cloud, and the method comprises:
[0006] Obtain real-time vehicle status data of each target vehicle, where the target vehicle is the car that interacts with the cloud;
[0007] Perform data conversion on real-time vehicle condition data to obtain vehicle trajectory point data;
[0008] The vehicle trajectory point data are grouped and processed based on the frame number corresponding to each target vehicle to generate the initial trajectory of each target vehicle;
[0009] The initial trajectories of each target vehicle are merged to obtain the final trajectory of each target vehicle.
[0010] The present invention converts vehicle condition data collected in real time into vehicle trajectory point data, groups the vehicle trajectory point data to generate an initial trajectory of the corresponding vehicle, and merges the initial trajectory to obtain a final trajectory of the corresponding vehicle. This can solve the problem of trajectory calculation errors caused by disordered or repeated reporting of vehicle condition data and data anomalies, and can achieve more accurate and effective batch trajectory calculation in the cloud. It not only realizes the effective processing of vehicle condition data, but also improves the accuracy and efficiency of vehicle trajectory generation, meeting the generation requirements of vehicle trajectories.
[0011] In an optional implementation, data conversion is performed on the real-time vehicle condition data to obtain vehicle trajectory point data, including:
[0012] Identify the current protocol type for reporting real-time vehicle condition data, which includes at least various vehicle states and their corresponding signals, power supply signals, vehicle speed information and location coordinates;
[0013] If the current protocol type is TLV protocol, then the trajectory point data is extracted from the real-time vehicle condition data based on the preset TLV data template, and the trajectory point data at least includes the vehicle frame number and the collection time;
[0014] If the current protocol type is MQTT protocol, the trajectory point data is extracted from the real-time vehicle condition data based on the preset MQTT data template;
[0015] Filter the track point data with empty frame number and collection time to obtain the vehicle track point data.
[0016] The present invention processes the vehicle condition data reported by the vehicle in real time based on different protocol types to extract the trajectory point data of the corresponding protocol type, which can take into account the transmission requirements of the actual vehicle condition data and thus ensure the acquisition quality of the trajectory point data.
[0017] In an optional implementation, the vehicle trajectory point data at least includes a power signal, a vehicle state, a real-time vehicle speed, the cumulative fuel consumption of this ignition, the cumulative power consumption of this ignition, the real-time longitude and latitude, and the cumulative mileage; the vehicle trajectory point data are grouped and processed based on the frame number corresponding to each target vehicle to generate an initial trajectory of each target vehicle, including:
[0018] The vehicle track point data are grouped according to the frame number, and the first track point of the target vehicle corresponding to each frame number is obtained;
[0019] respectively detecting whether the power signal of the first track point of each target vehicle is empty;
[0020] If there is at least one target vehicle whose first trajectory point has a power signal that is empty, power signal compensation is performed on the first trajectory points of each target vehicle to obtain corresponding second trajectory points of each target vehicle, and abnormal point detection is performed on each second trajectory point to obtain corresponding valid trajectory point sets;
[0021] If the power signals of the first trajectory points of all target vehicles are not empty, abnormal point detection is performed on the first trajectory points of each target vehicle respectively, and a corresponding valid trajectory point set is obtained;
[0022] The initial trajectory of each target vehicle is generated based on the set of all valid trajectory points.
[0023] After the vehicle condition data obtained in batches are grouped by the vehicle frame number, corresponding power signal compensation or abnormal trajectory point processing is performed according to the power signal state of the trajectory point of each vehicle, and a valid trajectory point set of the corresponding vehicle is obtained and an initial trajectory of the corresponding vehicle is generated based on the set, which can avoid trajectory calculation errors caused by disordered or repeated reporting of vehicle condition data and abnormal vehicle condition data, greatly ensure the calculation accuracy of the vehicle's initial trajectory, and meet the generation requirements of the vehicle trajectory.
[0024] In an optional implementation, power signal compensation is performed on the first trajectory point of each target vehicle to obtain the corresponding second trajectory point of each target vehicle, including:
[0025] Determine whether the vehicle state of the first trajectory point of each target vehicle is empty;
[0026] If the vehicle state is not empty, the power signal state is determined based on the vehicle state, and the power signal state includes an on state and an off state;
[0027] If the vehicle status is empty, the power signal status is determined based on the real-time vehicle speed corresponding to the first trajectory point of each target vehicle, the cumulative fuel consumption of this ignition, and the cumulative power consumption of this ignition;
[0028] Based on the states of the power signals, the power signals corresponding to the first trajectory points of the target vehicles are updated to obtain the corresponding second trajectory points of the target vehicles.
[0029] The present invention takes into account the situation that there is a signal missing in the vehicle condition data reported by the actual vehicle, and the power signal compensation processing flow of the corresponding designed trajectory point can make the trajectory generated by the corresponding vehicle more accurate, thereby improving the generation efficiency of the vehicle trajectory.
[0030] In an optional implementation, the power signal state is determined based on the real-time vehicle speed corresponding to the first trajectory point of each target vehicle, the cumulative fuel consumption of this ignition, and the cumulative power consumption of this ignition, including:
[0031] Determine whether the real-time vehicle speed corresponding to the first trajectory point of each target vehicle is greater than the preset vehicle speed threshold, whether the cumulative fuel consumption of this ignition is equal to zero, and whether the cumulative power consumption of this ignition is equal to zero:
[0032] If the real-time vehicle speed is greater than the preset vehicle speed threshold, or the cumulative fuel consumption of this ignition is not equal to zero, or the cumulative power consumption of this ignition is not equal to zero, then the power signal state is determined to be the on state;
[0033] If the real-time vehicle speed is not greater than the preset vehicle speed threshold, and the cumulative fuel consumption of this ignition is equal to zero or the cumulative power consumption of this ignition is equal to zero, then it is determined that the power signal state is in the off state.
[0034] The present invention takes into account the situation that the vehicle status signal is missing in the vehicle condition data reported by the actual vehicle, and the corresponding design compensates the power signal of the corresponding trajectory point based on the real-time vehicle speed corresponding to the vehicle real-time trajectory point, the cumulative fuel consumption of this ignition, and the cumulative power consumption of this ignition, which can improve the compensation efficiency of the power signal and further ensure the accuracy and efficiency of vehicle trajectory generation.
[0035] In an optional implementation, outlier detection is performed on the first trajectory point or the second trajectory point to obtain a corresponding valid trajectory point set, including:
[0036] Detecting whether there is a trajectory point cache set corresponding to the target vehicle for the first trajectory point or the second trajectory point in the preset cache area;
[0037] If there is a track point cache set, the first track point or the second track point is added to the track point cache set accordingly;
[0038] If there is no trajectory point cache set, constructing a trajectory point cache set based on the first trajectory point or the second trajectory point;
[0039] When the number of trajectory points in the trajectory point cache set is greater than a first preset number threshold, obtaining preset abnormal points in the trajectory point cache set, and processing the preset abnormal points to obtain a valid trajectory point set;
[0040] When the number of trajectory points in the trajectory point cache set is not greater than the first preset number threshold, the process returns to the step of acquiring the real-time vehicle condition data of each target vehicle.
[0041] The present invention performs trajectory point anomaly detection through the real-time trajectory points of the vehicle and the trajectory point cache set of the corresponding vehicle in the preset cache area, and obtains a valid trajectory point set, which can ensure the quality of each trajectory point participating in the subsequent trajectory calculation and help improve the accuracy of the trajectory calculation.
[0042] In an optional implementation, if the preset abnormal point is an abnormal point in the acquisition time, the preset abnormal point in the trajectory point cache set is obtained, and the preset abnormal point is processed to obtain a valid trajectory point set, including:
[0043] Sorting each track point in the track point cache set in ascending order based on its corresponding acquisition time to obtain an ascending track point set;
[0044] Calculate the acquisition time difference between each trajectory point and its adjacent trajectory point in the ascending set of trajectory points respectively;
[0045] Determine whether each acquisition time difference is greater than a preset difference threshold;
[0046] If the acquisition time difference of the current trajectory point is greater than the preset difference threshold, the current trajectory point is determined to be an abnormal trajectory point, all abnormal trajectory points are obtained and an abnormal point set is constructed based on them;
[0047] The abnormal point set and the preset set are combined to obtain the corresponding target trajectory point set;
[0048] Calculate the adjacent distance between each trajectory point in the target trajectory point set and its adjacent trajectory point, and select the benchmark adjacent distance with the largest adjacent distance accordingly;
[0049] A valid trajectory point set is determined based on the trajectory point ascending set, the outlier point set and the reference adjacent distance.
[0050] The present invention arranges each trajectory point in a trajectory point cache set in ascending order, constructs an abnormal point set based on the size relationship between the acquisition time difference and the maximum acquisition time difference of each trajectory point and its adjacent trajectory point, and solves the union of the abnormal point set in consideration of special working conditions. The effective trajectory point set is determined based on the maximum adjacent distance between each trajectory point and its adjacent trajectory point in the union, the ascending set of trajectory points, and the abnormal point set. The influence of abnormal points in acquisition time on vehicle trajectory generation can be avoided, the generation efficiency of vehicle trajectory is improved, and the generation requirements of vehicle trajectory are met.
[0051] In an optional implementation, if the preset abnormal point is a real-time latitude and longitude abnormal point or a cumulative mileage abnormal point, the preset abnormal point in the track point cache set is obtained, and the preset abnormal point is processed to obtain a valid track point set, including:
[0052] Based on the preset detection algorithm, anomaly detection is performed on the trajectory point cache set, and corresponding real-time longitude and latitude anomaly points or cumulative mileage anomaly points are obtained. The preset detection algorithm includes a mileage anomaly detection algorithm and a longitude and latitude anomaly detection algorithm;
[0053] Obtain two normal track points adjacent to the abnormal real-time longitude and latitude point or the abnormal cumulative mileage point, and calculate the average longitude and latitude or mileage of the two normal track points;
[0054] The corresponding outlier points are updated based on the average latitude and longitude or the average mileage, and a corresponding valid trajectory point set is obtained.
[0055] The present invention detects real-time longitude and latitude anomalies or cumulative mileage anomalies in a trajectory point cache set through a preset detection algorithm, and performs compensation processing on the corresponding abnormal trajectory points, which can overcome trajectory calculation errors caused by abnormal collection of cumulative mileage and longitude and latitude signals, and greatly improve the accuracy and efficiency of vehicle trajectory generation.
[0056] In an optional implementation, generating the initial trajectory of each target vehicle based on all valid trajectory point sets includes:
[0057] Extracting a minimum trajectory point and a maximum trajectory point from the valid trajectory point set of the current target vehicle respectively, wherein the minimum trajectory point and the maximum trajectory point are determined based on the power signal state of each trajectory point in the valid trajectory point set;
[0058] Determine the current trajectory information according to the minimum trajectory point and the maximum trajectory point of the current target vehicle;
[0059] Based on the current trajectory information, an initial trajectory of the current target vehicle is determined, and the initial trajectory is stored in a preset storage area; or, based on each trajectory point in the valid trajectory point set, the trajectory point data cached by the current target vehicle in the preset cache area is updated, and when the current cache quantity after the update of the corresponding trajectory point data of the current target vehicle in the preset cache area is greater than a second preset quantity threshold, the trajectory point cached first by the current target vehicle is removed, wherein the second preset quantity threshold is greater than the first preset quantity threshold.
[0060] The present invention generates the initial trajectory of the corresponding vehicle by extracting the minimum trajectory point and the maximum trajectory point from the vehicle valid trajectory point set and stores it in a preset storage area; at the same time, it is designed to update the cached trajectory data points according to the valid trajectory points corresponding to the trajectory being generated by the current vehicle, and considers the memory situation of the cached trajectory points, and performs first-in-first-out removal processing of the trajectory points when the cache quantity exceeds the set maximum threshold, so as to filter the trajectory points with earlier collection time, thereby greatly ensuring the timeliness and accuracy of the trajectory points.
[0061] In an optional implementation, the process of determining the minimum trajectory point and the maximum trajectory point includes:
[0062] Traverse each track point and its power signal status in the valid track point set of the current target vehicle in sequence;
[0063] When the power signal state of the first track point is on, the first track point is determined to be the minimum track point; the next track point is traversed in sequence, and if the power signal state of the current track point is off, the current track point is determined to be the maximum track point; if the power signal state of all track points is on, the last track point is determined to be the maximum track point;
[0064] When the power signal state of the first track point is an off state, the first track point is determined to be a minimum track point and a maximum track point.
[0065] The present invention determines the minimum trajectory point and the maximum trajectory point according to each trajectory point in the valid trajectory point set and its power signal state, which can ensure the determination accuracy of the minimum trajectory point and the maximum trajectory point, thereby making the subsequent trajectory calculation of the corresponding vehicle more accurate.
[0066] In an optional implementation, the current trajectory information is determined according to the correspondence between the minimum trajectory point and the maximum trajectory point of the current target vehicle, including:
[0067] Detect whether there is historical cache trajectory information of the current target vehicle in the preset cache area;
[0068] If the preset cache area does not contain the historical cache trajectory information of the current target vehicle, determining whether the minimum trajectory point and the maximum trajectory point of the current target vehicle are the same;
[0069] When the minimum trajectory point and the maximum trajectory point are the same, executing the step of updating the trajectory point data cached by the current target vehicle in the preset cache area based on each trajectory point in the valid trajectory point set;
[0070] When the minimum trajectory point and the maximum trajectory point are different, the current trajectory information of the current target vehicle is determined based on the minimum trajectory point and the maximum trajectory point, wherein the current trajectory information includes the current trajectory and its point information, and the point information includes the trajectory start point and its corresponding start time, the trajectory end point and its corresponding end time, or the trajectory last point and its corresponding end time; when the power signal state corresponding to the maximum trajectory point is the on state, the current trajectory information is cached to a preset cache area; when the power signal state corresponding to the maximum trajectory point is the off state, the maximum trajectory point is marked as the trajectory end point, and the current trajectory information is stored in a preset storage area.
[0071] The present invention designs a calculation process for the current trajectory information by preset whether there is historical cached trajectory information of the current target vehicle in the cache area. When there is no historical cached trajectory information of the current target vehicle, the current trajectory information is correspondingly determined according to the size relationship between the minimum trajectory point and the maximum trajectory point, which can greatly ensure the accuracy of the current trajectory and its point information in the current trajectory information.
[0072] In an optional implementation, the vehicle trajectory generation method further includes:
[0073] If the preset cache area contains historical cached trajectory information of the current target vehicle, determine the trajectory start point and its corresponding start time, the trajectory end point or the last point of the trajectory and its corresponding end time, the first acquisition time of the minimum trajectory point, and the second acquisition time of the maximum trajectory point of the historical cached trajectory information respectively;
[0074] Determine whether the power signal state corresponding to the maximum trajectory point is in the on state;
[0075] When the power signal state corresponding to the maximum trajectory point is in the on state, respectively calculating a first time interval between the first acquisition time and the start time, and a second time interval between the second acquisition time and the end time corresponding to the trajectory end point or the last point of the trajectory;
[0076] Respectively determine the relationship between the first acquisition time and the start time, the first time interval and the preset interval threshold, the second acquisition time and the end time corresponding to the trajectory end point or the last point of the trajectory, and the corresponding second time interval and the preset interval threshold;
[0077] When the first acquisition time is less than the start time and the first time interval is less than the preset interval threshold, the minimum trajectory point is marked as the trajectory start point of the current trajectory and the first acquisition time is marked as the start time corresponding to the trajectory start point, and the current trajectory information is updated based on the trajectory start point and the start time of the current trajectory;
[0078] When the second acquisition time is greater than the end time of the last point of the trajectory and the corresponding second time interval is greater than the preset interval threshold, the maximum trajectory point is marked as the trajectory end point of the current trajectory and the second acquisition time is marked as the end time corresponding to the trajectory end point, the current trajectory information is updated based on the trajectory end point and the end time of the current trajectory, and the updated current trajectory information is stored in the preset storage area and the historical cache trajectory information is removed.
[0079] The present invention correspondingly designs a current trajectory information determination process in which there is historical cached trajectory information of the current target vehicle, and determines the corresponding calculation process of the trajectory information currently being generated according to the trajectory starting point of the historical cached trajectory information and its corresponding starting time, the trajectory ending point or the last point of the trajectory and its corresponding ending time, the first acquisition time of the minimum trajectory point and the second acquisition time of the maximum trajectory point, and updates the historical cached trajectory information according to the trajectory information currently being generated, which can ensure the calculation accuracy of the current trajectory information, thereby improving the generation efficiency of subsequent vehicle trajectories and meeting the generation requirements of vehicle trajectories.
[0080] In an optional implementation, the vehicle trajectory generation method further includes:
[0081] When the power signal state corresponding to the maximum trajectory point is off, the maximum trajectory point is marked as the trajectory end point and cached in a preset cache area; if there is current trajectory information of the current target vehicle, the current trajectory information is updated based on the maximum trajectory point, and the updated current trajectory information is stored in the preset storage area and the historical cached trajectory information of the current target vehicle is removed.
[0082] In an optional implementation, before determining the current trajectory information according to the correspondence between the minimum trajectory point and the maximum trajectory point of the current target vehicle, the vehicle trajectory generation method further includes:
[0083] Determine whether the maximum trajectory point is marked as the trajectory end point, and whether the collection time of the minimum trajectory point is greater than the start time of the trajectory start point in the historical cache trajectory information;
[0084] When the maximum trajectory point is marked as the trajectory end point and the collection time of the minimum trajectory point is greater than the start time of the trajectory start point in the historical cache trajectory information, a step of updating the trajectory point data cached by the current target vehicle in the preset cache area based on each trajectory point in the valid trajectory point set is executed.
[0085] The present invention takes into account the rationality requirements of actual vehicle condition scenarios. Before determining the current trajectory information according to the correspondence between the minimum trajectory point and the maximum trajectory point of the current target vehicle, once it is detected that the maximum trajectory point is marked as the trajectory end point and the acquisition time of the minimum trajectory point is greater than the start time of the trajectory start point in the historical cache trajectory information, the current trajectory calculation process is terminated, which can ensure the calculation accuracy of the current trajectory, further simplify the trajectory calculation process, and improve the trajectory generation efficiency.
[0086] In an optional implementation, the initial trajectories of the target vehicles are merged to obtain the final trajectory of each target vehicle, including:
[0087] Get all initial trajectories of the current target vehicle and their corresponding start and end times;
[0088] Based on the start time and end time of each initial trajectory, overlapping trajectories with time overlap are identified, and all overlapping trajectories are merged to obtain a merged trajectory;
[0089] The final trajectory of the current target vehicle is determined based on all merged trajectories and the remaining initial trajectories.
[0090] The present invention can ensure the uniqueness of the corresponding vehicle trajectory in time sequence by detecting and filtering the trajectory overlap of all initial trajectories of the current target vehicle, thereby improving the accuracy and efficiency of vehicle trajectory calculation.
[0091] In a second aspect, the present invention provides a vehicle trajectory generation device, which is applied to the cloud, and the device includes:
[0092] The acquisition module is used to obtain the real-time vehicle condition data of each target vehicle, where the target vehicle is the car interacting with the cloud;
[0093] A conversion module is used to convert the real-time vehicle condition data to obtain vehicle trajectory point data;
[0094] A generation module, used for grouping the vehicle trajectory point data based on the frame number corresponding to each target vehicle, and generating an initial trajectory of each target vehicle;
[0095] The merging module is used to merge the initial trajectories of each target vehicle to obtain the final trajectory of each target vehicle.
[0096] The vehicle trajectory generating device of the present invention converts the vehicle condition data collected in real time into vehicle trajectory point data, generates the initial trajectory of the corresponding vehicle after grouping the vehicle trajectory point data, and merges the initial trajectory to obtain the final trajectory of the corresponding vehicle. It not only realizes the effective processing of the vehicle condition data, but also can effectively solve the problem of trajectory calculation errors caused by disordered or repeated reporting of vehicle condition data and data anomalies. At the same time, it can realize more accurate and effective batch trajectory calculation in the cloud, improve the accuracy and efficiency of vehicle trajectory generation, and meet the generation requirements of vehicle trajectories.
[0097] In a third aspect, the present invention provides a vehicle, comprising a controller, the controller comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes a vehicle trajectory generation method according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0098] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute a vehicle trajectory generation method according to the first aspect or any corresponding embodiment thereof.
[0099] The vehicle trajectory generation method and device of the present invention collects real-time vehicle condition data and converts it into vehicle trajectory point data, generates an initial trajectory of the corresponding vehicle after grouping the vehicle trajectory point data, and merges the initial trajectories to obtain the final trajectory of the corresponding vehicle. The method and device can effectively solve the problem of trajectory calculation errors caused by disordered or repeated reporting of vehicle condition data and data anomalies, realize effective processing of vehicle condition data, improve the accuracy and efficiency of vehicle trajectory generation, and realize more accurate batch trajectory calculation in the cloud. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0101] Figure 1 is a flow chart of a vehicle trajectory generation method according to an embodiment of the present invention;
[0102] Figure 2 is a flow chart of another vehicle trajectory generation method according to an embodiment of the present invention;
[0103] Figure 3 It is a flow chart of vehicle trajectory generation and processing;
[0104] Figure 4 It is a flow chart of vehicle trajectory point conversion processing;
[0105] Figure 5 It is a flow chart of the power signal compensation processing of the vehicle track point;
[0106] Figure 6 It is a flowchart of the effective point processing of vehicle trajectory;
[0107] Figure 7 It is a flow chart of vehicle trajectory calculation and processing;
[0108] Figure 8 It is the structural block diagram of the vehicle trajectory generation system;
[0109] Fig. 9 is a structural block diagram of a vehicle trajectory generating device according to an embodiment of the present invention;
[0110] Fig.10 It is a schematic diagram of the structure of a controller of a vehicle according to an embodiment of the present invention. DETAILED DESCRIPTION
[0111] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0112] An embodiment of the present invention provides an embodiment of a vehicle trajectory generation method. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0113] In this embodiment, a vehicle trajectory generation method is provided, which is applied to the cloud. Figure 1 is a flow chart of a vehicle trajectory generation method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0114] Step S101, obtaining real-time vehicle condition data of each target vehicle, where the target vehicle is a car interacting with the cloud.
[0115] It should be noted that the real-time vehicle condition data in this embodiment is the real-time vehicle condition data collected by the target vehicle. The real-time vehicle condition data of different vehicles can be uploaded to the corresponding cloud (or cloud server) through the Internet of Vehicles technology for subsequent analysis and use. The specific content and acquisition method of the vehicle condition data are not limited here, and are adaptively set according to the actual project requirements and conventional data acquisition methods in this field. For example, the vehicle condition data includes signal type (i.e., signal data used to distinguish different vehicle states and different body domains), power signal, vehicle speed, longitude and latitude, etc. The current vehicle speed can be collected in real time through the speed sensor carried by the vehicle, which is only for exemplary explanation.
[0116] Step S102, converting the real-time vehicle condition data to obtain vehicle trajectory point data.
[0117] In actual applications, uploading vehicle condition data to the cloud needs to follow the corresponding data transmission communication protocols formulated for various types of data transmission in the current vehicle, and set the corresponding data structure according to each communication protocol to extract vehicle trajectory point data.
[0118] Step S103 , grouping the vehicle trajectory point data based on the frame number corresponding to each target vehicle to generate an initial trajectory of each target vehicle.
[0119] In this embodiment, since the cloud can receive vehicle condition data uploaded by multiple vehicles at the same time, the vehicle trajectory point data is grouped and processed by the frame number that uniquely identifies the vehicle identity, and the trajectory point data corresponding to each vehicle is obtained, which facilitates the subsequent fast and accurate calculation of each vehicle trajectory.
[0120] Step S104, merging the initial trajectories of the target vehicles to obtain the final trajectory of each target vehicle.
[0121] It should be noted that, since the cloud can process the trajectory generation of multiple vehicles in parallel in actual applications, as well as the trajectory generation of the same vehicle in different time intervals, multiple initial trajectories of different vehicles will be obtained. Therefore, this embodiment stores the initial trajectory generated by the vehicle at the current moment in the corresponding database, so as to facilitate the subsequent analysis using the multiple historical trajectories stored by the vehicle.
[0122] The vehicle trajectory generation method of the embodiment of the present invention can solve the problem of trajectory calculation errors caused by disordered or repeated reporting of vehicle condition data and data anomalies, and can realize more accurate and effective batch trajectory calculation in the cloud, which not only realizes the effective processing of vehicle condition data, but also improves the accuracy and efficiency of vehicle trajectory generation, and meets the generation requirements of vehicle trajectories.
[0123] In this embodiment, a vehicle trajectory generation method is provided, which is applied to the cloud. Figure 2 FIG. 1 is a flow chart of another vehicle trajectory generation method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0124] Step S201, obtain the real-time vehicle condition data of each target vehicle, the target vehicle is the car that interacts with the cloud. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0125] Step S202, converting the real-time vehicle condition data to obtain vehicle trajectory point data.
[0126] Specifically, the above step S202 includes:
[0127] Step S2021, identifying the current protocol type for reporting real-time vehicle condition data, where the real-time vehicle condition data at least includes various vehicle states and their corresponding signals, power signals, vehicle speed information, and position coordinates.
[0128] In this embodiment, the specific content of various vehicle states can be adaptively adjusted according to actual needs, such as whether the vehicle is in a driving state, a parking state, an accelerating state, etc.; the power signal refers to the electric energy signal used to drive various electronic components in the vehicle circuit, and its specific meaning is determined according to the demand adaptability, such as the power signal on or off state corresponds to the open or closed state of the vehicle; the position coordinates are used to characterize the current position of the vehicle, such as longitude and latitude coordinates.
[0129] Step S2022: If the current protocol type is the TLV protocol, then the trajectory point data is extracted from the real-time vehicle condition data based on a preset TLV data template, and the trajectory point data at least includes the vehicle frame number and the collection time.
[0130] In this embodiment, the data content contained in the track point is defined in the preset TLV data template, which is a data structure set in advance according to actual needs, and clarifies the type of each vehicle condition attribute. For example, a TLV data template is provided, and the specific content is:
[0131] <template>
[0132] <power name="Power signal value" / >
[0133] <speed name="Vehicle speed" / >
[0134] …
[0135] < / template>
[0136] It should be noted that the above TLV data template is only for illustrative purposes and is not intended to be limiting.
[0137] Step S2023, if the current protocol type is the MQTT protocol, then the trajectory point data is extracted from the real-time vehicle condition data based on a preset MQTT data template.
[0138] In this embodiment, the relevant content of the preset MQTT data template is referred to above, and can be set based on the actual MQTT protocol adaptability, and will not be repeated here.
[0139] Step S2024, filtering the track point data whose frame number and collection time are empty to obtain the vehicle track point data.
[0140] In the embodiment of the present invention, the vehicle condition data reported by the vehicle in real time is processed based on different protocol types to extract the trajectory point data of the corresponding protocol type, which can take into account the transmission requirements of the actual vehicle condition data and thus ensure the acquisition quality of the trajectory point data.
[0141] Step S203 , grouping the vehicle trajectory point data based on the frame number corresponding to each target vehicle to generate an initial trajectory of each target vehicle.
[0142] In this embodiment, the vehicle trajectory point data at least includes power signal, vehicle status, real-time vehicle speed, cumulative fuel consumption of this ignition, cumulative power consumption of this ignition, real-time longitude and latitude, and cumulative mileage. It should be noted that the specific model of the target vehicle in this embodiment is set based on the adaptability of the vehicle power source, such as gasoline vehicle, pure electric vehicle, hybrid vehicle, etc. Therefore, the specific content of the vehicle trajectory point data corresponding to different models can be adaptively added or deleted according to actual needs, which is only for exemplary explanation.
[0143] Specifically, the above step S203 includes:
[0144] Step S2031, grouping the vehicle track point data according to the frame number, and obtaining the first track point of the target vehicle corresponding to each frame number.
[0145] Step S2032, respectively detecting whether the power signal of the first track point of each target vehicle is empty.
[0146] In this embodiment, a signal being empty indicates that the sensor signal of the vehicle may be lost under different operating conditions, that is, there is an incomplete power signal in the data reported at a certain time point.
[0147] Step S2033: If the power signal of the first trajectory point of at least one target vehicle is empty, power signal compensation is performed on the first trajectory point of each target vehicle to obtain the corresponding second trajectory point of each target vehicle, and abnormal point detection is performed on each second trajectory point to obtain a corresponding valid trajectory point set.
[0148] In this embodiment, the power signal compensation is to compensate the power signal for the corresponding trajectory point where the signal is missing, so that the power signal obtains a reasonable value or state.
[0149] Specifically, in the above step S2033, the power signal compensation is performed on the first trajectory point of each target vehicle respectively, and the corresponding second trajectory point of each target vehicle is obtained, including:
[0150] Step A1, determining whether the vehicle state of the first trajectory point of each target vehicle is empty.
[0151] In this embodiment, the vehicle status signal is reported by the actual vehicle in response to the data collection command issued by the cloud / vehicle system. If the "vehicle status" attribute does not exist in the reported data, it is defaulted to empty.
[0152] Step A2: if the vehicle status is not empty, determine the power signal status based on the vehicle status, where the power signal status includes an on state and an off state.
[0153] In this embodiment, the power signal on state indicates that the vehicle is moving, which can be adaptively determined based on the actual vehicle state, such as when the vehicle is accelerating; the power signal off state indicates that the vehicle is parked, which can be adaptively determined by detecting whether the vehicle is started.
[0154] Step A3: if the vehicle status is empty, the power signal status is determined based on the real-time vehicle speed corresponding to the first trajectory point of each target vehicle, the cumulative fuel consumption of this ignition, and the cumulative power consumption of this ignition.
[0155] Specifically, in the above step A3, the power signal state is determined based on the real-time vehicle speed corresponding to the first trajectory point of each target vehicle, the cumulative fuel consumption of this ignition, and the cumulative power consumption of this ignition, including:
[0156] Step A31, respectively judging whether the real-time vehicle speed corresponding to the first trajectory point of each target vehicle is greater than a preset vehicle speed threshold, whether the cumulative fuel consumption of this ignition is equal to zero, and whether the cumulative power consumption of this ignition is equal to zero.
[0157] In this embodiment, the specific value of the preset vehicle speed threshold is not limited here and can be adaptively adjusted according to actual needs.
[0158] Step A32: if the real-time vehicle speed is greater than the preset vehicle speed threshold, or the cumulative fuel consumption of this ignition is not equal to zero, or the cumulative power consumption of this ignition is not equal to zero, then determine that the power signal state is the on state.
[0159] In this embodiment, the vehicle speed being greater than the preset vehicle speed threshold indicates that the vehicle is driving, and the current ignition cumulative fuel consumption and the current ignition cumulative power consumption being not equal to zero (ie, greater than zero) both indicate that the vehicle is driving.
[0160] Step A33: if the real-time vehicle speed is not greater than the preset vehicle speed threshold, and the cumulative fuel consumption of this ignition is equal to zero or the cumulative power consumption of this ignition is equal to zero, then determine that the power signal state is the off state.
[0161] In this embodiment, when the preset vehicle speed threshold is zero, if the real-time vehicle speed is not greater than the preset vehicle speed threshold, it indicates that the vehicle is currently stationary.
[0162] In the embodiment of the present invention, taking into account the situation that the vehicle status signal is missing in the vehicle condition data reported by the actual vehicle, the corresponding design is based on the real-time vehicle speed corresponding to the real-time trajectory point of the vehicle, the cumulative fuel consumption of this ignition, and the cumulative power consumption of this ignition to compensate for the power signal of the corresponding trajectory point, which can improve the compensation efficiency of the power signal and further ensure the accuracy and efficiency of vehicle trajectory generation.
[0163] Step A4: updating the power signal corresponding to the first trajectory point of each target vehicle based on the state of each power signal, and correspondingly obtaining the second trajectory point of each target vehicle.
[0164] In the embodiment of the present invention, taking into account the situation where there is a signal missing in the vehicle condition data reported by the actual vehicle, the power signal compensation processing flow of the corresponding designed trajectory point can make the trajectory generated by the corresponding vehicle more accurate, thereby improving the generation efficiency of the vehicle trajectory.
[0165] Step S2034: if the power signals of the first trajectory points of all target vehicles are not empty, abnormal point detection is performed on the first trajectory points of each target vehicle respectively, and a corresponding valid trajectory point set is obtained.
[0166] It should be noted that, in this embodiment, the contents of performing outlier detection on each track point in step S2033 and step S2034 are the same, and are described here uniformly. Specifically, performing outlier detection on the first track point or the second track point, and obtaining a corresponding valid track point set, includes:
[0167] Step B1, detecting whether there is a trajectory point cache set corresponding to the first trajectory point or the second trajectory point of the target vehicle in the preset cache area.
[0168] In this embodiment, the preset cache area is used to temporarily store the operation data in the process of trajectory generation, and its specific content is not limited here. For example, the preset cache area includes the vehicle's trajectory point cache and trajectory cache, which is only used as an exemplary description.
[0169] Step B2: if there is a track point cache set, then the first track point or the second track point is added to the track point cache set accordingly.
[0170] Step B3: if there is no track point cache set, a track point cache set is constructed based on the first track point or the second track point.
[0171] Step B4: when the number of trajectory points in the trajectory point cache set is greater than a first preset number threshold, obtain preset abnormal points in the trajectory point cache set, and process the preset abnormal points to obtain a valid trajectory point set.
[0172] It should be noted that the specific value of the first preset number threshold in this embodiment can be adaptively determined according to actual needs and is not limited here; the preset anomaly points in this embodiment at least include collection time anomaly points, real-time latitude and longitude anomaly points, and cumulative mileage anomaly points.
[0173] In this embodiment, if the preset abnormal point is a collection time abnormal point, the preset abnormal point in the trajectory point cache set is obtained in the above step B4, and the preset abnormal point is processed to obtain a valid trajectory point set, including:
[0174] Step B41, sorting each track point in the track point cache set in ascending order based on its corresponding collection time to obtain an ascending track point set.
[0175] Step B42, respectively calculating the acquisition time difference between each trajectory point in the ascending set of trajectory points and its adjacent trajectory points.
[0176] Step B43, determining whether each acquisition time difference is greater than a preset difference threshold.
[0177] In this embodiment, the preset difference threshold is the maximum value of the adjacent differences of the trajectory point acquisition time set in advance, and its specific value is adaptively adjusted according to actual needs.
[0178] Step B44: if the acquisition time difference of the current trajectory point is greater than the preset difference threshold, the current trajectory point is determined to be an abnormal trajectory point, all abnormal trajectory points are obtained and an abnormal point set is constructed based on them.
[0179] Step B45, performing a union solution on the abnormal point set and the preset set to obtain a corresponding target trajectory point set.
[0180] In this embodiment, the specific content of the preset set is adaptively determined according to actual needs. For example, considering the simplified calculation of the valid trajectory point set, ensuring the rationality and rigor of the outlier point set, and performing a union operation on the outlier point set and the zero set can ensure that when processing the abnormal data in the outlier point set, the overall result will not be affected by the presence of zero.
[0181] Step B46, calculating the adjacent distance between each trajectory point in the target trajectory point set and its adjacent trajectory point, and correspondingly selecting the reference adjacent distance with the largest adjacent distance.
[0182] It should be noted that the target trajectory point set in this embodiment is an outlier point index set.
[0183] Step B47, determining a valid trajectory point set based on the trajectory point ascending set, the abnormal point set and the reference adjacent distance.
[0184] In a specific embodiment, obtaining a valid trajectory point set of a vehicle involved in trajectory calculation specifically includes:
[0185] 1. Get the corresponding vehicle trajectory point cache set G from the trajectory point cache area. If it does not exist, create a trajectory point cache set G for the corresponding vehicle.
[0186] 2. Add the real-time vehicle trajectory points to the corresponding vehicle trajectory point cache set G.
[0187] 3. Determine whether the number of cached trajectory points of the corresponding vehicle is greater than the preset minimum number of trajectory points. If it is less, do not continue to perform trajectory calculation. It should be noted that in this process, the number of current trajectory points is too small to support the current trajectory calculation of the corresponding vehicle, so the current trajectory calculation process is directly exited.
[0188] 4. Filter the abnormal points in the trajectory point collection time in the corresponding vehicle trajectory point cache set G to obtain the valid trajectory point set G of the corresponding vehicle participating in the trajectory calculation valid The specific calculation process is as follows.
[0189] 5. Sort the trajectory points in the corresponding vehicle trajectory point cache set G in ascending order according to the trajectory collection time to obtain the corresponding vehicle trajectory point ascending set G sort , and calculate G according to formula (1) sort The time difference D between adjacent trajectory points T , the specific formula is:
[0190]
[0191] 6. Get the maximum value t of the adjacent difference of the preset trajectory point acquisition time max , and obtain D according to formula (2) and formula (3) T The outlier index set L in is:
[0192]
[0193] L={0}∪L ′ (3)
[0194] 7. Calculate the maximum adjacent distance l according to formula (4) max , thereby determining the starting position s and the end position e of the maximum adjacent distance. The specific formula is:
[0195] l max =max({l i+1 -l i |l i ∈L,i=0,1,…n-1})(4)
[0196] It should be noted that since the vehicle computer's reporting signal may be delayed in uploading (for example, the vehicle computer will cache the signal locally when the network signal is poor), the real-time data will be reported at the same time when the delayed data is uploaded. This will cause the data received by the cloud to have discontinuous trajectory points. A continuous set of trajectory points can be obtained based on the maximum adjacent distance.
[0197] 8. Obtain s through formula (5), the specific formula is:
[0198] s=l i (5)
[0199] 9. Use formula (6) to get e. The specific formula is:
[0200] e=l i+1 (6)
[0201] 10. Calculate G according to formula (7) valid , the specific formula is:
[0202]
[0203] It should be noted that the formula (7) determines G according to the situation valid Specifically, when L ′ When G is an empty set, valid Equal to G sort ; When the starting point and the end point differ by one point (ie es = 1), G valid is an empty set; the others are from G sort Take out the subset from the starting point to the end point.
[0204] In the embodiment of the present invention, after arranging each trajectory point in the trajectory point cache set in ascending order, an abnormal point set is correspondingly constructed based on the size relationship between the acquisition time difference and the maximum acquisition time difference of each trajectory point and its adjacent trajectory point, and the abnormal point set is solved for the union in consideration of special working conditions. The valid trajectory point set is determined based on the maximum adjacent distance between each trajectory point and its adjacent trajectory point in the union, the ascending set of trajectory points, and the abnormal point set, so as to avoid the influence of abnormal points in the acquisition time on the generation of vehicle trajectories, improve the generation efficiency of vehicle trajectories, and meet the generation requirements of vehicle trajectories.
[0205] In this embodiment, if the preset abnormal point is a real-time latitude and longitude abnormal point or a cumulative mileage abnormal point, the preset abnormal point in the track point cache set is obtained in the above step B4, and the preset abnormal point is processed to obtain a valid track point set, including:
[0206] Step B410, performing anomaly detection on the trajectory point cache set based on a preset detection algorithm, and obtaining corresponding real-time longitude and latitude anomaly points or cumulative mileage anomaly points. The preset detection algorithm includes a mileage anomaly detection algorithm and a longitude and latitude anomaly detection algorithm.
[0207] In this embodiment, the real-time latitude and longitude abnormal points represent abnormal track points where the real-time latitude and longitude are empty or deviated; the cumulative mileage abnormal points represent abnormal track points where the cumulative mileage is empty or deviated, and the corresponding deviation detection methods can be adaptively adjusted according to actual needs. For example, when the track point signal is lost, the point is considered a deviated point; when the track point has data, it can be identified by known methods such as an outlier detection algorithm, which is only for illustrative purposes.
[0208] Step B420, obtaining two normal track points adjacent to the real-time longitude and latitude abnormal point or the cumulative mileage abnormal point, and calculating the average longitude and latitude or the average mileage of the two normal track points.
[0209] Step B430, updating the corresponding abnormal points based on the average latitude and longitude or the average mileage, and obtaining a corresponding valid trajectory point set.
[0210] In the embodiment of the present invention, a preset detection algorithm is used to detect real-time latitude and longitude abnormal points or cumulative mileage abnormal points in the trajectory point cache set, and compensation processing is performed on the corresponding abnormal trajectory points. This can overcome trajectory calculation errors caused by abnormal collection of cumulative mileage and longitude and latitude signals, and greatly improve the accuracy and efficiency of vehicle trajectory generation.
[0211] Step B5: when the number of trajectory points in the trajectory point cache set is not greater than the first preset number threshold, the process returns to the step of obtaining the real-time vehicle condition data of each target vehicle.
[0212] In the embodiment of the present invention, trajectory point anomaly detection is performed through the real-time trajectory points of the vehicle and the trajectory point cache set corresponding to the vehicle in the preset cache area to obtain a valid trajectory point set, which can ensure the quality of each trajectory point participating in the subsequent trajectory calculation and help improve the accuracy of the trajectory calculation.
[0213] Step S2035, generating an initial trajectory of each target vehicle based on all valid trajectory point sets.
[0214] Specifically, the above step S2035 includes:
[0215] Step C1, respectively extracting a minimum trajectory point and a maximum trajectory point from the valid trajectory point set of the current target vehicle, wherein the minimum trajectory point and the maximum trajectory point are respectively determined based on the power signal state of each trajectory point in the valid trajectory point set.
[0216] Specifically, the process of determining the minimum trajectory point and the maximum trajectory point in the above step C1 package includes:
[0217] Step C11, traversing each trajectory point and its power signal status in the valid trajectory point set of the current target vehicle in sequence.
[0218] Step C12, when the power signal state of the first trajectory point is on, determine the first trajectory point as the minimum trajectory point; traverse the next trajectory point in turn, if the power signal state of the current trajectory point is off, determine the current trajectory point as the maximum trajectory point; if the power signal state of all trajectory points is on, determine the last trajectory point as the maximum trajectory point.
[0219] Step C13, when the power signal state of the first track point is the off state, determining the first track point as the minimum track point and the maximum track point.
[0220] In the embodiment of the present invention, the minimum trajectory point and the maximum trajectory point are correspondingly determined according to each trajectory point in the valid trajectory point set and its power signal state, which can ensure the determination accuracy of the minimum trajectory point and the maximum trajectory point, thereby making the subsequent trajectory calculation of the corresponding vehicle more accurate.
[0221] Step C2, determining the current trajectory information according to the minimum trajectory point and the maximum trajectory point of the current target vehicle.
[0222] Specifically, the above step C2 includes:
[0223] Step C21, detecting whether there is historical cached trajectory information of the current target vehicle in the preset cache area.
[0224] In this embodiment, the relevant contents of the preset buffer area refer to the above text and will not be repeated here.
[0225] Step C22: if the preset cache area does not contain the historical cache trajectory information of the current target vehicle, it is determined whether the minimum trajectory point and the maximum trajectory point of the current target vehicle are the same.
[0226] It should be noted that if the preset cache area contains historical cached trajectory information of the current target vehicle, the vehicle trajectory generation method of this embodiment further includes:
[0227] Step D1, if the preset cache area contains historical cache trajectory information of the current target vehicle, determine the trajectory start point and its corresponding start time, the trajectory end point or the last point of the trajectory and its corresponding end time, the first acquisition time of the minimum trajectory point, and the second acquisition time of the maximum trajectory point of the historical cache trajectory information.
[0228] Step D2, determining whether the power signal state corresponding to the maximum trajectory point is in the on state.
[0229] Step D3, when the power signal state corresponding to the maximum trajectory point is the on state, respectively calculate the first time interval between the first acquisition time and the start time, and the second time interval between the second acquisition time and the end time corresponding to the trajectory end point or the last point of the trajectory.
[0230] Step D4, respectively determine the relationship between the first acquisition time and the start time, the first time interval and the preset interval threshold, the second acquisition time and the end time corresponding to the trajectory end point or the last point of the trajectory, and the corresponding second time interval and the preset interval threshold.
[0231] In this embodiment, the specific value of the preset interval threshold is adaptively set based on actual needs.
[0232] Step D5, when the first acquisition time is less than the start time and the first time interval is less than the preset interval threshold, the minimum trajectory point is marked as the trajectory start point of the current trajectory and the first acquisition time is marked as the start time corresponding to the trajectory start point, and the current trajectory information is updated based on the trajectory start point of the current trajectory and its start time.
[0233] Step D6, when the second acquisition time is greater than the end time of the last point of the trajectory and the corresponding second time interval is greater than the preset interval threshold, the maximum trajectory point is marked as the trajectory end point of the current trajectory and the second acquisition time is marked as the end time corresponding to the trajectory end point, the current trajectory information is updated based on the trajectory end point and the end time of the current trajectory, and the updated current trajectory information is stored in the preset storage area and the historical cache trajectory information is removed.
[0234] In this embodiment, the preset storage area is used to store the initial trajectories and final trajectories generated by different vehicles, and its specific content is adaptively determined according to actual needs. For example, the preset storage area includes the initial trajectory storage area and the final trajectory storage area, which is only for exemplary description.
[0235] It should be noted that when the condition in step D6 is not met, the last point information of the trajectory information currently being generated by the vehicle (ie, the historical cache trajectory information) is updated, and the corresponding preset cache area is updated.
[0236] Step D7, when the power signal state corresponding to the maximum trajectory point is the off state, the maximum trajectory point is marked as the trajectory end point and cached in a preset cache area; if there is current trajectory information of the current target vehicle, the current trajectory information is updated based on the maximum trajectory point, and the updated current trajectory information is stored in the preset storage area and the historical cached trajectory information of the current target vehicle is removed.
[0237] In the embodiment of the present invention, a current trajectory information determination process is designed correspondingly for the historical cached trajectory information of the current target vehicle, and a corresponding calculation process of the trajectory information currently being generated is determined according to the trajectory start point of the historical cached trajectory information and its corresponding start time, the trajectory end point or the last point of the trajectory and its corresponding end time, the first acquisition time of the minimum trajectory point and the second acquisition time of the maximum trajectory point, and the historical cached trajectory information is updated according to the trajectory information currently being generated, so as to ensure the calculation accuracy of the current trajectory information, thereby improving the generation efficiency of subsequent vehicle trajectories and meeting the generation requirements of vehicle trajectories.
[0238] Step C23, when the minimum trajectory point and the maximum trajectory point are the same, executing the step of updating the trajectory point data cached by the current target vehicle in the preset cache area based on each trajectory point in the valid trajectory point set.
[0239] In this embodiment, the minimum trajectory point and the maximum trajectory point are the same, indicating that they belong to the same trajectory point and do not meet the trajectory calculation condition; therefore, the current trajectory information calculation process is stopped and used to update the corresponding trajectory point in the preset buffer area.
[0240] Step C24, when the minimum trajectory point and the maximum trajectory point are different, the current trajectory information of the current target vehicle is determined based on the minimum trajectory point and the maximum trajectory point, wherein the current trajectory information includes the current trajectory and its point information, and the point information includes the trajectory start point and its corresponding start time, the trajectory end point and its corresponding end time, or the trajectory last point and its corresponding end time; when the power signal state corresponding to the maximum trajectory point is the on state, the current trajectory information is cached to a preset cache area; when the power signal state corresponding to the maximum trajectory point is the off state, the maximum trajectory point is marked as the trajectory end point, and the current trajectory information is stored in a preset storage area.
[0241] It should be noted that in this embodiment, when there is no historical cached trajectory information of the current target vehicle, it indicates that the current vehicle has no trajectory being generated, that is, this trigger is a new trajectory calculation process. Specifically, when there is no historical cached trajectory information of the current target vehicle, the corresponding calculation process of the current trajectory information can greatly ensure the accuracy of the current trajectory and its point information in the current trajectory information.
[0242] Step C3, determining the initial trajectory of the current target vehicle based on the current trajectory information, and storing the initial trajectory in a preset storage area; or, updating the trajectory point data cached by the current target vehicle in the preset cache area based on each trajectory point in the valid trajectory point set, and when the current cache quantity after the update of the corresponding trajectory point data of the current target vehicle in the preset cache area is greater than a second preset quantity threshold, removing the trajectory point cached first by the current target vehicle, wherein the second preset quantity threshold is greater than the first preset quantity threshold.
[0243] In this embodiment, the second preset number threshold is the maximum number of cached trajectory points that can be set, and its specific value is adaptively adjusted according to actual needs. Specifically, the initial trajectory of the corresponding vehicle is generated by extracting the minimum trajectory point and the maximum trajectory point from the vehicle's valid trajectory point set and stored in the preset storage area; at the same time, it is designed to update the cached trajectory data points according to the valid trajectory points corresponding to the trajectory being generated by the current vehicle, and considering the memory situation of the cached trajectory points, the first-in-first-out removal of the trajectory points is performed when the cache number exceeds the set maximum threshold, so as to filter out the trajectory points with an earlier collection time, which greatly ensures the timeliness and accuracy of the trajectory points.
[0244] In the embodiment of the present invention, after the vehicle condition data obtained in batches are grouped by the frame number, corresponding power signal compensation or abnormal trajectory point processing is performed for the power signal state of the trajectory point of each vehicle, and a set of valid trajectory points of the corresponding vehicle is obtained and an initial trajectory of the corresponding vehicle is generated based on the set, which can avoid trajectory calculation errors caused by disordered or repeated reporting of vehicle condition data and abnormal vehicle condition data, greatly ensure the calculation accuracy of the vehicle's initial trajectory, and meet the generation requirements of the vehicle trajectory.
[0245] It should be noted that, before generating the initial trajectory of each target vehicle based on all valid trajectory point sets, the vehicle trajectory generation method of this embodiment further includes:
[0246] Step E1, respectively judging whether the maximum trajectory point is marked as the trajectory end point, and whether the collection time of the minimum trajectory point is greater than the start time of the trajectory start point in the historical cache trajectory information.
[0247] Step E2, when the maximum trajectory point is marked as the trajectory end point, and the collection time of the minimum trajectory point is greater than the start time of the trajectory start point in the historical cache trajectory information, a step of updating the trajectory point data cached by the current target vehicle in the preset cache area based on each trajectory point in the valid trajectory point set is executed.
[0248] In the embodiment of the present invention, the rationality requirements of the actual vehicle condition scenario are taken into consideration. Before the current trajectory information is determined according to the correspondence between the minimum trajectory point and the maximum trajectory point of the current target vehicle, once it is detected that the maximum trajectory point is marked as the trajectory end point and the acquisition time of the minimum trajectory point is greater than the start time of the trajectory start point in the historical cache trajectory information, the current trajectory calculation process is terminated, which can ensure the calculation accuracy of the current trajectory, further simplify the trajectory calculation process, and improve the trajectory generation efficiency.
[0249] Step S204, merging the initial trajectories of the target vehicles to obtain the final trajectory of each target vehicle.
[0250] Specifically, the above step S204 includes:
[0251] Step S2041, obtaining all initial trajectories of the current target vehicle and their corresponding start time and end time.
[0252] Step S2042: based on the start time and end time of each initial trajectory, identify overlapping trajectories with time overlap, and merge all overlapping trajectories to obtain a merged trajectory.
[0253] Step S2043, determining the final trajectory of the current target vehicle based on all merged trajectories and the remaining initial trajectories.
[0254] In this embodiment, the display method of the final trajectory can be adaptively determined according to actual needs. For example, all merged trajectories and the remaining initial trajectories are spliced in time to obtain a final trajectory of the current target vehicle; or, according to the difference in trajectory generation time (such as morning and night), multiple final trajectories corresponding to different time intervals are obtained.
[0255] In the embodiment of the present invention, by detecting and filtering the overlap of all initial trajectories of the current target vehicle, the uniqueness of the corresponding vehicle trajectory in time sequence can be ensured, thereby improving the accuracy and efficiency of vehicle trajectory calculation.
[0256] In a specific embodiment, a real-time streaming computing method is adopted to trigger vehicle trajectory calculation through the real-time vehicle condition data reported by the vehicle, that is, for each car, the cloud triggers the vehicle trajectory calculation once each time it receives a real-time vehicle condition data reported by the car. Figure 3 It is a flow chart of vehicle trajectory generation and processing. Figure 3 It can be seen that the process includes the following steps:
[0257] Step 301: Collect real-time vehicle condition data of all vehicles.
[0258] In this embodiment, by sending a data collection instruction to the vehicle system, the vehicle (i.e., the target vehicle) actively reports the real-time vehicle condition data. Specifically, in the Internet of Vehicles system (which includes the vehicle system and its corresponding target vehicle), for any vehicle, once receiving the data collection instruction sent by the vehicle system, it will collect the current vehicle condition data including signal type, power signal, vehicle speed, longitude and latitude, and then upload the data.
[0259] Step 302: Convert the real-time vehicle condition data into vehicle trajectory points according to different protocols, and filter out invalid vehicle trajectory points.
[0260] In this embodiment, the specific process of vehicle trajectory point conversion processing is as follows: Figure 4 As shown, the process includes the following steps:
[0261] Step 401: Acquire real-time vehicle condition data;
[0262] Step 402: Determine the protocol type.
[0263] In this embodiment, different methods are used to obtain the real-time trajectory points of the vehicle according to the protocol type of the real-time vehicle condition data reporting. Specifically, the following methods are used:
[0264] Step 4021: If it is a TLV protocol, obtain the signal type from the real-time vehicle condition data and filter out the vehicle condition signal containing the track point information according to the signal type, and further use the TLV data template to extract the track point information.
[0265] In this embodiment, the extracted trajectory point information is the real-time trajectory point of the vehicle.
[0266] Step 4022: If it is the MQTT protocol, obtain the service code from the real-time vehicle condition data and filter out the vehicle condition signal containing the track point information according to the service code, and further use the MQTT data template to extract the track point information.
[0267] In this embodiment, the business code refers to the business function module corresponding to the vehicle computer; the information of the vehicle real-time trajectory point in the above steps 4021 and 4022 includes but is not limited to the frame number, vehicle ID, device ID (referring to the device ID corresponding to the vehicle computer TBOX or THU), vehicle series code (representing the series to which each vehicle belongs), collection time, real-time longitude and latitude, power signal, vehicle status, real-time vehicle speed, cumulative mileage, cumulative fuel consumption of this ignition, and cumulative power consumption of this ignition. It should be noted that the above signals are all data collected by the vehicle computer from various sensors (for specific collection methods, please refer to the conventional data acquisition methods in this field), and actively reported to the cloud at a set fixed interval.
[0268] Step 403: Filter out the real-time trajectory points of vehicles whose collection time and frame number are empty.
[0269] In this embodiment, the real-time vehicle trajectory points obtained in the above steps are further filtered out, and the real-time vehicle trajectory points with empty collection time and frame number are removed.
[0270] Step 303: Process the real-time trajectory points of the vehicle according to the vehicle frame number group, and generate the initial trajectory of the vehicle according to the real-time trajectory points of the vehicle. Specifically, step 303 includes the following steps:
[0271] In this embodiment, since all vehicles report data to the same data interface of the cloud, the cloud needs to separate the data according to the vehicle frame number after receiving the data, so as to calculate the corresponding trajectory of each vehicle.
[0272] It should be noted that if the vehicle real-time trajectory point is encountered where the power signal is empty, the following Figure 5 The vehicle trajectory point conversion process shown in the figure compensates and calculates the power information of the vehicle's real-time trajectory point, and the process includes the following steps:
[0273] Step 501: Acquire the real-time trajectory points of the vehicle where the power signal is empty.
[0274] In this embodiment, the real-time trajectory points of the vehicle at which the vehicle computer does not report a power signal (such as a power signal loss) are obtained.
[0275] Step 502: Determine whether the vehicle status is empty.
[0276] In this embodiment, it is determined whether the vehicle status of the real-time vehicle track point is empty, and further processing is performed according to different statuses. Specifically, it includes:
[0277] Step 5021: If the vehicle state is not empty, the power signal is calculated based on the vehicle state compensation of the vehicle real-time trajectory point. Specifically, if the vehicle state is driving, the power signal is assigned to the on state; if the vehicle state is parking, the power signal is assigned to the off state.
[0278] Step 5022: If the vehicle status is empty, the power signal is calculated based on the real-time speed of the vehicle's real-time trajectory point, the cumulative fuel consumption of this ignition, and the cumulative power consumption of this ignition. Specifically, if the real-time speed is greater than the preset minimum speed or the cumulative fuel consumption of this ignition or the cumulative power consumption of this ignition is greater than zero, the power signal is in the on state; if the real-time speed is less than the preset minimum speed, and the cumulative fuel consumption of this ignition or the cumulative power consumption of this ignition is zero, the power signal is assigned to the off state.
[0279] In this embodiment, the compensated power signal can be indirectly converted from the signal data mentioned in the above steps; after compensating the power signal for the real-time trajectory point of the vehicle, the start and end positions of the trajectory will be more accurate.
[0280] In this embodiment, if the power signal is still empty after the compensation calculation, the real-time vehicle trajectory point is ignored. It should be noted that the power signal is still empty after the compensation calculation, which may occur in the vehicle computer under extreme circumstances, such as vehicle failure or vehicle accident causing damage to related sensors, and then the signals relied on for calculating the trajectory are all lost.
[0281] In this embodiment, a valid trajectory point set of the corresponding vehicle participating in trajectory calculation is obtained, and the specific processing flow of the valid points of the vehicle trajectory is as follows: Figure 6 As shown, the process includes the following steps:
[0282] Step 601: Obtain a trajectory point cache set corresponding to the vehicle from the trajectory point cache area. If it does not exist, create a trajectory point cache set for the corresponding vehicle.
[0283] Step 602: Add the valid vehicle trajectory point to the corresponding vehicle trajectory point cache set.
[0284] Step 603: Determine whether the number of corresponding vehicle trajectory points cached is greater than the preset minimum number of trajectory points. If less, do not continue to perform trajectory calculation.
[0285] Step 604: Filter the abnormal points in the trajectory point collection time in the corresponding vehicle trajectory point cache set to obtain the corresponding vehicle participating trajectory calculation set.
[0286] In this embodiment, if the number of trajectory points in the valid trajectory point set of the vehicle participating in the trajectory calculation is less than the preset minimum number of trajectory points, the trajectory calculation will not be continued this time (the number of characterization points is insufficient, which affects the trajectory calculation result, so the calculation is terminated and waits for new points to be calculated again), otherwise continue to step 605.
[0287] Step 605: Obtain abnormal trajectory points whose real-time longitude and latitude are empty or deviated in the corresponding vehicle participating trajectory calculation set, and use the middle value of the real-time longitude and latitude of two adjacent normal points to compensate for the abnormal points.
[0288] In this embodiment, abnormal trajectory points whose real-time longitude and latitude are empty or deviated in the corresponding vehicle participating trajectory calculation set are obtained, and the middle value (ie, the average value) of the real-time longitude and latitude of two adjacent normal points is used to compensate for the abnormal points.
[0289] Step 606: Obtain abnormal trajectory points with empty and deviated cumulative mileage in the corresponding vehicle participating trajectory calculation set, and use the average cumulative mileage of two adjacent normal points to compensate for the abnormal points.
[0290] In this embodiment, abnormal trajectory points with empty and deviated cumulative mileage in the corresponding vehicle participating trajectory calculation set are obtained, and the abnormal points are compensated by using the average value of the cumulative mileage of two adjacent normal points.
[0291] In this embodiment, the vehicle trajectory is calculated according to the valid trajectory point set involved in the trajectory calculation in the above steps. The specific processing flow of the vehicle trajectory calculation is as follows: Figure 7 As shown, the process includes the following steps:
[0292] Step 701: Obtain the minimum trajectory point and the maximum trajectory point from the valid trajectory point set of the corresponding vehicle.
[0293] In this embodiment, from the corresponding vehicle G valid (i.e., the set of valid trajectory points involved in trajectory calculation) to obtain the minimum trajectory point g min With the maximum trajectory point g max Specifically, traverse G valid , if the trajectory point The power signal is in the on state, when i=0, When i>0, And continue to traverse; if you encounter a trajectory point The power signal is in the off state. When i=0, When i>0, And end the traversal; where i refers to G valid The index number of each track point in the set. It should be noted that i = 0 will not exist multiple times, only one; when the power signal is turned on, If the power signal is off, If i>0, when G valid There is a point where the power signal is off, that is, this point is the maximum trajectory point; if it does not exist, the maximum trajectory point is G valid The last point in the set.
[0294] Step 702: Generate a corresponding vehicle trajectory according to the minimum trajectory point and the maximum trajectory point status information, and update the cache or save it to the database.
[0295] In this embodiment, according to g min With g max The status information generates the corresponding vehicle trajectory and updates the cache or saves it to the database. Specifically, it includes:
[0296] If the corresponding vehicle g max is a marked end point of the trajectory, and g min If the acquisition time is greater than the start time of the previous trajectory generation, the trajectory calculation will not be continued this time, and step 703 will be executed (this indicates that the trajectory information has been generated and the repeated trajectory information will not be generated here).
[0297] Furthermore, the trajectory information of the corresponding vehicle being generated is obtained from the cache, and further processing is performed according to whether there is trajectory information being generated. Specifically, it includes:
[0298] If it does not exist (i.e. the vehicle does not have any trajectory information being generated): when g min Equal to g max When g , the trajectory calculation is not continued this time, and step 703 is executed; when g min Not equal to g max When g min With g max Information is the trajectory information being created by the current vehicle, and if g max If the power signal state is on, the trajectory information currently being generated by the vehicle is added to the cache. max If the power signal is off, g max Mark it as the end point of the trajectory and save the trajectory information being generated into the database.
[0299] It should be noted that the power signal state corresponds to the driving state of the vehicle. When the power signal is off, it indicates that the vehicle is parked and the engine is off. When the power signal is on, it indicates that the vehicle is driving.
[0300] If it exists (i.e. the vehicle has trajectory information being generated), and according to g max The power signal is further processed. Specifically including:
[0301] If the power signal is on, if gmin When the acquisition time is less than the start time of the trajectory information currently being generated by the vehicle, and the time interval is less than the maximum time interval between the preset trajectory points, g min point as the starting point of the trajectory information currently being generated by the vehicle, and update the trajectory information currently being generated by the vehicle (updating the trajectory starting point will make the trajectory starting point more accurate). max If the acquisition time is greater than the last point time of the trajectory information currently being generated by the vehicle, and the time interval is greater than the maximum time interval between preset trajectory points, g max Mark it as the end point of the track, and store the track information being generated in the database, and remove the track information being generated by the current vehicle in the cache; otherwise, update the last point information of the track information being generated by the current vehicle and update the cache.
[0302] If the power signal is off, use g max Update the trajectory information being generated and set g max Mark it as the end point of the trajectory, store the trajectory information being generated in the database, and remove the trajectory information being generated by the corresponding vehicle in the cache.
[0303] Step 703: According to whether the number of corresponding vehicle trajectory point caches is greater than the preset maximum number of trajectory points, a trajectory point is removed according to the first-in-first-out principle, and the corresponding vehicle trajectory point cache set is updated.
[0304] In this embodiment, for cached trajectory points, when the cached number is greater than the preset maximum number of trajectory points, the corresponding trajectory points are removed according to the first-arrived-first-removed rule, so as to avoid abnormal trajectory generation caused by inaccurate vehicle computer collection time.
[0305] Step 304: Process all vehicle incremental initial trajectories offline and generate vehicle real trajectories through trajectory merging and filtering.
[0306] In this embodiment, the incremental initial trajectories of all vehicles (i.e., the initial trajectories generated in the aforementioned steps 301 to 303) are obtained, and the data of the intersection of the trajectory start time and the trajectory end time in the initial trajectory of each vehicle are grouped and merged according to the frame number, and the trajectory data with zero mileage is further removed to obtain the corresponding vehicle's real trajectory.
[0307] In this embodiment, for the trajectory merging strategy of the same vehicle, all initial trajectories with overlapping start and end times are merged into one, and the earliest trajectory start time is taken as the merged trajectory start time, and the latest trajectory end time is taken as the merged trajectory end time, so as to obtain a more accurate trajectory.
[0308] In a specific embodiment, the above vehicle trajectory generation scheme is functionally packaged / integrated, and a vehicle trajectory generation system is designed accordingly. Figure 8 This is the structural diagram of the vehicle trajectory generation system. Figure 8 It can be seen that the system includes: a real-time data acquisition module, a real-time data processing module, an offline data processing module and a trajectory data storage module. Among them, the real-time data acquisition module is mainly used to collect the vehicle condition data of all vehicles in real time. The real-time data processing module includes a trajectory buffer area, a trajectory point buffer area, and a trajectory generation unit. Among them, the trajectory buffer area is mainly used to cache the trajectory information being generated by the corresponding vehicle; the trajectory point buffer area is mainly used to cache the trajectory point information recently reported by the corresponding vehicle that is generating the trajectory; the trajectory generation unit is mainly used to consume the vehicle condition signal data collected by the real-time data acquisition module, and convert the vehicle condition signal into the real-time trajectory point information of the vehicle, and at the same time combine the corresponding vehicle trajectory buffer information and the trajectory point buffer information to generate the vehicle initial trajectory information, and store the initial trajectory information in the initial trajectory storage area in the trajectory data storage module. The offline data processing module is mainly used to incrementally process the initial vehicle trajectory information generated by the real-time data processing module, and obtain the corresponding vehicle's real trajectory by merging and filtering the trajectory of each vehicle, and store it in the final trajectory storage area in the trajectory data storage module. The trajectory data storage module mainly includes an initial trajectory storage area and a final trajectory storage area. The initial trajectory storage area is mainly used to store the initial trajectory of the vehicle; the final trajectory storage area is mainly used to store the actual trajectory of the vehicle.
[0309] In summary, in the embodiment of the present invention, the real-time vehicle condition data is collected and converted into vehicle trajectory points, and then the maximum and minimum trajectory points among the vehicle's nearest trajectory points are obtained by filtering, sorting, and denoising, and the initial trajectory of the corresponding vehicle is generated in combination with the trajectory information currently being generated. Finally, the real vehicle trajectory is generated by offline timed merging and filtering all vehicle incremental initial trajectories. This can solve the problems of disordered or repeated reporting of vehicle condition data, as well as trajectory calculation errors caused by abnormal collection time, accumulated mileage, and longitude and latitude signal collection, and can achieve more accurate batch trajectory calculation in the cloud.
[0310] In this embodiment, a vehicle trajectory generating device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" refers to a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0311] The present invention provides a vehicle trajectory generation device, which is applied to the cloud. Fig. 9 As shown, the device comprises:
[0312] The acquisition module 901 is used to acquire the real-time vehicle condition data of each target vehicle, where the target vehicle is a car interacting with the cloud.
[0313] The conversion module 902 is used to perform data conversion on the real-time vehicle condition data to obtain vehicle trajectory point data.
[0314] The generation module 903 is used to group the vehicle trajectory point data based on the frame number corresponding to each target vehicle to generate an initial trajectory of each target vehicle.
[0315] The merging module 904 is used to merge the initial trajectories of the target vehicles to obtain the final trajectory of each target vehicle.
[0316] In some optional embodiments, the conversion module 902 includes: a first conversion submodule, a second conversion submodule, a third conversion submodule and a fourth conversion submodule; wherein the first conversion submodule is used to identify the current protocol type for real-time vehicle condition data reporting, and the real-time vehicle condition data at least includes various vehicle states and their corresponding signals, power signals, vehicle speed information and position coordinates; the second conversion submodule is used to extract trajectory point data from the real-time vehicle condition data based on a preset TLV data template if the current protocol type is the TLV protocol, and the trajectory point data at least includes a frame number and a collection time; the third conversion submodule is used to extract trajectory point data from the real-time vehicle condition data based on a preset MQTT data template if the current protocol type is the MQTT protocol; the fourth conversion submodule is used to filter the trajectory point data whose frame number and collection time are empty to obtain vehicle trajectory point data.
[0317] In some optional embodiments, the generation module 903 includes: a first generation submodule, a second generation submodule, a third generation submodule, a fourth generation submodule and a fifth generation submodule; wherein the first generation submodule is used to group the vehicle trajectory point data according to the frame number, and obtain the first trajectory point of the target vehicle corresponding to each frame number; the second generation submodule is used to respectively detect whether the power signal of the first trajectory point of each target vehicle is empty; the third generation submodule is used to, if there is at least one target vehicle whose first trajectory point has a power signal that is empty, then respectively perform power signal compensation on the first trajectory point of each target vehicle, and obtain the second trajectory point of each target vehicle, and perform abnormal point detection on each second trajectory point, and obtain a valid trajectory point set; the fourth generation submodule is used to, if the power signals of the first trajectory points of all target vehicles are not empty, then perform abnormal point detection on the first trajectory point of each target vehicle, and obtain a valid trajectory point set; the fifth generation submodule is used to generate the initial trajectory of each target vehicle based on all valid trajectory point sets.
[0318] In some optional embodiments, the third generation submodule includes: a first generation unit, a second generation unit, a third generation unit and a fourth generation unit; wherein the first generation unit is used to determine whether the vehicle status of the first trajectory point of each target vehicle is empty; the second generation unit is used to determine the power signal status based on the vehicle status if the vehicle status is not empty, and the power signal status includes an on state and an off state; the third generation unit is used to determine the power signal status based on the real-time vehicle speed, the cumulative fuel consumption of this ignition and the cumulative power consumption of this ignition corresponding to the first trajectory point of each target vehicle if the vehicle status is empty; the fourth generation unit is used to update the corresponding power signal of the first trajectory point of each target vehicle based on each power signal status, and obtain the corresponding second trajectory point of each target vehicle.
[0319] In some optional embodiments, the third generation unit includes: a determination subunit, which is used to determine whether the real-time vehicle speed corresponding to the first trajectory point of each target vehicle is greater than a preset vehicle speed threshold, whether the cumulative fuel consumption of this ignition is equal to zero, and whether the cumulative power consumption of this ignition is equal to zero: if the real-time vehicle speed is greater than the preset vehicle speed threshold, or the cumulative fuel consumption of this ignition is not equal to zero, or the cumulative power consumption of this ignition is not equal to zero, then the power signal state is determined to be on; if the real-time vehicle speed is not greater than the preset vehicle speed threshold, and the cumulative fuel consumption of this ignition is equal to zero or the cumulative power consumption of this ignition is equal to zero, then the power signal state is determined to be off.
[0320] In some optional embodiments, the third generation submodule or the fourth generation submodule includes: a first detection unit, a second detection unit, a third detection unit, a fourth detection unit and a fifth detection unit; wherein the first detection unit is used to detect whether there is a trajectory point cache set corresponding to the first trajectory point or the second trajectory point of the target vehicle in the preset cache area; the second detection unit is used to add the first trajectory point or the second trajectory point to the trajectory point cache set if there is a trajectory point cache set; the third detection unit is used to construct a trajectory point cache set based on the first trajectory point or the second trajectory point if there is no trajectory point cache set; the fourth detection unit is used to obtain the preset abnormal points in the trajectory point cache set when the number of trajectory points in the trajectory point cache set is greater than the first preset number threshold, and process the preset abnormal points to obtain a valid trajectory point set; the fifth detection unit is used to return to the step of obtaining the real-time vehicle condition data of each target vehicle when the number of trajectory points in the trajectory point cache set is not greater than the first preset number threshold.
[0321] In some optional embodiments, the fourth detection unit includes: a first detection subunit and a second detection subunit; wherein the first detection subunit is used to sort each trajectory point in the trajectory point cache set in ascending order based on its corresponding acquisition time to obtain an ascending trajectory point set; respectively calculate the acquisition time difference between each trajectory point in the ascending trajectory point set and its adjacent trajectory point; respectively determine whether each acquisition time difference is greater than a preset difference threshold; if the acquisition time difference of the current trajectory point is greater than the preset difference threshold, determine that the current trajectory point is an abnormal trajectory point, obtain all abnormal trajectory points and construct an abnormal point set based on them; perform a union solution on the abnormal point set and the preset set to obtain a corresponding target trajectory point set; calculate each trajectory point in the target trajectory point set The adjacent distance between the track point and its adjacent track point, and the corresponding benchmark adjacent distance with the largest adjacent distance is selected; the valid track point set is determined based on the ascending set of track points, the abnormal point set and the benchmark adjacent distance; the second detection subunit is used to perform abnormality detection on the track point cache set based on the preset detection algorithm, and obtain the real-time longitude and latitude abnormal point or the cumulative mileage abnormal point, and the preset detection algorithm includes the mileage abnormality detection algorithm and the longitude and latitude abnormality detection algorithm; obtain two normal track points adjacent to the real-time longitude and latitude abnormal point or the cumulative mileage abnormal point, and calculate the longitude and latitude average value or the mileage average value of the two normal track points; update the corresponding abnormal point based on the longitude and latitude average value or the mileage average value, and obtain the valid track point set accordingly.
[0322] In some optional embodiments, the fifth generation submodule includes: a first calculation unit, a second calculation unit and a third calculation unit; wherein the first calculation unit is used to respectively extract the minimum trajectory point and the maximum trajectory point from the valid trajectory point set of the current target vehicle, and the minimum trajectory point and the maximum trajectory point are respectively determined based on the power signal state of each trajectory point in the valid trajectory point set; the second calculation unit is used to determine the current trajectory information according to the minimum trajectory point and the maximum trajectory point of the current target vehicle; the third calculation unit is used to determine the initial trajectory of the current target vehicle based on the current trajectory information, and store the initial trajectory in a preset storage area; or, based on each trajectory point in the valid trajectory point set, the trajectory point data cached in the preset cache area of the current target vehicle is updated, and when the current cache quantity of the corresponding trajectory point data of the current target vehicle in the preset cache area after the update is greater than the second preset quantity threshold, the first trajectory point cached by the current target vehicle is removed, wherein the second preset quantity threshold is greater than the first preset quantity threshold.
[0323] In some optional embodiments, the first calculation unit includes: a first calculation subunit, which is used to traverse each trajectory point and its power signal state in the valid trajectory point set of the current target vehicle in sequence; when the power signal state of the first trajectory point is on, determine the first trajectory point as the minimum trajectory point; traverse the next trajectory point in sequence, and if the power signal state of the current trajectory point is off, determine the current trajectory point as the maximum trajectory point; if the power signal state of all trajectory points is on, determine the last trajectory point as the maximum trajectory point; when the power signal state of the first trajectory point is off, determine the first trajectory point as the minimum trajectory point and the maximum trajectory point.
[0324] In some optional embodiments, the second calculation unit includes: a first detection subunit and a second detection subunit; wherein the first detection subunit is used to detect whether there is historical cached trajectory information of the current target vehicle in the preset cache area; if the historical cached trajectory information of the current target vehicle does not exist in the preset cache area, then determine whether the minimum trajectory point and the maximum trajectory point of the current target vehicle are the same; when the minimum trajectory point and the maximum trajectory point are the same, execute the step of updating the trajectory point data cached by the current target vehicle in the preset cache area based on each trajectory point in the valid trajectory point set; when the minimum trajectory point and the maximum trajectory point are not the same, determine the current trajectory information of the current target vehicle based on the minimum trajectory point and the maximum trajectory point, wherein the current trajectory information includes the current trajectory and its point information, the point information includes the trajectory start point and its corresponding start time, the trajectory end point and its corresponding end time, or the trajectory last point and its corresponding end time; when the power signal state corresponding to the maximum trajectory point is on, the current trajectory information is cached in a preset cache area; when the power signal state corresponding to the maximum trajectory point is off, the maximum trajectory point is marked as the trajectory end point, and the current trajectory information is stored in a preset storage area; the second detection subunit is used to determine the trajectory start point and its corresponding start time, the trajectory end point or the trajectory last point and its corresponding end time, the first acquisition time of the minimum trajectory point, and the historical cache trajectory information of the current target vehicle if the preset cache area exists. The first acquisition time and the second acquisition time of the maximum trajectory point; determine whether the power signal state corresponding to the maximum trajectory point is in the on state; when the power signal state corresponding to the maximum trajectory point is in the on state, respectively calculate the first time interval between the first acquisition time and the start time, and the second time interval between the second acquisition time and the end time corresponding to the trajectory end point or the last point of the trajectory; respectively determine the size relationship between the first acquisition time and the start time, the first time interval and the preset interval threshold, the second acquisition time and the end time corresponding to the trajectory end point or the last point of the trajectory, and the corresponding second time interval and the preset interval threshold; when the first acquisition time is less than the start time and the first time interval is less than the preset interval threshold, mark the minimum trajectory point as the trajectory start point of the current trajectory point and mark the first acquisition time as the start time corresponding to the trajectory start point, and update the current trajectory information based on the trajectory start point of the current trajectory and its start time; when the second acquisition time is greater than the end time of the last point of the trajectory and the corresponding second time interval is greater than the preset interval threshold, mark the maximum trajectory point as the trajectory end point of the current trajectory and mark the second acquisition time as the end time corresponding to the trajectory end point, update the current trajectory information based on the trajectory end point of the current trajectory and its end time, and store the updated current trajectory information in a preset storage area and remove the historical cache trajectory information; when the power signal state corresponding to the maximum trajectory point is the off state, mark the maximum trajectory point as the trajectory end point and cache it in the preset cache area;If there is current track information of the current target vehicle, the current track information is updated based on the maximum track point, and the updated current track information is stored in a preset storage area and the historical cache track information of the current target vehicle is removed. ;
[0325] In some optional embodiments, the fifth generation submodule also includes: a fourth calculation unit, used to respectively determine whether the maximum trajectory point is marked as the trajectory end point, and whether the collection time of the minimum trajectory point is greater than the start time of the trajectory start point in the historical cached trajectory information; when the maximum trajectory point is marked as the trajectory end point, and the collection time of the minimum trajectory point is greater than the start time of the trajectory start point in the historical cached trajectory information, a step of updating the trajectory point data cached by the current target vehicle in the preset cache area based on each trajectory point in the valid trajectory point set is executed.
[0326] In some optional embodiments, the merging module 904 includes: a first merging submodule, a second merging submodule and a third merging submodule; wherein the first merging submodule is used to obtain all initial trajectories of the current target vehicle and their corresponding start time and end time; the second merging submodule is used to identify overlapping trajectories with time overlap based on the start time and end time of each initial trajectory, and merge all overlapping trajectories to obtain a merged trajectory; the third merging submodule is used to determine the final trajectory of the current target vehicle based on all merged trajectories and the remaining initial trajectories.
[0327] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.
[0328] The vehicle trajectory generating device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0329] The vehicle trajectory generation device of the embodiment of the present invention not only realizes the effective processing of vehicle condition data, but also can effectively solve the problem of trajectory calculation errors caused by disordered or repeated reporting of vehicle condition data and data anomalies, and can also realize more accurate and effective batch trajectory calculation in the cloud, which greatly improves the accuracy and efficiency of vehicle trajectory generation and meets the generation requirements of vehicle trajectories.
[0330] A vehicle is also provided in an embodiment of the present invention, and the vehicle includes a controller. The controller in this embodiment is a vehicle controller, which is used to perform operations such as power supply / power off, sleep and wake up of the sub-controllers and network nodes under it, and each power supply interface thereof can collect the real-time current output. Other controllers with the above functions are applicable.
[0331] Fig.10 is a schematic diagram of the structure of the controller provided in an optional embodiment of the present invention, such as Fig.10 As shown, the controller includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the controller, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output system (such as a display device coupled to an interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple controllers can be connected, and each controller provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.10 A processor 10 is taken as an example.
[0332] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0333] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0334] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of the controller, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0335] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0336] The controller also includes a communication interface 30 for the main control chip to communicate with other devices or a communication network.
[0337] A computer-readable storage medium is also provided in an embodiment of the present invention. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor main control chip or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0338] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A vehicle trajectory generation method, applied in the cloud, characterized in that: The method comprises: Acquire real-time vehicle condition data of each target vehicle, where the target vehicle is a car interacting with the cloud; Performing data conversion on the real-time vehicle condition data to obtain vehicle trajectory point data; The vehicle trajectory point data are grouped based on the frame number corresponding to each of the target vehicles to generate an initial trajectory for each of the target vehicles; The initial trajectories of the target vehicles are merged to obtain a final trajectory of each target vehicle.
2. The vehicle trajectory generation method according to claim 1, characterized in that: The step of converting the real-time vehicle condition data to obtain vehicle trajectory point data includes: Identify the current protocol type for reporting the real-time vehicle condition data, wherein the real-time vehicle condition data includes at least various vehicle states and corresponding signals, power supply signals, vehicle speed information and position coordinates; If the current protocol type is a TLV protocol, then extracting trajectory point data from the real-time vehicle condition data based on a preset TLV data template, the trajectory point data at least including a vehicle frame number and a collection time; If the current protocol type is the MQTT protocol, then extracting trajectory point data from the real-time vehicle condition data based on a preset MQTT data template; Filter the track point data with empty frame number and collection time to obtain the vehicle track point data.
3. The vehicle trajectory generation method according to claim 2, characterized in that: The vehicle trajectory point data at least includes power signal, vehicle status, real-time vehicle speed, cumulative fuel consumption of this ignition, cumulative power consumption of this ignition, real-time longitude and latitude, and cumulative mileage; The grouping and processing of the vehicle trajectory point data based on the frame numbers corresponding to the target vehicles to generate the initial trajectory of each target vehicle includes: The vehicle track point data are grouped according to the frame number, and the first track point of the target vehicle corresponding to each frame number is obtained; respectively detecting whether the power signal of the first track point of each target vehicle is empty; If there is at least one target vehicle whose first trajectory point has a power signal that is empty, power signal compensation is performed on the first trajectory points of each target vehicle to obtain corresponding second trajectory points of each target vehicle, and abnormal point detection is performed on each second trajectory point to obtain corresponding valid trajectory point sets; If the power supply signals of the first trajectory points of all target vehicles are not empty, abnormal point detection is performed on the first trajectory points of each target vehicle respectively, and a corresponding valid trajectory point set is obtained; The initial trajectory of each target vehicle is correspondingly generated based on all valid trajectory point sets.
4. The vehicle trajectory generation method according to claim 3, characterized in that: The power signal compensation is performed on the first trajectory point of each target vehicle to obtain the corresponding second trajectory point of each target vehicle, including: Determining whether the vehicle state of the first trajectory point of each target vehicle is empty; If the vehicle state is not empty, determining a power signal state based on the vehicle state, the power signal state including an on state and an off state; If the vehicle status is empty, the power signal status is determined based on the real-time vehicle speed corresponding to the first trajectory point of each target vehicle, the cumulative fuel consumption of this ignition, and the cumulative power consumption of this ignition; Based on the state of each power signal, the power signal corresponding to the first trajectory point of each target vehicle is updated to obtain the corresponding second trajectory point of each target vehicle.
5. The vehicle trajectory generation method according to claim 4, characterized in that: The determining of the power signal state based on the real-time vehicle speed corresponding to the first trajectory point of each target vehicle, the cumulative fuel consumption of this ignition, and the cumulative power consumption of this ignition includes: It is respectively determined whether the real-time vehicle speed corresponding to the first trajectory point of each target vehicle is greater than a preset vehicle speed threshold, whether the cumulative fuel consumption of this ignition is equal to zero, and whether the cumulative power consumption of this ignition is equal to zero: If the real-time vehicle speed is greater than the preset vehicle speed threshold, or the cumulative fuel consumption of this ignition is not equal to zero, or the cumulative power consumption of this ignition is not equal to zero, then the power signal state is determined to be on; If the real-time vehicle speed is not greater than the preset vehicle speed threshold, and the current ignition cumulative fuel consumption is equal to zero or the current ignition cumulative power consumption is equal to zero, it is determined that the power signal state is an off state.
6. The vehicle trajectory generation method according to claim 3, characterized in that: Perform outlier detection on the first trajectory point or the second trajectory point, and obtain a corresponding valid trajectory point set, including: Detecting whether there is a trajectory point cache set corresponding to the target vehicle for the first trajectory point or the second trajectory point in the preset cache area; If there is a track point cache set, adding the first track point or the second track point to the track point cache set accordingly; If there is no trajectory point cache set, constructing a trajectory point cache set based on the first trajectory point or the second trajectory point; When the number of trajectory points in the trajectory point cache set is greater than a first preset number threshold, obtaining preset abnormal points in the trajectory point cache set, and processing the preset abnormal points to obtain a valid trajectory point set; When the number of trajectory points in the trajectory point cache set is not greater than the first preset number threshold, the process returns to the step of obtaining the real-time vehicle condition data of each target vehicle.
7. The vehicle trajectory generation method according to claim 6, characterized in that: If the preset abnormal point is a collection time abnormal point, the step of obtaining the preset abnormal point in the trajectory point cache set and processing the preset abnormal point to obtain a valid trajectory point set includes: Sorting each trajectory point in the trajectory point cache set in ascending order based on its corresponding collection time to obtain an ascending trajectory point set; Calculate the acquisition time difference between each trajectory point and its adjacent trajectory point in the ascending set of trajectory points respectively; Determine whether each acquisition time difference is greater than a preset difference threshold; If the acquisition time difference of the current trajectory point is greater than the preset difference threshold, the current trajectory point is determined to be an abnormal trajectory point, all abnormal trajectory points are acquired and an abnormal point set is constructed based on them; The abnormal point set is combined with the preset set to obtain a corresponding target trajectory point set; Calculate the adjacent distance between each trajectory point in the target trajectory point set and its adjacent trajectory point, and select the reference adjacent distance with the largest adjacent distance accordingly; A valid trajectory point set is determined based on the trajectory point ascending set, the abnormal point set and the reference adjacent distance.
8. The vehicle trajectory generation method according to claim 6, characterized in that: If the preset abnormal point is a real-time latitude and longitude abnormal point or a cumulative mileage abnormal point, the preset abnormal point in the trajectory point cache set is obtained, and the preset abnormal point is processed to obtain a valid trajectory point set, including: Performing anomaly detection on the track point cache set based on a preset detection algorithm, and obtaining corresponding real-time longitude and latitude anomaly points or cumulative mileage anomaly points, wherein the preset detection algorithm includes a mileage anomaly detection algorithm and a longitude and latitude anomaly detection algorithm; Obtain two normal track points adjacent to the real-time longitude and latitude abnormal point or the cumulative mileage abnormal point, and calculate the average longitude and latitude or the average mileage of the two normal track points; The corresponding abnormal points are updated based on the average values of longitude and latitude or the average values of mileage, and a corresponding valid trajectory point set is obtained.
9. The vehicle trajectory generation method according to claim 6, characterized in that: The generating of the initial trajectory of each target vehicle based on all valid trajectory point sets includes: Extracting a minimum trajectory point and a maximum trajectory point from a valid trajectory point set of the current target vehicle respectively, wherein the minimum trajectory point and the maximum trajectory point are determined based on a power signal state of each trajectory point in the valid trajectory point set; Determine current trajectory information according to the minimum trajectory point and the maximum trajectory point of the current target vehicle; Based on the current trajectory information, an initial trajectory of the current target vehicle is determined, and the initial trajectory is stored in a preset storage area; or, based on each trajectory point in the valid trajectory point set, the trajectory point data cached by the current target vehicle in the preset cache area is updated, and when the current cache quantity after the update of the corresponding trajectory point data of the current target vehicle in the preset cache area is greater than a second preset quantity threshold, the trajectory point cached first by the current target vehicle is removed, wherein the second preset quantity threshold is greater than the first preset quantity threshold.
10. The vehicle trajectory generation method according to claim 9, characterized in that: The process of determining the minimum trajectory point and the maximum trajectory point includes: Traverse each track point and its power signal status in the valid track point set of the current target vehicle in sequence; When the power signal state of the first track point is on, the first track point is determined to be the minimum track point; the next track point is traversed in sequence, and if the power signal state of the current track point is off, the current track point is determined to be the maximum track point; if the power signal states of all track points are on, the last track point is determined to be the maximum track point; When the power signal state of the first trajectory point is an off state, the first trajectory point is determined to be a minimum trajectory point and a maximum trajectory point.
11. The vehicle trajectory generation method according to claim 9, characterized in that: The correspondingly determining the current trajectory information according to the minimum trajectory point and the maximum trajectory point of the current target vehicle includes: Detecting whether there is historical cached trajectory information of the current target vehicle in a preset cache area; If the preset cache area does not contain the historical cache trajectory information of the current target vehicle, determining whether the minimum trajectory point and the maximum trajectory point of the current target vehicle are the same; When the minimum trajectory point and the maximum trajectory point are the same, performing the step of updating the trajectory point data cached by the current target vehicle in the preset cache area based on each trajectory point in the valid trajectory point set; When the minimum trajectory point and the maximum trajectory point are different, the current trajectory information of the current target vehicle is determined based on the minimum trajectory point and the maximum trajectory point, wherein the current trajectory information includes the current trajectory and its point information, and the point information includes the trajectory start point and its corresponding start time, the trajectory end point and its corresponding end time, or the trajectory last point and its corresponding end time; when the power signal state corresponding to the maximum trajectory point is the on state, the current trajectory information is cached to the preset cache area; when the power signal state corresponding to the maximum trajectory point is the off state, the maximum trajectory point is marked as the trajectory end point, and the current trajectory information is stored in the preset storage area.
12. The vehicle trajectory generation method according to claim 11, characterized in that: The method further comprises: If the preset cache area contains historical cached trajectory information of the current target vehicle, respectively determine the trajectory start point and its corresponding start time, the trajectory end point or the last point of the trajectory and its corresponding end time, the first acquisition time of the minimum trajectory point, and the second acquisition time of the maximum trajectory point of the historical cached trajectory information; Determine whether the power signal state corresponding to the maximum trajectory point is in the on state; When the power signal state corresponding to the maximum trajectory point is in the on state, respectively calculating a first time interval between the first acquisition time and the start time, and a second time interval between the second acquisition time and the end time corresponding to the trajectory end point or the last point of the trajectory; Respectively determine the relationship between the first acquisition time and the start time, the first time interval and the preset interval threshold, the second acquisition time and the end time corresponding to the trajectory end point or the last point of the trajectory, and the corresponding second time interval and the preset interval threshold; When the first acquisition time is less than the start time and the first time interval is less than the preset interval threshold, marking the minimum trajectory point as the trajectory start point of the current trajectory and marking the first acquisition time as the start time corresponding to the trajectory start point, and updating the current trajectory information based on the trajectory start point and the start time of the current trajectory; When the second acquisition time is greater than the end time of the last point of the trajectory and the corresponding second time interval is greater than the preset interval threshold, the maximum trajectory point is marked as the trajectory end point of the current trajectory and the second acquisition time is marked as the end time corresponding to the trajectory end point, the current trajectory information is updated based on the trajectory end point and the end time of the current trajectory, and the updated current trajectory information is stored in a preset storage area and the historical cache trajectory information is removed.
13. The vehicle trajectory generation method according to claim 12, characterized in that: The method further comprises: When the power signal state corresponding to the maximum trajectory point is in the off state, the maximum trajectory point is marked as the trajectory end point and cached in a preset cache area; if there is current trajectory information of the current target vehicle, the current trajectory information is updated based on the maximum trajectory point, and the updated current trajectory information is stored in the preset storage area and the historical cached trajectory information of the current target vehicle is removed.
14. The vehicle trajectory generation method according to claim 11, characterized in that: Before determining the current trajectory information according to the correspondence between the minimum trajectory point and the maximum trajectory point of the current target vehicle, the method further includes: Determine whether the maximum trajectory point is marked as the trajectory end point, and whether the collection time of the minimum trajectory point is greater than the start time of the trajectory start point in the historical cache trajectory information; When the maximum trajectory point is marked as the trajectory end point and the collection time of the minimum trajectory point is greater than the start time of the trajectory start point in the historical cache trajectory information, the step of updating the trajectory point data cached by the current target vehicle in the preset cache area based on each trajectory point in the valid trajectory point set is executed.
15. The vehicle trajectory generation method according to claim 3, characterized in that: The merging of the initial trajectories of the target vehicles to obtain the final trajectory of each target vehicle includes: Get all initial trajectories of the current target vehicle and their corresponding start and end times; Based on the start time and end time of each initial trajectory, overlapping trajectories with time overlap are identified, and all overlapping trajectories are merged to obtain a merged trajectory; A final trajectory of the current target vehicle is determined based on all merged trajectories and the remaining initial trajectories.
16. A vehicle trajectory generation device, applied to the cloud, characterized in that: The device comprises: An acquisition module is used to acquire real-time vehicle condition data of each target vehicle, where the target vehicle is a car interacting with the cloud; A conversion module, used for performing data conversion on the real-time vehicle condition data to obtain vehicle trajectory point data; A generating module, used for grouping the vehicle trajectory point data based on the frame number corresponding to each of the target vehicles, and generating an initial trajectory of each of the target vehicles; The merging module is used to merge the initial trajectories of the target vehicles to obtain the final trajectory of each target vehicle.
17. A vehicle, characterized in that: The vehicle includes a controller, and the controller includes: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the vehicle trajectory generation method according to any one of claims 1 to 15 by executing the computer instructions.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the vehicle trajectory generation method according to any one of claims 1 to 15.
Citation Information
Cited By
Offline automatic lightering tracking method and device
CN120742876A
Real-time tennis ball speed calculation method and system based on sliding window
CN121074080A