CN117935394A - Parking timing method, parking timer and storage medium - Google Patents

Parking timing method, parking timer and storage medium Download PDF

Info

Publication number
CN117935394A
CN117935394A CN202410128210.2A CN202410128210A CN117935394A CN 117935394 A CN117935394 A CN 117935394A CN 202410128210 A CN202410128210 A CN 202410128210A CN 117935394 A CN117935394 A CN 117935394A
Authority
CN
China
Prior art keywords
parking
angular velocity
time
vehicle
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410128210.2A
Other languages
Chinese (zh)
Inventor
张华�
戴伟明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Onlywell Tech Ltd
Original Assignee
Onlywell Tech Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Onlywell Tech Ltd filed Critical Onlywell Tech Ltd
Priority to CN202410128210.2A priority Critical patent/CN117935394A/en
Publication of CN117935394A publication Critical patent/CN117935394A/en
Pending legal-status Critical Current

Links

Landscapes

  • Traffic Control Systems (AREA)

Abstract

The application relates to the technical field of electronic equipment, and provides a parking timing method, a parking timer and a storage medium. When the vehicle is detected to enter a running state, a group of first angular velocities are periodically obtained from a sensor memory; judging whether the vehicle enters a parking state or not according to a plurality of groups of continuous first angular speeds; when it is determined that the vehicle enters a stopped state, a parking meter records a parking time. The application can solve the technical problem that the parking timer is inaccurate in timing when the state of the vehicle is converted.

Description

