School bus trajectory deviation detection method and device based on machine learning algorithm
A school bus trajectory deviation detection method was constructed by using machine learning algorithms. By utilizing GPS data and an RNN model, the problem of low accuracy in school bus trajectory deviation detection was solved, resulting in higher safety and management efficiency.
Patent Information
- Application Number
- CN202411367962.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-07
AI Technical Summary
In existing technologies, school bus trajectory deviation detection methods are not very accurate and have strict environmental requirements, making them unable to adapt to frequent adjustments to school bus routes and leading to safety hazards.
A school bus trajectory deviation detection method based on machine learning algorithms is adopted. By collecting GPS positioning data, preprocessing data, training RNN convolutional neural network model and cross-validating, a standard trajectory library model is constructed for deviation detection and early warning.
It improves the accuracy and real-time performance of school bus deviation detection, reduces accident risks, enhances operational safety and management efficiency, and strengthens the trust of schools and parents in school bus services.
Smart Images

Figure CN119274313A_ABST
Abstract
Description
Technical Field
[0001] The invention discloses a school bus track deviation detection method and device based on a machine learning algorithm, and relates to the technical field of vehicle safety. Background Art
[0002] As an important tool for transporting students, school buses need to strictly control their driving safety in daily operations. Traditional school bus track deviation detection methods usually rely on sensor data or visual recognition technology, but they have problems such as low accuracy and strict environmental requirements. According to the communication with the school bus company, the running track of the school bus is not static and may be adjusted every semester. Therefore, a more accurate and real-time school bus track deviation detection method is needed to timely warn and avoid potential safety accidents. Summary of the invention
[0003] In view of the problems of the prior art, the present invention provides a school bus track deviation detection method and device based on a machine learning algorithm, and the technical solution adopted is: In a first aspect, a school bus trajectory deviation detection method based on a machine learning algorithm, the method comprising: S1, regularly collects school bus location data based on the GPS device on the school bus; S2, according to the school bus location data, eliminating abnormal data through data cleaning and preprocessing; S3, based on the school bus location data, extracting features and analyzing the school bus trajectory data through a machine learning model to obtain a standard trajectory library model; S4, performing deviation detection and feedback warning according to the school bus position data through the standard trajectory library model.
[0004] In some implementations, the S2 specifically includes: S21, processing the school bus position data into a trajectory point sequence through trajectory data; S22, performing feature extraction according to the trajectory point sequence to obtain form state data and route feature data; In S3, the machine learning model is implemented by a RNN convolutional neural network model, and the trajectory data is captured by the RNN convolutional neural network model to obtain relevant information and sequence patterns; Among them, relevant information includes whether the school bus deviates from the scheduled route or whether its behavior is abnormal.
[0005] In some implementations, the S3 specifically includes: S31, dividing the trajectory data into a training set and a test set through the RNN convolutional neural network model; S32, training the RNN convolutional neural network model according to the test set, and performing parameter tuning and performance optimization through cross-validation to obtain a standard trajectory library model.
[0006] In a second aspect, an embodiment of the present invention provides a school bus track deviation detection device based on a machine learning algorithm, the device comprising: The positioning module is used to regularly collect the location data of the school bus based on the GPS device on the school bus; A processing module, used for eliminating abnormal data through data clearing and preprocessing according to the school bus location data; A model module is used to extract features and analyze the school bus trajectory data through a machine learning model according to the school bus location data to obtain a standard trajectory library model; An early warning module, used for performing deviation detection and feedback early warning according to the school bus position data through the standard trajectory library model; Wherein, the processing module specifically includes: A trajectory unit, used for processing the trajectory data into a trajectory point sequence according to the school bus position data; The extraction unit is used to perform feature extraction according to the trajectory point sequence to obtain form state data and route feature data.
[0007] In some implementations, in the model module, the machine learning model is implemented by a RNN convolutional neural network model, and the trajectory data is captured by the RNN convolutional neural network model to obtain relevant information and sequence patterns; Among them, relevant information includes whether the school bus deviates from the scheduled route or whether its behavior is abnormal.
[0008] In some implementations, the model module specifically includes: A training unit, configured to divide the trajectory data into a training set and a test set through the RNN convolutional neural network model; The optimization unit is used to train the RNN convolutional neural network model according to the test set, and perform parameter tuning and performance optimization through cross-validation to obtain a standard trajectory library model.
[0009] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein when the one or more computer instructions are executed by the processor, the method described in the first aspect above is implemented.
[0010] In a fourth aspect, an embodiment of the present invention provides a computer storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the method described in the first aspect.
[0011] One or more embodiments of the present invention can bring at least the following beneficial effects: The method of the present invention can timely detect the deviation of the school bus route and reduce the possibility of accidents. It not only effectively improves the safety and management efficiency of school bus operations, but also continuously improves and optimizes service quality in a data-driven manner, bringing practical benefits to schools and parents. By implementing the deviation detection device, the trust and satisfaction of schools and parents in school bus services can be improved; the vehicle standard trajectory library constructed based on the analysis of a large amount of real-time and historical data can provide more accurate data support for school and school bus company managers to optimize school bus operation strategies and resource allocation; school bus company managers can use the device of the present invention to monitor the location and status of school buses in real time, optimize scheduling and route planning, and improve operational efficiency and service quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0013] Figure 1 It is a flow chart of a school bus trajectory deviation detection method based on a machine learning algorithm provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0014] The technical solutions 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 only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.
[0015] Embodiment 1:
[0016] Figure 1 A flow chart of a school bus trajectory deviation detection method based on a machine learning algorithm is shown, Figure 1 As shown, the school bus trajectory deviation detection method based on machine learning algorithm provided in this embodiment includes: S1, regularly collects school bus location data based on the GPS device on the school bus; S2, according to the school bus location data, eliminating abnormal data through data cleaning and preprocessing; S3, based on the school bus location data, extracting features and analyzing the school bus trajectory data through a machine learning model to obtain a standard trajectory library model; S4, performing deviation detection and feedback warning according to the school bus position data through the standard trajectory library model.
[0017] First, according to S1, the GPS device deployed on the school bus regularly collects the school bus location data, including longitude, latitude, timestamp and other information; The S2 specifically includes: The next step, according to S2, includes: S21, processing the school bus position data into a trajectory point sequence through trajectory data; S22, performing feature extraction according to the trajectory point sequence to obtain form state data and route feature data.
[0018] Convert the location data collected by GPS into trajectory information, mainly the trajectory point sequence of the school bus; Extract features from trajectory data, such as speed change, acceleration, direction change, distance between trajectory points, etc. These features can reflect the driving status and route characteristics of the school bus; Next, according to S3, the machine learning model is implemented by a RNN convolutional neural network model, and the trajectory data is captured by the RNN convolutional neural network model to obtain relevant information and sequence patterns; Among them, relevant information includes whether the school bus deviates from the scheduled route or whether its behavior is abnormal.
[0019] The S3 specifically includes: S31, dividing the trajectory data into a training set and a test set through the RNN convolutional neural network model; S32, training the RNN convolutional neural network model according to the test set, and performing parameter tuning and performance optimization through cross-validation to obtain a standard trajectory library model.
[0020] Use RNN to capture relevant information and sequence patterns in trajectory data; divide the collected trajectory data into training set and test set to ensure the independence and effectiveness of model training and evaluation; use the training set to train RNN, and use cross-validation and other techniques to tune parameters and optimize performance to obtain a standard trajectory library model.
[0021] Next, according to S4, the trained standard trajectory library model is deployed to analyze the real-time location data of the school bus in real time to detect whether there is deviation from the scheduled route or abnormal driving mode; Deploy the trained standard trajectory library model to analyze the real-time location data of school buses in real time to detect whether there are deviations from the scheduled route or abnormal driving patterns; Based on the actual deviation situation and warning effect, data is continuously collected and analyzed, and the standard trajectory library model is iteratively optimized to improve the accuracy and real-time performance of deviation detection.
[0022] By extracting the features of the vehicle's operating data over the past month, a vehicle standard trajectory library is constructed. When the real-time vehicle operating data is received, the deviation between the real-time operating data and the standard trajectory library is calculated, and a vehicle warning is generated based on the calculation result. Compared with traditional technologies, the present invention not only improves the accuracy and real-time performance of school bus trajectory deviation detection by introducing machine learning technology, but also continuously optimizes the detection algorithm based on real-time data and historical learning to adapt to different road conditions and environmental conditions. Compared with traditional methods, the present invention has a higher degree of automation and more reliable safety performance.
[0023] The present invention collects sensor data during the operation of the school bus, including the acceleration, angular velocity, GPS positioning information, etc. of the vehicle, and performs preprocessing operations on the data. Based on the collected sensor data, a CNN convolutional neural network is used to extract features related to trajectory deviation, including time series information such as longitude and latitude, speed change, acceleration change, and vehicle steering angle, to construct a standard trajectory model for the school bus. When the school bus is running, real-time sensor data is continuously acquired and input into the model, and deviation calculation is performed between the real-time sensor data and the data in the standard trajectory model library. When it is detected that the result of the deviation calculation is greater than the set threshold, the system immediately generates an early warning message.
[0024] Embodiment 2:
[0025] An embodiment of the present invention provides a school bus track deviation detection device based on a machine learning algorithm, the device comprising: The positioning module is used to regularly collect the location data of the school bus based on the GPS device on the school bus; A processing module, used for eliminating abnormal data through data clearing and preprocessing according to the school bus location data; A model module is used to extract features and analyze the school bus trajectory data through a machine learning model according to the school bus location data to obtain a standard trajectory library model; The early warning module is used to perform deviation detection and feedback early warning according to the school bus position data through the standard trajectory library model.
[0026] Furthermore, the processing module specifically includes: A trajectory unit, used for processing the trajectory data into a trajectory point sequence according to the school bus position data; The extraction unit is used to perform feature extraction according to the trajectory point sequence to obtain form state data and route feature data.
[0027] Furthermore, in the model module, the machine learning model is implemented by a RNN convolutional neural network model, and the trajectory data is captured by the RNN convolutional neural network model to obtain relevant information and sequence patterns; Among them, relevant information includes whether the school bus deviates from the scheduled route or whether its behavior is abnormal.
[0028] Furthermore, the model module specifically includes: A training unit, configured to divide the trajectory data into a training set and a test set through the RNN convolutional neural network model; The optimization unit is used to train the RNN convolutional neural network model according to the test set, and perform parameter tuning and performance optimization through cross-validation to obtain a standard trajectory library model.
[0029] Embodiment three:
[0030] This embodiment further provides an electronic device, including a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions implement the method of embodiment 1 when executed by the processor; In practical applications, the processor can be an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller unit (MCU), a microprocessor or other electronic components to execute the methods in the above embodiments.
[0031] The method implemented in this embodiment is as shown in the content of the first embodiment.
[0032] Embodiment 4:
[0033] This embodiment further provides a computer storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by one or more processors, the method of the first embodiment is implemented; Among them, the computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0034] The method implemented in this embodiment is as shown in the content of the first embodiment.
[0035] In the several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed system and method can also be implemented in other ways. The system and method embodiments described above are merely illustrative.
[0036] It should be noted that, in this article, the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0037] Although the embodiments disclosed in the present invention are as above, the contents described are only embodiments adopted for facilitating the understanding of the present invention and are not intended to limit the present invention. Any technician in the technical field to which the present invention belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present invention, but the patent protection scope of the present invention shall still be subject to the scope defined in the attached claims.
Claims
1. A school bus trajectory deviation detection method based on machine learning algorithm, characterized in that: The method comprises: S1, regularly collects school bus location data based on the GPS device on the school bus; S2, according to the school bus location data, eliminating abnormal data through data cleaning and preprocessing; S3, based on the school bus location data, extracting features and analyzing the school bus trajectory data through a machine learning model to obtain a standard trajectory library model; S4, performing deviation detection and feedback warning through the standard trajectory library model according to the school bus position data; Wherein, the S2 specifically includes: S21, processing the school bus position data into a trajectory point sequence through trajectory data; S22, performing feature extraction according to the trajectory point sequence to obtain form state data and route feature data.
2. The method according to claim 1, characterized in that: In S3, the machine learning model is implemented by a RNN convolutional neural network model, and the trajectory data is captured by the RNN convolutional neural network model to obtain relevant information and sequence patterns; Among them, relevant information includes whether the school bus deviates from the scheduled route or whether its behavior is abnormal.
3. The method according to claim 2, characterized in that The S3 specifically includes: S31, dividing the trajectory data into a training set and a test set through the RNN convolutional neural network model; S32, training the RNN convolutional neural network model according to the test set, and performing parameter tuning and performance optimization through cross-validation to obtain a standard trajectory library model.
4. A school bus trajectory deviation detection device based on machine learning algorithm, characterized in that: The device comprises: The positioning module is used to regularly collect the location data of the school bus based on the GPS device on the school bus; A processing module, used for eliminating abnormal data through data clearing and preprocessing according to the school bus location data; A model module is used to extract features and analyze the school bus trajectory data through a machine learning model according to the school bus location data to obtain a standard trajectory library model; An early warning module, used for performing deviation detection and feedback early warning according to the school bus position data through the standard trajectory library model; Wherein, the processing module specifically includes: A trajectory unit, used for processing the trajectory data into a trajectory point sequence according to the school bus position data; The extraction unit is used to perform feature extraction according to the trajectory point sequence to obtain form state data and route feature data.
5. The device according to claim 4, characterized in that In the model module, the machine learning model is implemented by a RNN convolutional neural network model, and the trajectory data is captured by the RNN convolutional neural network model to obtain relevant information and sequence patterns; Among them, relevant information includes whether the school bus deviates from the scheduled route or whether its behavior is abnormal.
6. The device according to claim 5, characterized in that The model module specifically includes: A training unit, configured to divide the trajectory data into a training set and a test set through the RNN convolutional neural network model; The optimization unit is used to train the RNN convolutional neural network model according to the test set, and perform parameter tuning and performance optimization through cross-validation to obtain a standard trajectory library model.
7. An electronic device, characterized in that: It includes a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the school bus trajectory deviation detection method based on machine learning algorithm as described in any one of claims 1 to 3 above.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it is used to implement the school bus trajectory deviation detection method based on the machine learning algorithm as described in any one of claims 1 to 3 above.