A kart lap time measuring method, device, medium and product based on machine learning

By combining machine learning and linear interpolation, a lap timekeeping error prediction model was constructed, which solved the problems of high cost and low accuracy, and realized high-precision lap timekeeping under a low refresh rate GNSS module, thus reducing hardware costs.

CN122262484APending Publication Date: 2026-06-23QINGDAO LINGKONG ZERO DOMAIN RACING TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO LINGKONG ZERO DOMAIN RACING TECHNOLOGY CO LTD
Filing Date
2026-03-27
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing GNSS-based go-kart lap timers are expensive, and their timing accuracy drops significantly when using low-precision GNSS receivers, with no effective methods to improve accuracy.

Method used

A machine learning-based approach is adopted, combining linear interpolation and lap time timing error prediction models. By utilizing a bidirectional LSTM encoder, a temporal attention mechanism, and a statistical aggregation encoder, a fusion temporal neural network is constructed to predict lap time timing errors and improve timing accuracy.

Benefits of technology

With a low refresh rate GNSS module, the accuracy of go-kart lap timekeeping is significantly improved, approaching the timing accuracy of a high-precision GNSS system, while reducing hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122262484A_ABST
    Figure CN122262484A_ABST
Patent Text Reader

Abstract

The application discloses a kind of kart lap time based on machine learning method, equipment, medium and product, it is related to kart lap time field, the method comprises: obtaining the kart position before crossing the finish line and the kart position after crossing the finish line, and using linear interpolation method, determine kart crossing line time;Obtain the state information of kart in the set period;According to state information, using lap time error prediction model, determine the lap time error of kart;Wherein, lap time error prediction model is using training data set to lap time error initial prediction model and obtains by training;Lap time error initial prediction model includes bidirectional LSTM encoder, time sequence attention mechanism module, statistical aggregation encoder, fusion MLP module and linear layer;According to kart crossing line time and lap time error, determine the lap time result of kart.The application improves the precision of lap time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of go-kart lap timekeeping, and in particular to a go-kart lap timekeeping method, device, medium, and product based on machine learning. Background Technology

[0002] Karting (also known as Go-Kart) is a beginner-friendly, small-scale racing sport, often referred to as the "cradle of Formula One drivers." Karting competitions were held at the 2018 Summer Youth Olympic Games and are expected to become an official Olympic event in 2032. The addition of a Chinese driver to the Formula One driver's seat in 2021 has led to a rapid increase in karting participation in China. By 2024, the number of karting participants in China exceeded 5 million, and it is projected to surpass 10 million by 2030.

[0003] Lap timing is a crucial aspect of karting. Whether in training or competition, obtaining accurate lap times in real-time is essential for improving a driver's skills. Karting travels at high speeds, reaching up to 120 km / h, so positioning accuracy in such high-speed environments directly impacts the precision of lap times and the accurate recording and analysis of the karting trajectory.

[0004] Existing go-kart lap timekeeping systems based on positioning data provided by the Global Navigation Satellite System (GNSS) generally utilize high-precision GNSS receivers to ensure accuracy. However, high-precision GNSS receivers are expensive, and many products require additional monthly or annual fees for acquiring positioning data on top of the one-time purchase of the receiver hardware. This makes such timing systems costly, typically ranging from 4,000 to 10,000 yuan per device, or even higher, which is unaffordable for ordinary go-kart participants. Replacing the high-precision GNSS receiver with a lower-priced, low-precision one significantly reduces the accuracy of lap timekeeping. For example, the data refresh rate of GNSS receivers used in mobile phones is only 1Hz, or once per second. Field tests have shown that the error in lap timekeeping using a mobile phone GNSS receiver can reach 1-2.5 seconds. Furthermore, there are currently few effective methods to improve accuracy and reduce errors with low-precision GNSS receivers. Summary of the Invention

[0005] The purpose of this application is to provide a machine learning-based method, device, medium, and product for determining go-kart lap times with improved accuracy.

[0006] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a machine learning-based method for timing go-kart lap times, including: Get the position of the go-kart one moment before it crosses the finish line and the position of the go-kart one moment after it crosses the finish line. Based on the go-kart's position at the moment before crossing the finish line and the go-kart's position at the moment after crossing the finish line, the moment when the go-kart crosses the line is determined using linear interpolation. Obtain the status information of the go-karts during a set time period; the status information includes speed, lateral acceleration, longitudinal acceleration, longitude, and latitude; Based on the state information, the lap time timing error of the go-kart is determined using a lap time timing error prediction model. This lap time timing error prediction model is obtained by training an initial lap time timing error prediction model using a training dataset. The initial lap time timing error prediction model includes a bidirectional LSTM encoder, a temporal attention mechanism module, a statistical aggregation encoder, a fusion MLP module, and a linear layer. The bidirectional LSTM encoder includes two BiLSTM layers, both connected to the temporal attention mechanism module. The statistical aggregation encoder includes a first MLP layer. The fusion MLP module includes a second MLP layer. The outputs of the temporal attention mechanism module and the first MLP layer are concatenated and then input to the second MLP layer. The second MLP layer is connected to the linear layer. The lap time of the go-kart is determined based on the time the go-kart crosses the line and the lap time error.

