Electric bicycle wheel movement detection method and device, electronic equipment and storage medium

文档序号:828770 发布日期:2021-03-30 浏览:16次 中文

阅读说明:本技术 电单车轮动检测方法、装置、电子设备和存储介质 (Electric bicycle wheel movement detection method and device, electronic equipment and storage medium ) 是由 李超超 钱建安 江涛 张瑛 于 2021-02-24 设计创作,主要内容包括:本发明提供一种电单车轮动检测方法、装置、电子设备和存储介质,其中方法包括:基于RTOS支持的采样频率,获取电单车轮动信号的当前采样电平;基于所述当前采样电平,更新电平累计次数,所述电平累计次数是连续采样得到相同电平的采样次数;基于预设次数阈值和所述电平累计次数,确定轮动检测状态。本发明提供的方法、装置、电子设备和存储介质,通过统计连续采样得到相同电平的采样次数,反推电单车轮动信号的波动情况,进而判断电单车的轮动检测状态,仅需应用RTOS支持的采样频率进行电单车轮动信号采样即可实现轮动检测,在低频采样的情况下保证了轮动识别的敏捷性和静止识别的安全性。(The invention provides a method and a device for detecting wheel movement of an electric bicycle, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring the current sampling level of the electric bicycle wheel movement signal based on the sampling frequency supported by the RTOS; updating the level accumulation times based on the current sampling level, wherein the level accumulation times are the sampling times of obtaining the same level by continuous sampling; and determining a wheel movement detection state based on a preset time threshold and the level accumulation times. According to the method, the device, the electronic equipment and the storage medium provided by the invention, the sampling times of the same level are obtained by counting continuous sampling, the fluctuation condition of the electric bicycle wheel movement signal is reversely deduced, the wheel movement detection state of the electric bicycle is further judged, the wheel movement detection can be realized only by sampling the electric bicycle wheel movement signal by using the sampling frequency supported by the RTOS, and the agility of wheel movement identification and the safety of static identification are ensured under the condition of low-frequency sampling.)

1. A method for detecting wheel movement of an electric bicycle is characterized by comprising the following steps:

acquiring the current sampling level of the electric bicycle wheel movement signal based on the sampling frequency supported by the RTOS;

updating the level accumulation times based on the current sampling level, wherein the level accumulation times are the sampling times of obtaining the same level by continuous sampling;

and determining a wheel movement detection state based on a preset time threshold and the level accumulation times.

2. A method for detecting electric bicycle wheel-motion according to claim 1, wherein said updating the level accumulation number based on the current sampling level comprises:

if the current sampling level is the same as the last sampling level, adding one to the level accumulated times updated last time to serve as the updated level accumulated times;

otherwise, updating the level accumulation times to 1.

3. A method for detecting electric bicycle wheel-motion according to claim 1, wherein said updating the level accumulation number based on the current sampling level comprises:

if the current sampling level is a high level, adding one to the number of high levels updated last time to serve as the number of high levels updated, and setting the number of low levels to 0;

otherwise, setting the high level times to 0, and adding one to the low level times updated last time to serve as the updated low level times;

and taking the difference value of the high level times and the low level times as the level accumulation times.

4. A wheel-motion detecting method for an electric bicycle according to claim 1, wherein the determining a wheel-motion detecting state based on a preset number threshold and the level accumulated number comprises:

if the accumulated number of times of the level is greater than or equal to the preset number threshold, determining that the wheel movement detection state is a static state;

otherwise, determining the wheel motion detection state as a motion state.

5. A method for detecting electric bicycle wheel movement according to any one of claims 1 to 4, wherein the obtaining of the current sampling level of the electric bicycle wheel movement signal based on the sampling frequency supported by the RTOS further comprises:

and shaping the electric bicycle wheel-motion signal.

6. The electric bicycle wheel movement detection method according to claim 5, wherein the shaping the electric bicycle wheel movement signal includes:

performing full-wave rectification on the electric bicycle wheel movement signal to obtain a rectified signal;

shaping the rectified signal based on a preset voltage threshold, the preset voltage threshold being determined based on a peak voltage of the rectified signal.

7. A wheel-motion detection method for an electric bicycle according to any one of claims 1 to 4, wherein the determining of the wheel-motion detection state further comprises:

receiving a vehicle locking and returning request;

