Riding identification method and device, equipment and storage medium
By using the gravity sensor and positioning data of smart devices and combining it with a preset model to determine whether the user is in the car, it solves the problem in the existing technology that it is difficult to monitor the position of children and the elderly when they are riding alone, and achieves safety and power consumption. Double promotion.
Patent Information
- Application Number
- CN202310341819.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
Existing smart devices lack automatic recognition functions when children and the elderly are riding alone in cars, making it difficult for guardians to know their locations in real time. Moreover, continuous GPS positioning consumes high power and the devices are unwilling to actively perform positioning.
By obtaining the gravity sensor data of the electronic device, the gravity time domain characteristics are used to identify whether the user is in the riding state, and combined with the location change characteristics of the positioning data, a preset model is used to determine whether the user is in the riding state, avoiding the continuous use of the positioning system. , reducing power consumption.
It realizes automatic recognition of the user's riding status, ensures user safety, reduces cost and power consumption, and has high accuracy and low error rate.
Smart Images

Figure CN118734147A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of terminal devices, and in particular, to a vehicle identification method, device, equipment and storage medium. Background Art
[0002] For those who need supervision, such as children and the elderly, riding alone has certain risks, so there is a need for guardians to know the location of children and the elderly in real time.
[0003] Therefore, there is an urgent need in the prior art for a method that can automatically identify children and the elderly when they are riding in a vehicle, which will greatly reduce the risk of them riding alone. Although many smart watches and mobile phones now have built-in GPS sensors, continuous GPS positioning will cause relatively high power consumption, so many watches and mobile phones will not actively locate and do not have the function of automatically identifying riding. Summary of the invention
[0004] In order to at least partially solve the problems existing in the related art, the present application provides a vehicle identification method, device, equipment and storage medium.
[0005] A first aspect of the present application provides a method for identifying a user riding a vehicle, characterized in that the method is applied to an electronic device, and the method comprises: acquiring sensor data of at least one sensor of the electronic device within a period of time, the at least one sensor comprising a gravity sensor; and identifying whether the user is in a riding state based on at least one data feature of the at least one sensor data, the at least one data feature comprising a gravity time domain feature of the gravity sensor data.
[0006] Optionally, the at least one sensor is the gravity sensor, and identifying whether the user is in a riding state based on at least one data feature of the at least one sensor data includes: inputting the gravity time domain feature into a preset model to obtain an output result, the preset model is trained based on the gravity time domain features under different states, the different states including the riding state and the non-riding state; determining whether the user is in the riding state based on the output result.
[0007] Optionally, determining whether the user is in the riding state based on the output result includes: when it is determined that the output result indicates that the user is in the riding state, obtaining positioning data of the positioning system of the electronic device at multiple times; obtaining position change characteristics of the positioning data; and determining whether the user is in the riding state based on a relationship between the position change characteristics and a preset characteristic threshold.
[0008] Optionally, obtaining the position change feature of the positioning data includes: determining the position at each moment based on the positioning data; calculating the speed of the user based on the positions at adjacent moments; and using the speed of the user as the position change feature.
[0009] Optionally, determining the position at each moment based on the positioning data includes: obtaining the predicted position at the current moment based on the position at the previous moment and the state change matrix at the current moment, the state change matrix at the current moment is associated with a time interval, and the time interval is the time interval between the previous moment and the current moment; calculating error data based on the positioning data at the current moment; and correcting the predicted position at the current moment based on the error data to obtain the position at the current moment.
[0010] Optionally, calculating error data based on the positioning data at the current moment, and correcting the predicted position at the current moment based on the error data to obtain the position at the current moment, includes: calculating the difference between the positioning data at the current moment and the predicted position data at the current moment; multiplying the difference with a gain coefficient at the current moment to obtain the error data, wherein the gain coefficient at the current moment is obtained based on a state transformation matrix, an error covariance matrix and observation noise; and adding the error data to the predicted position data at the current moment to obtain the position data at the current moment.
[0011] Optionally, the method further includes: respectively collecting gravity sensor data in the riding state and the non-riding state; extracting gravity time domain features from the gravity sensor data in the riding state and the non-riding state to obtain the riding state time domain features and the non-riding state time domain features; generating sample data based on the riding state time domain features and the non-riding state time domain features, and training an initial model based on the sample data to obtain the preset model.
[0012] Optionally, the at least one sensor includes the gravity sensor and the positioning sensor, and identifying whether the user is in a riding state based on at least one data feature of the at least one sensor data includes: inputting the gravity time domain feature into a preset model to obtain a first output result, and the preset model is trained according to the gravity time domain features under different states, and the different states include the riding state and the non-riding state; determining the relationship between the position change feature of the positioning data of the positioning sensor and a preset feature threshold to obtain a second output result; identifying whether the user is in the riding state based on the first output result and the second output result, wherein if the first output result and the second output result both indicate that the user is in the riding state, identifying the user as being in the riding state.
[0013] A second aspect of the present application provides a vehicle riding identification device, the device comprising: an acquisition module for acquiring sensor data of at least one sensor of the electronic device within a period of time, the at least one sensor comprising a gravity sensor; an identification module for identifying whether the user is in a vehicle riding state based on at least one data feature of the at least one sensor data, the at least one data feature comprising a gravity time domain feature of the gravity sensor data.
[0014] A third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect above.
[0015] The fourth aspect of the present application provides an electronic device, comprising: a memory on which a computer program is stored; and a processor for executing the computer program in the memory to implement the steps of any one of the methods described in the first aspect above.
[0016] The above-mentioned occupancy identification method utilizes data from at least one sensor of an electronic device and at least one data feature of the sensor data to identify whether the user is in a riding state. The above-mentioned method uses the sensor data to realize automatic identification of the user's riding state, thereby ensuring the user's safety. It only utilizes sensors within the device and does not use a positioning system, thus resulting in lower costs and lower power consumption.
[0017] Other features and advantages of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide a further understanding of the present application and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present application but do not constitute a limitation to the present application. In the accompanying drawings:
[0019] Figure 1 is a flow chart of a vehicle identification method according to an exemplary embodiment;
[0020] Figure 2 is a flow chart of another vehicle identification method according to an exemplary embodiment;
[0021] Figure 3 is a confusion matrix predicted by a preset model according to an exemplary embodiment;
[0022] Figure 4 is a ROC curve predicted by a preset model according to an exemplary embodiment;
[0023] Figure 5 is a position curve of a user actually riding in a vehicle according to an exemplary embodiment;
[0024] Figure 6 is a flow chart of another vehicle identification method according to an exemplary embodiment;
[0025] Figure 7 is a schematic block diagram of a vehicle occupancy identification device according to an exemplary embodiment;
[0026] Figure 8 It is a schematic block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0027] The specific implementation of the present application is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present application, and is not used to limit the present application.
[0028] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0030] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0031] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0032] Based on the problems of the prior art, the embodiment of the present application provides a method for identifying whether a user is in a riding state by using at least one data feature of the sensor data. The above method uses the sensor data to realize automatic identification of the user's riding state, ensures the user's safety, and only uses the sensor in the device without using the positioning system, which has lower cost and lower power consumption. The method is applied to electronic devices. It can be understood that the electronic devices involved in the embodiments of the present invention can include general handheld screen electronic terminal devices, such as mobile phones, smart phones, portable terminals, terminals, personal digital assistants (PDA), portable multimedia players (Personal Media Player, PMP) devices, laptop computers, notebooks (Note Pad), wireless broadband (Wireless Broadband, Wibro) terminals, tablet computers (Personal Computer, PC), smart PCs, sales terminals (Point of Sales, POS) and vehicle-mounted computers, etc.
[0033] Electronic devices may also include wearable devices. Wearable devices are portable electronic devices that can be worn directly on the user or integrated into the user's clothes or accessories. Wearable devices are not just hardware devices, but can also achieve powerful intelligent functions through software support, data interaction, and cloud interaction, such as: computing function, positioning function, and alarm function. They can also be connected to mobile phones and various terminals. Wearable devices may include but are not limited to watches supported by the wrist (such as watches, wrists, etc.), shoes supported by the feet (such as shoes, socks, or other products worn on the legs), Glass supported by the head (such as glasses, helmets, headbands, etc.), and various non-mainstream product forms such as smart clothing, school bags, crutches, accessories, etc.
[0034] Figure 1 A schematic diagram of the implementation flow of a vehicle identification method provided in an embodiment of the present application, wherein the method is applied to an electronic device, such as Figure 1 As shown, the method may include the following steps 110 to 120:
[0035] Step 110: Acquire sensor data of at least one sensor of the electronic device within a period of time, wherein the at least one sensor includes a gravity sensor.
[0036] When riding in a vehicle, the user's body moves along with the vehicle, causing changes in sensor data, which can be used to make judgments.
[0037] The electronic device carried by the user can obtain data from at least one sensor on the device within a preset time period, and the at least one sensor should at least include a gravity sensor.
[0038] Gravity sensors, also known as gravity sensors, usually use elastic sensitive elements to make cantilever displacement devices, and energy storage springs made of elastic sensitive elements to drive electrical contacts to complete the conversion from gravity changes to electrical signals. This sensor does not rely solely on gravity acceleration for detection, but relies on acceleration force for detection. The internal structure is equipped with a tiny accelerometer and a tiny gyroscope, which can detect the acceleration and angular velocity of the device in three axes. By detecting the accelerometer reading, the gravity sensor can determine the orientation and position of the device. Gravity sensors have many applications, such as automatic rotation of mobile phone screens, game control, motion detection, etc. Gravity sensors can also be used to detect underground features, such as changes in the density of rocks or other materials.
[0039] With the development of electronic integration technology, multiple sensors and sensor systems are usually provided in electronic devices, such as electronic compasses, proximity sensors, camera systems, etc.
[0040] In one embodiment of the present application, under specified circumstances, for example, when it is detected that the current data meets the preset scenario, for example, the preset duration is set to 30s and one or more time periods such as 08.00am to 10.00am and 17.00pm to 20.00pm, and the time data of the electronic device such as 19.30 is obtained. When it is detected that the time is within the preset time period, the data collected by at least one sensor within 30s is obtained.
[0041] Step 120: Identify whether the user is in a vehicle riding state based on at least one data feature of the at least one sensor data, wherein the at least one data feature includes a gravity time domain feature of the gravity sensor data.
[0042] Extract data features from at least one sensor data. For example, when the at least one sensor only has gravity sensor data of a gravity sensor. At least one feature of the gravity sensor data can be extracted, and at least one feature can include a gravity time domain feature. The gravity time domain feature refers to the time domain feature (property in timedomain) of the gravity sensor data, which refers to the characteristics of the gravity sensor data in the time domain. For example, self-oscillation frequency, rise time, establishment time, and so on. Determine whether the user is in a riding state based on the extracted features. For example, the user is determined to be in a riding state when the self-oscillation frequency is less than a preset threshold within a preset time length. Then, when the self-oscillation frequency in all extracted time domain features is less than the preset threshold, the user is identified as being in a riding state. If the self-oscillation frequency in the time domain features within the preset time length is greater than the preset threshold, the user is identified as not being in a riding state.
[0043] Alternatively, in one embodiment, multiple data features of the gravity sensor data may be extracted, such as obtaining the gravity time domain features and change features of the gravity sensor data, and the change features may indicate changes in the orientation of the device within a preset time period. Whether the user is in a riding state is determined based on the extracted features. For example, if the orientation changes within a preset time period within a preset number of times and the rise time meets the preset time period, the user is determined to be in a riding state. If all extracted features indicate that the orientation changes within a preset number of times within a preset time period and the rise time meets the preset time period, the user is identified as being in a riding state. If the orientation changes within a preset time period more than a preset number of times or the rise time does not meet the preset time period, the user is identified as not being in a riding state.
[0044] In another embodiment of the present application, the at least one sensor includes other sensors besides the gravity sensor, for example, a sound sensor, and the acquired data includes gravity sensor data and sound data.
[0045] Extract the data features of the gravity sensor, such as obtaining the gravity time domain features of the gravity sensor within a preset time, and extract the sound frequency domain features in the sound data. Determine whether the user is in a riding state based on the extracted features. For example, when the value of each acceleration within a preset time length in the gravity time domain feature is set to be less than a preset threshold, and the sound frequency domain feature matches the preset sound feature, the user is determined to be in a riding state. The preset sound feature can be the sound feature of a car driving, the sound feature of a subway driving, etc. Then, if the value of each acceleration within the preset time length is less than the preset threshold, and the sound frequency domain feature matches the preset sound feature, it is identified that the user is in a riding state. If there is an acceleration value within the preset time length that is less than the preset threshold, or the sound frequency domain feature does not match the preset sound feature, it is identified that the user is not in a riding state.
[0046] The above-mentioned occupancy identification method utilizes data from at least one sensor of an electronic device and at least one data feature of the sensor data to identify whether the user is in a riding state. The above-mentioned method uses the sensor data to realize automatic identification of the user's riding state, thereby ensuring the user's safety. It only utilizes sensors within the device and does not use a positioning system, thus resulting in lower costs and lower power consumption.
[0047] Figure 2 A schematic diagram of the implementation flow of another vehicle identification method provided in an embodiment of the present application, wherein the method is applied to an electronic device, such as Figure 2 As shown, the method may include the following steps 210 to 250:
[0048] Step 210: Acquire sensor data of at least one sensor of the electronic device within a period of time, wherein the at least one sensor includes a gravity sensor.
[0049] Sensor data collected by at least one sensor mounted on the user's electronic device over a period of time is obtained, where the at least one sensor needs to include a gravity sensor, and the period of time may be a preset duration.
[0050] For example, sensor data collected by at least one sensor such as a gravity sensor carried by an electronic device over a period of time is obtained in real time.
[0051] Step 220: Identify whether the user is in a vehicle riding state based on at least one data feature of the at least one sensor data, wherein the at least one data feature includes a gravity time domain feature of the gravity sensor data.
[0052] In one embodiment of the present application, the at least one sensor is the gravity sensor, and the identifying whether the user is in a riding state based on at least one data feature of the at least one sensor data includes: inputting the gravity time domain feature into a preset model to obtain an output result, the preset model is trained based on the gravity time domain features under different states, the different states including the riding state and the non-riding state; determining whether the user is in the riding state based on the output result.
[0053] Extract data features of sensor data. For example, extract a feature for each type of sensor data to obtain at least one data feature corresponding to at least one sensor data. For example, gravity time domain features can be extracted for gravity sensor data.
[0054] The gravity time domain features are input into a preset model to obtain the output result of the model, wherein the preset model is obtained by training based on the gravity time domain features in different states, wherein the different states include the riding state and the non-riding state. For example, the training method of the preset model includes: respectively collecting the gravity sensor data in the riding state and the non-riding state; extracting the gravity time domain features from the gravity sensor data in the riding state and the non-riding state to obtain the riding state time domain features and the non-riding state time domain features; generating sample data based on the riding state time domain features and the non-riding state time domain features, and training the initial model based on the sample data to obtain the preset model.
[0055] Some gravity sensor data such as gravity acceleration data when the user carries the electronic device in a riding state and a non-riding state are collected in advance, and time domain features in the gravity sensor data in the riding state and the non-riding state are respectively extracted, such as some time domain features of gravity acceleration in the riding state and the non-riding state are respectively obtained to obtain the time domain features of the riding state and the non-riding state, each time domain feature of the riding state is used as feature data, and the marked data is the riding state, and a positive sample is established to obtain a first training set, and each time domain feature of the non-riding state is used as feature data, and the marked data is the non-riding state, and a negative sample is established to obtain a second training set, and the initial model is trained by using the first training set and the second sample set to obtain a preset model, and the initial model is preset, and the initial model can be a support vector machine (SVM, Supported Vector Machine), a neural network (NN, Neural Network), a conditional random field (CRF, Conditional Random Field), a gradient boosting tree (GradientBoosting Decision Tree, GBDT), a random forest (Random forest), etc.
[0056] Determine whether the user is in the riding state according to the output result. For example, during the training process, the riding state is marked as 1 and the non-riding state is marked as 0, then when the output result is 1, it can be determined that the user is in the riding state.
[0057] For example, this application Figure 3 , Figure 4 The confusion matrix and ROC (Receiver Operating Characteristic) curve of the preset model of possible riding and non-riding based on gravity acceleration prediction in one embodiment are respectively shown. The real-time prediction of the entire algorithm is about 50 seconds, that is, the algorithm can accurately identify the user 50 seconds after the user starts riding, and the accuracy of the algorithm prediction is about 98%.
[0058] Data from sensors in electronic devices can be used to predict whether a user is in a vehicle, but the prediction usually has a certain degree of error, and using the result directly will cause inconvenience to the user and guardian.
[0059] Step 230: When it is determined that the output result indicates that the user is in the vehicle-riding state, obtain positioning data of the positioning system of the electronic device at multiple times.
[0060] When the user is identified as being in a vehicle based on sensor data, the data of the positioning system carried by the electronic device can be further obtained. The positioning system can be GNSS (Global Navigation Satellite System), GPS (Global Positioning System) positioning, BDS (BeiDou Navigation Satellite System) positioning. In other embodiments of the present application, the positioning system can also be a software system implemented by a positioning method, for example, a positioning system implemented by a wireless (Wireless Fidelity, WiFi) positioning method, a base station positioning method, etc.
[0061] The positioning system obtains positioning data of the electronic device at multiple time points, and the multiple time points can be continuous or discontinuous. For example, when the user is identified as being in a vehicle based on the sensor data, the BDS positioning system of the electronic device is turned on to obtain the positioning data generated by the BDS positioning system within 0s to 15s. For another example, when the user is identified as being in a vehicle based on the sensor data, the electronic device will turn on the GPS module to actively locate for a period of time in each cycle and obtain a positioning data, and the cycle is preset, such as 5 minutes, so as to obtain positioning data at multiple times.
[0062] Step 240: Acquire the position change characteristics of the positioning data.
[0063] The positioning data of multiple time points are extracted to generate position change features, and the position change features may be displacement trajectories, displacement directions, etc.
[0064] In one embodiment of the present application, obtaining the position change feature of the positioning data includes: determining the position at each moment based on the positioning data; calculating the speed of the user based on the positions at adjacent moments; and using the speed of the user as the position change feature.
[0065] The position of the electronic device at each moment is calculated based on the positioning data at each moment, and the speed of the user between two adjacent moments is calculated based on the positions at two adjacent moments. For example, the path of the two positions is calculated based on the positions at adjacent moments, and the speed between the two positions is obtained by dividing the path by the time difference, which is used as the user speed, and the user speed is used as the position change feature.
[0066] In one embodiment of the present application, determining the position at each moment based on the positioning data includes: obtaining the predicted position at the current moment based on the position at the previous moment and the state transformation matrix at the current moment, the state change matrix at the current moment is associated with a time interval, and the time interval is the time interval between the previous moment and the current moment; calculating error data based on the positioning data at the current moment; and correcting the predicted position at the current moment based on the error data to obtain the position at the current moment.
[0067] When the positioning system is performing positioning, it is affected by the positioning environment and positioning accuracy, and the position point obtained has a certain error, which affects the positioning accuracy and algorithm performance. The position data needs to be corrected. For example, the Kalman filter method can be used. The Kalman filter method is a recursive prediction filtering algorithm. It can use a relatively simple calculation to predict the prediction result of this moment based on the optimal result of the previous moment, and use the observation value of the current moment to make corrections, and finally obtain the optimal result of the current moment. In this embodiment, for obtaining the position at a moment, first, the predicted position at the current moment is obtained based on the position at the previous moment and the state change matrix at the current moment, wherein the state change matrix at the current moment is associated with the time interval, and the time interval is the time interval between the previous moment and the current moment. For example, using F t represents the state transformation matrix at the current time t, F t =[1,Δt,,0;0,1,0,0;1,Δt,0,0;0,0,0,1],x t-1 Indicates the position data at the previous time t-1.
[0068] Then, the error data is calculated based on the positioning data at the current moment, for example, z t represents the positioning data at the current time t, and the error data can be z t .β, β is a preset coefficient.
[0069] Finally, the predicted position at the current moment is corrected according to the error data to obtain the position at the current moment. For example, F t .x t-1 -z t .β.
[0070] In a specific example of the present application, the difference between the positioning data at the current moment and the predicted position data at the current moment is calculated; the difference is multiplied by the gain coefficient at the current moment to obtain the error data, and the gain coefficient at the current moment is obtained based on the state transformation matrix, the error covariance matrix and the observation noise; the error data is added to the predicted position data at the current moment to obtain the position data at the current moment.
[0071] For example, using position k To represent the user's location, the location at a time t is expressed in the following form:
[0072] position t =position t-1 +Δtv t-1
[0073] Converted into matrix form as follows:
[0074]
[0075] Then use the observed value and the position of the previous moment to make corrections, which can be expressed as:
[0076]
[0077]
[0078] In the above formula, represents the position data at the current time t, represents the predicted position data at the current time t, F t represents the state transformation matrix at the current time t, x t-1 Represents the position data at the previous moment t-1, z t Indicates the positioning data at the current time t.
[0079] in,
[0080]
[0081] F t =[1,Δt,,0;0,1,0,0;1,Δt,0,0;0,0,0,1]
[0082] z t =[latitude,Δv,longitude,Δv]
[0083] In this embodiment, the longitude and latitude obtained from the GPS module are guaranteed to remain within a certain range according to the time of the current sampling point and the previous sampling point.
[0084] In the above example, the error data is expressed as The difference between the positioning data at the current moment and the predicted position data at the current moment is calculated, and the difference is multiplied by the gain coefficient at the current moment to obtain the error data, where the gain coefficient at the current moment is obtained based on the state transformation matrix, the error covariance matrix and the observation noise, and can be expressed as follows:
[0085]
[0086]
[0087] Among them, Q and R are prediction noise and observation noise, is a set of hyperparameters, and K t represents the gain matrix at the current time t, represents the prediction covariance estimate at the current time t, P t-1 represents the forecast covariance estimate of the previous time t-1, F t represents the state transformation matrix at the current time t, and I represents the identity matrix.
[0088] In the above process, the Kalman filter method can provide higher positioning accuracy without adding hardware based on the characteristics of the vehicle position change. Figure 5 FIG. 4 shows a curve of a user's actual ride in an embodiment. Figure 5 As shown in the figure, the GPS in the original curve is discounted and offset on the map. By comparing the GPS position before and after filtering, it can be obtained that the GPS position after Kalman filtering eliminates the offset caused by positioning accuracy, making the positioning curve smoother.
[0089] Step 250: Determine whether the user is in the riding state based on the relationship between the position change feature and a preset feature threshold.
[0090] Determine the relationship between the position change feature and the preset feature threshold. The feature threshold is preset. For the extracted position change feature, for example, the position change feature is set to displacement speed, and the feature threshold can be set to 1m / s. When the position change feature is greater than the preset feature threshold, the user is determined to be in a riding state. Obtain a position change feature such as 20m / s, determine the relationship between the two, that is, the position change feature is greater than the preset feature threshold, and identify the user as being in a riding state.
[0091] In another embodiment of the present application, the position change feature is set as the displacement distance, and the feature threshold can be set to 1km. When the position change feature is greater than the preset feature threshold, the user is determined to be in a riding state. The position change feature is obtained, such as 2km, and the relationship between the two is determined, that is, the position change feature is greater than the preset feature threshold, and the user is identified as being in a riding state.
[0092] Alternatively, the position change characteristics are set to displacement distance and displacement speed, and the characteristic thresholds can be set to 1km and 1m / s. When the position change characteristics are all greater than the preset characteristic thresholds, it is determined that the user is in a riding state.
[0093] The above-mentioned vehicle identification method realizes the identification of the user's vehicle status through sensor data and positioning data, ensures the user's safety, and compared with the prediction of a single sensor data, it has the support of positioning data, reduces the error rate, and has higher accuracy. Compared with always using the positioning system, this application first uses the sensor to make predictions, and then determines the positioning if there is a possible situation. There is no need to perform positioning all the time, and the power consumption is lower.
[0094] Figure 6 A schematic diagram of the implementation flow of another vehicle identification method provided in an embodiment of the present application, wherein the method is applied to an electronic device, such as Figure 6 As shown, the method may include the following steps 610 to 640:
[0095] Step 610: Acquire sensor data of at least one sensor of the electronic device within a period of time, wherein the at least one sensor includes the gravity sensor and the positioning sensor.
[0096] Sensor data collected by at least one sensor mounted on the user's electronic device over a period of time is obtained, where the at least one sensor needs to include a gravity sensor and a positioning sensor, and the period of time may be a preset duration.
[0097] The positioning sensor refers to a sensor used for positioning. In the prior art, a sensor can be used to position a device. For example, an ultra-wideband (UWB) antenna can be used to position the device, or positioning can be performed based on a communication antenna such as a 5G or 4G antenna.
[0098] Step 620: Input the gravity time domain feature into a preset model to obtain a first output result. The preset model is trained based on the gravity time domain features under different states, including the riding state and the non-riding state.
[0099] Extract the gravity time domain features of the gravity sensor data. Input the gravity time domain features into a preset model to obtain the output result of the model, i.e., the first output result. The preset model is trained based on the gravity time domain features under different states, and the different states include the riding state and the non-riding state. The preset model collects the features of the gravity sensor data under the riding state and the non-riding state, establishes samples, and trains an initial model based on the sample data to obtain the preset model, so that the preset model can capture the relationship between the features of the gravity sensor data and the riding state, and make a judgment.
[0100] Step 630: Determine the relationship between the position change feature of the positioning data of the positioning sensor and a preset feature threshold to obtain a second output result.
[0101] The positioning data collected by the positioning sensor is obtained, and the position change feature is extracted therefrom. The relationship between the position change feature of the positioning data of the positioning sensor and a preset feature threshold is determined to obtain a second output result.
[0102] Step 640, identifying whether the user is in the riding state based on the first output result and the second output result, wherein if the first output result and the second output result both indicate that the user is in the riding state, identifying the user as being in the riding state.
[0103] The user's riding status is identified based on the first output result and the second output result. In this embodiment, the first output result and the second output result are both set to indicate that the user is in the riding status, thereby identifying that the user is in the riding status.
[0104] The above-mentioned vehicle identification method realizes the identification of the user's vehicle status through sensor data and positioning data, ensures the user's safety, and uses two types of data for double judgment, which reduces the error rate and has higher accuracy.
[0105] Figure 7 A schematic block diagram of a vehicle identification device provided in an embodiment of the present application, such as Figure 7 As shown, the device 700 includes an acquisition module 710 and an identification module 720, wherein:
[0106] An acquisition module 710 is used to acquire sensor data of at least one sensor of the electronic device within a period of time, wherein the at least one sensor includes a gravity sensor;
[0107] The identification module 720 is used to identify whether the user is in a riding state based on at least one data feature of the at least one sensor data, and the at least one data feature includes a gravity time domain feature of the gravity sensor data.
[0108] Optionally, the at least one sensor is the gravity sensor, and the identification module includes:
[0109] A result submodule, used for inputting the gravity time domain features into a preset model to obtain an output result, wherein the preset model is trained based on the gravity time domain features in different states, wherein the different states include the riding state and the non-riding state;
[0110] The first identification submodule is used to determine whether the user is in the riding state according to the output result.
[0111] Optionally, the device further comprises:
[0112] A second acquisition module is used to acquire positioning data of the positioning system of the electronic device at multiple time points when it is determined that the output result indicates that the user is in the riding state;
[0113] A feature acquisition module, used to acquire the position change feature of the positioning data;
[0114] The second identification module is used to determine whether the user is in the riding state according to the relationship between the position change feature and a preset feature threshold.
[0115] Optionally, the feature acquisition module includes:
[0116] A position submodule, used to determine the position at each moment according to the positioning data;
[0117] A speed submodule, used to calculate the speed of the user based on the positions at adjacent moments;
[0118] A generating submodule is used to use the speed of the user as the position change feature.
[0119] Optionally, the position submodule is specifically used to obtain the predicted position at the current moment based on the position at the previous moment and the state change matrix at the current moment, the state change matrix at the current moment is associated with a time interval, and the time interval is the time interval between the previous moment and the current moment; calculate error data based on the positioning data at the current moment; and correct the predicted position at the current moment based on the error data to obtain the position at the current moment.
[0120] Optionally, calculating error data based on the positioning data at the current moment, and correcting the predicted position at the current moment based on the error data to obtain the position at the current moment, includes: calculating the difference between the positioning data at the current moment and the predicted position data at the current moment; multiplying the difference with a gain coefficient at the current moment to obtain the error data, wherein the gain coefficient at the current moment is obtained based on a state transformation matrix, an error covariance matrix and observation noise; and adding the error data to the predicted position data at the current moment to obtain the position data at the current moment.
[0121] Optionally, the device further comprises:
[0122] A data acquisition module, used for respectively collecting gravity sensor data in the riding state and the non-riding state;
[0123] A feature module, used for extracting time domain features from the gravity sensor data in the riding state and the non-riding state, and obtaining the riding state time domain features and the non-riding state time domain features;
[0124] The sample generation module is used to generate sample data according to the time domain characteristics of the riding state and the time domain characteristics of the non-riding state, and train an initial model according to the sample data to obtain the preset model.
[0125] Optionally, the at least one sensor includes the gravity sensor and the positioning system, and the identification module based on at least one data feature of the at least one sensor data includes:
[0126] A first result submodule, configured to input the gravity time domain feature into a preset model to obtain a first output result, wherein the preset model is trained based on the gravity time domain features under different states, wherein the different states include the riding state and the non-riding state;
[0127] A second result submodule, used to determine the relationship between the position change feature of the positioning data and a preset feature threshold to obtain a second output result;
[0128] The second identification submodule is used to identify whether the user is in the riding state based on the first output result and the second output result, wherein if the first output result and the second output result both indicate that the user is in the riding state, the user is identified as being in the riding state.
[0129] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0130] Figure 8 FIG. 8 is a schematic block diagram of an electronic device 800 according to an exemplary embodiment. Figure 8 As shown, the electronic device 800 may include: a processor 801 and a memory 802. The electronic device 800 may also include one or more of a multimedia component 803, an input / output (I / O) interface 804, and a communication component 805.
[0131] The processor 801 is used to control the overall operation of the electronic device 800 to complete all or part of the steps in the above-mentioned vehicle identification method. The memory 802 is used to store various types of data to support the operation of the electronic device 800, and these data may include, for example, instructions for any application or method used to operate on the electronic device 800, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 802 or sent through the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the electronic device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 805 may include: Wi-Fi module, Bluetooth module, NFC module, etc.
[0132] In an exemplary embodiment, the electronic device 800 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned vehicle identification method.
[0133] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned vehicle identification method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 802 including program instructions, and the above-mentioned program instructions can be executed by the processor 801 of the electronic device 800 to complete the above-mentioned vehicle identification method.
[0134] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-mentioned vehicle occupancy identification method when executed by the programmable device.
[0135] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings; however, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, a variety of simple modifications can be made to the technical solution of the present application, and these simple modifications all fall within the protection scope of the present application.
[0136] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this application will not further describe various possible combinations.
[0137] In addition, the various implementation modes of the present application may be arbitrarily combined, and as long as they do not violate the concept of the present application, they should also be regarded as the contents disclosed in the present application.
Claims
1. A vehicle identification method, characterized in that: The method is applied to an electronic device, and the method comprises: Acquire sensor data of at least one sensor of the electronic device over a period of time, wherein the at least one sensor includes a gravity sensor; Based on at least one data feature of the at least one sensor data, it is identified whether the user is in a riding state, and the at least one data feature includes a gravity time domain feature of the gravity sensor data.
2. The method according to claim 1, characterized in that The at least one sensor is the gravity sensor, and the identifying whether the user is in a riding state based on at least one data feature of the at least one sensor data includes: Inputting the gravity time domain features into a preset model to obtain an output result, wherein the preset model is trained based on the gravity time domain features in different states, wherein the different states include the riding state and the non-riding state; Determine whether the user is in the riding state according to the output result.
3. The method according to claim 2, characterized in that The determining whether the user is in the riding state according to the output result includes: When it is determined that the output result indicates that the user is in the vehicle-riding state, obtaining positioning data of the positioning system of the electronic device at multiple times; Acquiring position change characteristics of the positioning data; Whether the user is in the riding state is determined based on the relationship between the position change feature and a preset feature threshold.
4. The method according to claim 3, characterized in that The acquiring of the position change feature of the positioning data comprises: Determine the position at each moment according to the positioning data; Calculating the speed of the user based on the positions at adjacent moments; The speed of the user is used as the position change feature.
5. The method according to claim 4, characterized in that Determining the position at each moment according to the positioning data includes: Obtaining a predicted position at the current moment according to the position at the previous moment and a state change matrix at the current moment, wherein the state change matrix at the current moment is associated with a time interval, and the time interval is a time interval between the previous moment and the current moment; Calculating error data based on the positioning data at the current moment; The predicted position at the current moment is corrected according to the error data to obtain the position at the current moment.
6. The method according to claim 5, characterized in that The calculating error data based on the positioning data at the current moment, and correcting the predicted position at the current moment based on the error data to obtain the position at the current moment, includes: Calculating the difference between the positioning data at the current moment and the predicted position data at the current moment; The error data is obtained by multiplying the difference value with a gain coefficient at a current moment, wherein the gain coefficient at a current moment is obtained based on a state transformation matrix, an error covariance matrix and observation noise; The error data is added to the predicted position data at the current moment to obtain the position data at the current moment.
7. The method according to claim 1, characterized in that The method further comprises: respectively collecting gravity sensor data in the riding state and the non-riding state; Extracting gravity time domain features from the gravity sensor data in the riding state and the non-riding state to obtain the riding state time domain features and the non-riding state time domain features; Sample data is generated according to the riding state time domain features and the non-riding state time domain features, and an initial model is trained according to the sample data to obtain the preset model.
8. The method according to claim 1, characterized in that The at least one sensor includes the gravity sensor and the positioning sensor, and the identifying whether the user is in a riding state based on at least one data feature of the at least one sensor data includes: Inputting the gravity time domain characteristics of the gravity sensor into a preset model to obtain a first output result, wherein the preset model is trained according to the gravity time domain characteristics under different states, wherein the different states include the riding state and the non-riding state; Determine the relationship between the position change feature of the positioning data of the positioning sensor and a preset feature threshold to obtain a second output result; Based on the first output result and the second output result, identify whether the user is in the riding state, wherein if the first output result and the second output result both indicate that the user is in the riding state, identify the user as being in the riding state.
9. A vehicle identification device, characterized in that: The device comprises: an acquisition module, configured to acquire sensor data of at least one sensor of the electronic device within a period of time, wherein the at least one sensor comprises a gravity sensor; The identification module is used to identify whether the user is in a riding state based on at least one data feature of the at least one sensor data, and the at least one data feature includes a gravity time domain feature of the gravity sensor data.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.
11. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Behavior identification method based on GPS speed and acceleration data of smart phone
CN105528613A
Riding state determination method and device
CN106912026A
Method and device for intelligently judging user riding
CN109635863A
Low power consumption positioning device with riding recognition
CN110515107A
Riding state recognition method and device, storage medium and equipment
CN111259103A
