Vehicle detection method and device, computer device, readable storage medium and program product
By using a pre-set offline time model and a missing data filtering strategy, the problem of missing vehicle trajectory data was solved, thus improving the accuracy of vehicle fault detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, vehicle trajectory data cannot be completely recorded due to network issues, resulting in missing vehicle trajectory data and a low accuracy rate in vehicle fault detection.
By using a preset offline time model and missing data filtering strategy, the vehicle's trajectory integrity rate and missing message data are determined. By combining the trajectory integrity rate and missing message data, the vehicle fault detection result is determined.
This improves the accuracy of vehicle trajectory integrity and the accuracy of missing message data detection, thereby improving the accuracy of vehicle fault detection.
Smart Images

Figure CN121007718B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle inspection technology, and in particular to a vehicle inspection method, apparatus, computer equipment, readable storage medium, and program product. Background Technology
[0002] With the large-scale application of new energy vehicles, there are increasing demands on the real-time performance and completeness of vehicle operation data. Among these, the completeness rate of vehicle trajectory data is a core indicator, directly affecting the reliability of key scenarios such as safety supervision, accident tracing, and mileage verification.
[0003] However, during vehicle operation, network issues and other factors can cause incomplete recording of vehicle trajectory data, resulting in missing data. Related technologies often employ a local cache of vehicle trajectory data using an in-vehicle terminal (Telematics Box, T-Box). However, T-Box data transmission is limited by storage space and power consumption, and data gaps still occur, leading to low accuracy in vehicle fault detection. Summary of the Invention
[0004] Therefore, it is necessary to provide a vehicle detection method, apparatus, computer equipment, readable storage medium, and program product that can improve the accuracy of vehicle fault detection in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a vehicle detection method, including:
[0006] Based on a preset offline time model and the actual trajectory dataset of the vehicle, the trajectory integrity rate of the vehicle is determined;
[0007] The actual trajectory dataset is filtered based on a preset missing data filtering strategy to determine the missing data in the vehicle's message.
[0008] Based on the trajectory integrity rate and the missing message data, the vehicle fault detection result is determined.
[0009] In one embodiment, determining the trajectory completeness rate of the vehicle based on a preset offline time model and the vehicle's actual trajectory dataset includes:
[0010] Based on the vehicle's actual trajectory dataset, the offline duration of the vehicle in each target time period is determined. The actual trajectory dataset is collected within a preset duration, and each target time period is obtained by dividing the preset duration. The actual message data contained in the actual trajectory dataset is sorted by time.
[0011] Based on the offline duration, the online duration of the vehicle within the preset duration is determined, as well as the number of target message data for the online duration; and the ratio of the actual number of message data to the target number of message data is determined as the trajectory integrity rate of the vehicle.
[0012] In one embodiment, each target time period includes a start time period, a middle time period, and an end time period, and the offline duration of each target time period includes a first offline duration, a second offline duration, and a third offline duration. Determining the offline duration of the vehicle within each target time period based on the vehicle's actual trajectory dataset includes:
[0013] Determine the message type of each of the actual message data; the type of the actual message data includes at least one of logout message and login message;
[0014] For the aforementioned starting time period, the difference between the start time of the starting time period and the time of the first target actual message data is determined as the first offline duration, and the first offline duration is greater than the message interval threshold.
[0015] For the termination period, the difference between the time of the last target actual message data and the termination time of the termination period is determined as the second offline duration, and the second offline duration is greater than the message interval threshold.
[0016] For each logout message data in the intermediate time period, the time difference between the logout message data and the most recent next login message data is determined as the initial offline duration; based on vehicle trajectory recording data, the online duration in each initial offline duration is determined; the difference between each initial offline duration and the corresponding online duration is determined, and the sum of each difference is determined as the third offline duration.
[0017] In one embodiment, the step of filtering the actual trajectory dataset based on a preset missing data filtering strategy to determine the missing data in the vehicle's message includes:
[0018] From the actual trajectory dataset, two adjacent received message data points with a time difference greater than a preset time threshold are identified as the first missing breakpoints;
[0019] Determine the time data between each logout message and the most recent next login message, which is the offline missing breakpoint;
[0020] Based on the first missing breakpoint and the offline missing breakpoint, the online missing time period of the vehicle is determined;
[0021] The missing message data for the vehicle is obtained by matching the message data corresponding to the missing online time period.
[0022] In one embodiment, matching the message data corresponding to the missing online time period to obtain the missing message data of the vehicle includes:
[0023] For each online missing time period, if there is no indication message data that is closest to the endpoint message data within the online missing time period, then the online missing time period in which there is no indication message data that is closest to the endpoint message data is determined as the first target missing breakpoint.
[0024] If there is an indication message data that is closest to the endpoint message data within the online missing time period, then based on the elastic time window, each endpoint message data is matched with the closest login message data or logout message data to obtain a matching result; and the time period between the endpoint message data that does not match the matching result and the closest indication message data is determined as the second target missing breakpoint.
[0025] Based on the missing breakpoints of each of the first and second targets, the missing data of the message within the preset time period is determined.
[0026] In one embodiment, the method further includes:
[0027] Determine the location information of missing data in the message; if the number of occurrences of the location information is greater than a preset threshold, mark the location information and generate a corresponding message retransmission strategy.
[0028] Secondly, this application also provides a vehicle detection device, comprising:
[0029] The first determining module is used to determine the trajectory integrity rate of the vehicle based on a preset offline time model and the actual trajectory dataset of the vehicle.
[0030] The second determining module is used to filter the actual trajectory dataset based on a preset missing data filtering strategy to determine the missing data in the vehicle's message.
[0031] The third determining module is used to determine the vehicle fault detection result based on the trajectory integrity rate and the missing message data.
[0032] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0033] Based on a preset offline time model and the actual trajectory dataset of the vehicle, the trajectory integrity rate of the vehicle is determined;
[0034] The actual trajectory dataset is filtered based on a preset missing data filtering strategy to determine the missing data in the vehicle's message.
[0035] Based on the trajectory integrity rate and the missing message data, the vehicle fault detection result is determined.
[0036] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0037] Based on a preset offline time model and the actual trajectory dataset of the vehicle, the trajectory integrity rate of the vehicle is determined;
[0038] The actual trajectory dataset is filtered based on a preset missing data filtering strategy to determine the missing data in the vehicle's message.
[0039] Based on the trajectory integrity rate and the missing message data, the vehicle fault detection result is determined.
[0040] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0041] Based on a preset offline time model and the actual trajectory dataset of the vehicle, the trajectory integrity rate of the vehicle is determined;
[0042] The actual trajectory dataset is filtered based on a preset missing data filtering strategy to determine the missing data in the vehicle's message.
[0043] Based on the trajectory integrity rate and the missing message data, the vehicle fault detection result is determined.
[0044] The aforementioned vehicle detection method, apparatus, computer equipment, readable storage medium, and program product, by using a preset offline time model and the vehicle's actual trajectory dataset, determine the vehicle's trajectory integrity rate, thereby improving the accuracy of offline time calculation and thus enhancing the accuracy of the vehicle's trajectory integrity rate. Furthermore, by filtering the actual trajectory dataset based on a preset missing data filtering strategy, they identify missing vehicle messages, enabling the location of missing trajectory messages and improving the accuracy of missing message detection. Finally, based on the trajectory integrity rate and missing message data, they determine the vehicle fault detection result, further improving the accuracy of vehicle fault detection due to the increased accuracy of both trajectory integrity rate and missing message detection. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a flowchart illustrating a vehicle detection method in one embodiment;
[0047] Figure 2 This is a flowchart illustrating a vehicle detection method in one embodiment;
[0048] Figure 3 This is a flowchart illustrating a vehicle detection method in one embodiment;
[0049] Figure 4 This is a schematic diagram illustrating the matching of flexible time windows in one embodiment;
[0050] Figure 5 This is a flowchart illustrating a method for determining the trajectory integrity rate of new energy vehicles based on a three-segment offline time model, provided in one embodiment.
[0051] Figure 6 This is a flowchart illustrating a method for locating missing trajectories of new energy vehicles based on a three-segment offline time model, provided in one embodiment.
[0052] Figure 7 This is a structural block diagram of a vehicle detection device in one embodiment;
[0053] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0055] In one exemplary embodiment, such as Figure 1 As shown, a vehicle detection method is provided. This embodiment illustrates the method applied to a terminal. It is understood that this method can also be applied to a server, or to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0056] Step 101: Determine the trajectory integrity rate of the vehicle based on the preset offline time model and the actual trajectory dataset of the vehicle.
[0057] The preset offline time model is used to analyze the vehicle's offline time / offline duration within a preset time period. The preset offline time model can be a three-segment offline time model. Offline time is the time the vehicle is in a stationary state. The actual trajectory dataset is a collection of vehicle driving trajectory message data actually collected within the preset time period. The driving trajectory message data represents the vehicle's start time, stop time, and driving messages during the driving process within the preset time period. Driving messages can include real-time messages or retransmitted messages. Both real-time and retransmitted messages can represent the vehicle's status information during driving, including its geographical location, speed, trajectory, engine status, etc. The preset time period is a pre-set time interval, which can be hours, days, months, etc., without specific limitations.
[0058] Specifically, the terminal determines the offline duration of the vehicle within a preset time period based on a preset offline time model and the vehicle's actual trajectory dataset. Based on the offline duration, it determines the online duration of the vehicle. Based on the online duration of the vehicle and the number of message data in the actual trajectory dataset, it determines the trajectory integrity rate of the vehicle within the preset time period.
[0059] Step 102: Filter the actual trajectory dataset based on the preset missing data filtering strategy to determine the missing data of vehicle messages.
[0060] The preset missing message filtering strategy is used to determine whether there is a missing message between any two messages. The missing message data reflects the start time, end time, start message type, end message type, number of missing trajectory messages, and geographical location of the vehicle when the message is missing, etc., when there is a missing message between two messages in the actual trajectory message dataset.
[0061] Specifically, the terminal can perform multiple filtering operations on the actual trajectory dataset based on a preset missing data filtering strategy to determine the missing data of the vehicle's messages within a preset time period.
[0062] Step 103: Determine the vehicle fault detection result based on the trajectory integrity rate and missing message data.
[0063] Optionally, both trajectory integrity rate and message missing data reflect the message missing situation of the vehicle within the same preset time period.
[0064] Specifically, the terminal compares the trajectory integrity rate and missing message data for the same preset duration to obtain the comparison result. If the comparison result is consistent between the trajectory integrity rate and the missing message data, and neither the trajectory integrity rate nor the missing message data meets the preset fault conditions, then the vehicle is determined to be in a normal state. If the comparison result is inconsistent between the trajectory integrity rate and the missing message data, or if at least one of the trajectory integrity rate and the missing message data meets the preset fault conditions, then the vehicle is determined to be in a fault state.
[0065] Optionally, if the trajectory integrity rate is greater than or equal to a preset integrity threshold and the missing data is less than or equal to a preset missing data threshold, then it is determined that the trajectory integrity rate and the missing data do not meet the preset fault conditions. If the trajectory integrity rate is less than the preset integrity threshold and / or the missing data is greater than the preset missing data threshold, then it is determined that at least one of the trajectory integrity rate and the missing data does not meet the preset fault conditions.
[0066] In addition, after the terminal determines that the vehicle is in a faulty state, it determines the corresponding fault diagnosis strategy based on the trajectory integrity rate and missing message data. For example, it adjusts the vehicle's message retransmission strategy based on the fault diagnosis strategy.
[0067] The aforementioned vehicle detection method, by using a preset offline time model and the vehicle's actual trajectory dataset, determines the vehicle's trajectory integrity rate, improving the accuracy of offline time calculation and thus enhancing the accuracy of the vehicle's trajectory integrity rate. It also filters the actual trajectory dataset based on a preset missing data filtering strategy to identify missing vehicle messages, enabling the location of missing trajectory messages and improving the accuracy of missing message detection. Finally, based on the trajectory integrity rate and missing message data, it determines the vehicle fault detection result. By improving the accuracy of both trajectory integrity rate and missing message detection, it further enhances the accuracy of vehicle fault detection.
[0068] In an exemplary embodiment, the specific implementation process of step 101, "determining the trajectory integrity rate of the vehicle based on a preset offline time model and the actual trajectory dataset of the vehicle," may include:
[0069] Based on the actual trajectory dataset of the vehicle, the offline duration of the vehicle in each target time period is determined; based on each offline duration, the online duration of the vehicle in a preset duration is determined, as well as the number of target message data for the online duration; and the ratio of the number of actual message data to the number of target message data is determined as the trajectory integrity rate of the vehicle.
[0070] The actual trajectory dataset is collected within a preset time period. Each target time period is obtained by dividing the preset time period. The start and end times of different target time periods are different, and the duration may be the same or different, depending on the specific application scenario. The actual message data contained in the actual trajectory dataset is sorted by time, which can be in ascending or descending order, without specific limitations. The target message data is the ideal message data of the vehicle during its online time.
[0071] Specifically, the terminal can store the actual message data of the vehicle at each time, and determine the actual message data arranged by time within a preset time period as an actual message dataset. For example, the terminal can receive vehicle monitoring data through the GB / T32960 protocol, store the vehicle monitoring data, and determine the actual message data of a certain VIN and a certain day from the vehicle monitoring data through the vehicle identification number (VIN) and date.
[0072] The terminal can divide a preset duration into multiple target time periods and determine the real-time message data corresponding to each target time period. Based on the vehicle's actual trajectory dataset, it determines the vehicle's offline duration within each target time period; it determines the sum of each offline duration and determines the difference between the preset duration and the sum as the vehicle's online duration within the preset duration; the terminal obtains the preset message transmission interval and determines the target message data quantity by the ratio of the online duration to the preset message transmission interval; and it determines the vehicle's trajectory integrity rate by the ratio of the actual message data quantity to the target message data quantity.
[0073] For example, the duration of a day (from 00:00:00 to 23:59:59) is divided into multiple target time periods. These target time periods are: the early morning start period (00:00:00 critical point), the daytime dynamic period (primarily daytime driving entry and exit points), and the nighttime end period (23:59:59 critical point). The offline duration of the early morning start period, the daytime dynamic period, and the nighttime end period is determined. The sum of these offline durations is the total offline duration for the day. The difference between 24 hours and the total offline duration is the vehicle's online duration for the day. The ratio of the online duration to the preset message sending interval (a real-time message is sent every 10 seconds during vehicle online time) is the target message data quantity (the number of trajectory records the vehicle should have in a day). The actual number of message data received in a day and the target number of message data are used to determine the vehicle's trajectory integrity rate for the day.
[0074] In this embodiment, by determining the offline duration in each target time period, determining the online duration based on each offline duration, determining the number of target message data corresponding to the online duration, and determining the ratio of the number of actual message data to the number of target message data as the vehicle's trajectory integrity rate, the accuracy of offline duration detection within the preset duration is improved. Moreover, by determining the vehicle's trajectory integrity rate through target message data and actual message data, the accuracy of trajectory integrity rate calculation is improved.
[0075] In one exemplary embodiment, such as Figure 2 As shown, the specific implementation process of the step "determine the offline duration of the vehicle in each target time period based on the vehicle's actual trajectory dataset" may include:
[0076] Step 201: Determine the message type of each actual message data.
[0077] The actual message data types include at least one of the following: logout message, login message, real-time message, and resend message.
[0078] Specifically, the terminal can identify the type identifier carried by each actual message data, and determine the message type on which each actual message is based based on the correspondence between the type identifier and the message type.
[0079] Optionally, each target time period includes a start time period, a middle time period, and an end time period, and the offline duration of each target time period includes a first offline duration, a second offline duration, and a third offline duration;
[0080] Step 202: For the initial time period, determine the first offline duration as the difference between the start time of the initial time period and the time of the first target actual message data.
[0081] The first offline duration is greater than the message interval threshold, and the message type of the first target actual message is either a real-time message or a retransmission message. The starting time period can be the duration from the start point of a preset duration to the time when the first target actual message data is received. The starting time is the time corresponding to the start point. For example, if the preset duration is one day, the starting time period can be the early morning period, that is, from 00:00:00 to the time when the first target real-time message is received.
[0082] Specifically, for the initial time period, the terminal determines the first offline duration as the difference between the start time of the initial time period and the time of the first target actual message data. Optionally, if the first offline duration is less than a preset message transmission interval, the first offline duration is determined to be 0. For example, the preset message transmission interval can be 10 seconds.
[0083] Step 203: For the termination period, determine the second offline duration as the difference between the time of the last target's actual message data and the termination time of the termination period.
[0084] The second offline duration is greater than the message interval threshold, and the message type of the last target message data is a real-time message or a retransmission message. The termination period can be the duration from the moment of the last target actual message data to the termination point of the preset duration. The termination time is the moment corresponding to the termination point. For example, the preset duration is one day, and the starting period can be the nighttime period, that is, the period from the last target real-time message to 23:59:59.
[0085] Specifically, for the termination period, the difference between the time of the last target actual message data and the termination time of the termination period is determined as the second offline duration. Optionally, if the second offline duration is less than the preset message sending interval, the second offline duration is determined to be 0.
[0086] Step 204: For each logout message data in the intermediate time period, determine the time difference between the logout message data and the most recent next login message data, which is the initial offline duration; based on the vehicle trajectory record data, determine the online duration in each initial offline duration; determine the difference between each initial offline duration and the corresponding online duration, and determine the sum of each difference as the third offline duration.
[0087] The intermediate time period is the period from the first target real-time message to the last target real-time message. Vehicle trajectory recording data is the vehicle's driving data recorded within a preset time period, which reflects the online duration of the vehicle's driving.
[0088] Specifically, for each logout message in the middle period, the time difference between each logout message and the next most recent login message is determined as the initial offline duration. The time point when the logout message was sent and the time point of the next most recent login message are stored as the start and end times of the initial offline duration. Each initial offline duration, as well as the start and end times, are defined as the first day's offline time dataset.
[0089] Identify multiple consecutive online time periods in the vehicle trajectory record data that correspond to the first day's offline time dataset, and store each online time period as the second day's offline time dataset.
[0090] Determine the difference between the first day's offline time set and the second day's offline time set, and use the sum of these differences as the third offline duration.
[0091] Optionally, the sum of the first offline duration, the second offline duration, and the third offline duration is determined as the total offline duration of the vehicle within a preset duration.
[0092] For example, the login and logout message data are processed, and the time difference between the most recent login record after each logout is taken to obtain the first day's offline time dataset. The existing trajectory records are processed, and the continuous time periods within the first day's offline time dataset are taken to obtain the second day's offline time dataset. The second day's offline time dataset is subtracted from the first day's offline time dataset, the difference is taken, and time periods with trajectory records within the offline duration are removed. Finally, all offline durations are summed to obtain the total daytime offline duration.
[0093] In this embodiment, by using a three-segment offline time statistics method, subtracting the offline time from 24 hours yields a more accurate online time, thereby improving the accuracy of trajectory integrity calculation. Dual-source collaborative verification is achieved through login / logout records (the primary data source) and trajectory records (the verification data source). Login / logout records (direct status evidence) are prioritized, while trajectory records serve as negative evidence (excluding rare cases of login / logout errors leading to additional offline time statistics). While maintaining login / logout records as the primary source, trajectory records are used for correction, significantly improving the accuracy of daytime offline time calculation, especially adept at handling boundary cases such as record loss and data gaps; dual-source cross-validation further enhances the accuracy of daytime offline time calculation.
[0094] In an exemplary embodiment, the specific implementation process of step 102, "filtering the actual trajectory dataset based on a preset missing data filtering strategy to determine the missing data of vehicle messages," may include:
[0095] From the actual trajectory dataset, two adjacent received message data points with a time difference greater than a preset time threshold are identified as the first missing breakpoints; the time data between each logout message data and the most recent next login message data are identified as offline missing breakpoints; based on the first missing breakpoints and offline missing breakpoints, the online missing time period of the vehicle is determined; the message data corresponding to the online missing time period is matched to obtain the vehicle's missing message data.
[0096] The received message data can be real-time message data or resent message data.
[0097] Specifically, from the actual trajectory dataset, two adjacent real-time / retransmission message data with a time difference greater than a preset time threshold are identified as the first missing breakpoint, and the time point of the start point of the first missing breakpoint, the time point of the end point of the first missing breakpoint, and the time difference between the two are stored.
[0098] Determine the time data of each logout message and the next most recent login message, which are offline missing breakpoints, and store the time point when the logout message was sent, the time point of the next most recent login message, and the time difference between the two.
[0099] The terminal calculates the difference between the first missing breakpoint and the offline missing breakpoint to determine the online missing time period of the vehicle, and matches the message data corresponding to the online missing time period to obtain the message missing data of the vehicle for a preset duration.
[0100] In this embodiment, by further processing the message data corresponding to the online missing time period, message missing data of the vehicle for a preset duration is obtained, which improves the accuracy of distinguishing between real offline and message data missing, thereby improving the accuracy of message missing data detection.
[0101] In one exemplary embodiment, such as Figure 3 As shown, the specific implementation process of the step "matching the message data corresponding to the missing online time period to obtain the missing message data of the vehicle" may include:
[0102] Step 301: For each online missing time period, if there is no indication message data that is closest to the endpoint message data within the online missing time period, then the online missing time period for which there is no indication message data that is closest to the endpoint message data is determined as the first target missing breakpoint.
[0103] The indication message data can be either login or logout message data. The closest indication message data refers to the endpoint message data and the indication message data where there are no other message data between them.
[0104] Specifically, for each online missing time period, the nearest indication message data to the endpoint message data in the online missing time period is determined; if there is no indication message data closest to the endpoint message data in the online missing time period, then the online missing time period in which there is no indication message data closest to the endpoint message data is determined as the first target missing breakpoint.
[0105] Step 302: If there is an indication message data that is closest to the endpoint message data within the online missing time period, then based on the elastic time window, match each endpoint message data with the closest login message data or logout message data to obtain the matching result; and determine the time period between the endpoint message data that does not match and the closest indication message data as the second target missing breakpoint.
[0106] The flexible time window is determined based on the preset message sending interval.
[0107] Specifically, if there is an indication message data that is closest to the endpoint message data within the online missing time period, then based on the elastic time window, each endpoint message data is matched with the closest login message data or logout message data to obtain the matching result.
[0108] If the matching result indicates that the endpoint message data is not within the elastic time window specified by the nearest login or logout message data, then the matching result is determined to be a mismatch, and the time period between the endpoint message data with the determined mismatch and the nearest indication message data is the second target missing breakpoint.
[0109] If the matching result indicates that the endpoint message data is within the elastic time window specified by the nearest login or logout message data, then the matching result is determined to be a match, it is determined that there are no missing messages between the endpoint message data and the nearest login or logout message data, and the time period is deleted.
[0110] like Figure 4 As shown, Figure 4 This is a schematic diagram of the matching of flexible time windows in one embodiment, where the solid rectangles represent flexible time windows. Figure 4 The login message data is the closest indication message data to the first real-time / reissue message data, and the logout message data is the closest indication message data to the last real-time / reissue message data. Since a match is determined if the endpoint message data (real-time / reissue message data) is within the elastic time window, and a mismatch is determined if the endpoint message data is not within the elastic time window, meaning there is a gap between the logout message and the real-time (reissue) message. It should be understood that... Figure 4 This is for illustrative purposes only and does not constitute a specific limitation.
[0111] Step 303: Based on the missing breakpoints of each first target and each missing breakpoint of each second target, determine the missing data of the message within the preset time period.
[0112] Specifically, based on the missing breakpoints of each first target and each missing breakpoint of each second target, the terminal determines the start time and end time of each missing breakpoint, the difference between the start time and the end time, and the ratio of the difference to the preset message sending interval as the number of missing messages, and determines the message type of the start point and the end point, and the environmental data of the vehicle with the missing message; for example, the environmental data can be the actual location and latitude and longitude data.
[0113] In this embodiment, by using flexible time window matching, missing breakpoints of each first target and each second target, and determining missing message data within a preset time period, missing messages in the positioning trajectory are located, thereby improving the accuracy of missing message positioning.
[0114] In one exemplary embodiment, the vehicle detection method further includes:
[0115] Determine the location information of missing data in the message; if the number of occurrences of the location information exceeds a preset threshold, mark the location information and generate a corresponding message retransmission strategy.
[0116] The message retransmission strategy is a method to determine the corresponding retransmission message based on the known location information of potentially missing messages.
[0117] Specifically, the terminal determines the location information of the missing data in the message and generates a geographic heatmap based on the location information. If the number of occurrences of the location information exceeds a preset threshold, the cause of the missing location information is determined to be a network interruption due to physical terrain factors. The terminal can store this location information. The terminal can determine the cause of the missing message and generate a message retransmission strategy corresponding to the cause of the missing message. For example, if multiple vehicles have missing message data at a certain location, and it is determined that the location is a weak signal coverage area of the output base station, the message retransmission strategy is to first perform a local backup of the message data at that location and collect detailed information on the retransmission of the missing data in the T-Box. This is only an example and does not constitute a specific limitation.
[0118] In addition, the terminal can create a health profile for the vehicle, summarize information such as the manufacturing time and abnormal records.
[0119] In this embodiment, missing data points can be used to generate a geographic heatmap. Continuous missing data at the same location across different vehicles can identify network interruptions caused by physical terrain factors such as tunnels, facilitating subsequent optimization, such as local backups at these locations. By tracking missing data points, anomalies in the vehicle-mounted terminal can be located, enabling improvements to the retransmission mechanism and ensuring data and trajectory integrity. Furthermore, missing data points can pinpoint anomalies in the vehicle-mounted terminal, such as equipment failure or incorrect message transmission interval settings, facilitating subsequent maintenance and improvements.
[0120] In one embodiment, such as Figure 5 As shown, Figure 5 This is a flowchart illustrating a method for determining the trajectory completeness rate of new energy vehicles based on a three-segment offline time model, as provided in one embodiment. Specifically, it may include the following steps:
[0121] Step 501: After receiving vehicle monitoring data via the GB / T32950 protocol, write the data to the database. Extract the original message record (actual message data) of a specific VIN and date from the database.
[0122] Step 502: Sort the actual message data in ascending / descending order by device time and perform deduplication on the actual message data to obtain the actual trajectory dataset.
[0123] Step 503: Process time-series data. Obtain the trajectory records of message types login and logout, as well as the time difference between them and the most recent login / logout record.
[0124] Step 504: Extract the dataset of time differences between all logout messages and their most recent login record from the data in Step 503. This dataset serves as the first day's offline time dataset. At this point, the processed records include the time the logout message was sent, the time of the next login message, and the time difference between the two, which serves as the start and end points and duration of the offline period.
[0125] Step 505: Process the received trajectory records and take the continuous time period records within the first day's offline time dataset as the second day's offline time dataset (excluding the offline duration statistics caused by the rare cases of missing logout and login records).
[0126] Step 505: Take the difference between the first daytime offline time dataset and the second daytime offline time dataset, and remove the time periods with trajectory records in the offline duration. Then sum all the offline times. This sum is the daytime offline duration (third offline duration).
[0127] Step 507: Calculate the offline duration in the early morning. Find the first record of the day in the real-time / retransmission message data. If the first record is later than 00:00:10, calculate the time difference (in seconds) from 00:00:00 to the first record as the offline duration in the early morning (first offline duration). Records within 10 seconds are not counted as offline and are considered online across days. There are instances where drivers continue driving at night.
[0128] Step 508: Calculate the nighttime offline duration. Calculate the time difference between the last record of the day in the real-time / retransmission message data and 23:59:59, and use this as the nighttime offline duration (second offline duration). If the time difference is within 10 seconds, it is not counted as offline.
[0129] Step 509: Sum the three offline durations and determine the difference between 24 hours and the offline time as the vehicle's online time.
[0130] Step 510: Calculate the required number of trajectory records (the number of target message data) based on the real-time message sending interval (preset message sending interval). For example, if a vehicle sends a real-time message every 10 seconds while online, the number of records should equal the number of 10-second intervals during the online time.
[0131] Step 511: The completeness rate of the trajectory is determined by the ratio of the number of records received by a VIN in the database on that day (the actual number of message data) to the number of records that should be there.
[0132] In this embodiment, login / logout, real-time / retransmission messages, and trajectory information are uploaded to a remote data platform via the vehicle-mounted terminal. A three-segment offline time model and dual-source collaborative verification are used to calculate the dynamic offline duration during the day, yielding accurate offline and online durations. Based on the time interval for sending real-time vehicle data messages (e.g., every 10 seconds), the required number of trajectory records is calculated. Finally, the number of records received by the database divided by the required number of records yields the accurate trajectory completeness rate.
[0133] In one embodiment, such as Figure 6 As shown, Figure 6 This is a flowchart illustrating a method for locating missing trajectories of new energy vehicles based on a three-segment offline time model, as provided in one embodiment. Specifically, it may include the following steps:
[0134] Step 601: After receiving vehicle monitoring data via the GB / T32960 protocol, write the data to the database. Extract the original message record (actual message data) of a specific VIN and date from the database.
[0135] Step 602: Sort the actual message data in ascending / descending order by device time and perform deduplication on the actual message data to obtain the actual trajectory dataset.
[0136] Step 603: From the received real-time / retransmission message data, filter out records where the time difference between the received message and the next message exceeds 18 seconds. The processed records include the time of receipt, the time of the next received message, and the time difference between the two, serving as the start and end points and duration of the missing duration. A set of breakpoint durations based on historical trajectory records (the first missing breakpoint) is selected.
[0137] Step 604: Extract the dataset of time differences between all logout messages and their most recent login record from the login / logout data. At this point, the processed records include the time the logout message was sent, the time of the next login message, and the time difference between the two, serving as the start and end points and duration of the offline period. Filter out the set of breakpoints (missing offline breakpoints) based on the logout type in the original message data.
[0138] Step 605: Obtain the interval between the login / logout messages and the first / last sent messages. After the vehicle starts, it first sends a login message to the platform, then a real-time message. When the vehicle stops, it sends a logout message. Due to network latency, geographical limitations, and other factors, the interval may be unstable. If the sending interval is 10 seconds, the flexible time window is ±20 seconds. The value of the flexible time window is adjusted according to the actual interval of the device messages.
[0139] Step 606: Exclude the offline time period of the missing breakpoint within the missing time period of the first missing breakpoint to obtain the online missing time period. For each online missing time period, if there is no logout / login message data closest to the endpoint message data within the online missing time period, then the online missing time period without the closest indication message data to the endpoint message data is determined as the first target missing breakpoint, indicating a missing record; match the online missing time period with the closest logout / login message data to the endpoint message data using an elastic time window, and exclude the matched ones; the breakpoint time period without a match is the missing record.
[0140] Step 607: From the missing records, we can associate the start time, location, latitude and longitude, number of missing records, and message types sent before and after the missing records.
[0141] Step 608: A geographic heatmap can be generated based on the missing points. Continuous missing points at the same locations across different vehicles can identify network outages caused by physical terrain factors such as tunnels. Local backups are recorded at these locations. By tracking missing points, anomalies in the vehicle-mounted terminal can be located.
[0142] In this embodiment, dual-source collaborative verification of login / logout data and received message data is used. Two types of breakpoints are obtained by matching two different data sets using a flexible time window ΔT. Historical breakpoints that do not match are identified as missing records, thus locating missing trajectory messages. Furthermore, the start time, location, number of records, and message type of the missing message are correlated. A heatmap of the missing point's latitude and longitude is then used to determine the cause of the missing message. For example, missing messages from different vehicles at fixed locations are investigated as network interruptions caused by physical terrain factors such as tunnels. This also helps identify faults and anomalies in vehicle-mounted terminals, facilitating subsequent equipment optimization.
[0143] In one embodiment, this application is applied to an actual vehicle monitoring platform. After application, compared with the original method of using the interval of more than 10 minutes between messages in real-time / retransmission messages as the offline time, the three-segment offline time dual-source verification greatly improves the accuracy of trajectory integrity and the number of missing records.
[0144] The error between the number of missing records obtained from the trajectory completeness rate and the detailed number of missing records is within 5 for most vehicles, within 10 for complex terrain, and between 0 and 1 for some vehicles (due to factors such as network latency, driving terrain, equipment, and calculation errors).
[0145] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0146] Based on the same inventive concept, this application also provides a vehicle detection device for implementing the vehicle detection method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more vehicle detection device embodiments provided below can be found in the limitations of the vehicle detection method described above, and will not be repeated here.
[0147] In one exemplary embodiment, such as Figure 7 As shown, a vehicle detection device is provided, comprising: a first determining module 71, a second determining module 72, and a third determining module 73, wherein:
[0148] The first determining module 71 is used to determine the trajectory integrity rate of the vehicle based on a preset offline time model and the actual trajectory dataset of the vehicle.
[0149] The second determining module 72 is used to filter the actual trajectory dataset based on a preset missing data filtering strategy to determine the missing data of the vehicle's message.
[0150] The third determining module 73 is used to determine the vehicle fault detection result based on the trajectory integrity rate and the missing message data.
[0151] In one embodiment, the first determining module 71 is specifically used to determine the offline duration of the vehicle in each target time period based on the vehicle's actual trajectory dataset. The actual trajectory dataset is collected within a preset duration, and each target time period is obtained by dividing the preset duration. The actual message data contained in the actual trajectory dataset is obtained by sorting by time.
[0152] Based on the offline duration, the online duration of the vehicle within the preset duration is determined, as well as the number of target message data for the online duration; and the ratio of the actual number of message data to the target number of message data is determined as the trajectory integrity rate of the vehicle.
[0153] In one embodiment, the first determining module 71 is specifically used to determine the message type of each of the actual message data; the type of the actual message data includes at least one of logout message and login message;
[0154] For the aforementioned starting time period, the difference between the start time of the starting time period and the time of the first target actual message data is determined as the first offline duration, and the first offline duration is greater than the message interval threshold.
[0155] For the termination period, the difference between the time of the last target actual message data and the termination time of the termination period is determined as the second offline duration, and the second offline duration is greater than the message interval threshold.
[0156] For each logout message data in the intermediate time period, the time difference between the logout message data and the most recent next login message data is determined as the initial offline duration; based on vehicle trajectory recording data, the online duration in each initial offline duration is determined; the difference between each initial offline duration and the corresponding online duration is determined, and the sum of each difference is determined as the third offline duration.
[0157] In one embodiment, the second determining module 72 is specifically used to determine two adjacent received message data points with a time difference greater than a preset time threshold as the first missing breakpoint from the actual trajectory dataset;
[0158] Determine the time data between each logout message and the most recent next login message, which is the offline missing breakpoint;
[0159] Based on the first missing breakpoint and the offline missing breakpoint, the online missing time period of the vehicle is determined;
[0160] The missing message data for the vehicle is obtained by matching the message data corresponding to the missing online time period.
[0161] In one embodiment, the second determining module 72 is specifically used for each online missing time period. If there is no indication message data that is closest to the endpoint message data within the online missing time period, then the online missing time period in which no indication message data that is closest to the endpoint message data is found is determined as the first target missing breakpoint.
[0162] If there is an indication message data that is closest to the endpoint message data within the online missing time period, then based on the elastic time window, each endpoint message data is matched with the closest login message data or logout message data to obtain a matching result; and the time period between the endpoint message data that does not match the matching result and the closest indication message data is determined as the second target missing breakpoint.
[0163] Based on the missing breakpoints of each of the first and second targets, the missing data of the message within the preset time period is determined.
[0164] In one embodiment, the third determining module 73 is further configured to determine the location information of the missing data in the message; if the number of occurrences of the location information is greater than a preset threshold, the location information is marked and a corresponding message retransmission strategy is generated.
[0165] Each module in the aforementioned vehicle detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0166] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a vehicle detection method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0167] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0168] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0169] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0170] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0171] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0172] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0173] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0174] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A vehicle inspection method, characterized in that, The method includes: Based on a preset offline time model and the actual trajectory dataset of the vehicle, the trajectory integrity rate of the vehicle is determined; The actual trajectory dataset is filtered based on a preset missing data filtering strategy to determine the missing data in the vehicle's message. Based on the trajectory integrity rate and the missing message data, the vehicle fault detection result is determined; The step of determining the trajectory completeness rate of the vehicle based on a preset offline time model and the vehicle's actual trajectory dataset includes: Based on the vehicle's actual trajectory dataset, the offline duration of the vehicle in each target time period is determined. The actual trajectory dataset is collected within a preset duration, and each target time period is obtained by dividing the preset duration. The actual message data contained in the actual trajectory dataset is sorted by time. Based on the offline duration, the online duration of the vehicle within the preset duration is determined, and the number of target message data for the online duration is determined; the ratio of the actual number of message data to the target number of message data is determined as the trajectory integrity rate of the vehicle. The step of filtering the actual trajectory dataset based on a preset missing data filtering strategy to determine the missing data in the vehicle's message includes: From the actual trajectory dataset, two adjacent received message data points with a time difference greater than a preset time threshold are identified as the first missing breakpoints; Determine the time data between each logout message and the most recent next login message, which will be the offline missing breakpoints; Based on the first missing breakpoint and the offline missing breakpoint, the online missing time period of the vehicle is determined; The missing message data for the vehicle is obtained by matching the message data corresponding to the missing online time period.
2. The method according to claim 1, characterized in that, Each target time period includes a start time period, a middle time period, and an end time period. The offline duration of each target time period includes a first offline duration, a second offline duration, and a third offline duration. Determining the offline duration of the vehicle within each target time period based on the vehicle's actual trajectory dataset includes: Determine the message type of each of the actual message data; the type of the actual message data includes at least one of logout message and login message; For the aforementioned starting time period, the difference between the start time of the starting time period and the time of the first target actual message data is determined as the first offline duration, and the first offline duration is greater than the message interval threshold. For the termination period, the difference between the time of the last target actual message data and the termination time of the termination period is determined as the second offline duration, and the second offline duration is greater than the message interval threshold. For each logout message data in the intermediate time period, the time difference between the logout message data and the most recent next login message data is determined as the initial offline duration; based on vehicle trajectory recording data, the online duration in each initial offline duration is determined; the difference between each initial offline duration and the corresponding online duration is determined, and the sum of each difference is determined as the third offline duration.
3. The method according to claim 1, characterized in that, The step of matching the message data corresponding to the missing online time period to obtain the missing message data of the vehicle includes: For each online missing time period, if there is no indication message data that is closest to the endpoint message data within the online missing time period, then the online missing time period in which there is no indication message data that is closest to the endpoint message data is determined as the first target missing breakpoint. If there is an indication message data that is closest to the endpoint message data within the online missing time period, then based on the elastic time window, each endpoint message data is matched with the closest login message data or logout message data to obtain a matching result; and the time period between the endpoint message data that does not match the matching result and the closest indication message data is determined as the second target missing breakpoint. Based on the missing breakpoints of each of the first and second targets, the missing data of the message within the preset time period is determined.
4. The method according to claim 1, characterized in that, The method further includes: Determine the location information of missing data in the message; if the number of occurrences of the location information is greater than a preset threshold, mark the location information and generate a corresponding message retransmission strategy.
5. A vehicle detection device, characterized in that, The device includes: The first determining module is used to determine the trajectory integrity rate of the vehicle based on a preset offline time model and the actual trajectory dataset of the vehicle. The second determining module is used to filter the actual trajectory dataset based on a preset missing data filtering strategy to determine the missing data in the vehicle's message. The third determining module is used to determine the vehicle fault detection result based on the trajectory integrity rate and the missing message data; The first determining module is used to determine the offline duration of the vehicle in each target time period based on the vehicle's actual trajectory dataset. The actual trajectory dataset is collected within a preset duration, and each target time period is obtained by dividing the preset duration. The actual message data contained in the actual trajectory dataset is obtained by sorting by time. Based on the offline duration, the online duration of the vehicle within the preset duration is determined, and the number of target message data for the online duration is determined; the ratio of the actual number of message data to the target number of message data is determined as the trajectory integrity rate of the vehicle. The second determining module is used to determine two adjacent received message data points with a time difference greater than a preset time threshold as the first missing breakpoints from the actual trajectory dataset; Determine the time data between each logout message and the most recent next login message, which will be the offline missing breakpoints; Based on the first missing breakpoint and the offline missing breakpoint, the online missing time period of the vehicle is determined; The missing message data for the vehicle is obtained by matching the message data corresponding to the missing online time period.
6. The apparatus according to claim 5, characterized in that, Each target time period includes a start time period, a middle time period, and an end time period. The offline duration of each target time period includes a first offline duration, a second offline duration, and a third offline duration. The first determining module is specifically used to determine the message type of each actual message data. The type of the actual message data includes at least one of a logout message and a login message. For the aforementioned starting time period, the difference between the start time of the starting time period and the time of the first target actual message data is determined as the first offline duration, and the first offline duration is greater than the message interval threshold. For the termination period, the difference between the time of the last target actual message data and the termination time of the termination period is determined as the second offline duration, and the second offline duration is greater than the message interval threshold. For each logout message data in the intermediate time period, the time difference between the logout message data and the next most recent login message data is determined as the initial offline duration; Based on vehicle trajectory recording data, determine the online duration within each of the initial offline durations; The difference between each initial offline duration and the corresponding online duration is determined, and the sum of each difference is determined as the third offline duration.
7. The apparatus according to claim 5, characterized in that, The second determining module is specifically used for each online missing time period. If there is no indication message data that is closest to the endpoint message data within the online missing time period, then the online missing time period in which no indication message data that is closest to the endpoint message data is found is determined as the first target missing breakpoint. If there is an indication message data that is closest to the endpoint message data within the online missing time period, then based on the elastic time window, each endpoint message data is matched with the closest login message data or logout message data to obtain the matching result. And the time period between the endpoint message data where the matching result is a mismatch and the closest indication message data is determined as the second target missing breakpoint; Based on the missing breakpoints of each of the first and second targets, the missing data of the message within the preset time period is determined.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Message loss fault judgment method and device, equipment, storage medium and product
CN119254669A
Track data processing method and device, computer equipment, readable storage medium and program product
CN119846673A