and if the wheel movement detection state is a motion state, returning to a locking forbidding response, and controlling the lock of the electric bicycle to keep an opening state.

8. The utility model provides an electric bicycle wheel movement detection device which characterized in that includes:

the sampling unit is used for acquiring the current sampling level of the electric bicycle wheel movement signal based on the sampling frequency supported by the RTOS;

the accumulation unit is used for updating the level accumulation times based on the current sampling level, wherein the level accumulation times are the sampling times of the same level obtained by continuous sampling;

and the detection unit is used for determining the wheel movement detection state based on a preset frequency threshold value and the level accumulation frequency.

9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of the method for detecting electric bicycle wheel motion according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having stored thereon a computer program, which when executed by a processor implements the steps of the electric bicycle wheel movement detection method according to any one of claims 1 to 7.

Technical Field

The invention relates to the technical field of intelligent transportation, in particular to a method and a device for detecting wheel movement of an electric bicycle, electronic equipment and a storage medium.

Background

With the development of sharing economy, sharing electric bicycle brings great convenience to people's trip. In order to ensure the driving safety, people use the electric bicycle wheel movement detection as an important means for preventing the electric bicycle from mistakenly touching and locking a bicycle returning flow in the driving process.

At present, the wheel movement detection of the electric bicycle usually adopts a single chip microcomputer high-speed timer to sample wheel movement signals with 2 times of wheel movement frequency so as to ensure that the sampling can meet the Shannon sampling theorem. However, more and more electric bicycles begin to adopt a Real Time Operating System (RTOS) as an intelligent central control, and a software timer included in the RTOS cannot provide a timing function with a higher frequency, so that the intelligent central control based on the RTOS cannot meet the shannon sampling theorem when performing the rotation signal sampling, and the rotation detection reliability is directly poor.

Disclosure of Invention

The invention provides a method and a device for detecting wheel movement of an electric bicycle, electronic equipment and a storage medium, which are used for solving the problem of poor reliability of wheel movement detection caused by the fact that an RTOS (real time operating system) cannot provide a high-frequency timer.

The invention provides a wheel movement detection method for an electric bicycle, which comprises the following steps:

acquiring the current sampling level of the electric bicycle wheel movement signal based on the sampling frequency supported by the RTOS;

updating the level accumulation times based on the current sampling level, wherein the level accumulation times are the sampling times of obtaining the same level by continuous sampling;

and determining a wheel movement detection state based on a preset time threshold and the level accumulation times.

According to the electric bicycle wheel movement detection method provided by the invention, updating the level accumulation times based on the current sampling level comprises the following steps:

if the current sampling level is the same as the last sampling level, adding one to the level accumulated times updated last time to serve as the updated level accumulated times;

otherwise, updating the level accumulation times to 1.

According to the electric bicycle wheel movement detection method provided by the invention, updating the level accumulation times based on the current sampling level comprises the following steps:

if the current sampling level is a high level, adding one to the number of high levels updated last time to serve as the number of high levels updated, and setting the number of low levels to 0;

otherwise, setting the high level times to 0, and adding one to the low level times updated last time to serve as the updated low level times;

and taking the difference value of the high level times and the low level times as the level accumulation times.

According to the wheel movement detection method for the electric bicycle provided by the invention, the wheel movement detection state is determined based on the preset times threshold and the level accumulated times, and the method comprises the following steps:

if the accumulated number of times of the level is greater than or equal to the preset number threshold, determining that the wheel movement detection state is a static state;

otherwise, determining the wheel motion detection state as a motion state.

According to the electric bicycle wheel movement detection method provided by the invention, the current sampling level of the electric bicycle wheel movement signal is obtained based on the sampling frequency supported by the RTOS, and the method also comprises the following steps:

and shaping the electric bicycle wheel-motion signal.

According to the electric bicycle wheel movement detection method provided by the invention, the shaping of the electric bicycle wheel movement signal comprises the following steps:

performing full-wave rectification on the electric bicycle wheel movement signal to obtain a rectified signal;

shaping the rectified signal based on a preset voltage threshold, the preset voltage threshold being determined based on a peak voltage of the rectified signal.

According to the wheel movement detection method for the electric bicycle provided by the invention, the wheel movement detection state is determined, and then the method further comprises the following steps:

receiving a vehicle locking and returning request;

and if the wheel movement detection state is a motion state, returning to a locking forbidding response, and controlling the lock of the electric bicycle to keep an opening state.