Parking timing method, parking timer and storage medium
Technical Field
The present application relates to the field of electronic devices, and in particular, to a parking timing method, a parking timer, and a storage medium.
Background
In some countries free parking at the roadside is allowed but there is a limit to the parking duration, requiring the driver to place a parking meter on the vehicle head for indicating the parking time.
In the prior art, a single acceleration sensor is adopted by the parking timer to detect the motion state of an automobile, but the acceleration range generated in the running process of the automobile is wider, and noise drift, shaking, knocking, vibration and other misoperation generated by the acceleration sensor cause interference to the timer, so that the accurate time when the parking timer is switched from the running state to the parking state or the parking state is switched to the running state is difficult to accurately judge, and the technical problem of inaccurate timing of the parking timer exists.
Disclosure of Invention
In view of the above, the present application provides a parking timing method, a parking timer and a storage medium for solving the technical problem of inaccurate timing of the parking timer when the state of the vehicle is switched.
A first aspect of the present application provides a parking meter method, the method comprising:
When the vehicle is detected to enter a running state, periodically acquiring a group of first angular speeds from a sensor memory;
judging whether the vehicle enters a parking state or not according to a plurality of groups of continuous first angular speeds;
when it is determined that the vehicle enters a stopped state, a parking meter records a parking time.
In an alternative embodiment, the determining whether the vehicle enters a parking state according to the first angular speeds of the consecutive groups includes:
Determining the maximum absolute value in a group of first angular velocities acquired for the N1 th time, wherein N1 is a natural number from 1;
Judging whether the maximum value of the absolute value of the N1 th time is smaller than a preset value or not;
And adding 1 to N1 when the maximum value of the absolute value of the N1 time is smaller than the preset value until the vehicle is determined to enter a parking state when N1 is larger than a preset first time number threshold value.
In an alternative embodiment, the method further comprises:
acquiring an area where the vehicle is located;
And updating the parking time recorded by the parking timer according to the area and/or the timing rule.
In an alternative embodiment, the method further comprises:
detecting whether a wake-up signal is triggered or not when the vehicle is detected to enter a parking state;
When detecting that a wake-up signal is triggered, acquiring a second angular velocity of the vehicle at intervals of a preset sampling period;
judging whether the vehicle enters a running state or not according to the second angular speed which is continuously acquired for many times;
And when the vehicle is determined to enter a driving state, clearing the parking time recorded by the parking timer.
In an alternative embodiment, the detecting whether the wake-up signal is triggered includes:
Acquiring acceleration of the vehicle;
judging whether the acceleration exceeds a preset acceleration threshold value or not;
Detecting that a wake-up signal is triggered when the acceleration exceeds the preset acceleration threshold;
And detecting that the wake-up signal is not triggered when the acceleration does not exceed the preset acceleration threshold value.
In an optional embodiment, the determining whether the vehicle enters the driving state according to the second angular velocity acquired a plurality of times in succession includes:
Judging whether the second angular velocity acquired for the N2 th time is the same as the second angular velocity acquired for the 1 st time, and judging whether the second angular velocity acquired for the N2 th time is greater than a preset angular velocity threshold value, wherein N2 is a natural number from 2;
And when the second angular velocity acquired for the N2 th time is the same as the second angular velocity acquired for the 1 st time, and the second angular velocity acquired for the N2 th time is larger than the preset angular velocity threshold value, adding 1 to N2 until N2 is larger than the preset second time threshold value, and determining that the vehicle enters a running state.
In an alternative embodiment, the method further comprises:
deleting the second angular velocity acquired continuously for multiple times when the second angular velocity acquired for the N2 th time is different from the second angular velocity acquired for the 1 st time and/or the second angular velocity acquired for the N2 th time is not greater than the preset angular velocity threshold value;
Re-acquiring the second angular velocity of the vehicle every other preset sampling period;
And judging whether the vehicle enters a running state or not according to the second angular velocity which is continuously and repeatedly acquired.
In an alternative embodiment, the method further comprises:
After a group of first angular velocities are acquired from the sensor memory, carrying out emptying treatment on data in the sensor memory; and/or
After determining that the vehicle enters a parking state, the parking meter enters a dormant state; and/or
And receiving setting information input by a user through an application program or a function key corresponding to the parking timer.
A second aspect of the application provides a parking meter comprising a microcontroller unit, the microcontroller unit comprising:
The communication interface is used for communicating with a gyroscope sensing chip in the vehicle;
A processor;
A computer program stored on a memory and executable on the processor, the processor implementing the steps of the parking timing method when the computer program is executed.
A third aspect of the present application provides a computer readable storage medium having stored thereon a computer program which when executed performs the steps of the parking meter method.
When the vehicle is detected to enter a running state, a group of first angular velocities are periodically obtained from a sensor memory; judging whether the vehicle enters a parking state or not according to a plurality of groups of continuous first angular speeds; when it is determined that the vehicle enters a stopped state, a parking meter records a parking time. The application can solve the technical problem that the parking timer is inaccurate in timing when the state of the vehicle is converted.
Drawings
FIG. 1 is a flow chart of a method for parking meter for a vehicle from a driving state to a parking state according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for parking meter for a vehicle from a parked state to a driving state according to an embodiment of the present application;
fig. 3 is a hardware configuration diagram of a parking meter according to an embodiment of the present application.
Detailed Description
The terminology used in the following embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates to the contrary. It should also be understood that the term "and/or" as used in this disclosure is intended to encompass any or all possible combinations of one or more of the listed items.
The terms "first," "second," and the like, are used below for descriptive purposes only and are not to be construed as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the application, unless otherwise indicated, the meaning of "a plurality" is two or more.
Fig. 1 is a flowchart of a timing method for a vehicle from a driving state to a parking state, wherein the timing method is executed by a parking meter, and the timing method specifically comprises the following steps.
S11, when the vehicle is detected to enter a running state, a group of first angular velocities are periodically acquired from a sensor memory.
The parking meter is an electronic device related to parking of a vehicle, and can be used for managing and monitoring the vehicle in a roadside parking area by monitoring the parking state or the driving state of the vehicle and indicating the parking time of the vehicle.
A sensor is a device capable of sensing, detecting or measuring a particular physical quantity or environmental condition. The vehicle-mounted sensor includes, but is not limited to, an acceleration sensor, an angular velocity sensor. Among them, the acceleration sensor or the angular velocity sensor includes, but is not limited to, a single axis sensor, a double axis sensor, a three axis sensor, and the like. An acceleration sensor is a device that measures acceleration of a vehicle. An angular acceleration sensor is a device that measures the angular velocity of a vehicle. The detected acceleration or angular velocity of the vehicle is converted into an electrical signal, digital signal or other readable form for monitoring, controlling, acquiring acceleration or angular velocity data of the vehicle.
The first angular velocity refers to a set of angular velocities of the angular velocity sensor in a fixed time interval, including a first angular velocity value and a first angular velocity direction, obtained when the vehicle is in a driving state. The first angular velocity value is the absolute value of the first angular velocity. The first angular velocity direction is determined by a predetermined rotation direction and an axial direction, and is a direction in which the vehicle rotates around the axis, the direction in which the vehicle rotates around the axis is determined by positive and negative of the first angular velocity, the axial direction of the angular velocity is taken as a reference direction, when the first angular velocity is a non-negative number, the angular velocity vector points in the direction of the axis, the direction in which the vehicle rotates around the axis is a counterclockwise direction, and when the first angular velocity is a negative number, the angular velocity vector points in the direction in which the vehicle rotates around the axis is a clockwise direction.
The acceleration sensor is used for judging the acceleration of the vehicle to detect whether the vehicle enters a running state, and when the vehicle is detected to enter the running state, the detected angular velocity values are obtained from the internal memory of the angular velocity sensor at regular time intervals, so that the real-time angular velocity of the vehicle in the running process can be obtained, and the subsequent analysis of the state of the vehicle according to the angular velocity is facilitated.
S12, judging whether the vehicle enters a parking state or not according to the continuous multiple groups of first angular speeds.
The parking state refers to a state in which the angular velocity of the vehicle is continuously lower than a certain angular velocity value for a long period of time, wherein the long period of time is set according to actual conditions, and is generally 10 minutes or more.
The state of the vehicle can be determined from the successive sets of first angular velocities.
In an alternative embodiment, the determining whether the vehicle enters a parking state according to the first angular speeds of the consecutive groups includes:
Determining the maximum absolute value in a group of first angular velocities acquired for the N1 th time, wherein N1 is a natural number from 1;
Judging whether the maximum value of the absolute value of the N1 th time is smaller than a preset value or not;
And adding 1 to N1 when the maximum value of the absolute value of the N1 time is smaller than the preset value until the vehicle is determined to enter a parking state when N1 is larger than a preset first time number threshold value.
The absolute value maximum value is a value at which the absolute value of the angular velocity is maximum among the group of first angular velocities acquired by the nth 1. The preset value is a standard angular velocity when the vehicle satisfies a parking state, and is preset according to actual conditions. The first time threshold value refers to the duration that the maximum value of the absolute value in the first angular velocity is smaller than the preset value, and the larger the first time threshold value is, the longer the time for which the vehicle is kept in the stopped state is, and the smaller the first time threshold value is, the shorter the time for which the vehicle is kept in the stopped state is. When the vehicle satisfies the angular velocity of the parked state for a long period of time, it is indicated that the vehicle enters the parked state.
The method comprises the steps of determining the number of a group of first angular velocities acquired for the N1 th time as the number of times of circulation, setting the maximum value of absolute values in an initial first angular velocity as 0, traversing the group of first angular velocities acquired for the N1 th time circularly, calculating the absolute value of the first angular velocity in each circulation through an absolute value function, judging whether the absolute value of the first angular velocity in each circulation is larger than the maximum value of the absolute values in the first angular velocity, updating the maximum value of the absolute values to the absolute value of the first angular velocity in each circulation when the absolute value of the first angular velocity in each circulation is larger than or equal to the maximum value of the absolute values in the first angular velocity, keeping the maximum value of the absolute values unchanged when the absolute value of the first angular velocity in each circulation is smaller than the maximum value of the absolute values in the first angular velocity, and traversing all the first angular velocities in the group of the first angular velocities acquired for the N1 th time circularly to obtain the maximum value of the first angular velocity in the N1 th time.
And judging the magnitude relation between the maximum value of the absolute value of the Nth time 1 and the preset value through a comparison function. When the absolute value maximum value of the nth 1 time is greater than or equal to a preset value, the fact that the group of first angular speeds acquired by the nth 1 time does not reach the angular speed standard value of the parking state is indicated, the N1 is set to be 1, when the absolute value maximum value of the nth 1 time is smaller than the preset value, the fact that the absolute values of the group of first angular speeds acquired by the nth 1 time are smaller than the preset value in a fixed time interval is indicated, the group of first angular speeds acquired by the nth 1 time reach the angular speed standard value of the parking state of the vehicle, and the N1 is added to be 1. And (3) acquiring a group of first angular velocities of the angular velocity sensors at the next time interval, repeating the cycle traversal process, judging whether N1 is larger than a preset first time number threshold, when N1 is larger than the preset first time number threshold, indicating that the first angular velocity continuously reaches the standard angular velocity value of the parking state for N1 times, determining that the vehicle enters the parking state, and updating the vehicle state zone bit in the parking timer to the parking state.
In the above-mentioned alternative embodiment, the maximum absolute value of the group of first angular speeds obtained for the nth time is determined, when the maximum absolute value of the nth 1 time is smaller than the preset value, it is indicated that the first angular speed continues for the nth 1 time to reach the standard of the parking state, N1 is added to 1 until the vehicle is determined to enter the parking state when N1 is greater than the preset first time number threshold, that is, when the number of times of continuation N1 satisfies the duration number threshold for the parking state determination, it can be determined that the vehicle enters the parking state. Because the time interval for actually acquiring the angular velocity sensor is smaller, the parking state of the vehicle cannot be accurately judged only by meeting the preset value through the maximum value of the absolute value of the first angular velocity, and the vehicle can be accurately judged to enter the parking state only when the times for continuously judging that the maximum value of the absolute value of the angular velocity at a plurality of time intervals is continuously smaller than the preset value are larger than the first time threshold value.
And S13, when the vehicle is determined to enter a parking state, the parking timer records the parking time.
The parking time is a parking start time set according to an actual situation when the vehicle enters a parking state, and does not necessarily coincide with a local actual time.
When the vehicle is determined to enter the parking state, the MCU arranged in the parking timer writes the parking time into the flash memory, so that the parking time can be stored for a long time, the parking time recorded by the parking timer cannot be lost because the parking timer is closed by a user, and the parking time is displayed through the display unit of the parking timer.
In an alternative embodiment, the method further comprises:
acquiring an area where the vehicle is located;
And updating the parking time recorded by the parking timer according to the area and/or the timing rule.
The area in which the vehicle is located is obtained by a global positioning system, wherein the area includes, but is not limited to, a country, a region, a street, and the like. The time for allowing the vehicle to park freely in different areas is inconsistent, and the parking time corresponding to different timing rules is inconsistent, so the calculation of the parking time needs to combine the areas and the timing rules. And acquiring the actual time of the area and the free parking time of the area, and calculating the time sum of the actual time and the free parking time to obtain the parking time of the parking timer. Or calculating the parking time according to the adopted timing rule, wherein the timing rule is a mode which is built in the parking timer and used for determining the preset delay time length, and calculating the sum of the actual time and the preset delay time length corresponding to the timing rule to obtain the parking time of the parking timer. Or, according to the area and the timing rule, calculating the parking time of the parking timer.
For example, assuming that the allowed free parking time period of zone a is 10 minutes, the parking meter determines that the vehicle is in a parked state at 12, and the parking time is 12 hours 10 minutes. Further, assuming that the timer rule adopted by the parking meter is a real-time mode, the parking meter determines that the vehicle enters a parking state at 12 hours, and the parking time is 12 hours.
In the above optional embodiment, the area where the vehicle is located is obtained, and the parking time recorded by the parking meter is updated according to the area and/or the timing rule, so that the parking time when the vehicle is changed from the running state to the parking state can be more accurately obtained.
Fig. 2 is a flowchart of a parking meter method for a vehicle from a parking state to a driving state, wherein the parking meter method is executed by a parking meter, and the parking meter method specifically comprises the following steps.
S21, detecting whether a wake-up signal is triggered or not when the vehicle is detected to enter a parking state.
The wake-up signal is a digital signal transmitted from an acceleration sensor of the vehicle to a data communication interface of a parking meter when the vehicle is in a parking state to a moving state.
When the vehicle is determined to enter a parking state, the acceleration of the vehicle is detected by the acceleration sensor, and whether the wake-up signal is triggered is judged according to the detected acceleration value.
In an alternative embodiment, the detecting whether the wake-up signal is triggered includes:
Acquiring acceleration of the vehicle;
judging whether the acceleration exceeds a preset acceleration threshold value or not;
Detecting that a wake-up signal is triggered when the acceleration exceeds the preset acceleration threshold;
And detecting that the wake-up signal is not triggered when the acceleration does not exceed the preset acceleration threshold value.
The preset acceleration threshold value refers to an acceleration value when the acceleration of the vehicle reaches a motion state.
The parking timer reads the acceleration of an acceleration sensor arranged in the vehicle through the data communication interface, namely the acceleration of the vehicle, judges whether the acceleration of the vehicle exceeds a preset acceleration threshold, when the acceleration of the vehicle is larger than the preset acceleration threshold, the acceleration of the vehicle is indicated to reach the acceleration standard for enabling the vehicle to move, the parking timer detects that the wake-up signal is triggered, when the acceleration is smaller than or equal to the preset acceleration threshold, the acceleration of the vehicle is indicated to not reach the acceleration standard for enabling the vehicle to move, and the parking timer detects that the wake-up signal is not triggered.
In the above optional embodiment, by acquiring the acceleration of the vehicle, when it is determined that the acceleration of the vehicle exceeds the preset angular velocity threshold, the wake-up signal is triggered, so that the detection accuracy of the vehicle motion state can be improved, and it is ensured that the wake-up signal is triggered only when the vehicle is in the motion state from the parking state.
S22, when the wake-up signal is detected to be triggered, acquiring the second angular velocity of the vehicle every preset sampling period.
The second angular velocity refers to an angular velocity in the angular velocity sensor acquired at fixed time intervals when the vehicle detects the wake-up signal.
When the parking timer detects that the wake-up signal is triggered, a second angular velocity sampling process of the angular velocity sensor is started to acquire the angular velocity of the vehicle in the wake-up state. The parking timer is internally provided with a preset sampling period for indicating how long the parking timer acquires the angular velocity data, and the angular velocity in the angular velocity sensor, namely the second angular velocity, is acquired through a data communication interface of the parking timer when the preset sampling period is met through the timer function of the parking timer. According to the preset sampling period, the second angular speed of the vehicle is obtained regularly, the motion state of the vehicle can be monitored in real time, and timely and reliable angular speed data are provided for decision judgment.
S23, judging whether the vehicle enters a running state or not according to the second angular velocity acquired continuously and repeatedly.
The running state refers to a state in which the vehicle remains in motion for a longer time interval. Whether the vehicle enters the running state is determined by judging whether the second angular velocity satisfies the standard angular velocity of the running state a plurality of times in succession.
In an optional embodiment, the determining whether the vehicle enters the driving state according to the second angular velocity acquired a plurality of times in succession includes:
Judging whether the second angular velocity acquired for the N2 th time is the same as the second angular velocity acquired for the 1 st time, and judging whether the second angular velocity acquired for the N2 th time is greater than a preset angular velocity threshold value, wherein N2 is a natural number from 2;
And when the second angular velocity acquired for the N2 th time is the same as the second angular velocity acquired for the 1 st time, and the second angular velocity acquired for the N2 th time is larger than the preset angular velocity threshold value, adding 1 to N2 until N2 is larger than the preset second time threshold value, and determining that the vehicle enters a running state.
The preset angular velocity threshold is a standard angular velocity that satisfies the vehicle when it enters a moving state from a stopped state. The preset second time threshold value refers to the duration of the standard angular velocity when the vehicle satisfies the motion state.
The sign of the second angular velocity indicates the direction of the second angular velocity. Judging whether the second angular velocity acquired for the N2 time is the same as the second angular velocity acquired for the 1 time, and when the signs of the second angular velocity acquired for the N2 time and the second angular velocity acquired for the 1 time are different, indicating that the directions of the second angular velocity acquired for the N2 time and the second angular velocity acquired for the 1 time are different. When the second angular velocity obtained for the N2 th time is identical to the second angular velocity obtained for the 1 st time in sign, the second angular velocity obtained for the N2 th time is identical to the second angular velocity obtained for the 1 st time in direction, whether the second angular velocity obtained for the N2 th time is larger than a preset angular velocity threshold value is judged, when the second angular velocity obtained for the N2 th time is larger than the preset angular velocity threshold value, the second angular velocity obtained for the N2 th time is judged to meet the standard angular velocity from the parking state to the moving state of the vehicle, the value obtained by adding 1 to the value of N2 is updated, whether the N2 is larger than the preset second time threshold value is judged, when the N2 is not larger than the preset second time threshold value, the process is repeated until the N2 is larger than the preset second time threshold value, when the N2 is larger than the preset second time threshold value, the vehicle is kept in the moving state in a long-lasting time is judged, and the vehicle is determined to enter the running state.
In the above-mentioned alternative embodiment, since the time interval of the angular velocity sensor obtained according to the sampling period is small each time, only the direction of the first second angular velocity is judged to be the same as the direction of the second angular velocity of the 1 st time, the running state of the vehicle cannot be accurately judged, and the vehicle can be determined to enter the running state only if the vehicle remains in the running state for a long enough time. When the continuous multiple sampling periods are judged, namely the number of times N2 is large enough and the angular velocity direction measured each time is the same as the 1 st angular velocity direction, the vehicle can be accurately judged to enter the running state.
And S24, when the vehicle is determined to enter a running state, clearing the parking time recorded by the parking timer.
When the vehicle is determined to enter the running state, the vehicle state flag bit in the parking timer is updated to the running state, and the recorded parking time is cleared. The parking time is removed, the angular velocity data acquired later can be ensured not to be influenced by the previous data, the accuracy of the angular velocity is improved,
In an alternative embodiment, the method further comprises:
deleting the second angular velocity acquired continuously for multiple times when the second angular velocity acquired for the N2 th time is different from the second angular velocity acquired for the 1 st time and/or the second angular velocity acquired for the N2 th time is not greater than the preset angular velocity threshold value;
Re-acquiring the second angular velocity of the vehicle every other preset sampling period;
And judging whether the vehicle enters a running state or not according to the second angular velocity which is continuously and repeatedly acquired.
When the sign of the second angular velocity obtained by the nth 2 time is different from that of the second angular velocity obtained by the 1 st time, namely, the direction of the second angular velocity obtained by the nth 2 time is different from that of the second angular velocity obtained by the 1 st time, or the second angular velocity obtained by the nth 2 time is not more than a preset angular velocity threshold value, or the direction of the second angular velocity obtained by the second nth 2 time is different from that of the second angular velocity obtained by the 1 st time, and the angular velocity obtained by the nth 2 time is not more than the preset angular velocity threshold value, deleting the second angular velocities obtained continuously for multiple times.
And re-acquiring the second angular velocity in the angular velocity sensor through the data communication interface every other preset sampling period by the timer function of the parking timer. And when the second angular velocity acquired for the N2 th time is the same as the second angular velocity acquired for the 1 st time, and the second angular velocity acquired for the N2 th time is larger than a preset angular velocity threshold value, adding 1 to N2 until N2 is larger than a preset second time threshold value, and determining that the vehicle enters a running state.
In the above-mentioned alternative embodiment, when the second angular velocity obtained by the nth 2 th time is different from the second angular velocity obtained by the 1 st time, and/or the second angular velocity obtained by the nth 2 time is not greater than the preset angular velocity threshold, the second angular velocity obtained by the continuous multiple times is deleted, that is, when the second angular velocity obtained by the nth 2 time does not satisfy the direction and the magnitude of the angular velocity, the number of times is recalculated, so that the number of times of continuation N2 when the second angular velocity continuously satisfies the condition can be obtained, thereby improving the accuracy of the judgment of the vehicle from the parking state to the driving state.
In an alternative embodiment, the method further comprises: and after a group of first angular velocities are acquired from the sensor memory, carrying out emptying treatment on the data in the sensor memory.
After a set of first angular velocities in the sensor memory is acquired, the parking timer sends a defined emptying instruction to the sensor, and the sensor is required to empty the angular velocity data in the memory. After sending the purge command, the parking meter waits for a confirmation signal or status feedback from the sensor to ensure that the purge operation has been successfully performed.
In an alternative embodiment, the method further comprises: after determining that the vehicle is in a parked state, the parking meter is put into a dormant state.
After the vehicle is determined to enter the parking state, the parking meter is placed in the dormant state, and the dormant state is designed according to specific requirements, including but not limited to stopping the counting of the parking meter, reducing the working frequency of the parking meter, reducing the brightness of a display unit of the parking meter, ensuring as little energy consumption as possible and reducing the power consumption of the parking meter. In the sleep state, the parking timer sets a wake-up condition according to actual needs in response to the next start-up, including but not limited to setting a specific trigger event, detecting a wake-up signal.
In an alternative embodiment, the method further comprises: and receiving setting information input by a user through an application program or a function key corresponding to the parking timer.
And by setting an event monitoring mechanism, performing touch event monitoring or physical key monitoring on an application program corresponding to the parking timer or a function key of the parking timer, analyzing user setting information of a corresponding operation event, and performing corresponding event processing according to the analyzed setting information. The user may set the parking meter to the sleep mode through an application corresponding to the parking meter or a function key input.
In the above optional embodiment, after a set of first angular velocities are acquired from the sensor memory, the data in the sensor memory is subjected to the emptying treatment, so that the newly acquired angular velocity data is not affected by the previous data, the accuracy of the angular velocities is improved, the memory is easy to overflow due to long-time non-emptying of the memory, the stable operation of the sensor memory can be ensured, and the sensor performance is improved. After the vehicle is determined to enter the parking state, the parking timer is set to be in the dormant state, so that the power consumption of the parking timer can be reduced, the energy is saved, the service life of relevant electronic elements of the parking timer is prolonged, and the system maintenance cost is reduced. The method and the device can provide good user interaction operation by receiving the setting information input by the user through the application program or the function key corresponding to the parking timer, and flexibly adapt to different operation requirements of different users.
According to the application, when the vehicle is detected to enter the running state, a group of first angular velocities are periodically acquired from the sensor memory, so that the real-time angular velocities of the vehicle in the running process can be acquired, and the subsequent analysis of the state of the vehicle according to the angular velocities is facilitated; judging whether the vehicle enters a parking state or not according to the first angular speeds of the continuous multiple groups, and determining that the vehicle enters the parking state when the first angular speeds of the continuous multiple groups are smaller than a preset value, so that the vehicle can be accurately judged from the running state to the parking state; when the vehicle is determined to enter the parking state, the parking timer records the parking time, and the parking time is written into the flash memory, so that the long-term storage of the parking time can be ensured, and the parking time recorded by the parking timer cannot be lost due to the fact that the parking timer is closed by a user. The application can solve the technical problem that the parking timer is inaccurate in timing when the state of the vehicle is converted.
The embodiment of the application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program realizes all or part of the steps of the parking timing method when being executed.
Referring to fig. 3, a hardware configuration diagram of a parking meter according to an embodiment of the present application is shown.
The parking timer adopts a microprocessor M8P831 of 8Bit simplified instruction set produced by pan core electronics, adopts LQFP48 package, and is internally provided with an LCD/LED display driver, an RTC timing unit, communication interfaces such as UART and IIC, and a plurality of GPIOs.
The sensor adopts QMI8658, and QMI8658 is a 6-axis gyroscope sensing chip, and 3-axis acceleration, 3-axis angular velocity sensor and certain memory are integrated in the sensor, so that acceleration and angular velocity of the vehicle can be detected, and data of a period of time can be stored. The built-in acceleration sensor of QMI8658 provides the wake-up function when the parking time counter goes to sleep, lets the parking time counter only be woken up work when needs, effectively improves battery life. The built-in angular velocity sensor of QMI8658 provides data support when the vehicle is in a driving state or a parking state.
The display unit adopts a segment code type liquid crystal display.
The RTC timing unit uses an external 32768 low-frequency crystal oscillator as a clock source, the timing error of the 32768 clock source is less than 10PPM, the month difference is less than 30 seconds, and the requirement of a user on time precision is completely met.
The input unit is composed of GPIO of MCU and external tact switch.
The loudspeaker or the buzzer is used for voice prompt alarm, and when the vehicle is determined to enter a parking state, a driving state and low battery power, a voice prompt alarm mechanism is triggered.
The power supply unit may be configured by using 2 or more batteries, or a button cell such as CR2032, or may be configured by using a solar cell.
The MCU collects key data, completes the setting of the time and other contents and displays the key data on the display unit. The MCU communicates with the QMI8658 through the IIC interface to acquire real-time data of the vehicle sensor, and is connected with an interrupt wakeup port of the QMI8658 by using a GPIO with an external interrupt function.
When the QMI8658 sends out an interrupt signal, the MCU is awakened, and communicates with the QMI8658 through a data communication interface to acquire sensor data, and the state of the vehicle is judged by combining a parking timing method.
In some embodiments, the parking timer is a device capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware of the parking timer includes, but is not limited to, a microprocessor, an application specific integrated circuit, a programmable gate array, a digital processor, an embedded device and the like. The parking meter may also include a client device including, but not limited to, any electronic product that can interact with a client by way of a keyboard, mouse, remote control, touch pad, or voice-controlled device, such as a personal computer, tablet, smart phone, digital camera, etc.
In some embodiments, the parking meter has stored therein a computer program which, when executed by the at least one processor, performs all or part of the steps of the parking meter method as described. The Memory includes Read-Only Memory (ROM), programmable Read-Only Memory (PROM), erasable programmable Read-Only Memory (EPROM), one-time programmable Read-Only Memory (One-time Programmable Read-Ony Memory, OTPROM), electrically erasable rewritable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory) or other optical disc Memory, magnetic disk Memory, magnetic tape Memory, or any other medium from which a computer can Read for carrying or storing data. Further, the computer-readable storage medium mainly includes 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, and the like.
In some embodiments, the at least one processor is a Control Unit (Control Unit) of the parking meter, connects various components of the entire parking meter using various interfaces and lines, and performs various functions and processes of the parking meter by running or executing programs or modules stored in the memory, and calling data stored in the memory. For example, the at least one processor, when executing the computer program stored in the memory, implements all or part of the steps of the parking meter method described in embodiments of the application; or to implement all or part of the functions of the parking meter method. The at least one processor may be comprised of integrated circuits, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functionality, including one or more central processing units, microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application.