[0007] In one embodiment, the timing of the go-kart crossing the finish line is determined using linear interpolation based on the go-kart's position at the moment before crossing the finish line and the go-kart's position at the moment after crossing the finish line. Specifically, this includes: Based on the position of the go-kart at the moment before crossing the finish line, determine the first distance between the position of the go-kart at the moment before crossing the finish line and the finish line. Based on the position of the go-kart at the moment after crossing the finish line, determine the second distance between the position of the go-kart at the moment after crossing the finish line and the finish line. Based on the first distance and the second distance, determine the linear interpolation factor; The time when the go-kart crosses the line is determined based on the linear interpolation factor, the moment before crossing the finish line, and the moment after crossing the finish line.

[0008] In one embodiment, determining the linear interpolation factor based on the first distance and the second distance specifically includes: Using formula Determine the linear interpolation factor; where, It is a linear interpolation factor; t-1 represents the first distance between the go-kart's position and the finish line at the moment before it crosses the finish line; t-1 represents the moment before it crosses the finish line. t represents the second distance between the go-kart's position and the finish line at the moment after it crosses the finish line; t represents the moment after it crosses the finish line.

[0009] In one embodiment, the time when the go-kart crosses the finish line is determined based on the linear interpolation factor, the time before crossing the finish line, and the time after crossing the finish line, specifically including: Using formula Determine the time for go-karts to cross the line; among them, For the time when go-karts cross the line; This is the time value corresponding to the moment before crossing the finish line; This is the time value corresponding to the moment after crossing the finish line; is the linear interpolation factor.

[0010] In one embodiment, the initial prediction model for lap time timing error is trained using a training dataset, prior to which the following steps are also included: Obtain the state information of the training go-kart at historical moments and calculate the linear interpolation factor for training; Based on the state information of the training go-kart at historical moments and the training linear interpolation factor, the trajectory time series data sequence of the training go-kart is determined; The trajectory time series data sequence of the training go-kart is standardized to obtain the standardized trajectory time series data sequence of the training go-kart; Based on the time-series trajectory data of the go-karts used for training, a statistical feature vector is extracted; the statistical feature vector includes velocity features, acceleration features, position features, and basic features. The lap time error of the training go-kart is determined based on the lap time value measured by professional lap time timing equipment and the crossing time of the training go-kart. A training dataset is constructed by taking the standardized trajectory time series data sequence of the training go-kart and the statistical feature vector as inputs and the lap time timing error of the training go-kart as output.

[0011] In one embodiment, based on the state information, the lap time timing error of the go-kart is determined using a lap time timing error prediction model, specifically including: Based on the state information and the linear interpolation factor, a trajectory time series data sequence is determined; the trajectory time series data sequence includes velocity, longitudinal acceleration, lateral acceleration, linear interpolation factor, and time interval; The trajectory time series data sequence is standardized to obtain a standardized trajectory time series data sequence; Based on the trajectory time-series data sequence, a statistical feature vector is extracted; the statistical feature vector includes velocity features, acceleration features, position features, and basic features; The standardized trajectory time series data sequence and the statistical feature vector are input into the lap time timing error prediction model to determine the lap time timing error of the go-kart.

[0012] In one embodiment, the lap time score of the go-kart is determined based on the time the go-kart crosses the line and the lap time timing error, specifically including: Using formula Determine the lap time of the go-kart; wherein, The lap time of the go-kart; For the time when go-karts cross the line; This refers to the lap time timing error.

[0013] Secondly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described machine learning-based go-kart lap timer method.

[0014] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described machine learning-based go-kart lap timer method.

[0015] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned machine learning-based go-kart lap timer method.