The invention also provides a wheel movement detection device for the electric bicycle, which comprises:

the sampling unit is used for acquiring the current sampling level of the electric bicycle wheel movement signal based on the sampling frequency supported by the RTOS;

the accumulation unit is used for updating the level accumulation times based on the current sampling level, wherein the level accumulation times are the sampling times of the same level obtained by continuous sampling;

and the detection unit is used for determining the wheel movement detection state based on a preset frequency threshold value and the level accumulation frequency.

The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the steps of any one of the electric bicycle wheel movement detection methods.

The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the electric bicycle wheel-motion detection method as any one of the above.

According to the electric bicycle wheel motion detection method, the electric bicycle wheel motion detection device, the electronic equipment and the storage medium, the sampling times of the same level are obtained through counting continuous sampling, the fluctuation condition of the electric bicycle wheel motion signal is reversely deduced, the wheel motion detection state of the electric bicycle is further judged, the wheel motion detection can be realized only by sampling the electric bicycle wheel motion signal by using the sampling frequency supported by the RTOS, and the agility of wheel motion identification and the safety of static identification are ensured under the condition of low-frequency sampling.

Drawings

In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.

FIG. 1 is a schematic flow chart of a method for detecting wheel motion of an electric bicycle according to the present invention;

FIG. 2 is a schematic view of a processing flow of an electric bicycle wheel-movement signal provided by the present invention;

FIG. 3 is a schematic diagram of an electric bicycle wheel-motion signal sampling provided by the present invention;

FIG. 4 is a second schematic flow chart of the electric bicycle wheel-motion detecting method according to the present invention;

FIG. 5 is a schematic structural diagram of the electric bicycle wheel-motion detecting device provided by the present invention;

fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

The electric bicycle in the following embodiments may be a shared bicycle, and the body of the shared electric bicycle is provided with an intelligent central control for realizing automatic control of the shared electric bicycle service, such as lock control, travel calculation, server-side interaction, and the like of the shared bicycle.

Fig. 1 is a schematic flow chart of an electric bicycle wheel-motion detection method provided by the present invention, and as shown in fig. 1, the method is applied to RTOS-based electric bicycle intelligent central control, and the method includes:

and step 110, acquiring the current sampling level of the electric bicycle wheel movement signal based on the sampling frequency supported by the RTOS.

Specifically, the electric bicycle wheel-motion signal is an electromotive force generated by cutting magnetic induction lines when a wheel of the electric bicycle rotates, the wheel-motion signal can be generally regarded as a sinusoidal signal when the wheel is in a motion state, and the wheel-motion signal can be generally regarded as a linear signal close to 0 when the wheel is in a static state.

Considering that the RTOS-based intelligent center control of the electric bicycle cannot provide a software timer meeting the requirement of 2 times of the wheel movement frequency, when the wheel movement signal of the electric bicycle is sampled, the embodiment of the invention selects the sampling frequency supported by the RTOS to sample the level, and a sampling level is obtained by performing sampling once, wherein the current sampling level is the level obtained by current sampling. The level referred to herein may be a high level and a low level converted into a digital representation, which respectively correspond to 1 and 0, or may be a specific analog voltage value, which is not specifically limited in the embodiment of the present invention.

And step 120, updating the level accumulation times based on the current sampling level, wherein the level accumulation times are the sampling times of obtaining the same level by continuous sampling.

And step 130, determining a wheel movement detection state based on a preset frequency threshold value and the level accumulation frequency.

Specifically, the level accumulation number is the number of samples obtained by continuously sampling the same level, and thus the duration of time for which the electric bicycle wheel-motion signal is kept at the same level can be reflected. Every time a new sampling level is acquired, namely the current sampling level is obtained, the level accumulation times after the last updating can be further updated, for example, if the current sampling level is equal to the average of the previous sampling levels, 1 is added to the last level accumulation times, and if the current sampling level is different from the last sampling level, the electric bicycle wheel movement signal is not continuously on the same level, at the moment, the level accumulation times can be set to be 1, and the current sampling level is taken as the initial to restart the accumulation.

