Method for updating map data based on sensor
Data is collected through sensors and used soft maximum regression algorithm and KMP algorithm for classification and comparison, combined with differential autoregressive moving average model, the problem of inability to predict map information reliability in the existing technology is solved, real-time update and intelligent prediction of maps are realized.
Patent Information
- Application Number
- CN202411622924.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-07
AI Technical Summary
Most existing methods of updating maps can only realize real-time network acquisition methods, and cannot make reliability predictions based on existing situations in a certain period of time in the near future, and the degree of intelligence is low.
Vehicle information and external information are collected through sensors, and the data is classified and compared using soft max regression algorithm and KMP algorithm, and map information is predicted and recommended in combination with differential autoregression moving average model.
Real-time update of maps and reliability prediction of future map information is realized, the level of intelligence is improved, and the use needs of different vehicles are met.
Smart Images

Figure CN119576950A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of methods for updating map data based on sensors, and in particular to a method for updating map data based on sensors. Background Art
[0002] It is very important for automobile manufacturers and related service providers to provide high-quality digital map data to ensure vehicle safety, so it needs to be updated in real time.
[0003] To sum up, most of the existing methods for updating maps can only achieve real-time online acquisition, but cannot make reliability predictions on map information for a certain period in the near future based on the current situation. The degree of intelligence is low. To address the above problems, existing equipment needs to be improved. Summary of the invention
[0004] The purpose of the present invention is to provide a method for updating map data based on sensors, so as to solve the problem that most of the existing methods for updating maps proposed in the above background technology can only realize real-time network acquisition, but cannot make reliability predictions on map information in a certain period of time in the near future based on the existing situation, and have a low degree of intelligence.
[0005] To achieve the above object, the present invention provides the following technical solution: a method for updating map data based on a sensor, comprising the following steps:
[0006] S1, data collection stage: information data is collected through sensors, and the data information collected by the sensors includes vehicle information and external information;
[0007] S2, data analysis stage: classify the various types of data received, then compare the classified data with the samples set in the sample library through the comparison algorithm, and output the comparison results;
[0008] S3, regular re-inspection stage: the setting of regular collection controls the frequency of data collection to ensure the real-time update of data information;
[0009] S4, map update stage: update the map information partially or completely according to the result;
[0010] S5, prediction and recommendation stage: predicting the map information based on the road information of the period stored in the sample library as a sample, and recommending the optimal solution.
[0011] Preferably, the sensors in the S1 data collection stage include temperature and humidity sensors, positioning sensors, infrared sensors, network detection sensors, image sensors and various types of vehicle-mounted sensors, and the vehicle-mounted sensors include gyro sensors, proximity sensors and light sensors.
[0012] Preferably, the classification in the S2 data analysis stage adopts a soft max regression algorithm, and the main idea of the soft max regression algorithm is: for a training set {(x (1) ,y (1) )...(x (m) ,y (m) )}, where X is the sample feature, Y is the category corresponding to each sample, and the class label y (i) ∈{1,2,...,k}, use the hypothesis function to estimate the probability value of the test sample X' to which the category j belongs, and P(y=j|x′) takes the category with the largest probability as the predicted category of the test sample.
[0013] Preferably, the classification in the S2 data analysis stage adopts the soft max regression algorithm, and the hypothesis function is generally recorded as h θ (x), as shown in the formula where the parameter θ is a matrix.
[0014] Preferably, each row of the matrix θ in the S2 data analysis stage can be regarded as a classifier parameter corresponding to a category. There are k categories in total, so θ has k rows, as shown in the formula
[0015]
[0016] Preferably, the implementation process of the soft max regression algorithm on the Spark platform is as follows:
[0017] Step 1: Broadcast the model parameters obtained in the training phase to each computing node on the master node;
[0018] Step 2: Read the dataset to be classified from HDFS to generate an RDD whose internal data structure is the customer information model, and specify the number of RDD partitions according to the dataset size;
[0019] Step 3: Parse the data through the map operation to generate an RDD with a custom data structure inside. Since iteration is not required, there is no need to call the cache to persist the data set at this time;
[0020] Step 4: Calculate the probability of each data item belonging to each category based on the model parameters on each slave node, and take the category with the highest probability as the predicted category of the data item;
[0021] step5: Output classification results.
[0022] Preferably, the S2 data analysis stage is completed using a KMP algorithm, and the matching types of the KMP algorithm include approximate matching and exact matching.
[0023] Preferably, the S3 periodic review phase is to set the collection frequency and collection content of the S1 data collection phase, and at the same time provide comparison samples for data matching in the S2 data analysis phase.
[0024] Preferably, the S5 prediction and recommendation stage is predicted by a differential autoregressive moving average model, and the prediction process is to first convert the non-stationary time series into a stationary time series by selecting a differential operation of an appropriate order, then establish an autoregressive moving average model for the stationary series, and then predict the original data.
[0025] Preferably, the process of the differential autoregressive moving average model prediction in the S5 prediction and recommendation stage is to first obtain time series data, then draw a data graph to observe whether it is a stationary time series and invert the model, and finally repeat the previous step when the model diagnosis is abnormal.
[0026] Compared with the prior art, the invention has the following beneficial effects: the method for updating map data based on sensors,
[0027] The present invention can effectively solve the problem of low intelligence level in that most existing methods of updating maps can only realize real-time network acquisition, but cannot predict the reliability of map information in a certain period in the near future according to the existing situation through the coordinated use of the S2 data analysis stage and the S5 prediction and recommendation stage. The data information received from temperature and humidity sensors, positioning sensors, infrared sensors, network detection sensors, image sensors and various vehicle-mounted sensors are classified through the soft max regression algorithm, and then the classified data are compared with the samples set in the sample library through the KMP algorithm, and the comparison result is output; that is, the content of the map to be updated is obtained, thereby realizing real-time update of the map, and at the same time, the optimal choice is analyzed and recommended when the map information is not conducive to travel. In addition, the device predicts the map situation in the same period in the near future by combining the map status of the previous period through the differential autoregressive moving average model prediction, and thereby meets the different usage requirements of vehicles, thereby improving the intelligence level of the device. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of the overall workflow of a method for updating map data based on a sensor according to the present invention;
[0029] Figure 2 A schematic diagram of the types of common sensors used in the collection items of the S1 stage of a method for updating map data based on sensors of the present invention;
[0030] Figure 3 This is a schematic diagram of the workflow of stage S2 of a method for updating map data based on a sensor according to the present invention;
[0031] Figure 4 The present invention discloses a method for updating map data based on sensors, which is a parallel softmax flowchart based on spark. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] See also Figure 1-4 , the present invention provides a technical solution:
[0034] Embodiment 1
[0035] A method for updating map data based on a sensor comprises the following steps:
[0036] S1, data collection stage: information data is collected through sensors, and the data information collected by the sensors includes vehicle information and external information;
[0037] S2, data analysis stage: classify the various types of data received, then compare the classified data with the samples set in the sample library through the comparison algorithm, and output the comparison results;
[0038] S3, regular re-inspection stage: the setting of regular collection controls the frequency of data collection to ensure the real-time update of data information;
[0039] S4, map update stage: update the map information partially or completely according to the result;
[0040] S5, prediction and recommendation stage: predicting the map information based on the road information of the period stored in the sample library as a sample, and recommending the optimal solution.
[0041] In a further example, the sensors in the S1 data collection phase include temperature and humidity sensors, positioning sensors, infrared sensors, network detection sensors, image sensors, and various types of vehicle-mounted sensors, and the vehicle-mounted sensors include gyro sensors, proximity sensors, and light sensors.
[0042] In a further example, the classification in the S2 data analysis stage adopts the soft max regression algorithm, and the main idea of the soft max regression algorithm is: for a training set consisting of m labeled samples {(x (1) ,y (1) )...(x (m),y (m) )}, where X is the sample feature, Y is the category corresponding to each sample, and the class label y (i) ∈{1,2,...,k}, use the hypothesis function to estimate the probability value of the test sample X' to which the category j belongs, and P(y=j|x′) takes the category with the largest probability as the predicted category of the test sample.
[0043] In a further example, the classification in the S2 data analysis stage adopts the soft max regression algorithm, and the hypothesis function is generally denoted as h θ (x), as shown in the formula where the parameter θ is a matrix.
[0044] Specifically, as can be seen from the formula, as long as the parameter θ is determined, the prediction model can be obtained, so as to predict the category of the test sample. At the same time, the parameter θ also needs to be evaluated to determine whether the prediction model is accurate. Therefore, the hypothesis function must be evaluated. The function that evaluates the quality of the hypothesis function is generally called the loss function or error function, denoted as j(θ):
[0045]
[0046] Among them, l{.} is an indicative function. When the value in the curly brackets is true, the result of the function is l, and when the value in the curly brackets is false, the result is 0. For example, 1{5=5}=1, 1{2=3}=0. To obtain the parameter θ, we need to solve θ so that j(θ) reaches the minimum value.
[0047] In a further example, each row of the matrix θ in the S2 data analysis phase can be regarded as a classifier parameter corresponding to a category. There are k categories in total, so θ has k rows, as shown in the formula
[0048]
[0049] In a further example, the implementation process of the soft max regression algorithm on the Spark platform is as follows:
[0050] Step 1: Broadcast the model parameters obtained in the training phase to each computing node on the master node;
[0051] Step 2: Read the dataset to be classified from HDFS to generate an RDD whose internal data structure is the customer information model, and specify the number of RDD partitions according to the dataset size;
[0052] Step 3: Parse the data through the map operation to generate an RDD with a custom data structure inside. Since iteration is not required, there is no need to call the cache to persist the data set at this time;
[0053] Step 4: Calculate the probability of each data item belonging to each category based on the model parameters on each slave node, and take the category with the highest probability as the predicted category of the data item;
[0054] step5: Output classification results.
[0055] In a further example, the S2 data analysis phase is completed using the KMP algorithm, and the matching types of the KMP algorithm include approximate matching and exact matching.
[0056] In a further example, the S3 scheduled review phase is to set the collection frequency and collection content of the S1 data collection phase, and at the same time provide comparison samples for data matching in the S2 data analysis phase.
[0057] In a further example, the S5 prediction recommendation stage is predicted by a differential autoregressive moving average model, and the prediction process is to first transform the non-stationary time series into a stationary time series by selecting a differential operation of an appropriate order, then establish an autoregressive moving average model for the stationary series, and then predict the original data.
[0058] In a further example, the process of prediction of the differential autoregressive moving average model in the S5 prediction recommendation stage is to first obtain the time series data, then draw a data plot to observe whether it is a stationary time series and invert the model, and finally repeat the previous step when the model diagnoses an abnormality.
[0059] Specifically, the prediction process of the autoregressive moving average model includes the following steps:
[0060] A: Obtain the time series data of the observed system;
[0061] B: Plot the data to see if it is a stationary time series. If it is a non-stationary time series, it must first be transformed into a stationary time series by performing a d-order difference operation. Here, d is the d in the ARIMA (p, d, q) model. If it is a stationary series, the ARMA (p, q) model is used. The difference between the ARIMA (p, d, q) model and the ARMA (p, q) model is that the characteristic polynomial of the autoregressive part of the former contains d unit roots.
[0062] C: The autocorrelation coefficient ACF and partial autocorrelation coefficient PACF of the obtained stationary time series are obtained respectively. The optimal layer p and order q are obtained by analyzing the autocorrelation graph and partial autocorrelation graph. The ARIMA model is obtained by the above-obtained d, q, and p.
[0063] D: Model diagnosis, perform diagnostic analysis to confirm that the obtained model is indeed consistent with the observed data characteristics; if not, return to step C.
[0064] Embodiment 2
[0065] This embodiment is a further description of the above embodiment. It should be understood that this embodiment includes all the aforementioned technical features and is further described in detail.
[0066] As attached Figure 4 The parallel design of the training phase of the softmax regression algorithm shown in the Spark platform is as follows:
[0067] Step 1: First, read the training data set from the distributed file system HDFS to generate an RDD whose internal data structure is the information model, and specify the number of RDD partitions when generating the RDD. This number of partitions is the number of parallel tasks.
[0068] Step 2: Transform the data format through the map operation so that the data in each partition of the RDD has a custom structure; Step 3: Call the cache function on the RDD to perform persistence operations and initialize the weight matrix;
[0069] Step 4: Use broadcast variables to distribute the weight matrix to each computing node;
[0070] Step 5: On each computing node, calculate the gradient of each category corresponding to each piece of data according to the weight matrix;
[0071] Step 6: On each computing node, calculate the gradient sum of each category, generate a global gradient, and return it to the master node;
[0072] Step 7: Update the weight matrix according to the global gradient on the master node;
[0073] step8: Repeat steps 3-6 until the set number of iterations is reached;
[0074] step9: Iteration is completed and model parameters (weight matrix) are output.
[0075] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for updating map data based on a sensor, characterized in that: The following steps are involved: S1, data collection stage: information data is collected through sensors, and the data information collected by the sensors includes vehicle information and external information; S2, data analysis stage: classify the various types of data received, then compare the classified data with the samples set in the sample library through the comparison algorithm, and output the comparison results; S3, regular re-inspection stage: the setting of regular collection controls the frequency of data collection to ensure the real-time update of data information; S4, map update stage: update the map information partially or completely according to the result; S5, prediction and recommendation stage: predicting the map information based on the road information of the period stored in the sample library as a sample, and recommending the optimal solution.
2. A method for updating map data based on a sensor according to claim 1, characterized in that: The sensors in the S1 data collection stage include temperature and humidity sensors, positioning sensors, infrared sensors, network detection sensors, image sensors and various types of vehicle-mounted sensors, and the vehicle-mounted sensors include gyro sensors, proximity sensors and light sensors.
3. The method for updating map data based on a sensor according to claim 1, characterized in that: The classification in the S2 data analysis stage adopts the soft max regression algorithm, and the main idea of the soft max regression algorithm is: for a training set consisting of m labeled samples {(x (1) ,y (1) )...(x (m) ,y (m) )}, where X is the sample feature, Y is the category corresponding to each sample, and the class label y (i) ∈{1,2,...,k}, use the hypothesis function to estimate the probability value of the test sample X' to which the category j belongs, and P(y=j|x′) takes the category with the largest probability as the predicted category of the test sample.
4. The method for updating map data based on a sensor according to claim 1, characterized in that: The classification in the S2 data analysis stage adopts the soft max regression algorithm, and the hypothesis function is generally denoted as h θ (x), as shown in the formula where the parameter θ is a matrix.
5. The method for updating map data based on sensors according to claim 1, characterized in that: In the S2 data analysis phase, each row of the matrix θ can be regarded as a classifier parameter corresponding to a category. There are k categories in total, so θ has k rows, as shown in the formula 6. The method for updating map data based on sensors according to claim 1, characterized in that: The implementation process of the softmax regression algorithm on the Spark platform is as follows: Step 1: Broadcast the model parameters obtained in the training phase to each computing node on the master node; Step 2: Read the dataset to be classified from HDFS to generate an RDD whose internal data structure is the customer information model, and specify the number of RDD partitions according to the dataset size; Step 3: Parse the data through the map operation to generate an RDD with a custom data structure inside. Since iteration is not required, there is no need to call the cache to persist the data set at this time; Step 4: Calculate the probability of each data item belonging to each category based on the model parameters on each slave node, and take the category with the highest probability as the predicted category of the data item; step5: Output classification results.
7. The method for updating map data based on sensors according to claim 1, characterized in that: The S2 data analysis stage is completed using the KMP algorithm, and the matching types of the KMP algorithm include approximate matching and exact matching.
8. The method for updating map data based on sensors according to claim 1, characterized in that: The S3 periodic recheck stage is to set the collection frequency and collection content of the S1 data collection stage, and provide comparison samples for data matching in the S2 data analysis stage.
9. The method for updating map data based on sensors according to claim 1, characterized in that: The S5 prediction recommendation stage is predicted by a differential autoregressive moving average model, and the prediction process is to first transform the non-stationary time series into a stationary time series by selecting a differential operation of an appropriate order, then establish an autoregressive moving average model for the stationary series, and then predict the original data.
10. The method for updating map data based on sensors according to claim 1, characterized in that: The process of the differential autoregressive moving average model prediction in the S5 prediction recommendation stage is to first obtain time series data, then draw a data plot to observe whether it is a stationary time series and invert the model, and finally repeat the previous step when the model diagnoses an abnormality.