[0016] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a machine learning-based method, device, medium, and product for go-kart lap time timing. It obtains the go-kart's position before and after crossing the finish line; determines the go-kart's crossing time using linear interpolation based on these positions; acquires the go-kart's state information for a set time period; and determines the go-kart's lap time timing error using a lap time timing error prediction model based on the state information. The lap time timing error prediction model is obtained by training an initial lap time timing error prediction model using a training dataset. The initial prediction model for lap timer error includes a bidirectional LSTM encoder, a temporal attention mechanism module, a statistical aggregation encoder, a fusion MLP module, and a linear layer. The bidirectional LSTM encoder consists of two BiLSTM layers, both connected to the temporal attention mechanism module. The statistical aggregation encoder includes a first MLP layer. The fusion MLP module includes a second MLP layer. The outputs of the temporal attention mechanism module and the first MLP layer are concatenated and then input to the second MLP layer. The second MLP layer is connected to the linear layer. Based on the karting's crossing time and lap timer error, the karting's lap timer score is determined. This application improves the lap timer accuracy of karting in high-speed motion scenarios using a low refresh rate GNSS module through linear interpolation. Subsequently, machine learning techniques are used to construct a lap timer error prediction model that integrates temporal neural networks and statistical features. This model can predict the error in the lap timer result, thereby further improving the accuracy of lap timer prediction. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating a machine learning-based go-kart lap timer method provided in an embodiment of this application; Figure 2 A flowchart illustrating a machine learning-based go-kart lap timer method provided in an embodiment of this application; Figure 3 A diagram showing go-karts crossing the finish line; Figure 4 A diagram of the machine learning model architecture for predicting lap time timing errors; Figure 5 A schematic diagram illustrating the timing error of lap time prediction using the BiLSTM-Attention model; Figure 6 Take a screenshot of the app's main interface; Figure 7 A screenshot of the lap timer display interface; Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] This application proposes a system for outdoor go-kart lap timekeeping using GNSS positioning modules on mobile phones and other mobile devices with low signal refresh rates. The system improves lap timekeeping accuracy by designing interpolation formulas and using machine learning models to predict lap timekeeping errors, resulting in a significant improvement in timing accuracy. It is widely applicable to various types of racing vehicles besides go-karts, including, but not limited to, Formula, touring car, and sports car racing.

[0022] This application first improves the lap timekeeping accuracy of go-karts in high-speed motion scenarios using a low refresh rate GNSS module through linear interpolation. Then, it utilizes machine learning techniques to construct a lap timekeeping error prediction model that integrates temporal neural networks and statistical features. This model can predict the error in the lap timekeeping results, thereby further improving the accuracy of lap timekeeping. Figure 1 As shown.

[0023] In one exemplary embodiment, such as Figure 2 As shown, a machine learning-based method for timing go-kart lap times is provided, including the following steps: S1: Get the position of the go-kart one moment before crossing the finish line and the position of the go-kart one moment after crossing the finish line.

[0024] S2: Based on the position of the go-kart before crossing the finish line and the position of the go-kart after crossing the finish line, the time when the go-kart crosses the line is determined using linear interpolation.

[0025] In one embodiment, S2 specifically includes: S21: Based on the position of the go-kart at the moment before crossing the finish line, determine the first distance between the position of the go-kart at the moment before crossing the finish line and the finish line.

[0026] S22: Based on the position of the go-kart at the moment after crossing the finish line, determine the second distance between the position of the go-kart at the moment after crossing the finish line and the finish line.

[0027] S23: Determine the linear interpolation factor based on the first distance and the second distance.

[0028] In one embodiment, S23 specifically includes: Using formula Determine the linear interpolation factor; where, It is a linear interpolation factor; t-1 represents the first distance between the go-kart's position and the finish line at the moment before it crosses the finish line; t-1 represents the moment before it crosses the finish line. t represents the second distance between the go-kart's position and the finish line at the moment after it crosses the finish line; t represents the moment after it crosses the finish line.

[0029] S24: Determine the time when the go-kart crosses the line based on the linear interpolation factor, the time before crossing the finish line, and the time after crossing the finish line.

[0030] In one embodiment, S24 specifically includes: Using formula Determine the time for go-karts to cross the line; among them, For the time when go-karts cross the line; This is the time value corresponding to the moment before crossing the finish line; This is the time value corresponding to the moment after crossing the finish line; is the linear interpolation factor.

[0031] In this embodiment, the low signal refresh rate of the GNSS positioning module leads to some error in determining whether the go-kart has crossed the finish line. Taking the GNSS positioning module on a mobile phone as an example, its signal refresh rate is typically 1Hz, meaning it receives a positioning signal once per second. Theoretically, two perfect touches of the finish line by the go-kart's front end constitute one lap, and this is used to time the lap. Let the go-kart's coordinates be... .like Figure 3 As shown, at time t-1, the go-kart has not yet touched the finish line; its current position is... When the satellite positioning signal is received again after 1 second, which is time t, the go-kart has already crossed the finish line a certain distance, and its current position is... If the time t is used as the time it takes for the go-kart to touch the finish line for lap timekeeping, a significant error will occur. In this case, the theoretical maximum error can reach 1 second. To address this issue, this application designs a method for calculating the crossing time based on linear interpolation to reduce the error caused by this situation, as follows: 1. Establish the equation of the straight line leading to the finish line.

