Vehicle control method, device, vehicle and readable storage medium
By starting multiple timers in the vehicle and updating their duration and number of triggers, the problem of difficulty in triggering the vehicle when it is powered off quickly and the excessive number of timers is solved, achieving safer and more reliable vehicle control.
Patent Information
- Application Number
- CN202410731244.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-06
AI Technical Summary
In the existing technology, it is difficult to trigger a rapid power off of a vehicle. It is difficult for users to trigger the target switch multiple times in quick succession in an emergency, making it difficult to smoothly power off a vehicle. Too many timers may exceed the limit of the vehicle controller. processing power, resulting in data overflow or stuck.
By starting multiple timers and updating the timer duration and number of triggers when the timing reaches or fails to reach the preset duration, restart timing and count the number of triggers, limit the number of timers, simplify the process of obtaining the number of triggers, and when necessary Directly control the power off of the vehicle.
It reduces the difficulty of triggering vehicle power-off, avoids data overflow and vehicle controller jamming caused by too many timers, and improves the safety and reliability of the system.
Smart Images

Figure CN118288796B
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and more specifically, to a vehicle control method, a device, a vehicle and a readable storage medium in the field of vehicle technology. Background Art
[0002] Vehicles are usually equipped with a switch for controlling the rapid power-off of the vehicle (hereinafter referred to as the target switch). The target switch can support users to control the rapid power-off of the vehicle in an emergency.
[0003] In the related art, in order to prevent the user from accidentally triggering the target switch and causing the vehicle to power off quickly, the vehicle is generally controlled to power off quickly when the user triggers the target switch multiple times in a short period of time. This method can prevent rapid power off caused by accidental triggering to a certain extent, but it also increases the difficulty of triggering rapid power off. Summary of the invention
[0004] The present application provides a vehicle control method, device, vehicle and readable storage medium, which can reduce the difficulty of triggering vehicle power-off.
[0005] In a first aspect, a vehicle control method is provided, the method comprising:
[0006] If the i-th triggering operation on the target switch in the vehicle is detected, the i-th timer is started and the first triggering number of the target switch during the timing of the i-th timer is obtained; wherein i is an integer greater than or equal to 1; if the i+1-th triggering operation on the target switch is detected, the i+1-th timer is started and the second triggering number of the target switch during the timing of the i+1-th timer is obtained; when the timing duration of the i-th timer reaches a first preset duration, if the first triggering number is less than the preset number, the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer, and the first triggering number is updated to the second triggering number; before the timing duration of the i-th timer reaches the first preset duration, if the first triggering number reaches the preset number, the vehicle is controlled to power off.
[0007] In the embodiment of the present application, if the i-th trigger operation of the target switch in the vehicle is detected, the i-th timer is started and the first triggering number of the target switch in the timing process of the i-th timer is obtained; if the i+1-th trigger operation of the target switch is detected, the i+1-th timer is started and the second triggering number of the target switch in the timing process of the i+1-th timer is obtained; before the timing duration of the i-th timer reaches the first preset duration, if the first triggering number reaches the preset number, the vehicle is controlled to be powered off; when the timing duration of the i-th timer reaches the first preset duration, if the first triggering number is less than the preset number, the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer, and the first triggering number is updated to the second triggering number. In this way, within the preset duration after the target switch is triggered for the i-th time, when it is detected that the target switch is triggered but the triggering number does not reach the preset number, the timing can be restarted based on the i+1 triggering, and the triggering number can be restarted. Other triggering operations before the timing duration reaches the preset duration can be counted in the triggering number. In this way, when the user triggers the target switch multiple times in a row, each triggering operation performed by the user can be counted, thereby reducing the difficulty of triggering.
[0008] At the same time, compared with the method of starting a timer each time a trigger operation is detected, the method provided in the embodiment of the present application can control the vehicle to power off and shut down all started timers when the timing duration of the i-th timer is less than the first preset duration and the first trigger reaches a preset number of times, which can avoid the situation where a large number of timers exceeds the processing capacity of the vehicle controller, thereby preventing data overflow and preventing the vehicle controller from getting stuck.
[0009] In combination with the first aspect, in some possible implementations, the method also includes: when the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer, the timing duration of the i+1-th timer is cleared to zero, and the second trigger number is cleared to zero; if the i+2-th trigger operation on the target switch is detected, the i+1-th timer is restarted and the second trigger number is re-acquired; when the timing duration of the i-th timer reaches the first preset duration, if the first trigger number is less than the preset number, the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer, and the first trigger number is updated to the re-acquired second trigger number.
[0010] In an embodiment of the present application, after the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer, after the i+2-th triggering operation of the target switch is detected, the i+1-th timer can continue to be used to start timing, so that the number of timers can be limited to two, thereby avoiding starting a large number of timers, thereby reducing the load of the vehicle controller and saving power consumption.
[0011] In combination with the first aspect, in some possible implementations, the method further includes: when the timing duration of the i-th timer has not reached the first preset duration and the first triggering number is less than the preset number, if an i+2th triggering operation on the target switch is detected, starting the i+2th timer, and obtaining the third triggering number of the target switch during the timing of the i+2th timer.
[0012] In an embodiment of the present application, when the timing duration of the i-th timer has not reached the first preset duration and the first trigger number is less than the preset number, a corresponding timer is started to start timing each time a trigger operation is detected, which can simplify the timing duration process and the process of obtaining the trigger number.
[0013] In combination with the first aspect, in some possible implementations, updating the timing duration of the i-th timer to the timing duration of the i+1-th timer, and updating the first trigger number to the second trigger number, includes: detecting whether the target switch is in a triggered state at a current moment; when the target switch is in the triggered state, if the first trigger duration of the target switch in the triggered state is greater than or equal to a second preset duration, controlling the vehicle to power off; or, if the target switch is not in the triggered state or the first trigger duration is less than the second preset duration, updating the timing duration of the i-th timer to the timing duration of the i+1-th timer, and updating the first trigger number to the second trigger number.
[0014] In an embodiment of the present application, when the timing duration of the i-th timer reaches the first preset duration, the first trigger number is less than the preset number, and the first trigger duration is greater than or equal to the second preset duration, the vehicle is controlled to be powered off. This can be used to control the vehicle to be powered off when the user is nervous and cannot trigger the target switch multiple times in a row, thereby effectively ensuring the safety of the user and the vehicle.
[0015] In combination with the first aspect, in some possible implementations, starting the i-th timer and obtaining the first triggering number of the target switch during the timing of the i-th timer includes: determining the second triggering duration when the target switch is triggered for the i-th time; if the second triggering duration is less than a third preset duration, starting the i-th timer and obtaining the first triggering number; or, if the second triggering duration is greater than or equal to the third preset duration, controlling the vehicle to power off.
[0016] In an embodiment of the present application, when the user triggers the target switch for longer than a preset time, the vehicle is directly controlled to power off. When the user is nervous and cannot trigger the target switch continuously, the vehicle can be controlled to power off in time, thereby ensuring the safety of the vehicle and the user.
[0017] In combination with the first aspect, in some possible implementations, starting the i-th timer and obtaining the first triggering number of the target switch during the timing of the i-th timer includes: determining the idle time of the target switch before the i-th triggering operation is detected; if the idle time is greater than or equal to a fourth preset time, determining that i is 1, starting the first timer and obtaining the first triggering number.
[0018] In an embodiment of the present application, when the idle time of the target switch is greater than or equal to the fourth preset time, the first timer is started to begin timing. When the user has not performed a trigger operation for a long time, the detection can be restarted to obtain the first trigger number, which can simplify the power-off detection process.
[0019] In combination with the first aspect, in some possible implementations, the method also includes: when the timing duration of the i-th timer reaches the first preset duration, if the first trigger number is 1, determining whether the vehicle is in a powered-on state; if the vehicle is in a powered-on state, controlling the vehicle to power off normally; if the vehicle is not in the powered-on state, controlling the vehicle to power on.
[0020] In the embodiment of the present application, when the user triggers the target switch once, the vehicle is controlled to be powered on and off normally, so that the user can control the vehicle to be powered on and off normally through the target switch, thereby making it convenient for the user to control the vehicle to be powered on and off normally through the target switch.
[0021] In combination with the first aspect, in some possible implementations, controlling the vehicle to power off includes: obtaining the driving speed of the vehicle; when the driving speed is less than a preset speed threshold, controlling the vehicle to power off; or, when the driving speed is greater than or equal to the preset speed threshold, outputting a power-off notification, and controlling the vehicle to power off after a delay of a fifth preset time period.
[0022] In an embodiment of the present application, when the vehicle's driving speed is greater than or equal to a preset speed threshold, a power-off notification is first output, and then the vehicle is controlled to power off, which can facilitate the user to prepare for power off, thereby improving the safety and reliability of the vehicle.
[0023] In a second aspect, a vehicle control device is provided, the device comprising:
[0024] A starting module, configured to start an i-th timer and obtain a first triggering number of the target switch during the timing of the i-th timer if an i-th triggering operation of the target switch in the vehicle is detected; wherein i is an integer greater than or equal to 1;
[0025] The starting module is further configured to start the i+1th timer and obtain the second triggering number of the target switch during the timing of the i+1th timer if the i+1th triggering operation on the target switch is detected;
[0026] An updating module, configured to update the timing duration of the i-th timer to the timing duration of the (i+1)-th timer and update the first triggering number to the second triggering number when the timing duration of the i-th timer reaches a first preset duration and if the first triggering number is less than the preset number;
[0027] A control module is used to control the vehicle to power off if the first triggering number reaches the preset number before the timing duration of the i-th timer reaches the first preset duration.
[0028] In a third aspect, a vehicle is provided, the vehicle comprising:
[0029] A memory for storing executable program codes;
[0030] A processor is used to call and run the executable program code from the memory, so that the vehicle executes the method in any possible implementation of the first aspect above.
[0031] In a fourth aspect, a computer program product is provided, the computer program product comprising: a computer program code, when the computer program code is run on a computer, the computer executes the method in any possible implementation manner of the above-mentioned first aspect.
[0032] In a fifth aspect, a readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a schematic diagram of the composition of a vehicle provided in an embodiment of the present application;
[0034] Figure 2 is a flow chart of the steps of a vehicle control method provided by an embodiment of the present application;
[0035] Figure 3 is a schematic diagram of a triggering process of a target switch provided in an embodiment of the present application;
[0036] Figure 4 is a schematic diagram of another triggering process of a target switch provided in an embodiment of the present application;
[0037] Figure 5is a flow chart of a vehicle control method provided in an embodiment of the present application;
[0038] Figure 6 is a structural schematic diagram of a vehicle control device provided in an embodiment of the present application;
[0039] Figure 7 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0041] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0042] See also Figure 1 , Figure 1 Schematic diagram of a vehicle provided in an embodiment of the present application. Figure 1 As shown, the vehicle includes a target switch 101, a vehicle control unit (VCU) 102, a battery management system (BMS) 103, a relay 104, a power battery 105, a load 106, and other components. The battery management system 103 can control the connection or disconnection between the power battery 105 and the load 106 through the relay 104, so as to supply power to the load 106 through the power battery 105. The target switch 101 can be a one-button start switch in the vehicle. When the target switch 101 is a one-button start switch, when the vehicle is in a powered-on state, the user can control the vehicle to power off normally or quickly through the target switch 101.
[0043] Among them, normal power-off refers to the vehicle being powered off smoothly and orderly according to the preset power-off process. During the normal power-off process, the vehicle controller first starts power-off preparation to ensure that the motor torque output value in the vehicle is 0 and that there is no high-voltage request at present, and then sends a notification to the BMS to disconnect the BMS control relay to stop supplying power to the load (including low-voltage load and high-voltage load), and perform other power-off operations. Fast power-off is also called forced power-off, which means that the vehicle controller does not prepare for power-off, but directly controls the relay to disconnect to cut off the power of the load, so as to control the vehicle to power off quickly and prevent the power battery from overheating, fire or other potential safety risks.
[0044] In the related art, the vehicle controller determines whether to power off the vehicle quickly or normally by the number of times the target switch is triggered. Specifically, the vehicle controller starts timing when the first trigger operation of the target switch is detected, and sets the initial value of the number of times the target switch is triggered to 1. After that, each time a trigger operation of the target switch is detected, the number of triggers is increased by 1. Before the timing reaches the preset time (for example, 2 seconds), if the number of triggers reaches the preset number (for example, 3 times), the vehicle is controlled to power off quickly. When the timing reaches the preset time, if the number of triggers is greater than 1, but still does not reach the preset number, it is determined that the target switch is triggered by the user by mistake, and the vehicle is not controlled to power off quickly or normally.
[0045] In actual applications, users usually manually control the vehicle to quickly power off when a dangerous situation occurs. At this time, the user is generally nervous and it is difficult for the user to effectively perform the trigger operation multiple times in a short period of time, resulting in the number of triggers being difficult to reach the preset number when the timing reaches the preset time, making it difficult for the quick power off to proceed smoothly. In short, although the above method can prevent quick power off caused by false triggering, it also increases the difficulty of triggering quick power off.
[0046] In order to reduce the difficulty of triggering rapid power-off, an optional method is to start a corresponding timer to start timing each time a trigger operation of the target switch is detected. For each timer, if the target switch is triggered a preset number of times before the timing duration of the timer reaches the preset duration, the vehicle is controlled to power off quickly. This method requires starting a timer for timing each time a trigger operation is detected, and the number of timers is relatively large. Moreover, when the number of triggers of the target switch is large, the number of timers started is large. When the number of timers is large, the number of counters may exceed the processing capacity of the vehicle controller, which may cause data overflow and cause the vehicle controller to get stuck.
[0047] See also Figure 2 , Figure 2 is a flow chart of the steps of a vehicle control method provided by an embodiment of the present application. The execution subject of the method may be a vehicle controller, such as Figure 2As shown, the method may include the following steps:
[0048] Step 201: If the i-th triggering operation on the target switch in the vehicle is detected, start the i-th timer and obtain the first triggering number of the target switch during the timing of the i-th timer.
[0049] Step 202: If the (i+1)th triggering operation on the target switch is detected, start the (i+1)th timer and obtain the second triggering number of the target switch during the timing of the (i+1)th timer.
[0050] Here, i is the number of times the user performs the trigger operation, and i is a positive integer greater than or equal to 1.
[0051] For example, after the vehicle is powered on, the vehicle controller can continuously detect whether the target switch is triggered by the user. When the first trigger operation of the target switch by the user is detected, the first timer can be started to start timing, and the first counter corresponding to the first timer can be started to start counting. The initial timing duration of the first timer is 0, and the initial count value of the first counter is 1. After starting the first timer, the vehicle controller adds 1 to the count value of the first counter each time it detects a trigger operation of the target switch by the user. The count value of the first counter is the number of times the target switch is triggered during the timing of the first timer.
[0052] See also Figure 3 , Figure 3 This is a schematic diagram of a triggering process of a target switch provided in an embodiment of the present application. Figure 3 Each circle in represents a trigger operation of the target switch. The vehicle controller detects the first trigger operation of the target switch by the user at time t1. The vehicle controller can start the first timer to start timing at time t1 and start the first counter to start counting. After starting the first timer, the vehicle controller detects a trigger operation of the target switch at time t2, time t3 and time t4 respectively, and increases the count value of the first counter by 1 each time a trigger operation is detected.
[0053] After starting the first timer, before the timing duration of the first timer reaches the first preset duration, when the user triggers the target switch for the second time, the second timer can be started to start timing, and the second counter corresponding to the second timer can be started to start counting. The initial timing duration of the second timer is 0, and the initial count value of the second counter is 1. Similarly, after starting the second timer, the vehicle controller adds 1 to the count value of the second counter each time it detects a trigger operation of the target switch by the user. The count value of the second counter is the number of times the target switch is triggered during the timing of the second timer. Figure 3As shown, the vehicle controller detects the second triggering operation of the target switch at time t2, and can start the second timer to start timing at time t2, and start the second counter to start counting. After time t2, each time a triggering operation is detected, the count value of the second counter is increased by 1.
[0054] When the i-th timer is the 1st timer, the count value of the 1st counter is the first triggering number, and when the second timer is the i+1th timer, the count value of the second counter is the second triggering number.
[0055] After starting the second timer, before the timing duration of the first timer reaches the first preset duration, when the user triggers the target switch for the third time, the third timer can be started to start timing, and the third counter corresponding to the third timer can be started to start counting. The initial timing duration of the third timer is 0, and the initial count value of the third counter is 1. After starting the third timer, the vehicle controller will increase the count value of the third counter by 1 each time it detects a trigger operation of the target switch by the user. The count value of the third counter is the number of times the target switch is triggered during the timing of the third timer. Figure 3 As shown, the vehicle controller detects the third trigger operation of the target switch at time t3, and can start the third timer to start timing at time t3, and start the third counter to start counting. After time t3, the count value of the third counter increases by 1 each time a trigger operation is detected.
[0056] Among them, when the i-th timer is the second timer, the count value of the second counter is the first trigger number, and the third timer is the (i+1)-th timer, and the count value of the third counter is the second trigger number.
[0057] Step 203, when the timing duration of the i-th timer reaches the first preset duration, if the first triggering number is less than the preset number, the timing duration of the i-th timer is updated to the timing duration of the (i+1)-th timer, and the first triggering number is updated to the second triggering number.
[0058] Step 204: before the timing duration of the i-th timer reaches the first preset duration, if the first triggering number reaches the preset number, the vehicle is controlled to power off.
[0059] Controlling the vehicle to power off refers to controlling the vehicle to power off quickly.
[0060] For example, after the first timer is started, the vehicle controller monitors the timing duration of the first timer, and before the timing duration of the first timer reaches the first preset duration, determines whether the count value of the first counter reaches a preset number of times (the preset number of times is, for example, 4 times), and controls the vehicle to quickly power off when the count value of the first counter reaches the preset number of times 4. Figure 3 As shown, the timing duration of the first timer reaches the first preset duration T at time t5. At this time, the count value of the first counter reaches the preset number of times 4, and the vehicle controller can control the vehicle to power off quickly.
[0061] like Figure 3 As shown, the vehicle controller controls the vehicle to quickly power off at time t4. While controlling the vehicle to quickly power off, the vehicle controller can turn off all timers and counters, and reset the timing duration of all timers and the count values of counters to zero. After turning off all timers and counters, the vehicle controller can execute steps 101 to 104 again when the triggering operation of the target switch is detected next time.
[0062] The preset number is an integer greater than or equal to 2. Before the timing duration of the i-th timer reaches the first preset duration, if the first triggering number reaches the preset number, it means that the user has continuously performed multiple triggering operations before the timing duration of the i-th timer reaches the first preset duration, and the vehicle needs to be controlled to power off quickly.
[0063] Exemplarily, after starting the first timer to begin timing, when the timing duration of the first timer reaches a first preset duration, if it is determined that the count value of the first counter is still less than the preset number of times, the vehicle controller first clears the timing duration of the first timer and the count value of the first counter, and then obtains the timing duration of the second timer and the count value of the second counter, uses the timing duration of the second timer as the initial timing duration of the first timer, uses the count value of the second counter as the initial count value of the first counter, and controls the first timer to restart timing and controls the first counter to restart counting.
[0064] Among them, the timing duration of the second timer is used as the initial timing duration of the first timer, that is, the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer; the count value of the second counter is used as the initial count value of the first counter, that is, the first trigger number is updated to the second trigger number.
[0065] See also Figure 4 , Figure 4 FIG. 1 is a schematic diagram of another triggering process of a target switch provided in an embodiment of the present application. Figure 4 As shown, the vehicle controller detects the first trigger operation at time t1, starts the first timer to start timing, and starts the first counter to start counting. The timing duration of the first timer reaches the first preset duration T at time t4, at which time the count value of the first counter is 3, which is less than the preset number of 4 times.
[0066] At time t4, the vehicle controller clears the timing duration of the first timer, takes the timing duration of the second timer (i.e., the time difference between time t2 and time t4) as the initial timing duration of the first timer, and controls the first timer to restart timing. At the same time, the vehicle controller clears the count value of the first counter, takes the count value of the second counter (2 times) as the initial count value of the first counter, and controls the first counter to restart counting. Alternatively, the vehicle controller can replace the second timer with the first timer, replace the second counter with the first counter, that is, use the second timer as the new first timer, use the second counter as the new first counter, control the replaced first timer to continue timing, and control the first counter to continue counting.
[0067] At the same time, the second timer is equivalent to the i-th timer, and the third counter is equivalent to the i+1-th timer. The vehicle controller resets the timing duration of the second timer to zero, resets the count value of the second counter to zero, and uses the timing duration of the third timer as the initial count value of the second timer, uses the count value of the third counter as the initial counter of the second counter, and controls the second timer to restart timing, and controls the second counter to restart counting. Alternatively, the vehicle controller can replace the third timer with the second timer, replace the third counter and the second counter, that is, use the third timer as the second timer, use the third counter as the second counter, control the replaced second timer to continue timing, and control the second counter to continue counting.
[0068] Among them, the timing duration of the third timer is used as the initial timing duration of the second timer, that is, the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer; the count value of the third counter is used as the initial count value of the second counter, that is, the first trigger number is updated to the second trigger number.
[0069] like Figure 4 As shown, after controlling the first timer to restart timing, the vehicle controller detects a trigger operation of the target switch at time t6, the first trigger number reaches 4 times, and the timing duration of the first timer reaches the first preset duration at time t7. If time t6 is before time t7, the vehicle controller can control the vehicle to quickly power off at time t6.
[0070] By analogy, after controlling the i-th timer to restart timing and controlling the i-th counter to restart counting, the vehicle controller controls the vehicle to quickly power off when it detects that the first trigger number reaches a preset number before the timing duration of the i-th timer reaches the first preset duration.
[0071] Optionally, when the timing duration of the i-th timer reaches a first preset duration, if the first trigger number is less than the preset number (for example, the i+1th trigger operation is not detected), it can be determined that the number of times the user performs the trigger operation before the timing duration of the i-th timer reaches the first preset duration is less than the preset number, and the vehicle can be controlled to power off normally at this time.
[0072] In the embodiment of the present application, if the i-th trigger operation of the target switch in the vehicle is detected, the i-th timer is started and the first triggering number of the target switch in the timing process of the i-th timer is obtained; if the i+1-th trigger operation of the target switch is detected, the i+1-th timer is started and the second triggering number of the target switch in the timing process of the i+1-th timer is obtained; before the timing duration of the i-th timer reaches the first preset duration, if the first triggering number reaches the preset number, the vehicle is controlled to be powered off; when the timing duration of the i-th timer reaches the first preset duration, if the first triggering number is less than the preset number, the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer, and the first triggering number is updated to the second triggering number. In this way, within the preset duration after the target switch is triggered for the i-th time, when it is detected that the target switch is triggered but the triggering number does not reach the preset number, the timing can be restarted based on the i+1 triggering, and the triggering number can be restarted. Other triggering operations before the timing duration reaches the preset duration can be counted in the triggering number. In this way, when the user triggers the target switch multiple times in a row, each triggering operation performed by the user can be counted, thereby reducing the difficulty of triggering.
[0073] At the same time, compared with the method of starting a timer each time a trigger operation is detected, the method provided in the embodiment of the present application can control the vehicle to quickly power off and shut down all started timers when the timing duration of the i-th timer is less than the first preset duration and the first trigger reaches a preset number of times, which can avoid the situation where a large number of timers exceeds the processing capacity of the vehicle controller, thereby preventing data overflow and preventing the vehicle controller from getting stuck.
[0074] Optionally, the method may further include:
[0075] When the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer, the timing duration of the i+1-th timer is reset to zero, and the second triggering number is reset to zero;
[0076] If the (i+2) trigger operation on the target switch is detected, the (i+1) timer is restarted and the second trigger count is re-acquired;
[0077] When the timing duration of the i-th timer reaches the first preset duration, if the first trigger number is less than the preset number, the timing duration of the i-th timer is updated to the timing duration of the (i+1)-th timer, and the first trigger number is updated to the re-acquired second trigger number.
[0078] Exemplarily, i is 1, i+1 is 2, and i+2 is 3. After the timing duration of the first timer is updated to the timing duration of the second timer, and the count value of the second counter is updated to the count value of the first counter, the timing duration of the second timer can be cleared, and the count value of the second counter can be cleared. At this time, if the user's third triggering operation on the target switch is detected, the vehicle controller can set the initial timing duration of the second timer to 0, and restart the second timer to start timing. At the same time, the initial count value of the second timer can be set to 0, and the second counter can be restarted to start counting. After restarting the second timer, each time the user detects a triggering operation on the target switch, the count value of the second counter is increased by 1, and the count value of the second counter is the second number of triggers retrieved.
[0079] like Figure 4 As shown, at time t4, the timing duration of the first timer reaches the first preset duration T, and the first trigger number is less than the preset number of 4 times. At this time, the vehicle controller first uses the timing duration of the second timer as the timing duration of the first timer, and uses the count value of the second counter as the count value of the first counter. After that, the vehicle controller can clear the timing duration of the second timer and the count value of the second counter. After the user's third trigger operation on the target switch is detected at time t3, the vehicle controller can start the second timer again to start timing, and the initial timing duration of the second timer is 0, and start the second counter again to start counting, and the initial count value of the second counter is 0. The third trigger operation is the i+2th trigger operation, and the count value of the second counter is the re-acquired second trigger number.
[0080] After restarting the second timer, when the timing duration of the first timer reaches the first preset duration, if it is again determined that the count value of the first counter (i.e., the first triggering number) is less than the preset number, the timing duration of the first timer can be reset to zero again, and the timing duration of the second timer can be used as the timing duration of the first timer to control the first timer to restart timing. Also, the count value of the first counter is reset to zero, and the count value of the second timer (the second triggering number obtained again) is used as the initial count value of the first counter to control the first counter to restart timing.
[0081] It can be seen that after the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer, after the i+2-th triggering operation of the target switch is detected, the i+1-th timer can continue to be used to start timing. In this way, the number of timers can be limited to two, thereby avoiding starting a large number of timers, thereby reducing the load of the vehicle controller and saving power consumption.
[0082] Optionally, the method may further include:
[0083] When the timing duration of the i-th timer has not reached the first preset duration and the first trigger number is less than the preset number, if the i+2th trigger operation on the target switch is detected, the i+2th timer is started and the third trigger number of the target switch during the timing of the i+2th timer is obtained.
[0084] like Figure 3 As shown, when i is 1, i+2 is 3, before the timing duration of the first timer reaches the first preset duration T, the count value of the first counter is less than the preset number of times 4, and the third triggering operation of the target switch by the user is detected at time t3. At time t3, the timing duration of the first timer has not reached the first preset duration, and the count value of the first counter (i.e., the first triggering number) is less than the preset number of times 4, the third timer can be started to start timing, and the third counter can be started to start counting, and the count value of the third timer is the third triggering number.
[0085] Afterwards, when the timing duration of the first timer reaches the first preset duration, the count value of the first counter is still less than the preset number of 4 times, at this time, the timing duration of the first timer is updated to the timing duration of the second timer, and the count value of the first counter is updated to the count value of the second counter. At the same time, the timing duration of the second timer is updated to the timing duration of the third timer, and the count value of the second counter is updated to the count value of the third counter. That is, the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer, the timing duration of the i+2-th timer is updated to the timing duration of the i+1-th timer, the first triggering number is updated to the second triggering number, and the second triggering number is updated to the third triggering number.
[0086] In an embodiment of the present application, when the timing duration of the i-th timer has not reached the first preset duration and the first trigger number is less than the preset number, a corresponding timer is started to start timing each time a trigger operation is detected, which can simplify the timing duration process and the process of obtaining the trigger number.
[0087] Optionally, updating the timing duration of the i-th timer to the timing duration of the (i+1)-th timer, and updating the first triggering number to the second triggering number, includes:
[0088] Detect whether the target switch is in the trigger state at the current moment;
[0089] When the target switch is in a triggered state, if the first triggering time length of the target switch in the triggered state is greater than or equal to the second preset time length, control the vehicle to power off;
[0090] Alternatively, if the target switch is not in a triggered state or the first trigger duration is less than the second preset duration, the timing duration of the i-th timer is updated to the timing duration of the (i+1)-th timer, and the first trigger count is updated to the second trigger count.
[0091] Exemplarily, when the target switch is a push-button switch, the pressed state of the target switch is the triggered state, and the pop-up state is the non-triggered state. The vehicle controller starts timing each time it detects that the target switch is pressed by the user, and ends timing when the target switch pops up. The timing duration is the duration that the target switch is in the triggered state. When the timing duration of the first timer reaches the first preset duration, and the first trigger number is less than the preset number, the vehicle controller first determines whether the target switch is in the pressed state at the current moment. If the target switch is in the pressed state, the timing duration from the moment the target switch is pressed to the current moment is obtained, and the timing duration is the first trigger duration of the target switch in the triggered state.
[0092] After obtaining the first trigger duration, the vehicle controller determines whether the first trigger duration is greater than or equal to the second preset duration. If the first trigger duration is greater than or equal to the second preset duration, it is determined that the target switch is pressed by the user for a long time, and the user may have pressed the target switch for a long time due to nervousness. At this time, the vehicle controller can directly control the vehicle to power off quickly.
[0093] Optionally, the vehicle controller can control the vehicle to quickly power off when the timing duration of the i-th timer reaches the first preset duration, the first trigger number is greater than 1 and less than the preset number, and the first trigger duration is greater than or equal to the second preset duration. Wherein, when the timing duration of the i-th timer reaches the first preset duration, the first trigger number is greater than 1 and less than the preset number, the first trigger duration is greater than or equal to the second preset duration, which may be because the user wants to trigger the target switch continuously due to nervousness, but cannot perform the preset number of trigger operations on the target switch due to nervousness.
[0094] On the contrary, when the first trigger duration is less than the second preset duration, the vehicle controller can update the timing duration of the i-th timer to the timing duration of the i+1-th timer, and update the first trigger number to the second trigger number, and then control the i-th timer to restart timing.
[0095] In an embodiment of the present application, when the timing duration of the i-th timer reaches the first preset duration, the first trigger number is less than the preset number, and the first trigger duration is greater than or equal to the second preset duration, the vehicle is controlled to power off quickly. This can be used to control the vehicle to power off quickly when the user is nervous and cannot trigger the target switch multiple times in a row, thereby effectively ensuring the safety of the user and the vehicle.
[0096] Optionally, starting the i-th timer and obtaining the first triggering number of the target switch during the timing of the i-th timer includes:
[0097] Determine the second triggering duration of the target switch when it is triggered for the i-th time;
[0098] If the second trigger duration is less than the third preset duration, start the i-th timer and obtain the first trigger number;
[0099] Alternatively, if the second trigger duration is greater than or equal to the third preset duration, the vehicle is controlled to power off.
[0100] For example, after each time the user's triggering operation on the target switch is detected, the vehicle controller may start timing when the user's triggering operation is detected, and end timing when the triggering operation ends, and the timing duration is the second triggering duration when the target switch is triggered. When the second triggering duration is less than the third preset duration, the vehicle controller determines that the user has quickly and effectively completed the i-th triggering operation of the target switch.
[0101] When the second trigger duration is greater than or equal to the third preset duration, the vehicle controller determines that the user cannot effectively complete the i-th trigger operation, and the vehicle controller can directly control the vehicle to power off quickly. For example, when the trigger operation of the target switch is detected for the first time, the vehicle controller determines that the user has pressed the target switch for a long time when the second trigger duration is greater than or equal to the third preset duration, and can directly control the vehicle to power off quickly.
[0102] On the contrary, when the second trigger duration is less than the third preset duration, the vehicle controller can determine that the user has effectively completed the trigger operation of the target switch, and can start the i-th timer and obtain the first trigger number.
[0103] Among them, the third preset time length can be preset according to actual needs. When the second trigger time length is greater than or equal to the third preset time length, it means that the user has been triggering the target switch for a long time and cannot effectively complete the continuous triggering of the target switch.
[0104] Optionally, when i is 1, the controller may first determine the triggering duration of the target switch being triggered for the first time, and if the triggering duration of the first triggering operation is greater than or equal to the third preset duration, the vehicle is directly controlled to power off quickly. If the triggering duration of the first triggering operation is less than the third preset duration, the first timer is directly started to start timing, and the first counter is started to start counting.
[0105] In an embodiment of the present application, when the user triggers the target switch for longer than a preset time, the vehicle is directly controlled to power off quickly. When the user is nervous and unable to continuously trigger the target switch, the vehicle can be controlled to power off quickly in time, thereby ensuring the safety of the vehicle and the user.
[0106] Optionally, starting the i-th timer and obtaining the first triggering number of the target switch during the timing of the i-th timer includes:
[0107] Determine the idle time of the target switch before the i-th trigger operation is detected;
[0108] If the idle time period is greater than or equal to the fourth preset time period, i is determined to be 1, the first timer is started and the first triggering number is obtained.
[0109] For example, when the target switch is a push-button switch, each time a user presses the target switch (trigger operation) and detects that the target switch pops up, the vehicle controller determines that the user's current trigger operation on the target switch is over. The vehicle controller can start timing when the trigger operation ends, and end timing when the target switch is detected to be pressed by the user next time. The timing duration is the idle time of the target switch between the current trigger operation and the previous adjacent trigger operation.
[0110] When the i-th trigger operation of the user on the target switch is detected, the vehicle controller can obtain the idle time between the i-th trigger operation and the i-1-th trigger operation. If the idle time is greater than the fourth preset time, i is determined to be 1, that is, the user is currently performing the first trigger operation on the target switch. After that, the vehicle controller can start the first timer to start timing, and start the corresponding first counter to start counting.
[0111] In an embodiment of the present application, when the idle time of the target switch is greater than or equal to the fourth preset time, the first timer is started to begin timing. When the user has not performed a trigger operation for a long time, the detection can be restarted to obtain the first trigger number, which can simplify the quick power-off detection process.
[0112] Optionally, the method may further include:
[0113] When the timing duration of the i-th timer reaches the first preset duration, if the first triggering number is 1, determining whether the vehicle is in a powered-on state;
[0114] If the vehicle is powered on, control the vehicle to power off normally;
[0115] If the vehicle is not in the power-on state, control the vehicle to power on.
[0116] In some embodiments, when the timing duration of the i-th timer reaches a first preset duration, the vehicle controller first determines whether the first trigger number is 1. When the first trigger number is greater than 1 and less than the preset number, the timing duration of the i-th timer is updated to the timing duration of the (i+1)-th timer, and the first trigger number is updated to the second trigger number, and the i-th timer is controlled to restart timing.
[0117] When the timing duration of the i-th timer reaches the first preset duration, if the first triggering number is 1, it is determined that the user needs to control the vehicle to power on or off normally through the target switch (one-button start switch). At this time, if the vehicle is in the power-on state, the vehicle is controlled to power on normally; if the vehicle is not in the power-on state (i.e., the power-off state), the vehicle is controlled to power on normally.
[0118] In the embodiment of the present application, when the user triggers the target switch once, the vehicle is controlled to be powered on and off normally, so that the user can control the vehicle to be powered on and off normally through the target switch, thereby making it convenient for the user to control the vehicle to be powered on and off normally through the target switch.
[0119] Optionally, the step of controlling the vehicle to power off may include:
[0120] Get the vehicle's speed;
[0121] When the driving speed is lower than the preset speed threshold, the vehicle is controlled to power off;
[0122] Alternatively, when the driving speed is greater than or equal to a preset speed threshold, a power-off notification is output, and the vehicle is controlled to be powered off after a delay of a fifth preset time period.
[0123] In some embodiments, when controlling the vehicle to power off quickly, the vehicle controller first detects the current driving speed of the vehicle. If the driving speed is less than a preset speed threshold (the preset speed threshold can be 0), the vehicle is directly controlled to power off quickly. When the driving speed is greater than or equal to the preset speed threshold, a quick power-off notification is first output. The quick power-off notification is, for example, a voice notification. The quick power-off notification is used to notify the user that the power is about to be quickly turned off, so that the user can reduce the driving speed of the vehicle in time and park the vehicle in a safe location. After outputting the quick power-off notification, the vehicle controller starts timing, and when the timing reaches the fifth preset time, the vehicle is controlled to power off quickly.
[0124] In an embodiment of the present application, when the vehicle's driving speed is greater than or equal to a preset speed threshold, a quick power-off notification is first output, and then the vehicle is controlled to power off quickly, which can facilitate the user to prepare for the quick power-off, thereby improving the safety and reliability of the vehicle.
[0125] See also Figure 5 , Figure 5 is a flow chart of a vehicle control method provided by an embodiment of the present application. Figure 5 As shown, the method may include:
[0126] Step 501: Detect whether the user performs the i-th trigger operation.
[0127] Step 502: Start the i-th timer and obtain the first triggering number.
[0128] In this embodiment, after the vehicle is powered on, the vehicle controller can continuously detect whether the target switch receives a trigger operation from the user. After detecting the i-th trigger operation of the target switch by the user, step 502 is executed to start the i-th timer and start the i-th counter to obtain the first number of trigger times.
[0129] Step 503: Determine whether the timing duration of the i-th timer reaches a first preset duration.
[0130] Step 504: Detect whether the user performs the (i+1)th trigger operation.
[0131] Step 505: Start the (i+1)th timer to obtain the second triggering number.
[0132] In this embodiment, when the vehicle controller determines that the timing duration of the i-th timer is less than the first preset duration, it can detect whether the user has received the i+1th trigger operation on the target switch. After detecting the i+1th trigger operation, the i+1th timer is started to start timing, and the i+1th counter is started to start counting to obtain the second triggering number. At the same time, each time the vehicle controller detects a triggering operation of the target switch, the count value of the i-th counter is increased by 1, that is, the first triggering number is increased by 1.
[0133] Step 506: Determine whether the first triggering number reaches a preset number.
[0134] Step 507: Control the vehicle to quickly power off.
[0135] In this embodiment, when the timing duration of the i-th timer is less than the first preset duration, the vehicle controller continuously detects whether the first triggering number reaches the preset number, and executes step 507 when the first triggering number reaches the preset number, and controls the vehicle to power off quickly. When the first triggering number is less than the preset number, the execution returns to step 503.
[0136] Step 508: Determine whether the first triggering number is 1.
[0137] Step 509: Update the i-th timer and update the first triggering number.
[0138] Step 510: Control the vehicle to power off normally.
[0139] In this embodiment, when the vehicle controller determines that the timing duration of the i-th timer reaches the first preset duration, it determines whether the first triggering number is 1. When the first triggering number is greater than 1 and less than the preset number, step 509 is executed to update the timing duration of the i-th timer according to the timing duration of the i+1-th timer, and to update the count value of the i-th counter according to the count value of the i+1-th counter, so as to update the first triggering number through the second triggering number. On the contrary, when the first triggering number is 1, it is determined that the user needs to control the vehicle to power off normally, and step 510 is executed to control the vehicle to power off normally.
[0140] See also Figure 6 , Figure 6 Schematic diagram of the structure of a vehicle control device provided in an embodiment of the present application. Figure 6 As shown, the vehicle control device 600 may be provided in a vehicle controller and may include:
[0141] The starting module 601 is used to start the i-th timer and obtain the first triggering number of the target switch during the timing of the i-th timer if the i-th triggering operation of the target switch in the vehicle is detected; wherein i is an integer greater than or equal to 1;
[0142] The start module 601 is further configured to start the i+1th timer and obtain the second triggering number of the target switch during the timing of the i+1th timer if the i+1th triggering operation on the target switch is detected;
[0143] An updating module 602 is configured to update the timing duration of the i-th timer to the timing duration of the (i+1)-th timer and update the first triggering number to the second triggering number when the timing duration of the i-th timer reaches the first preset duration and the first triggering number is less than the preset number;
[0144] The control module 603 is used to control the vehicle to power off if the first triggering number reaches a preset number before the timing duration of the i-th timer reaches a first preset duration.
[0145] In combination with the first aspect, in some possible implementations, the update module 602 is also used to clear the timing duration of the i+1th timer and the second trigger number when the timing duration of the i-th timer is updated to the timing duration of the i+1th timer; if the i+2th trigger operation on the target switch is detected, restart the i+1th timer and re-acquire the second trigger number; when the timing duration of the i-th timer reaches the first preset duration, if the first trigger number is less than the preset number, update the timing duration of the i-th timer to the timing duration of the i+1th timer, and update the first trigger number to the re-acquired second trigger number.
[0146] In combination with the first aspect, in some possible implementations, the starting module 601 is also used to start the i+2 timer and obtain the third triggering number of the target switch during the timing of the i+2 timer if the i+2 triggering operation on the target switch is detected when the timing duration of the i-th timer has not reached the first preset duration and the first triggering number is less than the preset number.
[0147] In combination with the first aspect, in some possible implementations, the update module 602 is specifically used to detect whether the target switch is in a triggered state at a current moment; when the target switch is in a triggered state, if the first trigger duration of the target switch in the triggered state is greater than or equal to the second preset duration, the vehicle is controlled to power off; or, if the target switch is not in a triggered state or the first trigger duration is less than the second preset duration, the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer, and the first trigger number is updated to the second trigger number.
[0148] In combination with the first aspect, in some possible implementations, the start module 601 is specifically used to determine the second trigger duration when the target switch is triggered for the i-th time; if the second trigger duration is less than the third preset duration, start the i-th timer and obtain the first trigger number; or, if the second trigger duration is greater than or equal to the third preset duration, control the vehicle to power off.
[0149] In combination with the first aspect, in some possible implementations, the start module 601 is specifically used to determine the idle time of the target switch before the i-th trigger operation is detected; if the idle time is greater than or equal to the fourth preset time, i is determined to be 1, the first timer is started and the first trigger number is obtained.
[0150] In combination with the first aspect, in some possible implementations, the control module 603 is also used to determine whether the vehicle is in a powered-on state when the timing duration of the i-th timer reaches a first preset duration, if the first trigger number is 1; if the vehicle is in a powered-on state, control the vehicle to power off normally; if the vehicle is not in a powered-on state, control the vehicle to power on.
[0151] In combination with the first aspect, in some possible implementations, the control module 603 is specifically used to obtain the vehicle's driving speed; when the driving speed is less than a preset speed threshold, control the vehicle to power off; or, when the driving speed is greater than or equal to the preset speed threshold, output a power-off notification and control the vehicle to power off after a delay of a fifth preset time period.
[0152] See also Figure 7 , Figure 7 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application.
[0153] For example, Figure 7As shown, the vehicle 700 includes: a memory 701 and a processor 702, wherein the memory 701 stores an executable program code 7011, and the processor 702 is used to call and execute the executable program code 7011 to perform a vehicle control method.
[0154] In addition, an embodiment of the present application also protects a vehicle control device, which may include a memory and a processor, wherein the memory stores an executable program code, and the processor is used to call and execute the executable program code to execute a vehicle control method provided by an embodiment of the present application.
[0155] In this embodiment, the functional modules of the device can be divided according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0156] In the case of dividing each functional module according to each function, the device may also include a startup module, an update module, a control module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
[0157] It should be understood that the device provided in this embodiment is used to execute the above-mentioned vehicle control method, and thus can achieve the same effect as the above-mentioned implementation method.
[0158] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a vehicle, the processing module may be used to control and manage the actions of the vehicle. The storage module may be used to support the vehicle in executing mutual program codes, etc.
[0159] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits shown in combination with the contents disclosed in this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0160] In addition, the device provided in the embodiments of the present application may specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a vehicle control method provided in the above embodiments.
[0161] This embodiment also provides a readable storage medium, in which a computer program code is stored. When the computer program code is run on a computer, the computer executes the above-mentioned related method steps to implement a vehicle control method provided by the above-mentioned embodiment.
[0162] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement a vehicle control method provided by the above-mentioned embodiment.
[0163] Among them, the device, readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0164] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0165] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0166] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A vehicle control method, characterized in that: The method comprises If the i-th triggering operation of the target switch in the vehicle is detected, start the i-th timer and obtain the first triggering number of the target switch during the timing of the i-th timer; wherein i is an integer greater than or equal to 1; If the (i+1)th triggering operation on the target switch is detected, starting the (i+1)th timer and obtaining the second triggering number of the target switch during the timing of the (i+1)th timer; When the timing duration of the i-th timer reaches a first preset duration, if the first triggering number is less than the preset number, the timing duration of the i-th timer is updated to the timing duration of the (i+1)-th timer, and the first triggering number is updated to the second triggering number; Before the timing duration of the i-th timer reaches the first preset duration, if the first triggering number reaches the preset number, controlling the vehicle to power off; Among them, updating the timing duration of the i-th timer to the timing duration of the i+1-th timer, and updating the first trigger number to the second trigger number, includes: detecting whether the target switch is in a triggered state at a current moment; when the target switch is in the triggered state and the first trigger number is greater than 1, if the first trigger duration of the target switch in the triggered state is greater than or equal to the second preset duration, controlling the vehicle to power off; or, if the target switch is not in the triggered state or the first trigger duration is less than the second preset duration, updating the timing duration of the i-th timer to the timing duration of the i+1-th timer, and updating the first trigger number to the second trigger number.
2. The method according to claim 1, characterized in that The method further comprises: When the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer, the timing duration of the i+1-th timer is cleared to zero, and the second triggering number is cleared to zero; If the (i+2) triggering operation on the target switch is detected, restarting the (i+1) timer and reacquiring the second triggering number; When the timing duration of the i-th timer reaches the first preset duration, if the first trigger number is less than the preset number, the timing duration of the i-th timer is updated to the timing duration of the (i+1)-th timer, and the first trigger number is updated to the re-acquired second trigger number.
3. The method according to claim 1, characterized in that The method further comprises: When the timing duration of the i-th timer has not reached the first preset duration and the first triggering number is less than the preset number, if the i+2th triggering operation on the target switch is detected, the i+2th timer is started, and the third triggering number of the target switch during the timing of the i+2th timer is obtained.
4. The method according to claim 1, characterized in that The step of starting the i-th timer and obtaining the first triggering number of the target switch during the timing of the i-th timer includes: Determine a second triggering duration of the target switch when it is triggered for the i-th time; If the second trigger duration is less than the third preset duration, start the i-th timer and obtain the first trigger number; Alternatively, if the second trigger duration is greater than or equal to the third preset duration, the vehicle is controlled to power off.
5. The method according to claim 1, characterized in that The step of starting the i-th timer and obtaining the first triggering number of the target switch during the timing of the i-th timer includes: Determining the idle time of the target switch before the i-th trigger operation is detected; If the idle time duration is greater than or equal to a fourth preset time duration, i is determined to be 1, a first timer is started and the first triggering number is obtained.
6. The method according to claim 1, characterized in that The method further comprises: When the timing duration of the i-th timer reaches the first preset duration, if the first triggering number is 1, determining whether the vehicle is in a powered-on state; If the vehicle is in a powered-on state, controlling the vehicle to be powered-off normally; If the vehicle is not in the powered-on state, control the vehicle to be powered on.
7. The method according to any one of claims 1 to 6, characterized in that The controlling the vehicle to power off includes: Obtaining the driving speed of the vehicle; When the driving speed is less than a preset speed threshold, controlling the vehicle to power off; Alternatively, when the driving speed is greater than or equal to the preset speed threshold, a power-off notification is output, and the vehicle is controlled to be powered off after a delay of a fifth preset time period.
8. A vehicle control device, characterized in that: The device comprises: A starting module, configured to start an i-th timer and obtain a first triggering number of the target switch during the timing of the i-th timer if an i-th triggering operation of the target switch in the vehicle is detected; wherein i is an integer greater than or equal to 1; The starting module is further configured to start the i+1th timer and obtain the second triggering number of the target switch during the timing of the i+1th timer if the i+1th triggering operation on the target switch is detected; an updating module, configured to update the timing duration of the i-th timer to the timing duration of the (i+1)-th timer and update the first triggering number to the second triggering number when the timing duration of the i-th timer reaches a first preset duration and if the first triggering number is less than the preset number; a control module, configured to control the vehicle to power off if the first triggering number reaches the preset number before the timing duration of the i-th timer reaches the first preset duration; Among them, the update module is specifically used to detect whether the target switch is in a triggered state at a current moment; when the target switch is in a triggered state and the first trigger number is greater than 1, if the first trigger duration of the target switch in the triggered state is greater than or equal to the second preset duration, the vehicle is controlled to power off; or, if the target switch is not in a triggered state or the first trigger duration is less than the second preset duration, the timing duration of the i-th timer is updated to the timing duration of the i+1-th timer, and the first trigger number is updated to the second trigger number.
9. A vehicle, characterized in that: The vehicle comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the vehicle executes the method according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Power state control method and device
CN110203158A
Emergency power-off control method for battery electric vehicle key
CN113071318A
Forced power-off control method in vehicle running process
CN113386782A
Vehicle component abuse prevention method and device, vehicle and storage medium
CN116118648A
Controller for vehicle antitheft function
JP2007016589A
