Disclosure of Invention
The disclosure provides a vehicle locking control method, a vehicle-mounted terminal, an engine electronic control unit and a vehicle, which are used for solving the problem that the remote vehicle locking in the related art is possible to fail when power is unexpectedly cut off.
In order to achieve the above object, in a first aspect, an embodiment of the present disclosure provides a vehicle locking control method, where the method is applied to a vehicle-mounted terminal, and the method includes:
sending a vehicle locking instruction to an engine Electronic Control Unit (ECU), and storing the vehicle locking instruction, wherein the vehicle locking instruction is used for triggering the engine ECU to feed back a state message of receiving the vehicle locking instruction, and triggering the engine ECU to execute a vehicle locking operation when the vehicle is powered on again;
when the vehicle is powered on again, sending a state query request message to the engine ECU, wherein the state query request message is used for indicating the engine ECU to feed back a state message of successful vehicle locking after the vehicle locking operation is successfully executed;
and if a state message that the engine ECU feeds back the successful car locking is received, clearing the car locking instruction from storage.
Optionally, the method further includes:
and if the state message that the engine ECU feeds back the successful locking is not received, the stored locking instruction is issued to the engine ECU again.
Optionally, the method further includes:
and when the stored vehicle locking command is issued to the engine ECU again, sending a notification message of immediate vehicle locking to the engine ECU.
In a second aspect, the disclosed embodiments provide a vehicle locking control method, which is applied to an engine electronic control unit ECU of a vehicle, and includes:
when a vehicle locking instruction sent by a vehicle-mounted terminal is received, storing the vehicle locking instruction in a temporary buffer area, and feeding back a state message of receiving the vehicle locking instruction to the vehicle-mounted terminal;
when the vehicle is normally powered off, the vehicle locking instruction is stored into a flash memory from a temporary buffer area;
when the vehicle is powered on again, responding to the vehicle locking instruction in the flash memory to execute vehicle locking operation;
and if the vehicle locking operation is successfully executed and a state query request message sent by the vehicle-mounted terminal is received, feeding back a vehicle locking successful state message to the vehicle-mounted terminal, wherein the vehicle locking successful state message is used for triggering the vehicle-mounted terminal to clear the vehicle locking command from storage.
Optionally, the method further includes:
if the vehicle locking operation is not successfully executed, when a state query request message sent by the vehicle-mounted terminal is received, a state message of unsuccessful vehicle locking is fed back to the vehicle-mounted terminal, and the state message of unsuccessful vehicle locking is used for triggering the vehicle-mounted terminal to send the stored vehicle locking instruction to the engine ECU again.
Optionally, the method further includes: and if the vehicle locking instruction and the notification message of immediately locking the vehicle are received, executing the vehicle locking operation.
In a third aspect, an embodiment of the present disclosure provides a vehicle-mounted terminal, where the vehicle-mounted terminal includes:
the command control module is used for sending a vehicle locking command to an engine Electronic Control Unit (ECU) and storing the vehicle locking command, wherein the vehicle locking command is used for triggering the engine ECU to feed back a state message of receiving the vehicle locking command and indicating the engine ECU to execute a vehicle locking operation;
the message control module is used for sending a state query request message to the engine ECU when the vehicle is powered on again, wherein the state query request message is used for indicating the engine ECU to feed back a state message of successful vehicle locking after the vehicle locking operation is successfully executed;
and the instruction control module is also used for clearing the vehicle locking instruction from storage when receiving a state message that the engine ECU feeds back the successful vehicle locking.
Optionally, the instruction control module is further configured to, when a status message that the engine ECU feeds back the successful car locking is not received, issue the stored car locking instruction to the engine ECU again.
Optionally, the instruction control module is further configured to send a notification message of immediately locking the vehicle to the engine ECU when the stored vehicle locking instruction is issued to the engine ECU again.
In a fourth aspect, an embodiment of the present disclosure provides an engine electronic control unit ECU including:
the first control module is used for storing the vehicle locking instruction in a temporary buffer area when receiving the vehicle locking instruction sent by the vehicle-mounted terminal and feeding back a state message of receiving the vehicle locking instruction to the vehicle-mounted terminal;
the second control module is used for storing the vehicle locking instruction into the flash memory from the temporary buffer area when the vehicle is normally powered off;
the third control module is used for responding to the vehicle locking instruction in the flash memory to execute vehicle locking operation when the vehicle is powered on again;
and the fourth control module is used for feeding back a vehicle locking successful state message to the vehicle-mounted terminal when the vehicle locking operation is successfully executed and the state query request message sent by the vehicle-mounted terminal is received, wherein the vehicle locking successful state message is used for triggering the vehicle-mounted terminal to clear the vehicle locking instruction from storage.
Optionally, the engine ECU further includes a fifth control module, configured to, when the vehicle locking operation is not successfully executed, if a status query request message sent by the vehicle-mounted terminal is received, feed back a status message indicating that the vehicle locking is not successful to the vehicle-mounted terminal, where the status message indicating that the vehicle locking is not successful is used to trigger the vehicle-mounted terminal to send the stored vehicle locking instruction to the engine ECU again.
Optionally, the engine ECU further includes: and the sixth control module is used for executing the vehicle locking operation when receiving the vehicle locking instruction and the notification message of immediately locking the vehicle.
In a fifth aspect, embodiments of the present disclosure provide a vehicle including the above vehicle-mounted terminal and an engine electronic control unit.
The technical scheme can at least achieve the following technical effects:
after the vehicle-mounted terminal sends a vehicle locking instruction to an engine electronic control unit, storing the vehicle locking instruction; when the vehicle is electrified again, sending a state query request message to the engine ECU; and if a state message that the engine ECU feeds back the successful car locking is received, clearing the car locking instruction from storage. Therefore, even if the vehicle is powered off when the electronic control unit of the engine executes the vehicle locking operation, the vehicle locking instruction is still stored in the vehicle-mounted terminal slowly, if the vehicle is not locked successfully, the vehicle-mounted terminal can send the vehicle locking instruction to the electronic control unit of the engine again after the whole vehicle is powered on, the problem that the remote vehicle locking is possible to fail when the vehicle is powered off accidentally in the related art is solved, and the reliability of the remote vehicle locking is improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
Fig. 1 is a flowchart of a method for controlling locking of a vehicle according to an exemplary embodiment of the present disclosure, where the method is applied to a vehicle-mounted terminal, and the method includes:
and S11, sending a vehicle locking instruction to an engine Electronic Control Unit (ECU), and storing the vehicle locking instruction, wherein the vehicle locking instruction is used for triggering the engine ECU to feed back a state message of receiving the vehicle locking instruction, and triggering the engine ECU to execute vehicle locking operation when the vehicle is powered on again.
The vehicle-mounted terminal can communicate with the remote control center and generate a vehicle locking instruction according to the instruction of the control center. And then the vehicle locking command is sent to the vehicle engine ECU through CAN bus communication on the vehicle. After the vehicle-mounted terminal sends a vehicle locking instruction to the electric engine ECU, the vehicle locking instruction is cached. At this time, if the whole vehicle is powered off, the vehicle locking instruction is still stored in the cache of the vehicle-mounted terminal.
And S12, when the vehicle is powered on again, sending a state query request message to the engine ECU, wherein the state query request message is used for indicating the engine ECU to feed back a state message of successful vehicle locking after the vehicle locking operation is successfully executed.
It should be noted that the engine ECU detects the current vehicle locking state of the vehicle when receiving the state inquiry request message. If the vehicle locking is successful, feeding back a state message of successful vehicle locking; and if the vehicle locking is not successful, feeding back a status message of the vehicle locking failure.
And S13, if a state message that the engine ECU feeds back the successful locking is received, clearing the locking instruction from storage.
Further, the method further comprises: and if the state message that the engine ECU feeds back the successful locking is not received, the stored locking instruction is issued to the engine ECU again.
The state message that the engine ECU does not receive the successful locking feedback may include various conditions, and the ECU loses the locking instruction possibly because of abnormal power failure of the vehicle, so that the vehicle locking operation cannot be successfully executed and the state message that the vehicle locking is successful is returned; it is also possible that the status message has a communication failure during transmission. And if the vehicle-mounted does not receive the state message of successful vehicle locking, the vehicle locking command is retransmitted to the engine ECU.
In addition, the vehicle-mounted terminal can resend the state request message after issuing the vehicle locking command to the engine ECU again. And if the engine ECU successfully locks the vehicle corresponding to the vehicle locking instruction, feeding back a successful vehicle locking state message.
After sending a vehicle locking instruction to an engine ECU, the vehicle-mounted terminal stores the vehicle locking instruction; when the vehicle is electrified again, sending a state query request message to the engine ECU; and if a state message that the engine ECU feeds back the successful car locking is received, clearing the car locking instruction from storage. Therefore, even if the vehicle is powered off when the engine ECU performs the vehicle locking operation, the vehicle locking instruction is still stored in the vehicle-mounted terminal slowly, if the vehicle is not locked successfully, the vehicle-mounted terminal can send the vehicle locking instruction to the engine ECU again after the whole vehicle is powered on, the problem that the remote vehicle locking is possible to fail when the power is cut off unexpectedly in the related art is solved, and the reliability of the remote vehicle locking is improved. In addition, the state messages of all stages can also be used for determining which node fails to lock the vehicle, so that later optimization is facilitated.
Optionally, the method further includes: and when the cached car locking instruction is issued to the engine ECU again, sending a notification message of immediately locking the car to the engine ECU.
In the notification message of the instant car locking, it can be marked that the car locking instruction is cached in the vehicle-mounted terminal, and the currently issued car locking instruction is issued for the second time and needs to be executed immediately.
In specific implementation, when the engine ECU receives the notification message of immediately locking the vehicle, the vehicle locking instruction can be set at the highest priority, so that the operation of locking the vehicle is accelerated, and the failure of locking the vehicle due to accidental power failure or manual disassembly is avoided.
Fig. 2 is a flowchart illustrating another vehicle locking control method according to an exemplary embodiment of the present disclosure, which is applied to an engine electronic control unit ECU of a vehicle, and includes:
and S21, when receiving the vehicle locking instruction sent by the vehicle-mounted terminal, storing the vehicle locking instruction in a temporary buffer area, and feeding back a state message of receiving the vehicle locking instruction to the vehicle-mounted terminal.
And S22, when the vehicle is powered off normally, the vehicle locking command is stored in a flash memory from the temporary buffer area.
That is, if the vehicle executes a normal shutdown procedure, the vehicle locking command is saved in a FLASH memory (FLASH) from a temporary buffer. On the contrary, if the vehicle is abnormally shut down, the vehicle locking command is not successfully stored in a FLASH memory (FLASH) from the temporary buffer area, and the vehicle locking command may be lost, thereby causing the failure of vehicle locking.
And S23, when the vehicle is powered on again, responding to the locking command in the flash memory to execute the locking operation.
And S24, if the vehicle locking operation is successfully executed and the status inquiry request message sent by the vehicle-mounted terminal is received, feeding back a vehicle locking successful status message to the vehicle-mounted terminal, wherein the vehicle locking successful status message is used for triggering the vehicle-mounted terminal to clear the vehicle locking instruction from storage.
Optionally, if the vehicle locking operation is not successfully executed, when a status query request message sent by the vehicle-mounted terminal is received, a status message indicating that the vehicle locking is not successful is fed back to the vehicle-mounted terminal, and the status message indicating that the vehicle locking is not successful is used for triggering the vehicle-mounted terminal to send the stored vehicle locking instruction to the engine ECU again.
Optionally, if a vehicle locking instruction sent by the vehicle-mounted terminal is received and a notification message of immediately locking the vehicle is received, the vehicle locking operation is executed to enable the vehicle to be in a locked state, and a status message of successful vehicle locking is fed back to the vehicle-mounted terminal.
And marking that the car locking instruction is cached in the vehicle-mounted terminal in the notification message of the instant car locking, wherein the currently issued car locking instruction is issued for the second time.
To make those skilled in the art understand the technical solution of the present disclosure more clearly, fig. 3 is a signaling diagram of another car locking control method provided in an exemplary embodiment of the present disclosure, and the specific flow is as follows:
when the vehicle is in a power-on state, the vehicle-mounted terminal sends a vehicle locking instruction to the engine ECU, and the vehicle locking instruction is cached.
And the engine ECU receives the vehicle locking instruction sent by the vehicle-mounted terminal and feeds back a state message of receiving the vehicle locking instruction to the vehicle-mounted terminal.
At this time, if the whole vehicle is powered off, the vehicle locking instruction in the engine ECU may be lost, so that the vehicle locking is not successful, and the vehicle-mounted terminal still caches the vehicle locking instruction.
And when the vehicle is powered on, the vehicle-mounted terminal sends a state query request message to the engine ECU.
And the engine ECU detects that the vehicle is in an unlocked state, and feeds back a state message of unsuccessful vehicle locking to the vehicle-mounted terminal.
And the vehicle-mounted terminal receives the state message that the engine ECU feeds back the vehicle locking failure and issues the cached vehicle locking instruction to the engine ECU again.
And the engine ECU receives the vehicle locking instruction sent by the vehicle-mounted terminal and feeds back a state message of receiving the vehicle locking instruction to the vehicle-mounted terminal.
The vehicle-mounted terminal sends a notification message of locking the vehicle immediately to the engine ECU, wherein in the notification message of locking the vehicle immediately, the vehicle-mounted terminal can mark that the vehicle-locking instruction is cached in the vehicle-mounted terminal, and the currently issued vehicle-locking instruction is issued for the second time and needs to execute the vehicle-locking operation immediately.
And when the engine ECU receives the notification message of the instant vehicle locking, executing the vehicle locking operation to enable the vehicle to be in a locked state, and feeding back a state message of the successful vehicle locking to the vehicle-mounted terminal, wherein the vehicle in the locked state cannot be normally ignited.
And the vehicle-mounted terminal receives a state message that the engine ECU feeds back the successful vehicle locking and clears the vehicle locking instruction from the cache.
In another alternative embodiment, the vehicle-mounted terminal may send a notification message of immediate vehicle locking together with the vehicle locking command issued twice to the electronic control unit of the engine.
Therefore, according to the technical scheme, even if the vehicle is powered off when the engine ECU performs the vehicle locking operation, the vehicle locking instruction is still stored in the vehicle-mounted terminal slowly, if the vehicle is not locked successfully, the vehicle-mounted terminal can send the vehicle locking instruction to the engine ECU again after the whole vehicle is powered on, the problem that the remote vehicle locking is possible to lose efficacy when the power is cut off accidentally in the related art is solved, and the reliability of the remote vehicle locking is improved.
Fig. 4 is a block diagram illustrating a structure of a vehicle-mounted terminal 400 according to an exemplary embodiment of the disclosure, where the vehicle-mounted terminal 400 includes:
the instruction control module 410 is used for sending a vehicle locking instruction to an engine Electronic Control Unit (ECU) and storing the vehicle locking instruction, wherein the vehicle locking instruction is used for triggering the engine ECU to feed back a state message of receiving the vehicle locking instruction and indicating the engine ECU to execute a vehicle locking operation;
the message control module 420 is configured to send a status query request message to the engine ECU when the vehicle is powered on again, where the status query request message is used to indicate that the engine ECU feeds back a status message indicating that the vehicle is successfully locked after the vehicle locking operation is successfully performed;
the instruction control module 410 is further configured to clear the vehicle locking instruction from storage when receiving a status message that the vehicle locking is successfully fed back by the engine ECU.
Optionally, the instruction control module 410 is further configured to, when a status message that the engine ECU feeds back the successful car locking is not received, issue the stored car locking instruction to the engine ECU again.
Optionally, the instruction control module 410 is further configured to send a notification message of immediately locking the vehicle to the engine ECU when the stored vehicle locking instruction is issued to the engine ECU again.
Fig. 5 is a block diagram showing a structure of an engine ECU500 according to an exemplary embodiment of the present disclosure, the engine ECU500 including:
the first control module 510 is configured to, when receiving a car locking instruction sent by a vehicle-mounted terminal, store the car locking instruction in a temporary buffer area, and feed back a status message of receiving the car locking instruction to the vehicle-mounted terminal;
the second control module 520 is used for storing the vehicle locking instruction into a flash memory from a temporary buffer area when the vehicle is powered off normally;
the third control module 530 is used for responding to the vehicle locking instruction in the flash memory to execute vehicle locking operation when the vehicle is powered on again;
the fourth control module 540 is configured to, when the vehicle locking operation is successfully executed and a status query request message sent by the vehicle-mounted terminal is received, feed back a status message indicating that the vehicle locking is successful to the vehicle-mounted terminal, where the status message indicating that the vehicle locking is successful is used to trigger the vehicle-mounted terminal to clear the vehicle locking instruction from storage.
Optionally, the engine ECU500 further includes: and a fifth control module, configured to, when the vehicle locking operation is not successfully executed, if a status query request message sent by the vehicle-mounted terminal is received, feed back a status message indicating that the vehicle locking is not successful to the vehicle-mounted terminal, where the status message indicating that the vehicle locking is not successful is used to trigger the vehicle-mounted terminal to send the stored vehicle locking instruction to the engine ECU500 again.
Optionally, the engine ECU500 further includes: and the sixth control module is used for executing the vehicle locking operation when receiving the vehicle locking instruction and the notification message of immediately locking the vehicle.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The disclosed embodiment also provides a vehicle including the above-described in-vehicle terminal 400 and the engine electronic control unit ECU 500.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.