[0032] Let x and y represent the longitude and latitude values ​​in the received satellite positioning signal, respectively. Let A and B be the coordinates of a location. On the finish line, take two points, A and B, with coordinates A and B respectively. and From these two points, we can obtain an equation representing the finish line: .

[0033] in: .

[0034] .

[0035] .

[0036] When the go-kart crosses the finish line between time t-1 and time t, let... and These represent the distances between the go-kart and the finish line at times t-1 and t, respectively. Figure 3 As shown. Then, using the distance the go-kart travels between two consecutive times t-1 and t... and To calculate the linear interpolation factor The formula is: .

[0037] The time value corresponding to when the go-kart touches the finish line is The time values ​​corresponding to time t-1 and time t are respectively and ,but The calculation formula is: .

[0038] S3: Obtain the status information of the go-karts during a set time period; the status information includes speed, lateral acceleration, longitudinal acceleration, longitude, and latitude.

[0039] S4: Based on the state information, the lap timer error of the go-kart is determined using the lap timer error prediction model; wherein, the lap timer error prediction model is obtained by training an initial lap timer error prediction model using a training dataset; the initial lap timer error prediction model includes a bidirectional LSTM encoder, a temporal attention mechanism module, a statistical aggregation encoder, a fusion MLP module, and a linear layer; the bidirectional LSTM encoder includes two BiLSTM layers; both BiLSTM layers are connected to the temporal attention mechanism module; the statistical aggregation encoder includes a first MLP layer; the fusion MLP module includes a second MLP layer; the output of the temporal attention mechanism module and the output of the first MLP layer are concatenated and then input to the second MLP layer; the second MLP layer is connected to the linear layer.

[0040] In one embodiment, S4 specifically includes: Based on the state information and the linear interpolation factor, a trajectory time series data sequence is determined; the trajectory time series data sequence includes velocity, longitudinal acceleration, lateral acceleration, linear interpolation factor, and time interval.

[0041] The trajectory time series data sequence is standardized to obtain a standardized trajectory time series data sequence.

[0042] Based on the trajectory time series data sequence, a statistical feature vector is extracted; the statistical feature vector includes velocity features, acceleration features, position features, and basic features.

[0043] The standardized trajectory time series data sequence and the statistical feature vector are input into the lap time timing error prediction model to determine the lap time timing error of the go-kart.

[0044] In one embodiment, the initial prediction model for lap time timing error is trained using a training dataset, prior to which the following steps are also included: Obtain the state information of the training go-kart at historical moments and calculate the linear interpolation factor for training.

[0045] Based on the state information of the training go-kart at historical moments and the training linear interpolation factor, the trajectory time series data sequence of the training go-kart is determined.

[0046] The trajectory time series data sequence of the training go-kart is standardized to obtain the standardized trajectory time series data sequence of the training go-kart.

[0047] Based on the time-series trajectory data of the go-karts used for training, a statistical feature vector is extracted; the statistical feature vector includes velocity features, acceleration features, position features, and basic features.

[0048] The lap time error of the training go-kart is determined based on the lap time values ​​measured by professional lap time timing equipment and the crossing time of the training go-kart.

[0049] A training dataset is constructed by taking the standardized trajectory time series data sequence of the training go-kart and the statistical feature vector as inputs and the lap time timing error of the training go-kart as output.

[0050] In this embodiment, this application combines the physical characteristics of go-kart motion and the statistical laws of lap timekeeping errors to systematically construct multi-dimensional input features. It integrates various statistical features with vehicle trajectory characteristics and, combined with residual label design, constructs a feature engineering method for lap timekeeping error correction based on machine learning. First, when time t is detected that the go-kart has passed the finish line, the lap timekeeping error is calculated... At the same time, it obtains the current status information of the go-kart, including the go-kart's speed, lateral acceleration, longitudinal acceleration, longitude, and latitude of its current location.

[0051] In terms of label design, an error prediction method is used here, which means that the prediction target of the machine learning model is designed as an accurate lap time value. Compared with the actual calculated lap time value difference ,Right now .

[0052] in, The value can be positive or negative. The lap time value measured by professional lap time timing equipment can be considered the most accurate lap time value. The lap time (go-kart crossing time) is calculated by a linear interpolation-based method using a mobile phone or mobile device equipped with a GNSS module having a lower refresh rate. The lap time is then corrected using machine learning. The calculation formula is: .

[0053] in, The lap time timing error is predicted by a machine learning model (lap time timing error prediction model).

[0054] This label design effectively reduces the learning difficulty of the model, improves the correction accuracy, and has better generalization ability.

[0055] After the lap timekeeping data features are constructed and labels are defined, the BiLSTM-Attention lap timekeeping error prediction model is constructed.

[0056] This application designs a BiLSTM-Attention machine learning model to predict lap timekeeping errors. By designing a dedicated feature extraction architecture and attention mechanisms, it models the error prediction process. Figure 4 As shown.

[0057] This application transforms heterogeneous input data, namely trajectory time-series data sequences and statistical aggregation data, into feature vectors with representational capabilities. The architecture of this application employs a parallel encoding strategy, designing specialized encoders based on the characteristics of different data types.

[0058] 1. Trajectory temporal feature encoder (bidirectional LSTM encoder).

[0059] The trajectory temporal feature encoder needs to possess the ability to accurately capture long-range temporal dependencies and keenly perceive local dynamic changes. Therefore, an architecture based on Long Short-Term Memory (LSTM) networks is chosen for implementation. Given a segment of length... The trajectory time series data sequence, This represents the observed feature vector at time t, which contains velocity. Longitudinal acceleration lateral acceleration Linear interpolation factor Time interval ,Right now .

[0060] Given the inconsistency in the length of the actual collected trajectory time-series data sequences, and to meet the model's strict requirements on input dimensions, all sequence lengths are standardized to a uniform length. Specifically, sequences longer than 80 characters are truncated, while sequences shorter than 80 characters are padded with zeros.

[0061] The trajectory time-series data sequence, after the above standardization process, will be input into a two-layer bidirectional LSTM network for deep feature extraction. Each BiLSTM layer contains 64 hidden units, and a dropout rate of 0.2 is set to effectively enhance the model's generalization ability. The specific calculation formula is as follows: .

[0062] In the above formula, Indicates the first Output of the BiLSTM layer; and These refer to the concatenation of the forward and backward hidden states in BiLSTM, respectively.

[0063] After two layers of BiLSTM encoding operations, the trajectory temporal feature encoder outputs a feature matrix. This matrix fully encompasses the long-distance dependencies and dynamic changes in the trajectory data.

[0064] 2. Statistical Aggregation Feature Encoder (Statistical Aggregation Encoder).

[0065] The global statistical features contained in trajectory time-series data sequences can accurately reflect the overall trend of driving behavior, such as key information like average speed and maximum acceleration. These statistical features have significant advantages in terms of high stability and strong noise resistance, effectively compensating for the shortcomings of relying solely on time-series features in capturing global information. The statistical aggregation feature encoder in this application adopts a deep multilayer perceptron (MLP) architecture to achieve the key goals of nonlinear transformation of high-dimensional statistical features and dimensional unification. The statistical feature vector extracted from the original trajectory time-series data sequence contains a total of 27 dimensions of features, which can be further subdivided into the following categories.

[0066] Speed ​​characteristics: These include eight features such as the mean, standard deviation, median, 75th percentile, 25th percentile, maximum, minimum, and average absolute value of speed changes. These features characterize the speed of the go-kart from different perspectives, reflecting key information such as the central tendency, dispersion, and magnitude of speed changes.

[0067] Acceleration characteristics include the mean and standard deviation of longitudinal acceleration, the mean and standard deviation of lateral acceleration, the mean, standard deviation, and maximum value of total acceleration (obtained by taking the square root of the sum of the squares of longitudinal and lateral accelerations), the proportion of strong acceleration (i.e., the proportion of longitudinal acceleration greater than 2.0), the proportion of strong deceleration (the proportion of longitudinal acceleration less than -2.0), and the proportion of sharp turns (the proportion of lateral acceleration with an absolute value greater than 3.0), totaling 10 characteristics. These acceleration-related characteristics comprehensively reflect the dynamic behavior of go-karts during driving, including acceleration, deceleration, and steering.

[0068] Location characteristics: specifically including total distance, average distance, and standard deviation of distance. mean Standard deviation mean The system comprises seven features, including the standard deviation of the kart's trajectory. These positional features accurately describe the range of the kart's trajectory on the track, the dispersion of its positional distribution, and its overall positional trend.

[0069] Basic characteristics: mainly the number of data points and data density (measured by the number of data points and...). The data density is calculated from the ratio of the two features. The number of data points reflects the richness of the collected data, while the data density reflects the distribution of the data to a certain extent. Both are of great reference value for evaluating data quality and the effectiveness of model input.

[0070] The statistical aggregation encoder uses an MLP network (first MLP layer) to map the 27-dimensional raw statistical features to a 16-dimensional output space. The specific calculation formula is as follows: .

[0071] In the above formula, It is the weight matrix of the first-level linear transformation. Its element values ​​determine the connection weights between the input features and the hidden layer neurons, playing a key role in the direction and degree of feature transformation. This is the bias term of the first-layer linear transformation, used to adjust the activation threshold of neurons and increase the expressive power of the model; To correct the activation function of the Rectified Linear Unit, a non-linear transformation is applied to the input value, effectively solving the gradient vanishing problem in traditional neural networks and improving the training efficiency and expressive power of the model. It is the weight matrix of the second-level linear transformation, which further performs linear combination and transformation on the features after ReLU activation; This is the bias term for the second-level linear transformation. To further enhance the model's generalization ability, dropout regularization is introduced into the encoder, with a dropout rate of 0.3. After these operations, the final output statistical feature vector fully retains the global statistical properties and can work synergistically with other processed features.