Claims (10)

1. A parking timing method, the method comprising:
When the vehicle is detected to enter a running state, periodically acquiring a group of first angular speeds from a sensor memory;
judging whether the vehicle enters a parking state or not according to a plurality of groups of continuous first angular speeds;
when it is determined that the vehicle enters a stopped state, a parking meter records a parking time.
2. The parking meter method of claim 1, wherein determining whether the vehicle is in a parked state based on the first angular velocities of the consecutive sets comprises:
Determining the maximum absolute value in a group of first angular velocities acquired for the N1 th time, wherein N1 is a natural number from 1;
Judging whether the maximum value of the absolute value of the N1 th time is smaller than a preset value or not;
And adding 1 to N1 when the maximum value of the absolute value of the N1 time is smaller than the preset value until the vehicle is determined to enter a parking state when N1 is larger than a preset first time number threshold value.
3. The parking timing method of claim 1, further comprising:
acquiring an area where the vehicle is located;
And updating the parking time recorded by the parking timer according to the area and/or the timing rule.
4. The parking timing method of claim 1, further comprising:
detecting whether a wake-up signal is triggered or not when the vehicle is detected to enter a parking state;
When detecting that a wake-up signal is triggered, acquiring a second angular velocity of the vehicle at intervals of a preset sampling period;
judging whether the vehicle enters a running state or not according to the second angular speed which is continuously acquired for many times;
And when the vehicle is determined to enter a driving state, clearing the parking time recorded by the parking timer.
5. The parking meter method of claim 4, wherein detecting whether a wake-up signal is triggered comprises:
Acquiring acceleration of the vehicle;
judging whether the acceleration exceeds a preset acceleration threshold value or not;
Detecting that a wake-up signal is triggered when the acceleration exceeds the preset acceleration threshold;
And detecting that the wake-up signal is not triggered when the acceleration does not exceed the preset acceleration threshold value.
6. The parking meter method of claim 4, wherein the determining whether the vehicle enters a traveling state based on the second angular velocity acquired a plurality of times in succession includes:
Judging whether the second angular velocity acquired for the N2 th time is the same as the second angular velocity acquired for the 1 st time, and judging whether the second angular velocity acquired for the N2 th time is greater than a preset angular velocity threshold value, wherein N2 is a natural number from 2;
And when the second angular velocity acquired for the N2 th time is the same as the second angular velocity acquired for the 1 st time, and the second angular velocity acquired for the N2 th time is larger than the preset angular velocity threshold value, adding 1 to N2 until N2 is larger than the preset second time threshold value, and determining that the vehicle enters a running state.
7. The parking meter method of claim 6, further comprising:
deleting the second angular velocity acquired continuously for multiple times when the second angular velocity acquired for the N2 th time is different from the second angular velocity acquired for the 1 st time and/or the second angular velocity acquired for the N2 th time is not greater than the preset angular velocity threshold value;
Re-acquiring the second angular velocity of the vehicle every other preset sampling period;
And judging whether the vehicle enters a running state or not according to the second angular velocity which is continuously and repeatedly acquired.
8. The parking timing method according to any one of claims 1 to 7, characterized in that the method further comprises:
After a group of first angular velocities are acquired from the sensor memory, carrying out emptying treatment on data in the sensor memory; and/or
After determining that the vehicle enters a parking state, the parking meter enters a dormant state; and/or
And receiving setting information input by a user through an application program or a function key corresponding to the parking timer.
9. A parking timer comprising a microcontroller unit, the microcontroller unit comprising:
The communication interface is used for communicating with a gyroscope sensing chip in the vehicle;
A processor;
Computer program stored on a memory and executable on said processor, said processor implementing the steps of the parking timing method according to any one of claims 1 to 8 when said computer program is executed.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the parking meter method according to any of claims 1 to 8.
CN202410128210.2A 2024-01-26 2024-01-26 Parking timing method, parking timer and storage medium Pending CN117935394A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410128210.2A CN117935394A (en) 2024-01-26 2024-01-26 Parking timing method, parking timer and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410128210.2A CN117935394A (en) 2024-01-26 2024-01-26 Parking timing method, parking timer and storage medium