After the current level accumulation number update is completed, the updated level accumulation number may be compared with a preset number threshold. The preset number threshold here is a preset maximum level accumulation number of the wheel in the moving state, and may be a minimum level accumulation number of the wheel in the stationary state. By comparing the level accumulated times with the preset times threshold value, the wheel movement signal of the electric bicycle can be judged to belong to the normal fluctuation condition in the motion state or the condition close to 0 in the static state, and therefore the wheel movement detection result of the electric bicycle is determined. The wheel motion detection result here may be a stationary state or a moving state.

According to the method provided by the embodiment of the invention, the sampling times of the same level are obtained by counting continuous sampling, the fluctuation condition of the electric bicycle wheel movement signal is reversely deduced, the wheel movement detection state of the electric bicycle is further judged, the wheel movement detection can be realized only by sampling the electric bicycle wheel movement signal by using the sampling frequency supported by the RTOS, and the agility of wheel movement identification and the safety of static identification are ensured under the condition of low-frequency sampling.

Based on the above embodiment, step 120 includes:

if the current sampling level is the same as the last sampling level, adding one to the level accumulated times updated last time to serve as the updated level accumulated times; otherwise, the level accumulation number is updated to 1.

In particular, during low frequency sampling, the sampled level from each sampling may be retained until the end of the next sampling, so as to facilitate comparison with the sampled level from the next sampling. For the current sampling level acquired at the current time, the current sampling level may be compared with a previous sampling level, where the previous sampling level is the sampling level obtained at the previous sampling of the current time. And if the current sampling level is the same as the last sampling level, adding one to the level accumulation frequency updated last time to serve as the level accumulation frequency updated last time, and if the current sampling level is different from the last sampling level, indicating that the electric bicycle wheel movement signal is not continuously on the same level, and setting the level accumulation frequency to be 1. Thereby realizing the cumulative update of the level cumulative count.

For example, the last sampling level is a high level, the accumulated number of levels updated last time is 5, the current sampling level is a low level, the levels obtained by continuous sampling are different, and 1 is taken as the accumulated number of levels updated at the current time; for example, the last sampling level is low, the number of levels accumulated after the last update is 15, the current sampling level is low, the levels obtained by successive sampling are the same, and the number of levels accumulated after the update is 16.

Based on any of the above embodiments, step 120 includes:

if the current sampling level is a high level, adding one to the number of high levels updated last time to serve as the number of high levels updated, and setting the number of low levels to 0;

otherwise, setting the high level times to 0, and adding one to the low level times updated last time to serve as the updated low level times;

and taking the difference value of the high level times and the low level times as the level accumulation times.

Specifically, in the low-frequency sampling process, the high-level times and the low-level times can be updated respectively after each sampling, so that the update of the level accumulation times is realized. In the sampling update process, one of the high level times and the low level times is necessarily 0.

For example, if the number of times of high level after the last update is 13, the number of times of low level is 0, and the current sampling level is low level, the number of times of high level is set to 0, and 1 is added to the number of times of low level on the basis of 0. For example, if the number of high levels after the previous update is 9, the number of low levels is 0, and the current sampling level is high, the number of high levels is updated to 10, and the number of low levels is maintained at 0.

After each update of the high and low level times is completed, the difference between the two is calculated as the level accumulation times, and the difference referred to herein may be an absolute value of the difference between the high level times and the low level times.

Based on any of the above embodiments, step 130 includes:

if the accumulated number of times of the level is greater than or equal to a preset number threshold, determining that the wheel movement detection state is a static state; otherwise, determining the wheel motion detection state as a motion state.

Specifically, the preset number threshold is a preset minimum level accumulation number of the wheels in a stationary state. By comparing the level accumulated times with the preset times threshold value, the wheel movement signal of the electric bicycle can be judged to belong to the normal fluctuation condition in the motion state or the condition close to 0 in the static state, and therefore the wheel movement detection result of the electric bicycle is determined.

Based on any of the above embodiments, step 110 further includes: and shaping the electric bicycle wheel-motion signal.

Specifically, the wheel-motion signal generated by the electric bicycle during running can be regarded as an alternating-current voltage signal similar to a sine wave. In order to facilitate sampling and comparison, the electric bicycle wheel movement signals can be shaped before sampling, so that irregular wheel movement signals are shaped and converted into regular rectangular pulse signals, and therefore, only two levels, namely high level and low level, are obtained by sampling during sampling, comparison is facilitated, accurate accumulation of level accumulation times is guaranteed, and accuracy and reliability of the electric bicycle wheel movement detection method are improved.

Further, the shaping of the rotation signal may be implemented by a schmitt trigger.

Based on any of the above embodiments, fig. 2 is a schematic view of a processing flow of an electric bicycle wheel movement signal provided by the present invention, and as shown in fig. 2, the shaping of the electric bicycle wheel movement signal includes:

performing full-wave rectification on the electric bicycle wheel movement signal to obtain a rectified signal;

the rectified signal is shaped based on a preset voltage threshold, which is determined based on a peak voltage of the rectified signal.

Specifically, considering that the electric bicycle wheel movement signal is generally an alternating current signal, the electric bicycle wheel movement signal may be full-wave rectified first to convert the alternating current signal into a direct current signal. The half-cycle sine wave shown in fig. 2 is a dc signal. On this basis, the rectified signal is shaped based on the preset voltage threshold, the dotted line shown in fig. 2 is the preset voltage threshold, and in the shaping process, the part of the rectified signal with the voltage value higher than the preset voltage threshold is set as a high level, and the part of the rectified signal with the voltage value lower than the preset voltage is set as a low level.

It should be noted that, here, the preset voltage threshold may be determined based on a peak voltage of the rectified signal, the peak voltage may be an average value of the peak voltages in multiple cycles, and the preset voltage threshold may specifically be 1/2 of the peak voltage, or 3/4 of the peak voltage, which is not specifically limited in this embodiment of the present invention.

Based on any of the above embodiments, step 130 further includes:

receiving a vehicle locking and returning request;

and if the wheel movement detection state is a motion state, returning to the locking forbidding response, and controlling the lock of the electric bicycle to keep an opening state.

Specifically, in the scene of sharing the electric bicycle, the user needs to send a lock returning request to the intelligent central control of the electric bicycle through the mobile terminal to trigger the intelligent central control to perform order settlement, and control the vehicle lock to be closed after the order settlement, so as to complete the lock returning process of the sharing electric bicycle. Considering that the electric bicycle stops suddenly when the locking and returning process is executed in the driving process of the electric bicycle, and danger is brought to a user to ride the electric bicycle. After receiving a vehicle locking and returning request, the embodiment of the invention judges whether the current wheel-motion state allows the locking process to be started. Specifically, when the wheel-moving state is the moving state, the electric bicycle is still running, the locking process is not allowed to be started at the moment, the intelligent central control can return a locking forbidding response to the mobile terminal, and the vehicle lock is controlled to be kept in the opening state.

Based on any of the above embodiments, fig. 3 is a schematic diagram of sampling an electric bicycle wheel-movement signal provided by the present invention, the pulse square wave shown in fig. 3 is a shaped electric bicycle wheel-movement signal, an arrow above the pulse square wave indicates a time of sampling each time, and "0" and "1" marked above the arrow indicate sampling levels obtained by sampling each time, where 0 is a low level and 1 is a high level.

Fig. 4 is a second schematic flow chart of the electric bicycle wheel-motion detecting method provided by the present invention, as shown in fig. 4, the method may include the following steps:

and reading the sampling level of the electric bicycle wheel movement signal at the current moment, namely the current sampling level.

Judging whether the current sampling level is a high level:

if the high level is the high level, adding 1 as a new high level number on the basis of the high level number counted last time, and setting the low level number counted last time to be 0;

and if the voltage is low level, setting the number of times of high level counted last time to be 0, and adding 1 to the number of times of low level counted last time to be used as a new number of times of low level.

After the updating of the high and low level times is finished, taking the difference value of the high and low level times as the level accumulation times, and judging whether the level accumulation times is smaller than a preset time threshold value:

and if the level accumulated times are smaller than a preset time threshold value, determining that the wheel movement detection state is a motion state, otherwise, determining that the wheel movement detection state is a static state.

And after the judgment is finished, waiting for a sampling interval and reading the next sampling level. Here, the sampling interval is determined based on the sampling frequency supported by the RTOS, for example, when the rotation signal is 200Hz, the sampling frequency may be set to 20Hz, so that a determination accuracy of 99.999% may be achieved, and the following effects are obtained: firstly, the quickest 50ms speed is supported by the judgment of the wheel movement from the static state to the motion state so as to realize the agility of locking the vehicle by the wheel movement, and secondly, the judgment of the wheel movement from the motion state to the static state realizes the accurate judgment of 2 seconds so as to ensure the riding safety of a user.