[0072] 3. Design of the temporal attention mechanism (Attention).

[0073] The temporal characteristics of trajectory time series data are key information elements in lap time prediction tasks. However, traditional sequence models have significant limitations in effectively capturing critical moments in the driving process, such as rapid acceleration, sudden braking, and the start of cornering. Driving decisions at these critical moments often have a direct and decisive impact on the final lap time. Therefore, this application designs an attention mechanism that achieves accurate extraction and focusing of key temporal features by performing a weighted summation operation on the feature matrix output by a bidirectional LSTM encoder.

[0074] Given the feature matrix output by a bidirectional LSTM encoder ,in Let be the hidden state vector at time t. The attention mechanism calculates the importance weights for each time step in an orderly manner according to the following steps: First, using a linear layer, the feature matrix... Convert to attention score vector The specific calculation formula is as follows: .

[0075] In this formula, The weight matrix is ​​unique to the attention mechanism, and its parameters are learned and optimized through the model training process to adapt to different data features and task requirements. This is the calculated attention score vector, where each element corresponds to a feature matrix. The attention score for the corresponding time step is used to indicate that the features at that time step may be more important in the current task. A higher score indicates that the features at that time step may be more important in the current task.

[0076] Next, the softmax function is used to optimize the attention score vector. Normalization is performed to obtain the attention weights at each time step. The calculation formula is as follows: In the above formula, Indicates the normalized i-th The attention weights at each time step are normalized using the softmax function, ensuring that the sum of the attention weights at all time steps is 1. This allows these weights to reasonably reflect the relative importance of different time steps in the overall picture.

[0077] Finally, the attention feature vector of trajectory temporal features is obtained by weighted summation. The specific calculation formula is as follows: In this formula, This refers to the trajectory temporal key feature vector extracted by the attention mechanism, which is obtained by analyzing the feature matrix. Feature vectors at each time step According to the corresponding attention weight The weighted summation is then performed. This process effectively integrates important information from different time steps, highlighting the characteristics corresponding to the moments that play a crucial role in predicting lap time timing errors.

[0078] 4. Feature fusion mechanism.

[0079] The importance of trajectory temporal features and statistical aggregation features varies significantly across different driving scenarios and practical applications. To achieve optimal integration and synergistic utilization of various data types, this application constructs a feature fusion mechanism. This mechanism primarily achieves its goal through two key steps: feature concatenation and nonlinear transformation. Figure 5 As shown.

[0080] Let the attention feature vector of the trajectory temporal features after attention mechanism processing be... 128-dimensional; statistical eigenvectors are 16-dimensional. The feature fusion mechanism then executes according to the following steps.

[0081] First, the attention feature vector of trajectory temporal features and statistical eigenvectors Perform a concatenation operation to construct a joint representation vector. 144 dimensions. The specific calculation formula is as follows: .

[0082] In this formula, This is the joint feature vector obtained after concatenation, which organically integrates different feature information. Subsequently, an MLP is used to process the joint feature vector. A nonlinear transformation operation is performed to obtain the final fused feature vector. The specific calculation process is presented through the following formula: .

[0083] In the above formula, , , These are the weight matrices for the first, second, and third linear transformations in the second MLP layer (fused MLP). Map the input to a high-dimensional hidden space. The deep features are mapped to the final scalar output. , , These are the bias terms for the first, second, and third linear transformations, respectively, used to adjust the activation threshold of neurons and further enhance the expressive power of the model.

[0084] The activation function is applied after the linear transformation of the first two layers, enhancing the model's ability to learn complex features through nonlinear mapping. The third layer, as the regression output layer, directly outputs the prediction result without using an activation function. Furthermore, dropout (with a dropout rate of 0.2) is introduced after the activation of the first layer, effectively preventing overfitting and enhancing generalization ability by randomly discarding some neuron connections.

[0085] Finally, the fused feature vector obtained after the above series of operations The predicted lap time timing error will be output through a linear layer. .

[0086] S5: Determine the lap time of the go-kart based on the time the go-kart crosses the line and the lap time error.

[0087] In this embodiment, the lap time timing error is compared with... Adding them together will give you the corrected lap time result (lap time score). ,Right now .

[0088] In one embodiment, the lap time score of the go-kart is determined based on the time the go-kart crosses the line and the lap time timing error, specifically including: Using formula Determine the lap time of the go-kart; wherein, The lap time of the go-kart; For the time when go-karts cross the line; This refers to the lap time timing error.