Publications (1)

Publication Number Publication Date
CN117935394A true CN117935394A (en) 2024-04-26

Family

ID=90762915

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410128210.2A Pending CN117935394A (en) 2024-01-26 2024-01-26 Parking timing method, parking timer and storage medium

Country Status (1)

Country Link
CN (1) CN117935394A (en)

Similar Documents

Publication Publication Date Title
US11472361B2 (en) Systems and methods for detecting an impact event in a parked vehicle
US6895347B2 (en) Computerized methods for data loggers
US9720701B2 (en) Providing support for device states
US10551211B2 (en) Methods and devices with sensor time calibration
JP5741638B2 (en) Portable display device and operation detection method
US9885734B2 (en) Method of motion processing and related mobile device and microcontroller unit
CN103959754A (en) Controlling operational states of a location sensing system of a mobile device
CN103250029A (en) Mobile terminal and method for detecting continuous movement
CN103970055B (en) Multi-environment data acquisition storage device and method
CN111722692B (en) Power consumption control method, storage medium and wearable device
CN117935394A (en) Parking timing method, parking timer and storage medium
CN110599778B (en) Working mode switching method and device and ground sensing type vehicle detector
CN112732024A (en) Intelligent wearable device and control method thereof
US9207683B2 (en) Flow meter device and method of operation
CN110081933B (en) Vibration polling instrument, low-power-consumption frequency domain transformation method thereof and computer readable storage medium
RU2716964C1 (en) Vehicle technical condition monitoring telemeasure system
CN203859884U (en) Tourist action-tracking and calling device
JP5051516B2 (en) Rainfall measuring device
CN2886526Y (en) Multifunctional electronic dry-wet ball temperature and humidity meter
CN113406945B (en) Wide-domain frequency wake-up signal processing method and device
Lautner et al. Sensor-based low power management for mobile platforms
CN109030851A (en) A kind of bicycle speed measuring system
US10901477B2 (en) Information processing apparatus and controlling method
CN210466103U (en) Load and positioning information comprehensive monitoring system for vehicle
JP2008216214A5 (en)

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination