Vehicle-mounted component control method, electronic device and storage medium

文档序号:19533 发布日期:2021-09-21 浏览:12次 中文

阅读说明:本技术 车载部品控制方法、电子设备及存储介质 (Vehicle-mounted component control method, electronic device and storage medium ) 是由 潘华聪 胡俊杰 刘巍俊 刘兵 于 2021-06-29 设计创作,主要内容包括:本发明公开一种车载部品控制方法、电子设备及存储介质。车载部品控制方法,包括:获取移动终端在车舱内的第一轨迹,如果所述第一轨迹满足第一协议规定,则开始轨迹识别;在轨迹识别期间,如果移动终端在轨迹识别期间,在车舱内的第二轨迹满足第二协议规定,则停止轨迹识别;将所述第二轨迹与至少一个预设的标准轨迹进行对比,确定与所述第二轨迹对应的标准轨迹为待执行标准轨迹;对所述待执行标准轨迹对应的车载部品执行所述待执行标准轨迹对应的操作。本发明整个识别过程无需用户将移动终端对准特定方向,大大提高激活识别率。(The invention discloses a vehicle-mounted part control method, electronic equipment and a storage medium. The vehicle-mounted component control method comprises the following steps: acquiring a first track of a mobile terminal in a vehicle cabin, and starting track identification if the first track meets a first protocol rule; during the track recognition, if a second track in the vehicle cabin meets the second protocol specification during the track recognition by the mobile terminal, stopping the track recognition; comparing the second track with at least one preset standard track, and determining the standard track corresponding to the second track as a standard track to be executed; and executing the operation corresponding to the standard track to be executed on the vehicle-mounted part corresponding to the standard track to be executed. The invention does not need the user to aim the mobile terminal at a specific direction in the whole identification process, thereby greatly improving the activation identification rate.)

1. A method for controlling vehicle-mounted parts is characterized by comprising the following steps:

acquiring a first track of a mobile terminal in a vehicle cabin, and starting track identification if the first track meets a first protocol rule;

during the track recognition, if a second track in the vehicle cabin meets the second protocol specification during the track recognition by the mobile terminal, stopping the track recognition;

comparing the second track with at least one preset standard track, and determining the standard track corresponding to the second track as a standard track to be executed;

and executing the operation corresponding to the standard track to be executed on the vehicle-mounted part corresponding to the standard track to be executed.

2. The vehicle-mounted component control method according to claim 1, characterized in that:

the acquiring a first track of the mobile terminal in the vehicle cabin, and if the first track meets a first protocol specification, starting track identification specifically includes:

acquiring the displacement directions of the mobile terminal in a vehicle cabin, taking one or more displacement directions as a first track, and starting track identification if the first track meets the first protocol regulation;

during the track recognition, if a second track in the vehicle cabin meets a second protocol specification during the track recognition by the mobile terminal, stopping the track recognition, specifically comprising:

during track recognition, obtaining the displacement direction of the mobile terminal in the vehicle cabin, and stopping track recognition if one or more displacement directions of the mobile terminal in the vehicle cabin meet the second protocol regulation;

and taking the displacement direction of the mobile terminal in the cabin from the start track recognition to the stop track recognition as a second track.

3. The method for controlling the vehicle-mounted components according to claim 2, wherein the obtaining of the displacement direction of the mobile terminal in the vehicle cabin specifically comprises:

presetting sampling time intervals at intervals, and acquiring a displacement vector of the mobile terminal in a vehicle cabin;

comparing the difference value of the displacement vector of the mobile terminal in the vehicle cabin with a plurality of standard vectors, wherein each standard vector corresponds to a standard direction;

and taking the standard direction corresponding to the standard vector with the difference value within the preset range as the displacement direction of the mobile terminal in the vehicle cabin.

4. The method for controlling vehicle-mounted components according to claim 3, wherein the obtaining of the displacement direction of the mobile terminal in the vehicle cabin further comprises:

a plurality of displacement directions which are continuous and consistent in direction are combined.

5. The method for controlling vehicle-mounted components according to claim 2, wherein the step of comparing the second trajectory with at least one preset standard trajectory and determining the standard trajectory corresponding to the second trajectory as the standard trajectory to be executed specifically comprises:

comparing the displacement direction included by the second track with the standard direction included by each standard track;

and taking the displacement direction which is the same as the standard direction included by a standard track in the displacement directions included by the second track as a second displacement direction, and if the number of the second displacement directions is greater than a preset second number threshold, or the ratio of the number of the second displacement directions to the number of all the standard directions included by the standard protocol track is greater than a second proportional threshold, judging that the standard track is the standard track to be executed.

6. The method for controlling the vehicle-mounted parts according to claim 5, wherein the step of executing the operation corresponding to the standard trajectory to be executed on the vehicle-mounted parts corresponding to the standard trajectory to be executed specifically comprises:

if the second track comprises a standard track to be executed, executing the operation corresponding to the standard track to be executed on the vehicle-mounted part corresponding to the standard track to be executed;

if the second track comprises a plurality of standard tracks to be executed, executing the operation corresponding to the standard tracks to be executed on the vehicle-mounted parts corresponding to the standard tracks to be executed, if the plurality of standard tracks to be executed control the same part, selecting one standard track to be executed, and executing the operation corresponding to the selected standard track to be executed on the vehicle-mounted parts corresponding to the selected standard track to be executed.

7. The method for controlling the vehicle-mounted components according to claim 2, wherein if the first trajectory meets a first protocol specification, the starting of trajectory recognition specifically includes:

presetting a sampling time interval at each interval, and taking the displacement direction obtained in the sampling time interval as a first track;

comparing the displacement direction included by the first track with the standard direction included by a first protocol track specified by a first protocol;

and taking the displacement direction which is the same as the standard direction included by the first protocol track in the displacement directions included by the first track as a first displacement direction, and if the number of the first displacement directions is greater than a preset first number threshold value, or the ratio of the number of the first displacement directions to the number of all the standard directions included by the first protocol track is greater than a first ratio threshold value, judging that the first track meets the first protocol regulation, and starting track identification.

8. The method for controlling vehicle-mounted components according to claim 2, wherein if one or more of the displacement directions of the mobile terminal in the vehicle cabin satisfy a second protocol, stopping track recognition specifically comprises:

taking the displacement direction of the last stop identification number of the mobile terminal in the vehicle cabin as a stop displacement direction combination, wherein the stop identification number is more than or equal to the number of standard directions included in a standard track specified by a second protocol;

comparing the displacement direction included in the stop displacement direction combination with a standard direction included in a second protocol track specified by a second protocol;

and taking the displacement direction which is the same as the standard direction included by the second protocol in the displacement directions included by the stop displacement direction combination as the stop displacement direction, and if the number of the stop displacement directions is greater than a preset stop number threshold value or the ratio of the number of the stop displacement directions to the number of all the standard directions included by the second protocol track is greater than a stop proportion threshold value, judging that the displacement direction meets the specification of the second protocol and stopping track identification.

9. The method for controlling vehicle-mounted components according to claim 8, wherein the step of taking a displacement direction of the mobile terminal in the cabin from the start track recognition to the stop track recognition as the second track specifically comprises:

taking the displacement direction of the mobile terminal in the cabin from the start track recognition to the stop track recognition as a displacement direction combination to be recognized;

and removing the final stop recognition number displacement directions of the mobile terminal in the vehicle cabin from the displacement direction combination to be recognized, and taking the removed displacement directions in the displacement direction combination to be recognized as a second track.

10. The vehicle-mounted component control method according to claim 2, characterized in that:

before starting the trajectory recognition:

acquiring vehicle acceleration information and mobile terminal acceleration information, and/or acquiring a detection displacement vector of positioning equipment installed in a vehicle for detecting the displacement of the mobile terminal;

calculating a difference value between the vehicle acceleration information and the mobile terminal acceleration information to serve as a resultant acceleration vector, and determining a resultant displacement vector of the mobile terminal in the vehicle cabin based on the resultant acceleration vector;

