Systems and methods for communication of vehicle control information between a vehicle and an electronic device
This application provides a vehicle control method. The method Can include a mobile terminal that establishes a short-range communication connection to a vehicle. The mobile terminal reads vehicle information from a passive NFC apparatus in the vehicle. The mobile terminal generates control information based on the vehicle information. The mobile terminal sends the control information to the vehicle by using the short-range communication connection. The passive NFC apparatus is, for example, an NFC tag, and the mobile terminal is, for example, a mobile phone. In a process of controlling the vehicle, the mobile phone may be in a screen-off state throughout the process, and the user does not need to perform an operation in an interface of the mobile phone, thereby enhancing the user's experience.
1 . A vehicle control method, comprising:
establishing, by a mobile terminal, a short-range communication connection to a vehicle using a first communications protocol;
in response to establishing the short-range communication connection, reading, by the mobile terminal, vehicle information from a passive near field communication (NFC) apparatus in the vehicle using a second communications protocol that is different from the first communications protocol;
generating, by the mobile terminal, control information based on the vehicle information; and
sending, by the mobile terminal, the control information to the vehicle over the short-range communication connection using the first communications protocol;
wherein the vehicle information comprises task information, the task information is in an association relationship with a position of the passive NFC apparatus in the vehicle, and the task information is used to generate the control information; and
wherein the task information is random identification information that is generated randomly each time it is written to the passive NFC apparatus, the random identification information is written into the passive NFC apparatus after the short-range communication connection is established, and the control information comprises the random identification information.
2 . The method according to claim 1 , wherein the vehicle information comprises an identifier of the vehicle, and/or the vehicle information comprises an identifier of an application program corresponding to the vehicle information.
3 . The method according to claim 1 , wherein the control information is information encrypted with a session key.
4 . The method according to claim 1 , wherein the short-range communication connection is a Bluetooth connection, an ultra-wideband (UWB) connection, a ZigBee connection, or a Wireless Fidelity (Wi-Fi) connection.
5 . An electronic device, comprising:
one or more processors,
one or more memories, wherein the one or more memories are configured to store computer program, the computer program is executed by the one or more processors, to enable the electronic device to perform:
establishing a short-range communication connection to a vehicle using a first communications protocol;
in response to establishing the short-range communication connection, reading vehicle information from a passive near field communication (NFC) apparatus in the vehicle using a second communications protocol that is different from the first communications protocol;
generating control information based on the vehicle information; and
sending the control information to the vehicle over the short-range communication connection using the first communications protocol;
wherein the vehicle information comprises task information, the task information is in an association relationship with a position of the passive NFC apparatus in the vehicle, and the task information is used to generate the control information; and
wherein the task information is random identification information that is generated randomly each time it is written to the passive NFC apparatus, the random identification information is written into the passive NFC apparatus after the short-range communication connection is established, and the control information comprises the random identification information.
6 . The electronic device according to claim 5 , wherein the vehicle information comprises an identifier of the vehicle, and/or the vehicle information comprises an identifier of an application program corresponding to the vehicle information.
7 . The electronic device according to claim 5 , wherein the control information is information encrypted with a session key.
8 . The electronic device according to claim 5 , wherein the short-range communication connection is a Bluetooth connection, an ultra-wideband (UWB) connection, a ZigBee connection, or a Wireless Fidelity (Wi-Fi) connection.
9 . An electronic device, comprising:
one or more processors,
one or more memories, wherein the one or more memories are configured to store computer program, the computer program is executed by the one or more processors, to enable the electronic device to perform:
establishing a short-range communication connection to a mobile terminal using a first communications protocol;
receiving, using the first communication protocol, control information from the mobile terminal over the short-range communication connection in response to the mobile terminal establishing the short-range communication connection, wherein the control information is generated by the mobile terminal based on vehicle information, and the vehicle information is information read, by the mobile terminal using a second communications protocol that is different from the first communications protocol, from in a passive near field communication (NFC) apparatus in a vehicle on which the electronic device is located; and
controlling the vehicle based on the control information;
wherein the vehicle information is written into the passive NFC apparatus after the short-range communication connection is established,
wherein the vehicle information comprises task information, the task information is in an association relationship with a position of the passive NFC apparatus in the vehicle, and the task information is used to generate the control information, and
wherein the task information is random identification information that is generated randomly each time it is written to the passive NFC apparatus, the random identification information is written into the passive NFC apparatus after the short-range communication connection is established, and the control information comprises the random identification information.
10 . The electronic device according to claim 9 , wherein the vehicle information comprises an identifier of the vehicle, and/or the vehicle information comprises an identifier of an application program corresponding to the vehicle information.
11 . The electronic device according to claim 9 , wherein the control information is information encrypted with a session key.
12 . The electronic device according to claim 9 , wherein the short-range communication connection is a Bluetooth connection, an ultra-wideband (UWB) connection, a ZigBee connection, or a Wireless Fidelity (Wi-Fi) connection.