The following describes the electric bicycle wheel-motion detecting device provided by the present invention, and the electric bicycle wheel-motion detecting device described below and the electric bicycle wheel-motion detecting method described above may be referred to in correspondence with each other.

Fig. 5 is a schematic structural view of an electric bicycle wheel-motion detecting device provided by the present invention, and as shown in fig. 5, the device includes:

the sampling unit 510 is configured to obtain a current sampling level of the electric bicycle wheel movement signal based on a sampling frequency supported by the RTOS;

an accumulation unit 520, configured to update a level accumulation frequency based on the current sampling level, where the level accumulation frequency is a sampling frequency of obtaining the same level through continuous sampling;

the detecting unit 530 is configured to determine a wheel movement detection state based on a preset number threshold and the level accumulation number.

According to the device provided by the embodiment of the invention, the sampling times of the same level are obtained by counting continuous sampling, the fluctuation condition of the electric bicycle wheel movement signal is reversely deduced, the wheel movement detection state of the electric bicycle is further judged, the wheel movement detection can be realized only by sampling the electric bicycle wheel movement signal by using the sampling frequency supported by the RTOS, and the agility of wheel movement identification and the safety of static identification are ensured under the condition of low-frequency sampling.

Based on any of the above embodiments, the accumulating unit 520 is configured to:

if the current sampling level is the same as the last sampling level, adding one to the level accumulated times updated last time to serve as the updated level accumulated times;

otherwise, updating the level accumulation times to 1.

Based on any of the above embodiments, the accumulating unit 520 is configured to:

if the current sampling level is a high level, adding one to the number of high levels updated last time to serve as the number of high levels updated, and setting the number of low levels to 0;

otherwise, setting the high level times to 0, and adding one to the low level times updated last time to serve as the updated low level times;

and taking the difference value of the high level times and the low level times as the level accumulation times.

Based on any of the above embodiments, the detecting unit 530 is configured to:

if the accumulated number of times of the level is greater than or equal to the preset number threshold, determining that the wheel movement detection state is a static state;

otherwise, determining the wheel motion detection state as a motion state.

Based on any one of the above embodiments, the device further comprises a shaping unit, and the shaping unit is used for shaping the electric bicycle wheel movement signal.

Based on any of the above embodiments, the shaping unit is configured to:

performing full-wave rectification on the electric bicycle wheel movement signal to obtain a rectified signal;

shaping the rectified signal based on a preset voltage threshold, the preset voltage threshold being determined based on a peak voltage of the rectified signal.

Based on any of the above embodiments, the apparatus further comprises a lock returning unit, the lock returning unit is configured to:

receiving a vehicle locking and returning request;

and if the wheel movement detection state is a motion state, returning to a locking forbidding response, and controlling the lock of the electric bicycle to keep an opening state.

Fig. 6 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 6: a processor (processor)610, a communication Interface (Communications Interface)620, a memory (memory)630 and a communication bus 640, wherein the processor 610, the communication Interface 620 and the memory 630 communicate with each other via the communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a method of electric bicycle wheel-motion detection, the method comprising: acquiring the current sampling level of the electric bicycle wheel movement signal based on the sampling frequency supported by the RTOS; updating the level accumulation times based on the current sampling level, wherein the level accumulation times are the sampling times of obtaining the same level by continuous sampling; and determining a wheel movement detection state based on a preset time threshold and the level accumulation times.

In addition, the logic instructions in the memory 630 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the electric bicycle wheel movement detection method provided by the above methods, the method comprising: acquiring the current sampling level of the electric bicycle wheel movement signal based on the sampling frequency supported by the RTOS; updating the level accumulation times based on the current sampling level, wherein the level accumulation times are the sampling times of obtaining the same level by continuous sampling; and determining a wheel movement detection state based on a preset time threshold and the level accumulation times.

In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program, which when executed by a processor, is implemented to perform the electric bicycle wheel-motion detecting method provided in each of the above aspects, the method including: acquiring the current sampling level of the electric bicycle wheel movement signal based on the sampling frequency supported by the RTOS; updating the level accumulation times based on the current sampling level, wherein the level accumulation times are the sampling times of obtaining the same level by continuous sampling; and determining a wheel movement detection state based on a preset time threshold and the level accumulation times.

The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.

Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute the method according to the embodiments or some parts of the embodiments.

Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种数据存储方法和数据存储装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类