determining the displacement direction of the mobile terminal in the cabin based on the synthesized displacement vector, or determining the corrected displacement vector of the mobile terminal in the cabin based on the synthesized displacement vector and the detection displacement vector, and determining the displacement direction of the mobile terminal in the cabin based on the corrected displacement vector;

taking one or more of the displacement directions as a first trajectory;

during trajectory identification:

and obtaining a detection displacement vector of the positioning equipment installed in the vehicle for the displacement detection of the mobile terminal, determining a correction displacement vector of the mobile terminal in the vehicle cabin based on the synthesized displacement vector and the detection displacement vector, and determining the displacement direction of the mobile terminal in the vehicle cabin based on the correction displacement vector.

11. An electronic device, comprising:

at least one processor; and the number of the first and second groups,

a memory communicatively coupled to at least one of the processors; wherein the content of the first and second substances,

the memory stores instructions executable by at least one of the processors to enable the at least one of the processors to perform the in-vehicle parts control method according to any one of claims 1 to 10.

12. A storage medium storing computer instructions for executing all the steps of the in-vehicle parts control method according to any one of claims 1 to 10 when the computer instructions are executed by a computer.

Technical Field

The present invention relates to the field of automotive technologies, and in particular, to a method for controlling a vehicle-mounted component, an electronic device, and a storage medium.

Background

Existing automobiles are provided with a number of components controlled by a user, such as air conditioning buttons, volume buttons, and the like. Since most of the existing components are arranged in the front row, for the vehicle type without a rear row control system, the rear row passengers are difficult to control the front row components, and the driver is often required to take care of the vehicle type.

In order to control the front row of components by the back row of passengers, the prior art proposes a technical scheme for performing gesture control on electronic components in a vehicle. However, the gesture control scheme requires a camera mounted on a real vehicle, a high-precision neural network model training, and the like, and is high in cost.

In addition, the other technology provides the vehicle-mounted electronic equipment controlled based on the mobile phone pointing, and can help the back-row passengers to control the front-row parts.

However, the mobile phone pointing control is adopted, and the principle is that a control direction is set by using a gyroscope sensor and/or an acceleration sensor on a smart phone, and the vehicle-mounted electronic equipment is controlled based on the control direction. However, in the existing mobile phone control method, the user needs to aim at the mobile phone in a specific direction first to start control, and the user cannot activate the mobile phone if the user fails to aim at the specific direction. Therefore, the existing mobile phone control method is easy to cause the situation of activation failure and inconvenient to use.

Disclosure of Invention

Therefore, it is necessary to provide a method for controlling a vehicle-mounted component, an electronic device, and a storage medium, which are used to solve the technical problems of activation failure and inconvenient use in the prior art in which a vehicle-mounted component is controlled by a mobile phone.

The invention provides a vehicle-mounted part control method, which comprises the following steps:

acquiring a first track of a mobile terminal in a vehicle cabin, and starting track identification if the first track meets a first protocol rule;

during the track recognition, if a second track in the vehicle cabin meets the second protocol specification during the track recognition by the mobile terminal, stopping the track recognition;

comparing the second track with at least one preset standard track, and determining the standard track corresponding to the second track as a standard track to be executed;

and executing the operation corresponding to the standard track to be executed on the vehicle-mounted part corresponding to the standard track to be executed.

Further:

the acquiring a first track of the mobile terminal in the vehicle cabin, and if the first track meets a first protocol specification, starting track identification specifically includes:

acquiring the displacement directions of the mobile terminal in a vehicle cabin, taking one or more displacement directions as a first track, and starting track identification if the first track meets the first protocol regulation;

during the track recognition, if a second track in the vehicle cabin meets a second protocol specification during the track recognition by the mobile terminal, stopping the track recognition, specifically comprising:

during track recognition, obtaining the displacement direction of the mobile terminal in the vehicle cabin, and stopping track recognition if one or more displacement directions of the mobile terminal in the vehicle cabin meet the second protocol regulation;

and taking the displacement direction of the mobile terminal in the cabin from the start track recognition to the stop track recognition as a second track.

Furthermore, the acquiring the displacement direction of the mobile terminal in the vehicle cabin specifically includes:

presetting sampling time intervals at intervals, and acquiring a displacement vector of the mobile terminal in a vehicle cabin;

comparing the difference value of the displacement vector of the mobile terminal in the vehicle cabin with a plurality of standard vectors, wherein each standard vector corresponds to a standard direction;

and taking the standard direction corresponding to the standard vector with the difference value within the preset range as the displacement direction of the mobile terminal in the vehicle cabin.

Still further, the executing the operation corresponding to the standard trajectory to be executed on the vehicle-mounted part corresponding to the standard trajectory to be executed specifically includes:

if the second track comprises a standard track to be executed, executing the operation corresponding to the standard track to be executed on the vehicle-mounted part corresponding to the standard track to be executed;

if the second track comprises a plurality of standard tracks to be executed, executing the operation corresponding to the standard tracks to be executed on the vehicle-mounted parts corresponding to the standard tracks to be executed, if the plurality of standard tracks to be executed control the same part, selecting one standard track to be executed, and executing the operation corresponding to the selected standard track to be executed on the vehicle-mounted parts corresponding to the selected standard track to be executed.

Still further, the obtaining of the displacement direction of the mobile terminal in the cabin specifically further includes:

a plurality of displacement directions which are continuous and consistent in direction are combined.

Further, the comparing the second trajectory with at least one preset standard trajectory, and determining that the standard trajectory corresponding to the second trajectory is a standard trajectory to be executed specifically includes:

comparing the displacement direction included by the second track with the standard direction included by each standard track;

and taking the displacement direction which is the same as the standard direction included by a standard track in the displacement directions included by the second track as a second displacement direction, and if the number of the second displacement directions is greater than a preset second number threshold, or the ratio of the number of the second displacement directions to the number of all the standard directions included by the standard protocol track is greater than a second proportional threshold, judging that the standard track is the standard track to be executed.

Further, if the first trajectory satisfies a first protocol specification, starting trajectory identification specifically includes:

presetting a sampling time interval at each interval, and taking the displacement direction obtained in the sampling time interval as a first track;

comparing the displacement direction included by the first track with the standard direction included by a first protocol track specified by a first protocol;

and taking the displacement direction which is the same as the standard direction included by the first protocol track in the displacement directions included by the first track as a first displacement direction, and if the number of the first displacement directions is greater than a preset first number threshold value, or the ratio of the number of the first displacement directions to the number of all the standard directions included by the first protocol track is greater than a first ratio threshold value, judging that the first track meets the first protocol regulation, and starting track identification.

Further, if one or more of the displacement directions of the mobile terminal in the cabin satisfy a second protocol, stopping the track recognition specifically includes:

taking the displacement direction of the last stop identification number of the mobile terminal in the vehicle cabin as a stop displacement direction combination, wherein the stop identification number is more than or equal to the number of standard directions included in a standard track specified by a second protocol;

comparing the displacement direction included in the stop displacement direction combination with a standard direction included in a second protocol track specified by a second protocol;

and taking the displacement direction which is the same as the standard direction included by the second protocol in the displacement directions included by the stop displacement direction combination as the stop displacement direction, and if the number of the stop displacement directions is greater than a preset stop number threshold value or the ratio of the number of the stop displacement directions to the number of all the standard directions included by the second protocol track is greater than a stop proportion threshold value, judging that the displacement direction meets the specification of the second protocol and stopping track identification.

Still further, the step of taking the displacement direction of the mobile terminal in the cabin from the start track recognition to the stop track recognition as the second track specifically includes:

taking the displacement direction of the mobile terminal in the cabin from the start track recognition to the stop track recognition as a displacement direction combination to be recognized;

and removing the final stop recognition number displacement directions of the mobile terminal in the vehicle cabin from the displacement direction combination to be recognized, and taking the removed displacement directions in the displacement direction combination to be recognized as a second track.

Further:

before starting the trajectory recognition:

acquiring vehicle acceleration information and mobile terminal acceleration information, and/or acquiring a detection displacement vector of positioning equipment installed in a vehicle for detecting the displacement of the mobile terminal;

calculating a difference value between the vehicle acceleration information and the mobile terminal acceleration information to serve as a resultant acceleration vector, and determining a resultant displacement vector of the mobile terminal in the vehicle cabin based on the resultant acceleration vector;

determining the displacement direction of the mobile terminal in the cabin based on the synthesized displacement vector, or determining the corrected displacement vector of the mobile terminal in the cabin based on the synthesized displacement vector and the detection displacement vector, and determining the displacement direction of the mobile terminal in the cabin based on the corrected displacement vector;

taking one or more of the displacement directions as a first trajectory;

during trajectory identification:

and obtaining a detection displacement vector of the positioning equipment installed in the vehicle for the displacement detection of the mobile terminal, determining a correction displacement vector of the mobile terminal in the vehicle cabin based on the synthesized displacement vector and the detection displacement vector, and determining the displacement direction of the mobile terminal in the vehicle cabin based on the correction displacement vector.

The present invention provides an electronic device, including:

at least one processor; and the number of the first and second groups,

a memory communicatively coupled to at least one of the processors; wherein the content of the first and second substances,

the memory stores instructions executable by at least one of the processors to enable the at least one of the processors to perform the in-vehicle parts control method as described above.

The present invention provides a storage medium storing computer instructions for executing all the steps of the vehicle-mounted parts control method as described above when a computer executes the computer instructions.

According to the method and the device, the track recognition is activated based on the first track of the mobile terminal in the vehicle cabin, and the track recognition is stopped based on the second track of the mobile terminal in the vehicle cabin, so that the user does not need to aim the mobile terminal at a specific direction in the whole recognition process, the activation control can be activated only by simple action, and the activation recognition rate is greatly improved.

Drawings

FIG. 1 is a flowchart illustrating a method for controlling a vehicle-mounted component according to the present invention;

FIG. 2 is a flowchart illustrating a method for controlling a vehicle-mounted component according to an embodiment of the present invention;

fig. 3 is a flowchart illustrating a method for measuring a displacement of a mobile terminal in a vehicle cabin according to an embodiment of the present invention;

FIG. 4 is a flowchart illustrating a method for measuring the displacement of a mobile terminal in a vehicle cabin according to a preferred embodiment of the present invention;

FIG. 5 is a system schematic of the preferred embodiment of the present invention;

FIG. 6 is a flowchart illustrating a method for controlling a vehicle-mounted component according to a preferred embodiment of the present invention;

fig. 7 is a schematic diagram of a hardware structure of an electronic device according to the present invention.

Detailed Description

The invention is described in further detail below with reference to the figures and specific examples.

Example one

Fig. 1 shows a work flow chart of a method for controlling a vehicle-mounted component according to the present invention, which includes:

step S101, acquiring a first track of a mobile terminal in a vehicle cabin, and starting track identification if the first track meets a first protocol rule;

step S102, during the track recognition, if the second track in the vehicle cabin meets the second protocol regulation during the track recognition of the mobile terminal, the track recognition is stopped;

step S103, comparing the second track with at least one preset standard track, and determining the standard track corresponding to the second track as a standard track to be executed;

and step S104, executing the operation corresponding to the standard track to be executed on the vehicle-mounted part corresponding to the standard track to be executed.

Specifically, the present invention can be applied to an Electronic Control Unit (ECU) of a vehicle. In step S101, a trajectory of the mobile terminal in the vehicle cabin is acquired as a first trajectory, and when the first trajectory satisfies a first protocol, trajectory recognition is started. The first protocol may be preset by the system or may be set by the user. The first trajectory for activating the start trajectory recognition may be one or more, for example, the first protocol may be a jog phone, and when a leftward displacement direction and a rightward displacement direction are recognized, the trajectory recognition is started. For another example, the first protocol may be swinging the handset upward, and when an upward trajectory is recognized, trajectory recognition is started. Then, during the trajectory recognition, step S102 is performed to take the trajectory of the mobile terminal during the trajectory recognition as the second trajectory. And stopping track identification when the second track meets the second protocol specification. The second protocol may be preset by the system or may be set by the user. The second trajectory used to trigger stopping trajectory recognition may be one or more, for example, the second protocol may be a soft-shaking handset, and trajectory recognition is stopped when a trajectory first to left and then to right is recognized, or a trajectory first to right and then to left is recognized. For another example, the second protocol may be a downward swing of the handset, and when a downward trajectory is recognized, trajectory recognition is stopped. The first protocol and the second protocol may be the same or different.

Then, step S103 compares the second trajectory obtained during the trajectory recognition with a plurality of preset standard trajectories, and determines that the standard trajectory corresponding to the second trajectory is the standard trajectory to be executed. The standard track is set by a user or a system and is stored in a standard track database. The standard trajectory may be set in the system software development stage or during the user's use of the vehicle.

Finally, step S104 executes corresponding operations on the corresponding vehicle-mounted parts based on the standard trajectory to be executed.

According to the invention, the track recognition is activated based on the displacement direction of the mobile terminal in the vehicle cabin, and the track recognition is stopped based on the displacement direction of the mobile terminal in the vehicle cabin, so that the user does not need to aim the mobile terminal at a specific direction in the whole recognition process, and the activation control can be realized only by simple action, and the activation recognition rate is greatly improved.

Example two

Fig. 2 is a flowchart illustrating a method for controlling a vehicle-mounted component according to an embodiment of the present invention, including:

step S201, obtaining the displacement direction of the mobile terminal in the vehicle cabin.

In one embodiment, the acquiring a displacement direction of the mobile terminal in the vehicle cabin specifically includes:

presetting sampling time intervals at intervals, and acquiring a displacement vector of the mobile terminal in a vehicle cabin;

comparing the difference value of the displacement vector of the mobile terminal in the vehicle cabin with a plurality of standard vectors, wherein each standard vector corresponds to a standard direction;

and taking the standard direction corresponding to the standard vector with the difference value within the preset range as the displacement direction of the mobile terminal in the vehicle cabin.

In one embodiment, the acquiring a displacement direction of the mobile terminal in the vehicle cabin specifically further includes:

a plurality of displacement directions which are continuous and consistent in direction are combined.

Step S202, one or more displacement directions are taken as a first track, and if the first track meets the first protocol specification, track identification is started.

In one embodiment, if the first trajectory satisfies a first protocol specification, the starting of trajectory identification specifically includes:

presetting a sampling time interval at each interval, and taking the displacement direction obtained in the sampling time interval as a first track;

comparing the displacement direction included by the first track with the standard direction included by a first protocol track specified by a first protocol;

and taking the displacement direction which is the same as the standard direction included by the first protocol track in the displacement directions included by the first track as a first displacement direction, and if the number of the first displacement directions is greater than a preset first number threshold value, or the ratio of the number of the first displacement directions to the number of all the standard directions included by the first protocol track is greater than a first ratio threshold value, judging that the first track meets the first protocol regulation, and starting track identification.

In one embodiment, if the first trajectory satisfies a first protocol specification, the starting of trajectory identification specifically includes:

and if the first track meets the first protocol specification, performing sound-light or vibration prompt and starting track identification.

Step S203, during the track recognition, obtaining the displacement direction of the mobile terminal in the vehicle cabin, and stopping the track recognition if one or more displacement directions of the mobile terminal in the vehicle cabin meet the second protocol regulation.

In one embodiment, if one or more of the displacement directions of the mobile terminal in the vehicle cabin satisfy a second protocol, stopping the track recognition specifically includes:

taking the displacement direction of the last stop identification number of the mobile terminal in the vehicle cabin as a stop displacement direction combination, wherein the stop identification number is more than or equal to the number of standard directions included in a standard track specified by a second protocol;

comparing the displacement direction included in the stop displacement direction combination with a standard direction included in a second protocol track specified by a second protocol;