[0089] The product described in this application is a real-time lap timekeeping and information feedback app designed for karting (including, but not limited to, Formula, touring car, and sports car racing). This software can be installed and run on Android-based smartphones and other mobile smart devices equipped with a GNSS module and display screen. As a real-time lap timekeeping system for racing, it replaces traditional lap timekeeping solutions based on radio frequency identification (RFID) technology, providing drivers with real-time information feedback during karting training or races, helping them to instantly grasp their performance on each lap.

[0090] The core functionality of this app is designed around the entire process of "data acquisition - lap timekeeping - performance feedback." Specifically, it includes: supporting a satellite positioning module (built-in or external) to receive satellite positioning signals from the go-karts on outdoor tracks, providing multi-source data support for lap timekeeping, and displaying lap timekeeping results or providing real-time voice feedback to the driver. Based on the satellite positioning signals, it determines the time the go-kart crosses the finish line. It records the lap timekeeping results for each go-kart and improves lap timekeeping accuracy by using the linear interpolation formula and machine learning model designed in this application to predict lap timekeeping errors.

[0091] It supports displaying lap time results on the screen of a mobile phone or other smart device, and is compatible with various installation options such as go-kart nose wing mounting and helmet mounting. Drivers can view real-time information without taking their eyes off the track, and their view is not obstructed. It can also connect to headphones via wired or wireless (Bluetooth) connections for real-time voice announcements of lap time results, avoiding visual distraction. The app's main interface is shown below. Figure 6 As shown, the lap timer results are displayed on the interface. Figure 7 As shown.

[0092] This application proposes a method for karting lap timekeeping using Global Navigation Satellite System (GNSS), linear interpolation, and machine learning. Because the lap timekeeping method provided in this application does not require a high refresh rate GNSS module, it can be implemented on low-cost hardware. For example, a mobile app can be developed to utilize the existing low refresh rate GNSS module in a mobile phone. By implementing the machine learning module in software, users can use the functions provided in this application without purchasing additional hardware. This application provides karting participants with a near-zero-cost system that provides real-time lap timekeeping results, and the timing accuracy provided by this system is close to that of professional karting lap timekeeping systems priced at 4,000-10,000 RMB or even higher. This provides participants with a low-cost auxiliary training device, improving their training efficiency and reducing the cost of advancing their skill level in the sport. This helps maintain their enthusiasm for the sport, promotes its popularization, and facilitates the cultivation and reserve of professional talent.

[0093] The following experiments illustrate the improved accuracy of the method described in this application.

[0094] The experimental data were collected from actual measurements at multiple karting tracks in China, including: ×× Flying Elephant Karting Club, ×× Extreme Speed ​​Star International Karting Circuit, various branches of ×× Shengdao Boyue International Karting Circuit, ×× Zhongbei International Karting Circuit, and other tracks, totaling 148 sets of valid data. These tracks cover typical scenarios such as combinations of low-to-medium speed curves, long straights with continuous curves, and elevated bridges. As shown in Table 1, the design in this application that utilizes machine learning for error prediction and correction improves the accuracy of lap timekeeping by 37.8%.

[0095] Table 1. Statistical table of the effect of error correction using LSTM-Attention.

[0096] This application improves the lap timekeeping accuracy of go-karts in high-speed scenarios using a low refresh rate GNSS module through linear interpolation. Subsequently, machine learning techniques are employed to construct a lap timekeeping error correction model that integrates temporal neural networks and statistical features. This model can predict the error in the lap timekeeping results, thereby further improving the accuracy. Experimental results show that this application enables participants to significantly improve lap timekeeping accuracy with low or even zero hardware costs. It provides a theoretical and engineering foundation for realizing a low-cost, high-precision go-kart lap timekeeping system.

[0097] In one exemplary 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 above-described machine learning-based go-kart lap timer method.

[0098] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described machine learning-based go-kart lap timer method.

[0099] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described machine learning-based go-kart lap timer method.

[0100] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 8As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a machine learning-based go-kart lap timer method.

[0101] 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.

[0102] 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.

[0103] Those skilled in the art will understand that all or part of the processes in 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. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile 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).

[0104] 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, etc., and are not limited to these.

[0105] 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 specification.

[0106] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A go-kart lap timer method based on machine learning, characterized in that, include: Get the position of the go-kart one moment before it crosses the finish line and the position of the go-kart one moment after it crosses the finish line. Based on the go-kart's position at the moment before crossing the finish line and the go-kart's position at the moment after crossing the finish line, the moment when the go-kart crosses the line is determined using linear interpolation. Obtain the status information of the go-karts during a set time period; the status information includes speed, lateral acceleration, longitudinal acceleration, longitude, and latitude; Based on the state information, the lap time timing error of the go-kart is determined using a lap time timing error prediction model. This lap time timing error prediction model is obtained by training an initial lap time timing error prediction model using a training dataset. The initial lap time timing error prediction model includes a bidirectional LSTM encoder, a temporal attention mechanism module, a statistical aggregation encoder, a fusion MLP module, and a linear layer. The bidirectional LSTM encoder includes two BiLSTM layers, both connected to the temporal attention mechanism module. The statistical aggregation encoder includes a first MLP layer. The fusion MLP module includes a second MLP layer. The outputs of the temporal attention mechanism module and the first MLP layer are concatenated and then input to the second MLP layer. The second MLP layer is connected to the linear layer. The lap time of the go-kart is determined based on the time the go-kart crosses the line and the lap time error.

2. The go-kart lap time timing method based on machine learning according to claim 1, characterized in that, Based on the go-kart's position at the moment before crossing the finish line and the go-kart's position at the moment after crossing the finish line, the time when the go-kart crosses the line is determined using linear interpolation, specifically including: Based on the position of the go-kart at the moment before crossing the finish line, determine the first distance between the position of the go-kart at the moment before crossing the finish line and the finish line. Based on the position of the go-kart at the moment after crossing the finish line, determine the second distance between the position of the go-kart at the moment after crossing the finish line and the finish line. Based on the first distance and the second distance, determine the linear interpolation factor; The time when the go-kart crosses the line is determined based on the linear interpolation factor, the moment before crossing the finish line, and the moment after crossing the finish line.

3. The go-kart lap time timing method based on machine learning according to claim 2, characterized in that, Based on the first distance and the second distance, a linear interpolation factor is determined, specifically including: Using formula Determine the linear interpolation factor; where, It is a linear interpolation factor; t-1 represents the first distance between the go-kart's position and the finish line at the moment before it crosses the finish line; t-1 represents the moment before it crosses the finish line. t represents the second distance between the go-kart's position and the finish line at the moment after it crosses the finish line; t represents the moment after it crosses the finish line.

4. The go-kart lap time timing method based on machine learning according to claim 2, characterized in that, The timing of the go-kart crossing the finish line is determined based on the linear interpolation factor, the moment before crossing the finish line, and the moment after crossing the finish line. Specifically, this includes: Using formula Determine the time for go-karts to cross the line; among them, For the time when go-karts cross the line; This is the time value corresponding to the moment before crossing the finish line; This is the time value corresponding to the moment after crossing the finish line; is the linear interpolation factor.

5. The go-kart lap time timing method based on machine learning according to claim 1, characterized in that, The initial prediction model for lap timekeeping error was trained using the training dataset, and previous steps included: Obtain the state information of the training go-kart at historical moments and calculate the linear interpolation factor for training; Based on the state information of the training go-kart at historical moments and the training linear interpolation factor, the trajectory time series data sequence of the training go-kart is determined; The trajectory time series data sequence of the training go-kart is standardized to obtain the standardized trajectory time series data sequence of the training go-kart; Based on the time-series trajectory data of the go-karts used for training, a statistical feature vector is extracted; the statistical feature vector includes velocity features, acceleration features, position features, and basic features. The lap time error of the training go-kart is determined based on the lap time value measured by professional lap time timing equipment and the crossing time of the training go-kart. A training dataset is constructed by taking the standardized trajectory time series data sequence of the training go-kart and the statistical feature vector as inputs and the lap time timing error of the training go-kart as output.

6. The go-kart lap time timing method based on machine learning according to claim 2, characterized in that, Based on the aforementioned status information, the lap timer error prediction model is used to determine the lap timer error of the go-kart, specifically including: Based on the state information and the linear interpolation factor, a trajectory time series data sequence is determined; the trajectory time series data sequence includes velocity, longitudinal acceleration, lateral acceleration, linear interpolation factor, and time interval; The trajectory time series data sequence is standardized to obtain a standardized trajectory time series data sequence; Based on the trajectory time-series data sequence, a statistical feature vector is extracted; the statistical feature vector includes velocity features, acceleration features, position features, and basic features; The standardized trajectory time series data sequence and the statistical feature vector are input into the lap time timing error prediction model to determine the lap time timing error of the go-kart.

7. The go-kart lap time timing method based on machine learning according to claim 1, characterized in that, The lap time of the go-kart is determined based on the time the go-kart crosses the line and the lap time error, specifically including: Using formula Determine the lap time of the go-kart; wherein, The lap time of the go-kart; For the time when go-karts cross the line; This refers to the lap time timing error.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the machine learning-based go-kart lap timekeeping method according to any one of claims 1-7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the machine learning-based go-kart lap timer method as described in any one of claims 1-7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the machine learning-based go-kart lap timer method as described in any one of claims 1-7.