and taking the displacement direction which is the same as the standard direction included by the second protocol in the displacement directions included by the stop displacement direction combination as the stop displacement direction, and if the number of the stop displacement directions is greater than a preset stop number threshold value or the ratio of the number of the stop displacement directions to the number of all the standard directions included by the second protocol track is greater than a stop proportion threshold value, judging that the displacement direction meets the specification of the second protocol and stopping track identification.

In one embodiment, if one or more of the displacement directions of the mobile terminal in the vehicle cabin satisfy a second protocol, stopping the track recognition specifically includes:

and if one or more displacement directions of the mobile terminal in the vehicle cabin meet the second protocol, performing sound-light or vibration prompt and stopping track identification.

And step S204, taking the displacement direction of the mobile terminal in the cabin from the start track recognition to the stop track recognition as a second track.

In one embodiment, the taking the displacement direction of the mobile terminal in the cabin from the start track identification to the stop track identification as the second track specifically includes:

taking the displacement direction of the mobile terminal in the cabin from the start track recognition to the stop track recognition as a displacement direction combination to be recognized;

and removing the final stop recognition number displacement directions of the mobile terminal in the vehicle cabin from the displacement direction combination to be recognized, and taking the removed displacement directions in the displacement direction combination to be recognized as a second track.

Step S205, comparing the displacement direction included in the second trajectory with the standard direction included in each standard trajectory.

Step S206, regarding a displacement direction, which is the same as a standard direction included in a standard trajectory, of the displacement directions included in the second trajectory as a second displacement direction, and if the number of the second displacement directions is greater than a preset second quantity threshold, or the ratio of the number of the second displacement directions to the number of all standard directions included in the standard protocol trajectory is greater than a second proportional threshold, determining that the standard trajectory is a standard trajectory to be executed.

And step S207, executing the operation corresponding to the standard trajectory to be executed on the vehicle-mounted part corresponding to the standard trajectory to be executed.

In one embodiment, the executing the operation corresponding to the standard trajectory to be executed on the vehicle-mounted part corresponding to the standard trajectory to be executed specifically includes:

if the second track comprises a standard track to be executed, executing the operation corresponding to the standard track to be executed on the vehicle-mounted part corresponding to the standard track to be executed;

if the second track comprises a plurality of standard tracks to be executed, executing the operation corresponding to the standard tracks to be executed on the vehicle-mounted parts corresponding to the standard tracks to be executed, if the plurality of standard tracks to be executed control the same part, selecting one standard track to be executed, and executing the operation corresponding to the selected standard track to be executed on the vehicle-mounted parts corresponding to the selected standard track to be executed.

Specifically, step S201 obtains a displacement direction of the mobile terminal in the cabin, and the displacement direction may be represented by a direction of a displacement vector. The manufacturer may set a plurality of standard directions for the cabin, define a standard vector for each standard direction, and set a deviation value. When the displacement vector of the mobile terminal falls into the deviation range of a certain standard direction, the fact that the mobile terminal carries out the motion of the direction can be judged, and the standard direction is taken as the displacement direction of the displacement vector. And two displacement directions which are continuously adjacent are combined if the directions are consistent. The vector comprises a magnitude and a direction, and when the displacement vector is compared with the standard vector, only the direction difference value of the displacement vector and the standard vector can be compared, and the deviation range is the deviation range in the direction. For example, if the magnitude of the displacement vector is set to 1 and the magnitude of the standard vector is set to 1, the difference between the displacement vector and the standard vector is calculated to obtain the direction difference between the displacement vector and the standard vector, and it is determined whether the mobile terminal has performed a motion in the direction by determining whether the direction difference is within a preset direction deviation range.

And then, according to the track type, performing specific function operation, namely performing specific function operation according to the displacement track type of the mobile terminal.

Firstly, before the first protocol is satisfied, step S202 is executed to collect the displacement standard directions of the mobile terminal at a certain time interval and combine them into a displacement direction combination, the displacement direction combination is the first track, and the number of the displacement directions in the combination is greater than or equal to the number of the standard directions included in the standard direction combination defined in the first protocol.

And if the first track (direction combination) of the mobile terminal meets the displacement track (direction combination) specified by the first protocol and the behaviors of the mobile terminal and the vehicle meet the safety regulation of the first protocol, activating a control identification program. [ MOVING TRACE → STANDARD TRACE DATABASE → SAFETY CONTROL ]

The displacement trajectory specified by the first protocol is a first protocol trajectory, and the determining that the first trajectory satisfies the first protocol trajectory may be: and taking the displacement direction which is the same as the standard direction included by the first protocol track in the displacement directions included by the first track as a first displacement direction, and if the number of the first displacement directions is greater than a preset first number threshold, or the ratio of the number of the first displacement directions to the number of all the standard directions included by the first protocol track is greater than a first ratio threshold, judging that the first track meets the first protocol regulation. The number of displacement directions included in the first trajectory may be greater than the number of the first protocol trajectories, and therefore, the comparison between the first trajectory and the first protocol trajectory does not have to be performed from the beginning, and only a middle section of the first trajectory needs to satisfy the first protocol trajectory. Preferably, the first displacement direction is consistent with the corresponding standard direction sequence, that is, the sequence of the first displacement direction in the first trajectory, which is the same as the standard direction of the first protocol trajectory, is the same as the standard direction sequence of the first protocol trajectory, and one or more directions in the middle may be inconsistent, and the others are consistent and are also in agreement, so as to improve the fault tolerance of control identification. The first number threshold is less than or equal to the number of standard directions of the first protocol track, and the first proportional threshold is less than or equal to 100%. The first number threshold may be set to be smaller than the number of standard directions of the first protocol tracks, or the first proportion threshold may be smaller than 100%, so that the first track partially satisfies the first protocol tracks, and the control recognition may also be triggered, thereby improving the fault tolerance.

Taking the S-type standard trajectory as an example, the standard direction combination is: the upper left, the lower right, the lower left, the upper left.

The following first trajectories are all the trajectories meeting the above S-type standard:

1) the displacement direction combination of the first track slid out by the user is as follows: the upper left, the lower right, the lower left, the upper left. Because each displacement direction in the first track is the same as the standard direction and the sequence is the same, the first track of the user can be judged to conform to the S-shaped standard track.

2) The displacement direction combination of the first track slid out by the user is as follows: left lower, left upper, left lower, right lower, left upper. Which contains all the standard directions of the S-shaped standard trajectory. Wherein, the displacement directions consistent with the standard direction of the S-shaped standard track are (c), (c) and (c). Because the five displacement directions are consistent with the sequence of the standard directions, the first track of the user is still considered to be in accordance with the S-shaped standard track, and therefore the fault tolerance rate of control recognition is improved.

If the first number is set to 4, the displacement direction combination of the first trajectory is (upper left), (lower right), (upper left) and upper left, and the first trajectory can be considered to conform to the S-shaped standard trajectory.

And executing step S203 while controlling the identification program to be activated, combining all collected displacement directions of the mobile terminal, and detecting whether a direction combination formed by the displacement directions of the tail end of the displacement direction combination meets a second protocol. The number of displacement directions of the end is equal to the number of standard directions comprised by the combination of standard directions defined in the second protocol.

And fourthly, during the activation control recognition, if the displacement direction combination at the tail end of the displacement track of the mobile terminal meets a second protocol, stopping the control recognition.

The standard trace of the second protocol is a second protocol trace. Judging that the displacement direction combination at the tail end of the displacement track of the mobile terminal meets a second protocol track, which can be: and taking the displacement direction which is the same as the standard direction included in the second protocol as the stop displacement direction in the displacement directions included in the stop displacement direction combination, and if the number of the stop displacement directions is greater than a preset stop number threshold value, or the ratio of the number of the stop displacement directions to the number of all the standard directions included in the second protocol track is greater than a stop ratio threshold value, judging that the second protocol specification is met. The number of the displacement directions at the tail end of the displacement track of the mobile terminal can be larger than the number of the second protocol tracks, so that the comparison between the tail end of the displacement track of the mobile terminal and the second protocol tracks does not need to be performed from the beginning, and only a certain section in the middle of the tail end of the displacement track of the mobile terminal needs to meet the second protocol tracks. Preferably, the stopping displacement direction is consistent with the corresponding standard direction sequence, that is, the stopping displacement direction in the end of the displacement track of the mobile terminal, which is the same as the standard direction of the second protocol track, is the same as the standard direction sequence of the second protocol track, and one or more directions in the middle are not consistent, and the others are consistent and are also consistent, so that the fault tolerance rate of control identification is improved. The stop number threshold is less than or equal to the number of standard directions of the first protocol track, and the stop proportion threshold is less than or equal to 100%. The stop quantity threshold value can be set to be smaller than the quantity of the standard directions of the first protocol tracks, or the stop proportion threshold value is smaller than 100%, so that the stop displacement direction combination part meets the second protocol tracks, control recognition can also be triggered, and the fault tolerance rate is improved.

Defining the standard track triggering the second protocol as a V-shaped track, wherein the standard direction combination is as follows: the first is right-lower and the second is right-upper. After the user is triggered by the first protocol, in the time of track identification, the displacement direction combination of the second track which slides out is as follows: upper left, lower right, lower left, upper left, lower right, upper right.

In the sliding track of the user, the direction combination of the sixth and seventh directions meets the trigger condition V-shaped track of the second protocol, and the control recognition is stopped at the moment.

4. After the control recognition is stopped, removing direction combinations (namely, the seventh to the tenth) meeting the second protocol from the operation tracks of the user, taking the rest of the direction combinations (namely, the sixth to the tenth) as actual control tracks, and performing comparison and judgment to further control the vehicle.

And if the second track slides out, the displacement direction combination is as follows: upper left, lower right, lower left, upper right. Setting the number of the stopping identifications to be 3, and finally, carrying out displacement directions which are consistent with the standard directions of the V-shaped standard trajectories and comprise all the standard directions of the V-shaped standard trajectories. Because the two displacement directions are consistent with the sequence of the standard directions of the V-shaped track, the tail end of the displacement track of the mobile terminal of the user is still considered to be in accordance with the V-shaped standard track, so that the control recognition is stopped, and the fault tolerance rate of the control recognition is improved.

And fourthly, after the control recognition is stopped, deleting the displacement direction combination of the tail end of the track corresponding to the second protocol, and taking the displacement direction of the mobile terminal in the cabin from the track recognition starting to the track recognition stopping as a second track in step S204. The time for starting the track recognition may be a time for starting recognition whether the first track meets the first protocol specification, or a time for completing recognition when the first track meets the first protocol specification.

For example, a first trajectory moving within the vehicle satisfies the first protocol at N1 seconds, which may be judged to satisfy the first protocol in seconds at N1 seconds, or may be identified after N2 seconds after N1 seconds. Therefore, when the second trajectory is not recognized until N2 seconds, the trajectory after N2 seconds may be considered as the second trajectory, or the trajectory after N1 seconds may be considered as the second trajectory. Then, step S205 to step S206 are executed to compare the second trajectory with the standard directions of all the standard trajectories in the database, and determine whether the current displacement trajectory (displacement direction combination) of the mobile terminal belongs to a certain standard trajectory (standard direction combination).

Specifically, among the displacement directions included in the second trajectory, a displacement direction that is the same as a standard direction included in a standard trajectory is taken as a second displacement direction, and if the number of the second displacement directions is greater than a preset second quantity threshold, or the ratio of the number of the second displacement directions to the number of all standard directions included in the standard protocol trajectory is greater than a second proportional threshold, it is determined that the current displacement trajectory (displacement direction combination) of the mobile terminal belongs to the standard trajectory.

Judging that the second trajectory meets the standard trajectory, which may be: and taking the displacement direction which is the same as the standard direction included by a standard track in the displacement directions included by the second track as a second displacement direction, and if the number of the second displacement directions is greater than a preset second number threshold, or the ratio of the number of the second displacement directions to the number of all the standard directions included by the standard protocol track is greater than a second proportion threshold, judging that the second track meets the first protocol regulation. The number of displacement directions included in the second trajectory may be greater than the number of standard trajectories, and therefore, the comparison between the second trajectory and the standard trajectory does not need to be performed from the beginning, and only a middle section of the second trajectory needs to satisfy the standard trajectory. Preferably, the second displacement direction is consistent with the corresponding standard direction sequence, that is, the sequence of the second displacement direction in the second trajectory, which is the same as the standard direction of the standard trajectory, is the same as the standard direction sequence of the standard trajectory, and one or more directions in the middle may be inconsistent, and the others are consistent, and are also consistent, so that the fault tolerance of the trajectory identification is improved. The second quantity threshold is less than or equal to the quantity of the standard directions of the standard tracks, and the second proportion threshold is less than or equal to 100%. The second quantity threshold value can be set to be smaller than the quantity of the standard directions of the standard tracks, or the second proportion threshold value is smaller than 100%, so that the second track part meets the standard tracks, control recognition can be triggered, and the fault tolerance rate is improved. Different second quantity thresholds or second ratio thresholds may be set for different standard trajectories.

Taking the S-type standard trajectory as an example, the standard direction combination is: the upper left, the lower right, the lower left, the upper left.

The following second trajectories are all the trajectories meeting the above S-type standard:

1) the displacement direction combination of the second track slid out by the user is as follows: the upper left, the lower right, the lower left, the upper left. Because each displacement direction in the second track is the same as the standard direction and the sequence is the same, the second track of the user can be judged to conform to the S-shaped standard track.

2) The displacement direction combination of the second track slid out by the user is as follows: left lower, left upper, left lower, right lower, left upper. Which contains all the standard directions of the S-shaped standard trajectory. Wherein, the displacement directions consistent with the standard direction of the S-shaped standard track are (c), (c) and (c). Because the five displacement directions are consistent with the sequence of the standard directions, the second track of the user is still considered to conform to the S-shaped standard track, and therefore the fault tolerance rate of track identification is improved.

If the second number is set to 4, the displacement direction combination of the second trajectory is (upper left), (lower right), (upper left) and upper left, and the second trajectory can be considered to conform to the S-shaped standard trajectory.

If the displacement track during the control recognition belongs to a certain standard track defined in the database, step S207 is executed to control a certain function of a certain electronic component of the vehicle body according to the command corresponding to the track.

If the second track includes a plurality of standard tracks, the parts corresponding to the plurality of standard tracks can be operated, for example, the parts corresponding to the plurality of standard tracks can be sequentially operated. If a plurality of standard tracks in the second track control the same part, the last standard track is taken as the main track to control the part.

For example: in the second track, the following standard tracks are included,

air conditioner temperature rises, seat is forward, atmosphere lamp becomes red, air conditioner temperature falls, next song, last song.

Then it may be performed sequentially (or not in the order of detection): seat forward, atmosphere lamp turn red, air conditioner temperature drop, last song.

Wherein:

the data transmission between the vehicle and the mobile terminal is completed through wireless communication (such as internet, local area network, Bluetooth and the like).

The calculation and identification of the trajectory can be done in a mobile terminal or a car machine or other computationally equipped device.

The control of the vehicle-mounted electronic equipment can be completed through a vehicle machine or other controllable equipment with control authority.

The first protocol is a judgment protocol for controlling the start of recognition, and includes definitions of activation operations of the mobile terminal, judgment of user control authority, and the like.

The second protocol is a judgment protocol for controlling the termination of the recognition, and includes definitions of termination operations of the mobile terminal, judgment of user control authority, and the like.

The standard trajectory contains a combination of standard directions of displacement of the mobile terminal from the start point to the end point of the trajectory.

In this embodiment, after the track recognition is started, the displacement data of the mobile terminal during the period from the start to the end is collected at a certain time interval and converted into a displacement direction combination, wherein the same standard direction adjacent to a time point is used as data, and then the standard direction combinations corresponding to various types of standard tracks stored in the database are compared to judge whether the displacement track of the mobile terminal belongs to a certain type of standard track defined in the database.

The embodiment improves the activation recognition rate, and the control unit is activated without aligning the mobile phone to a specific direction, and the control unit can be activated by only carrying out simple action. The hardware cost is low, and the functions of recognizing the motion trail of the mobile terminal and controlling the rear row can be realized without carrying a rear row control system, a camera and the like. The cost of using the vehicle does not need to be increased, and the customer can control the vehicle by using the mobile terminal (a smart phone, a smart watch and the like). The embodiment can realize the motion trail identification at the background without switching the application interfaces of the mobile terminal and the car machine, and avoids interrupting the entertainment activities originally performed by the user at the mobile phone end and the car machine end. The user can finish the control of the electronic parts in the vehicle (such as a central control screen, an air conditioner, a skylight and the like) in any sitting posture without operating on specific function keys or specific areas. Meanwhile, a plurality of alternative control schemes are provided for the original height of the hard key. The embodiment can be expanded to travel service businesses such as dripping and the like, and passengers can freely adjust the environment in the cabin. The identification scheme of the embodiment can be expanded to a vehicle-mounted motion sensing game, and a smart phone/smart watch is used as a handle for playing.

In one embodiment, prior to initiating trajectory recognition:

acquiring vehicle acceleration information and mobile terminal acceleration information, and/or acquiring a detection displacement vector of positioning equipment installed in a vehicle for detecting the displacement of the mobile terminal;

calculating a difference value between the vehicle acceleration information and the mobile terminal acceleration information to serve as a resultant acceleration vector, and determining a resultant displacement vector of the mobile terminal in the vehicle cabin based on the resultant acceleration vector;

determining the displacement direction of the mobile terminal in the cabin based on the synthesized displacement vector, or determining the corrected displacement vector of the mobile terminal in the cabin based on the synthesized displacement vector and the detection displacement vector, and determining the displacement direction of the mobile terminal in the cabin based on the corrected displacement vector;

taking one or more of the displacement directions as a first trajectory;

during trajectory identification:

and obtaining a detection displacement vector of the positioning equipment installed in the vehicle for the displacement detection of the mobile terminal, determining a correction displacement vector of the mobile terminal in the vehicle cabin based on the synthesized displacement vector and the detection displacement vector, and determining the displacement direction of the mobile terminal in the vehicle cabin based on the correction displacement vector.

According to the embodiment, before the track recognition is started, the displacement direction of the mobile terminal in the vehicle cabin can be determined by adopting the synthetic displacement vector, so that the resource consumption is reduced. And after the track recognition is activated, the displacement direction of the mobile terminal in the vehicle cabin is determined by using the corrected displacement vector, so that the track recognition accuracy is improved.

The calculation of the displacement vector may be performed by collecting acceleration information in each direction of the vehicle at a certain time interval T1 based on the vehicle inertial sensor. Based on the inertial sensor of the mobile terminal, the acceleration information of the mobile phone in all directions is collected at time interval T1. And calculating displacement information X1 of the mobile terminal in the vehicle cabin in T1 based on the combined acceleration of the mobile terminal and the vehicle.

In order to improve the track identification accuracy, a UWB positioning device can be installed in the vehicle, and the displacement X2 of the mobile terminal in the vehicle is calculated at the time interval of T1, and the UWB positioning device is kept synchronous with the acquisition period of the inertial sensor. And carrying out weighted average on the X1 and the X2 to obtain more accurate displacement data of the mobile terminal in the vehicle.

Fig. 3 is a flowchart illustrating a method for measuring displacement of a mobile terminal in a vehicle cabin according to an embodiment of the present invention, including:

step S301, matching and calibrating the mobile terminal and the vehicle until three axes of a coordinate system of the mobile terminal and three axes of a coordinate system of the vehicle keep relatively static and consistent in direction;

step S302, acquiring vehicle acceleration information and mobile terminal acceleration information;

step S303, calculating a difference value between the vehicle acceleration information and the mobile terminal acceleration information as a resultant acceleration vector, and determining a resultant displacement vector of the mobile terminal in the vehicle cabin based on the resultant acceleration vector;

step S304, obtaining a detection displacement vector of the positioning equipment installed in the vehicle for the displacement detection of the mobile terminal;

and S305, determining a corrected displacement vector of the mobile terminal in the cabin based on the synthesized displacement vector and the detected displacement vector.

Specifically, in the first step after the function is started, step S301 is executed to perform matching calibration on the mobile terminal and the vehicle. And ensuring that three axes of the mobile terminal coordinate system and three axes of the vehicle coordinate system are kept relatively static and consistent in direction. After the calibration is completed, the calibration is not needed until the function is closed. The X, Y, and Z axes of the coordinate system of the mobile terminal and the coordinate system of the vehicle are determined according to the axes of their inertial sensors (acceleration, angular acceleration, etc.).

Then, step S302 and step S303 are executed to calculate a resultant acceleration vector, and a resultant displacement vector X1 of the mobile terminal in the cabin is determined based on the resultant acceleration vector. Meanwhile, step S304 is executed to obtain a detected displacement vector X2 of the positioning device mounted in the vehicle for displacement detection of the mobile terminal. Finally, step S305 is executed to determine a corrected displacement vector of the mobile terminal in the cabin based on the composite displacement vector and the detected displacement vector, where the correction may be performed by performing a weighted average on the composite displacement vector X1 and the detected displacement vector X2, so as to obtain a final corrected displacement vector of the mobile terminal in the cabin. And determining the accurate motion track of the mobile terminal in the vehicle cabin according to the corrected displacement vector. In addition, the obtained correction displacement vector can be expanded to a vehicle-mounted motion sensing game, and a user plays by using a smart phone/a smart watch as a handle. Preferably, the positioning device is an Ultra Wide Band (UWB) positioning device, and the UWB positioning technology is adopted to position the mobile terminal in the cabin.

According to the invention, when the function is started, namely the mobile terminal and the vehicle are subjected to matching calibration, the mobile terminal and the vehicle are relatively static at the initial time, and the initial speed of the mobile terminal in a vehicle coordinate system can be simplified to 0, so that the operation is simplified. And the detected displacement vector and the synthesized displacement vector obtained by the positioning equipment are corrected to obtain a more accurate displacement vector of the mobile terminal in the vehicle, and the influence of the sensor precision error and the UWB precision error is reduced and the application capability of the mobile terminal is improved by double confirmation.

In one embodiment, the calculating a difference value between the vehicle acceleration information and the mobile terminal acceleration information as a resultant acceleration vector, and determining a resultant displacement vector of the mobile terminal in the cabin based on the resultant acceleration vector specifically includes:

and presetting a sampling time interval at each interval, calculating a difference value between the vehicle acceleration information and the mobile terminal acceleration information in the sampling time interval as a resultant acceleration vector, and calculating a resultant displacement vector of the mobile terminal in the vehicle cabin based on all the resultant acceleration vectors.

Specifically, acceleration information in each direction of the vehicle is collected at a certain sampling time interval T1. Based on the inertial sensor of the mobile terminal, the acceleration information of the mobile phone in all directions is collected at the sampling time interval T1. And calculating displacement information X1 of the mobile terminal in the vehicle cabin in T1 based on the combined acceleration of the mobile terminal and the vehicle. Preferably, the UWB positioning equipment is installed in the vehicle, and the sampling period of the inertial sensor is kept synchronous, and the displacement X2 of the mobile terminal in the vehicle is calculated according to the sampling time interval of T1. And carrying out weighted average on the X1 and the X2 to obtain a more accurate displacement vector of the mobile terminal in the vehicle.

In the embodiment, the resultant acceleration vector is calculated at each preset sampling time interval, so that the change of the displacement vector can be accurately reflected, and a more accurate displacement track can be obtained.

In one embodiment, the vehicle acceleration information includes a vehicle linear acceleration vector collected by a vehicle linear acceleration sensor and a vehicle angle vector collected by a vehicle angular acceleration sensor, the mobile terminal acceleration information includes a mobile terminal linear acceleration vector collected by a mobile terminal linear acceleration sensor and a mobile terminal angle vector collected by a mobile terminal angular acceleration sensor, the difference between the vehicle acceleration information and the mobile terminal acceleration information in the sampling time interval is calculated as a resultant acceleration vector, and a resultant displacement vector of the mobile terminal in the vehicle cabin is calculated based on all the resultant acceleration vectors, which specifically includes:

calculating the difference between the angle vector of the mobile terminal and the angle vector of the vehicle in the sampling time interval as an angle difference value vector;

based on the angle difference vector in the sampling time interval, converting the linear acceleration vector of the mobile terminal in the sampling time interval into a mobile terminal correction linear acceleration vector based on a vehicle coordinate system;

calculating the difference between the mobile terminal corrected linear acceleration vector and the vehicle linear acceleration vector in the sampling time interval as a combined acceleration vector in the sampling time interval;

and calculating a composite velocity vector of the mobile terminal in the vehicle cabin based on the sum of products of all the composite acceleration vectors and the sampling time interval, and calculating a composite displacement vector of the mobile terminal in the vehicle cabin based on the composite velocity vector.

In this embodiment, the linear acceleration vector of the mobile terminal is specifically converted into a mobile terminal modified linear acceleration vector based on the vehicle coordinate system, so that a difference value is calculated between the linear acceleration vector of the mobile terminal and the vehicle linear acceleration vector in the same coordinate system, and an accurate synthesized displacement vector of the mobile terminal in the vehicle cabin is obtained.

In one embodiment, the converting the linear acceleration vector of the mobile terminal in the sampling time interval into a modified linear acceleration vector of the mobile terminal based on the vehicle coordinate system based on the angular difference vector in the sampling time interval specifically includes:

for the ith sampling interval:

linear acceleration vector of vehicle

Linear acceleration vector of mobile terminal

Vehicle angle vector

Mobile terminal angle vector

The mobile terminal corrects the linear acceleration vector as

Wherein the angle difference vector For the initial angle vector of the mobile terminal,is the initial angle vector of the vehicle,and the initial angle deviation vector of the mobile terminal coordinate system and the vehicle coordinate system is obtained.

Specifically, the method for calculating the modified linear acceleration vector of the mobile terminal is as follows:

calculating the three-axis acceleration acquired by an acceleration sensor of the mobile terminal in real time:

calculating the three-axis acceleration acquired by an acceleration sensor of the vehicle in real time:

calculating the rotation angle values around the X, Y and Z three axes acquired by the angular acceleration sensor of the mobile terminal in real time

Calculating the angular value of the rotation around the three X, Y and Z axes acquired by the angular acceleration sensor of the vehicle in real time

Wherein:i is the current sampling number, i.e. the current sampling time interval item number, T is the total time after the function is started, TcIs the sampling time interval.

By vector angle transfer functionConverting the acceleration vector of the mobile terminal into an acceleration vector based on a vehicle coordinate system:

wherein:

finally, in the vehicle coordinate system, the difference between the acceleration vector of the current mobile terminal and the acceleration vector of the vehicleFor confirming an acceleration of the current mobile device relative to the vehicle, wherein:

in one embodiment, the calculating a composite velocity vector of the mobile terminal in the cabin based on the sum of products of all the composite acceleration vectors and the sampling time interval, and calculating a composite displacement vector of the mobile terminal in the cabin based on the composite velocity vector specifically includes:

for the ith sampling time interval, calculating the resultant velocity vector of the mobile terminal in the cabinWhereinIs the initial velocity, T, of the mobile terminal in the vehicle coordinate systemcIn order to sample the time interval between the samples,the resultant acceleration vector for the h-th sampling time interval;

calculating the resultant displacement vector of the mobile terminal in the vehicle cabin based on the resultant velocity vector

Based on the above calculations, it can be determined that the velocity vector is synthesized at the ith sampling time intervalIs a composite of the velocities in all sampling time intervals prior to the ith sampling time interval. A composite displacement vector is then calculated based on the composite velocity vector. Wherein, because of the calibration, the mobile terminal is relatively static with the vehicle at the initial time, therefore, the initial speed of the mobile terminal in the vehicle coordinate system

The mobile terminal and the vehicle are matched and calibrated, and any one of the following schemes can be adopted:

the scheme is as follows: the mobile terminal is statically placed at an initial position defined by a manufacturer and placed according to a required direction.

Scheme II: and sliding the mobile terminal in a specific direction according to the indication.

Scheme III: other approaches are possible as long as the above requirements can be achieved.

The X, Y, and Z axes of the coordinate system of the mobile terminal and the coordinate system of the vehicle are determined based on the axes of the inertial sensors (acceleration, angular acceleration, and the like).

In one embodiment, the matching calibration of the mobile terminal and the vehicle specifically includes:

the mobile terminal is placed statically at a preset initial position and placed according to a preset direction.

In one embodiment, the matching calibration of the mobile terminal and the vehicle specifically includes:

and sliding the mobile terminal according to a preset direction.

Fig. 4 is a flowchart illustrating a method for measuring a displacement of a mobile terminal in a vehicle cabin according to a preferred embodiment of the present invention, including:

and step S401, after the function is started, matching and calibrating the mobile terminal and the vehicle. And ensuring that three axes of the mobile terminal coordinate system and three axes of the vehicle coordinate system are kept relatively static and consistent in direction. After the calibration is completed, the calibration is not needed until the function is closed. (calibration may take any of the following schemes:

the scheme is as follows: the mobile terminal is statically placed at an initial position defined by a manufacturer and placed according to a required direction.

Scheme II: and sliding the mobile terminal in a specific direction according to the indication.

Scheme III: other approaches are possible as long as the above requirements can be achieved.

The X, Y, and Z axes of the coordinate system of the mobile terminal and the coordinate system of the vehicle are determined based on the axes of the inertial sensors (acceleration, angular acceleration, and the like).

And S402, after calibration is completed, calculating the direction vector of the mobile terminal at each moment in the displacement process of the mobile terminal in the vehicle based on the values acquired by the sensors of the mobile terminal and the vehicle in real time. The calculation formula of the direction vector, i.e., the displacement vector, is as follows:

the two vectors are triaxial accelerations acquired by the acceleration sensors of the mobile terminal and the vehicle in real time.

The two vectors are angle values which are acquired by the mobile terminal and the angular acceleration sensor of the vehicle in real time and rotate around the three axes of X, Y and Z.

Wherein:i: the current number of samples. T: time after function is turned on. T isc: sampling time interval, the same below.

Wherein:

and under the vehicle coordinate system, the difference between the acceleration vector of the current mobile terminal and the acceleration vector of the vehicle is used for confirming the acceleration of the current mobile equipment relative to the vehicle.

And the vector angle conversion function is used for converting the acceleration vector of the mobile terminal into an acceleration vector based on the vehicle coordinate system.

The above equation can complete the calculation of the velocity direction vector of the current mobile terminal.

Wherein: mobile terminal is at carThe initial speed in the vehicle coordinate system is calibrated, so that the mobile terminal is static relative to the vehicle at the initial time, and 0 is taken.

The above equation can complete the displacement direction vector of the mobile terminal between two sampling pointsAnd (4) calculating.

And step S403, calculating a displacement direction vector of the mobile terminal based on the UWB positioning technology.

Specifically, the method comprises the following steps:

in step S404, a direction vector of the current mobile terminal is calculated by weighting.

In particular, the direction vector of the current mobile terminal Wherein alpha and beta are weight values and are determined by calibration.

Fig. 5 is a schematic diagram of a system according to a preferred embodiment of the present invention, which includes a vehicle-mounted host 1, a mobile terminal 2, a UWB antenna 3, an inertia measurement unit 4, and an electronic component 5. The vehicle-mounted host 1 acquires vehicle acceleration information from the inertia measurement unit 4, and meanwhile, the vehicle-mounted host 1 wirelessly communicates with the mobile terminal 2 to acquire the mobile terminal acceleration information, and the synthetic displacement vector is calculated by adopting the method. The in-vehicle host 1 communicates with the UWB antenna 3, and obtains a detection displacement vector provided by the UWB antenna 3. And finally, the vehicle-mounted host 1 determines a corrected displacement vector of the mobile terminal in the vehicle cabin based on the synthesized displacement vector and the detected displacement vector, and can control the corresponding electronic component 5 based on the corrected displacement vector of the mobile terminal in the vehicle cabin.

The embodiment reduces the false action rate, and combines the motion information of the whole vehicle and UWB positioning to more accurately calculate the motion track of the mobile phone in the dynamic space (vehicle cabin). Meanwhile, the hardware cost is low, and the functions of identifying the motion trail of the mobile terminal and controlling the rear row can be realized without carrying a rear row control system, a camera and the like. The cost of using the vehicle does not need to be increased, and the customer can control the vehicle by using the mobile terminal (a smart phone, a smart watch and the like). The motion trail identification can be realized at the background, the application interfaces of the mobile terminal and the car machine do not need to be switched, and the interruption of the entertainment activities originally performed at the mobile phone end and the car machine end by a user is avoided. The user can finish the control of the electronic parts in the vehicle (such as a central control screen, an air conditioner, a skylight and the like) in any sitting posture without operating on specific function keys or specific areas. The method can be used as one of the alternatives of the traditional hard key control, and the development cost of the hard key is reduced. The system can be expanded to travel service business, and passengers can freely adjust the environment in the cabin. The identification scheme can be expanded to a vehicle-mounted motion sensing game, and a smart phone/smart watch is used as a handle for playing.

Fig. 6 is a flowchart illustrating a method for controlling a vehicle-mounted component according to a preferred embodiment of the present invention, which includes:

step S601, initializing to ensure that a mobile terminal coordinate system and a vehicle coordinate system are relatively static and consistent in direction;

step S602, calculating a relative displacement vector X1 between the mobile terminal and the vehicle based on the sensor, and calculating a displacement vector X2 of the mobile terminal in the vehicle based on UWB;

step S603, weighting and summing X1 and X2, and converting the weighted sum into a displacement direction;

step S604, a certain number of displacement directions are combined and judged;

step S605, if the first protocol is satisfied, executing step S606, otherwise, continuing to execute step S604;

step S606, activating the control recognition program;

step S607, all the collected mobile terminal displacement directions are combined;

step S608, a certain number of displacement directions at the tail end of the displacement direction combination are combined and judged;

step S609, if the second protocol is satisfied, executing step S610, otherwise executing step S608;

step S610, judging all collected displacement direction combinations before the second protocol is met;

step S611, if the standard track belongs to, step S612 is executed, otherwise step S614 is executed;

step S612, controlling parts;

step S613, if the continuous recognition is turned on, perform step S607, otherwise perform step S614;

step S614, if the function is finished, otherwise, the step S604 is executed again.

An example of an interaction is as follows:

1) activation control: and (3) holding the mobile phone (the smart watch) by hand, completing corresponding actions (a first protocol), and activating control identification.

2) Track identification: the mobile phone (intelligent watch) is held by hand to complete corresponding actions.

3) And (4) completing recognition: and (4) holding the mobile phone (the smart watch) by hand to complete corresponding actions (a second protocol) and complete control identification.

Wherein, the corresponding action of the activation control can be:

the mobile phone (intelligent watch) is shaken slightly twice with a certain amplitude, the initial position of the mobile phone is identified in the area with the control authority by UWB positioning, and the mobile phone (intelligent watch) vibrates to prompt the start of control identification.

The corresponding action of the track recognition may be:

sliding a distance to the right and then making the next curve.

Sliding a distance to the left and then bending the curve.

Sliding a distance upwards to increase the volume.

Fourthly, the sound volume is reduced when the loudspeaker glides for a certain distance.

Drawing a complete circle clockwise, and reducing the temperature of the air conditioner.

Sixthly, drawing a complete circle anticlockwise, and increasing the temperature of the air conditioner.

The Arabic numeral 2 and the atmosphere lamp are adjusted to the mode 2.

And adjusting the atmosphere lamp to be in a mode 3.

Ninthly, sliding backwards for a certain distance, and opening the skylight.

The red slides forward a distance and the skylight is closed.

The corresponding actions to complete the recognition may be:

a mobile phone (smart watch) is lightly shaken to a certain extent.

The embodiment reduces the false action rate, and combines the motion information of the whole vehicle and UWB positioning to more accurately calculate the motion track of the mobile phone in the dynamic space (vehicle cabin). The activation recognition rate is improved, the mobile phone does not need to be aligned to a specific direction to activate the control unit, and the control can be activated only by simple action. The embodiment has low hardware cost, and can realize the functions of identifying the motion trail of the mobile terminal and controlling the rear row without carrying a rear row control system, a camera and the like. The cost of using the vehicle does not need to be increased, and the customer can control the vehicle by using the mobile terminal (a smart phone, a smart watch and the like). The embodiment can realize the motion trail identification at the background without switching the application interfaces of the mobile terminal and the car machine, and avoids interrupting the entertainment activities originally performed by the user at the mobile phone end and the car machine end. The user can finish the control of the electronic parts in the vehicle (such as a central control screen, an air conditioner, a skylight and the like) in any sitting posture without operating on specific function keys or specific areas. The embodiment provides a plurality of alternative control schemes for the original level of the hard key. The method can be expanded to trip service businesses such as dripping and the like, and passengers can freely adjust the environment in the cabin. The recognition scheme of the embodiment can be expanded to a vehicle-mounted motion sensing game, and a smart phone/smart watch is used as a handle for playing.

EXAMPLE III

Fig. 7 is a schematic diagram of a hardware structure of an electronic device according to the present invention, which includes:

at least one processor 701; and the number of the first and second groups,

a memory 702 communicatively coupled to at least one of the processors 701; wherein the content of the first and second substances,

the memory 702 stores instructions executable by at least one of the processors to enable the at least one of the processors to perform the method for controlling the vehicle-mounted components as described above

In fig. 5, one processor 701 is taken as an example.

The Electronic device is preferably an Electronic Control Unit (ECU) of the vehicle. The electronic device may further include: an input device 703 and a display device 704.

The processor 701, the memory 702, the input device 703 and the display device 704 may be connected by a bus or other means, and are illustrated as being connected by a bus.

The memory 702, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the vehicle-mounted component control method in the embodiment of the present application, for example, the method flow shown in fig. 1. The processor 701 executes various functional applications and data processing by executing nonvolatile software programs, instructions, and modules stored in the memory 702, that is, implements the vehicle-mounted component control method in the above-described embodiment.

The memory 702 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the in-vehicle component control method, and the like. Further, the memory 702 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 702 may optionally include memory located remotely from processor 701, and such remote memory may be connected over a network to a device that performs the in-vehicle parts control method. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The input device 703 may receive an input of a user click and generate signal inputs related to user settings and function control of the in-vehicle component control method. Display device 704 may include a display screen or the like.

When the one or more modules are stored in the memory 702 and executed by the one or more processors 701, the vehicle-mounted component control method in any of the above-described method embodiments is executed.

According to the invention, the track recognition is activated based on the displacement direction of the mobile terminal in the vehicle cabin, and the track recognition is stopped based on the displacement direction of the mobile terminal in the vehicle cabin, so that the user does not need to aim the mobile terminal at a specific direction in the whole recognition process, and the activation control can be realized only by simple action, and the activation recognition rate is greatly improved.

An eleventh embodiment of the present invention provides a storage medium that stores computer instructions for executing all the steps of the vehicle-mounted parts control method as described above when a computer executes the computer instructions.

The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

29页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于均匀设计的路径规划蚁群算法参数选取方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类