CN112911543B - Vehicle-mounted terminal and time synchronization method and storage medium thereof - Google Patents

Vehicle-mounted terminal and time synchronization method and storage medium thereof Download PDF

Info

Publication number
CN112911543B
CN112911543B CN202110057905.2A CN202110057905A CN112911543B CN 112911543 B CN112911543 B CN 112911543B CN 202110057905 A CN202110057905 A CN 202110057905A CN 112911543 B CN112911543 B CN 112911543B
Authority
CN
China
Prior art keywords
message
data packet
vehicle
mobile terminal
message data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110057905.2A
Other languages
Chinese (zh)
Other versions
CN112911543A (en
Inventor
任成珺
王金龙
巴涵坚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Linghangwei Technology Co ltd
Original Assignee
Shenzhen Linghangwei Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Linghangwei Technology Co ltd filed Critical Shenzhen Linghangwei Technology Co ltd
Publication of CN112911543A publication Critical patent/CN112911543A/en
Application granted granted Critical
Publication of CN112911543B publication Critical patent/CN112911543B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/48Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for in-vehicle communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • H04W56/0015Synchronization between nodes one node acting as a reference for the others
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W80/00Wireless network protocols or protocol adaptations to wireless operation
    • H04W80/08Upper layer protocols
    • H04W80/12Application layer protocols, e.g. WAP [Wireless Application Protocol]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the invention provides a vehicle-mounted terminal, a time synchronization method thereof and a storage medium, wherein a vehicle-mounted terminal side firstly acquires a current message data packet of a mobile terminal, the message data packet comprises data generated by message interaction between the mobile terminal and other terminals, and the data generated by message receiving and transmitting contains time information when the mobile terminal interacts with the other terminals, so that after the vehicle-mounted terminal side acquires the current message data packet of the mobile terminal, the current message time information, namely the time information of the latest message of the mobile terminal, can be analyzed from the current message data packet, and then the system time of the vehicle-mounted terminal is synchronized according to the latest message time information. In the time synchronization scheme, the user does not need to participate manually, the vehicle-mounted terminal side can automatically realize system time setting based on the message data packet of the mobile terminal side, the automation degree of time synchronization is improved, the operation burden of the user is reduced, and the user experience is enhanced.

Description

Vehicle-mounted terminal and time synchronization method and storage medium thereof
Technical Field
The present invention relates to the field of vehicle-mounted electronics, and in particular, to a vehicle-mounted terminal, a time synchronization method thereof, and a storage medium.
Background
The vehicle-mounted terminal generally does not have a clock function, so that a user needs to manually time to finish the setting of the system time of the vehicle-mounted terminal in many cases. In order to reduce the burden of setting the system time of the vehicle-mounted terminal by a user, after the iphone (apple mobile phone) is in Bluetooth communication connection with the vehicle-mounted terminal, the vehicle-mounted terminal is supported to acquire the time by using an AT (Attention) command "AT+CCLK" through HFP (Hands Free Profile, bluetooth telephone protocol), and then the system time setting is automatically completed. However, the time synchronization scheme is only suitable for the case that the vehicle-mounted terminal paired terminal is an iphone, and when the vehicle-mounted terminal is in Bluetooth communication connection with the vehicle-mounted terminal and is a mobile terminal based on the android system, the vehicle-mounted terminal cannot automatically set the system time in the mode, and the system time is required to be manually adjusted by a user.
Therefore, it is now desirable to provide a new time synchronization scheme for a vehicle-mounted terminal, so as to reduce the burden of manual time synchronization for a user.
Disclosure of Invention
The vehicle-mounted terminal, the time synchronization method thereof and the storage medium provided by the embodiment of the invention mainly solve the technical problems that: the method and the device solve the problems that in the prior art, a user is required to manually set the system time of the vehicle-mounted terminal, and the operation burden of the user is large.
In order to solve the above technical problems, an embodiment of the present invention provides a time synchronization method for a vehicle-mounted terminal, which is characterized by comprising:
acquiring a current message data packet of the mobile terminal, wherein the mobile terminal is connected with the vehicle-mounted terminal through Bluetooth communication, and the message data packet comprises data generated by message interaction between the mobile terminal and other terminals;
analyzing the latest information time information from the current information data packet, wherein the latest information time information is the latest information time information in the mobile terminal;
and synchronizing the system time of the vehicle-mounted terminal according to the latest message time information.
Optionally, before obtaining the current message data packet of the mobile terminal, the method further includes:
after the Bluetooth communication connection is established between the vehicle-mounted terminal and the mobile terminal, establishing an application layer connection based on MAP (Message Access Profile, message access configuration file) protocol between the vehicle-mounted terminal and the mobile terminal;
the step of obtaining the current message data packet of the mobile terminal comprises the following steps: and acquiring the current message data packet of the mobile terminal through the MAP protocol.
Optionally, the message data packet includes at least one of a message and a message list of the mobile terminal, and the message includes at least one of a short message, a multimedia message, an instant messaging message and a mail; the obtaining the current message data packet of the mobile terminal through the MAP protocol comprises the following steps:
The current Message packet is acquired from the mobile terminal through at least one of Get Message (Message acquisition function), get Messages Listing (Message list acquisition function), get Conversation Listing (dialogue list acquisition function) of the MAP protocol.
Optionally, before obtaining the current message data packet of the mobile terminal, the method further includes:
and sending a message outgoing instruction to the mobile terminal, wherein the message outgoing instruction is used for instructing the mobile terminal to send the message.
Optionally, sending the message outgoing indication to the mobile terminal includes:
and sending a Message outgoing instruction to the mobile terminal through a Push Message (Message Push function) of the MAP protocol.
Optionally, after the current message data packet of the mobile terminal is acquired, before the latest message time information is parsed from the message data packet, the method further includes:
comparing the current message data packet with the latest historical message data packet, wherein the latest historical data packet is a message data packet which is acquired before the current message data packet and is closest to the current moment, and the time difference between two adjacent message data packet acquisition times is smaller than or equal to the allowable error of the system time of the vehicle-mounted terminal;
determining that the current message data packet is different from the latest historical message data packet.
Optionally, after comparing the current message data packet with the latest historical message data packet, if it is determined that the current message data packet is the same as the latest historical message data packet, the vehicle-mounted terminal time synchronization method further includes:
continuously acquiring a current message data packet of the mobile terminal;
and comparing the current message data packet with the latest historical message data packet until the current message data packet and the latest historical message data packet are different.
Optionally, before obtaining the current message data packet of the mobile terminal, the method further includes:
a new message notification request is sent to the mobile terminal, and the new message notification request is used for requesting the mobile terminal to notify the vehicle-mounted terminal when receiving the new message;
the step of obtaining the current message data packet of the mobile terminal comprises the following steps:
and when receiving a new message notification sent by the mobile terminal, acquiring a current message data packet of the mobile terminal.
The embodiment of the invention also provides a vehicle-mounted terminal, which comprises a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the steps of the vehicle terminal time synchronization method of any one of the above.
The embodiment of the invention also provides a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the vehicle-mounted terminal time synchronization method of any one of the above.
The beneficial effects of the invention are as follows:
according to the vehicle-mounted terminal, the time synchronization method and the storage medium thereof provided by the embodiment of the invention, the vehicle-mounted terminal side firstly acquires the current message data packet of the mobile terminal, wherein the message data packet comprises data generated by message interaction between the mobile terminal and other terminals, and the data generated by message receiving and transmitting contains time information when the mobile terminal interacts with other terminals, so that after the vehicle-mounted terminal side acquires the current message data packet of the mobile terminal, the latest message time information, namely the time information of the latest message of the mobile terminal, can be analyzed from the current message data packet, and then the system time of the vehicle-mounted terminal is synchronized according to the latest message time information. In the time synchronization scheme, the user does not need to participate manually, the vehicle-mounted terminal side can automatically realize system time setting based on the message data packet of the mobile terminal side, the automation degree of time synchronization is improved, the operation burden of the user is reduced, and the user experience is enhanced.
Additional features and corresponding advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a flowchart of a method for time synchronization of a vehicle-mounted terminal according to a first embodiment of the present invention;
fig. 2 is a message dynamic diagram of a mobile terminal according to a first embodiment of the present invention;
fig. 3 is a flowchart of a time synchronization method of a vehicle-mounted terminal provided in the second embodiment of the present invention;
fig. 4 is a flowchart of acquiring a current message packet of a mobile terminal according to a second embodiment of the present invention;
fig. 5 is another flowchart of a time synchronization method of a vehicle-mounted terminal provided in the second embodiment of the present invention;
fig. 6 is a flowchart of a time synchronization method of a vehicle-mounted terminal according to a second embodiment of the present invention;
FIG. 7 is a flowchart of a method for continuously improving the accuracy of system time after synchronizing the system time according to the second embodiment of the present invention;
fig. 8 is a flowchart of a time synchronization method of a vehicle-mounted terminal according to a third embodiment of the present invention;
FIG. 9 is a flowchart of updating system time according to a timer provided in a third embodiment of the present invention;
Fig. 10 is another flowchart of a time synchronization method of a vehicle-mounted terminal according to the third embodiment of the present invention;
fig. 11 is a schematic hardware structure of a vehicle-mounted terminal according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following detailed description of the embodiments of the present invention is given with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Embodiment one:
the vehicle-mounted terminal can be connected with mobile terminals such as a mobile phone, a PAD (Portable Android Device, a tablet personal computer), intelligent wearable equipment and the like through a Bluetooth communication technology. The vehicle-mounted terminal comprises a Bluetooth transmitter, and the Bluetooth transmitter can be connected with the vehicle-mounted radio through FM (Frequency Modulation) broadcasting technology or AUX (audio input interface) output technology, so that the media audio or telephone voice of the mobile terminal can be sent to the vehicle-mounted radio and played through a loudspeaker of the vehicle. For example, music on a mobile phone is transmitted to a vehicle-mounted loudspeaker through a Bluetooth transmitter to be played.
In the related art, except that the mobile terminal of the apple system supports the vehicle-mounted terminal to acquire the time information by adopting the HFP protocol in the Bluetooth protocol stack, the mobile terminals of other systems cannot help the vehicle-mounted terminal to realize automatic setting of the system time, so if the mobile terminal of the user is not an apple system, the user is required to manually set the system time of the vehicle-mounted terminal, which brings great inconvenience to the user and severely limits the user experience of the vehicle-mounted terminal.
In view of the foregoing, the present embodiment provides a vehicle-mounted terminal time synchronization method, where the vehicle-mounted terminal time synchronization method is implemented by a vehicle-mounted terminal, for example, may be implemented by the vehicle-mounted terminal itself or may be implemented by a device that is communicatively connected to the vehicle-mounted terminal. Next, please refer to an optional flowchart of the vehicle-mounted terminal time synchronization method shown in fig. 1:
s102: and acquiring the current message data packet of the mobile terminal.
The message data packet refers to data generated by message interaction between the mobile terminal and other terminals (mobile terminals such as mobile phones, wearable devices, PADs, PDAs, notebook computers and the like, and fixed terminals). The data generated by the message interaction includes the message itself transmitted between the mobile terminal and the other terminals: take a message as an example: the message data packet includes a "send message" (also referred to as a "sent message", "an" outgoing message ", etc.) generated by the mobile terminal sending a message to the other terminal, or includes a" receive message "(also referred to as a" received message "," a "received message") generated by the mobile terminal receiving a message from the other terminal, and may also include a "short message session" formed by the mobile terminal and the other terminal in a time sequence of the messages. Of course, the message data packet may also be a message list: continuing with the description of the short message as an example, the message list may include at least one of a "send short message list" and a "receive short message list".
In addition, the Message may include other types besides short messages, such as Instant Message (Instant Message), multimedia Message, email, etc.
It should be understood that the message data packet acquired by the vehicle terminal side should include the latest message data information of the mobile terminal at the acquisition time, for example, it is assumed that the message dynamics of the mobile terminal between times t0-t4 are as follows: referring to fig. 2, the mobile terminal receives a short message a at time t0, sends a short message b at time t2, and sends instant communication information c at time t 4. If the vehicle-mounted terminal side acquires a first message data packet from the mobile terminal at the time t1 and acquires a second message data packet from the mobile terminal at the time t3, the latest message data information in the first message data packet is the message data information related to the short message a, and the message data information related to the short message b and the instant communication information c does not exist; the second message data packet should contain the message data information related to the short message b, but also will not contain the message data information related to the instant messaging information c.
In this embodiment, the vehicle-mounted terminal side may acquire the current message data packet of the mobile terminal based on the bluetooth communication connection, so before the vehicle-mounted terminal side acquires the message data packet, the vehicle-mounted terminal and the mobile terminal need to establish the bluetooth communication connection. In some examples, the in-vehicle terminal side may obtain the current message data packet from the mobile terminal based on the MAP protocol in the bluetooth communication protocol stack. The MAP protocol is a Bluetooth application layer protocol, and is used for realizing control interaction of functions such as checking, informing, receiving, sending and the like of messages and message lists between Bluetooth slave equipment (e.g. a vehicle-mounted terminal) and Bluetooth master equipment (e.g. a mobile phone). Therefore, in these examples, the vehicle terminal also needs to establish an application layer connection based on the MAP protocol after establishing the bluetooth communication connection with the mobile terminal.
The following description will be made on the procedure of acquiring the current message data packet from the mobile terminal by the vehicle terminal side by taking the MAP protocol as an example:
as can be seen from the foregoing description, the Message data packet acquired by the vehicle-mounted terminal may include a Message, in this embodiment, the vehicle-mounted terminal may acquire the Message data packet including the Message from the mobile terminal side by using Get Message in the MAP protocol, and the Message data packet acquired by the vehicle-mounted terminal may include at least one of a transmitted Message and a received Message.
If the vehicle-mounted terminal side requests that the message data packet contains a message list or a dialogue list, the vehicle-mounted terminal can acquire the message data packet by using Get Messages Listing or Get Conversation Listing in the MAP protocol.
Of course, it will be understood by those skilled in the art that the vehicle terminal may also obtain the Message data packet through a combination of at least two of Get Message, get Messages Listing and Get Conversation Listing.
S104: and resolving the latest message time information from the current message data packet.
After the current message data packet of the mobile terminal is acquired by the vehicle-mounted terminal side, the current message data packet can be analyzed, so that the latest message time information carried in the message data packet is acquired. The latest message time information refers to the time information of the latest message, and is the corresponding time when the latest message is interacted. For example, if the latest message is a received message, the latest message time information refers to the time at which the message was received by the mobile terminal; if the latest message is an outgoing message, the latest message time information refers to the time when the mobile terminal sent the message. It should be noted that, the message data packet needs to carry the latest message time information, but in this embodiment, the latest message itself is not required to be included in the message data packet. For example, in some examples, the message data packet acquired by the vehicle-mounted terminal does not include the message itself, but includes the message list, and in this case, the vehicle-mounted terminal may also acquire the latest message time information for the current time from the message data packet, but does not acquire the latest message itself.
In an example, the message data packet acquired by the vehicle-mounted terminal side includes the following message data information:
Figure BDA0002901275830000061
Figure BDA0002901275830000071
wherein, "Date: fri.1aug2014 01:29:12+01:00" is time information carried in the message data information, and is characterized by time when the mobile terminal sends or receives the message. The message data packet may contain message data information corresponding to a plurality of messages, so that a message data packet may include a plurality of time information, and the vehicle-mounted terminal side may determine the latest message time information according to the sequence of the time information.
In other examples of the present embodiment, the message data packet acquired by the vehicle-mounted terminal includes a message list, and the message data information in the message data packet may be different from that in the foregoing examples. For example, in some examples, the vehicle terminal side may extract the message time information from the message data packet using "datetime= … …" as a keyword.
S106: and synchronizing the system time of the vehicle-mounted terminal according to the latest message time information.
After the latest information time information is obtained, the vehicle-mounted terminal side can synchronize the system time according to the latest information time information. For example, in some examples, the in-vehicle terminal directly adjusts its own system time to the time of the latest message. In still other examples, the vehicle-mounted terminal may set the system time according to the processing result after performing some processing on the latest message time, for example, in one example, the vehicle-mounted terminal may increase the latest message time by 1 minute, and then take the increased time result as the system time. Of course, this is merely an example of one type of processing, and is not the only processing.
According to the time synchronization method of the vehicle-mounted terminal, the message data packet carrying the message time information can be obtained from the mobile terminal side, then the setting of the system time is automatically completed according to the latest message time in the message data packet, manual participation of a user is not needed, the automation degree of time synchronization is improved, the operation burden of the user is reduced, and the user experience is improved.
Embodiment two:
in some examples of this embodiment, the vehicle terminal side may periodically or aperiodically acquire the message data packet from the mobile terminal, and update the system clock directly according to the message data packet as soon as the message data packet is acquired.
In still other examples, the on-board terminal side sets the system time only once according to the message data packet after the on-board terminal is initialized and before the next initialization, and updates the system time based on its own timer after the setting is completed.
It should be understood that the accuracy of the system time of the vehicle-mounted terminal after time synchronization is determined by the time difference between the time represented by the latest message time information carried in the message data packet and the current time: if the time difference between the latest information in the information data packet and the current moment is larger, that is, the latest information of the mobile terminal is changed for a long time, the system time of the vehicle-mounted terminal is seriously delayed after the system time of the vehicle-mounted terminal is updated according to the latest information in the information data packet, and the accuracy is poor. For example, if a last message dynamic of the mobile terminal occurs at 13:00, but the actual time for the vehicle-mounted terminal side to acquire the message data packet is 19:37, updating the system time according to the latest message time information in the message data packet will result in the vehicle-mounted terminal displaying 13:00 at 19:37. In contrast, if the time difference between the latest information time information in the information data packet acquired by the vehicle-mounted terminal side and the current moment is small, the vehicle-mounted terminal will display more accurate time after updating the system time according to the latest information time information, and provide reliable time information for the user.
Therefore, in some examples of this embodiment, the vehicle-mounted terminal side may ensure the real-time performance of the message data packet according to which the system time is synchronized as much as possible, that is, ensure that the latest message time information carried by the message data packet has higher real-time performance. In order to achieve the purpose, the vehicle-mounted terminal side should ensure that the message data packet is acquired in time when the message of the mobile terminal is newly dynamic, and in this regard, the present embodiment provides the following ways of the vehicle-mounted terminal time synchronization methods:
mode one:
the vehicle-mounted terminal side can subscribe the mobile terminal for message notification, so that when the mobile terminal has message dynamic state, the mobile terminal can actively notify the vehicle-mounted terminal side. For example, please refer to a flowchart of a time synchronization method of the vehicle-mounted terminal shown in fig. 3:
s302: a new message notification request is sent to the mobile terminal.
In this embodiment, the in-vehicle terminal side may send a new message notification request to the mobile terminal, where the new message notification request is used to request the mobile terminal to notify the in-vehicle terminal when receiving the new message. Alternatively, the new message notification may be implemented based on a new message notification mechanism (Notification Feature) in the MAP protocol, and after the vehicle-mounted terminal establishes an application layer connection based on the MAP protocol with the mobile terminal, the vehicle-mounted terminal may request the mobile terminal to enable Notification Feature, and the request may be used as a new message notification request sent by the vehicle-mounted terminal to the mobile terminal.
S304: it is monitored whether a new message notification is received.
If yes, the method proceeds to S306, otherwise, continues to monitor.
S306: and acquiring the current message data packet of the mobile terminal.
After the new message notification is monitored, it is indicated that the mobile terminal currently receives the new message, so if the current message data packet of the mobile terminal is immediately acquired at this time, the message data packet necessarily contains the time information of the message just received, and the receiving time of the message is very close to the current time, so that the system time synchronization is performed according to the message data packet, and the system time of the vehicle-mounted terminal can be guaranteed to be very close to the actual time. Therefore, when the vehicle-mounted terminal side monitors the new message notification, the current message data packet of the mobile terminal can be immediately acquired.
It may be understood that, in the above example, the new message notification request sent from the vehicle-mounted terminal side to the mobile terminal can only request the mobile terminal to notify the vehicle-mounted terminal side when receiving the new message, but in other examples of this embodiment, the new message notification request may cause the mobile terminal to notify the vehicle-mounted terminal side when there is a message sending operation by itself; or in still other examples, the mobile terminal may notify the in-vehicle terminal when both of its own presence message transmission and message reception according to the new message notification request.
S308: and analyzing the current message data packet to obtain the latest message time information, and setting the system time of the vehicle-mounted terminal according to the latest message time information.
Mode two:
the vehicle-mounted terminal side can control the mobile terminal to cause the mobile terminal side to generate new message dynamic, such as message sending dynamic and/or message receiving dynamic, please combine another flow chart of acquiring the message data packet by the vehicle-mounted terminal shown in fig. 4:
s402: and sending a message outgoing indication to the mobile terminal.
The vehicle terminal side may control the mobile terminal to send a message through a message outgoing indication, and the vehicle terminal may indicate a message receiving end and a message content of an outgoing message in the message outgoing indication, where the message outgoing indication is not limited to the two types of information, for example, in other examples, the message outgoing indication further includes message type information (for indicating that the outgoing message is a multimedia message, a short message, an IM or a mail). After receiving the message outgoing indication, the mobile terminal can send a message to a corresponding receiving end according to the message outgoing indication.
It should be appreciated that the message content may be empty because the in-vehicle terminal controls the mobile terminal to send messages only in order for the mobile terminal to present new message dynamics, rather than delivering information to the outside. Moreover, considering that if a message sent by the mobile terminal is actually received successfully by a certain ordinary user, the message is likely to confuse the ordinary user, in order to avoid this problem, in some examples of this embodiment, the vehicle-mounted terminal side may control the mobile terminal to send a message to a fixed service number, so that the message of the mobile terminal may be prevented from being received by the ordinary user. In still other examples, the vehicle terminal may control the mobile terminal to send a message that will not be sent successfully, e.g., the vehicle terminal indicates that the message receiving end indicated in the message outgoing indication is a null number, optionally the currently valid phone number is typically 11 digits, and if the number of the message receiving end indicated on the vehicle terminal side may not be 11 digits (and the number is not an operator service number, a bank service number, etc.), the mobile terminal will fail to perform the message sending operation according to the message outgoing indication. It will be appreciated that although the message transmission fails, the mobile terminal still generates the message data information of the failure message, so that the purpose of prompting the mobile terminal to generate new message dynamics can be achieved.
In some examples of this embodiment, the vehicle terminal side may send a Message outgoing indication to the mobile terminal through a Push Message of the MAP protocol, and use the Push Message to prompt the mobile terminal to send a Message.
S404: and acquiring the current message data packet of the mobile terminal.
After sending the Message outgoing instruction to the mobile terminal, the vehicle-mounted terminal can acquire the current Message data packet of the mobile terminal through at least one of the functions of Get Message, get Messages Listing, get Conversation Listing and the like.
It should be understood that after the mobile terminal performs the message transmission, the transmitted message necessarily changes, so the object to which the vehicle-mounted terminal side acquires the message data packet is the transmitted message of the mobile terminal.
It should be understood that the vehicle-mounted terminal side should acquire the message data packet as soon as possible after the new message dynamic state occurs in the mobile terminal, preferably acquire the message data packet immediately when the new message dynamic state occurs in the mobile terminal, so in one example of this embodiment, the vehicle-mounted terminal immediately acquires the message data packet after transmitting the message outgoing indication to the mobile terminal. Considering that the mobile terminal needs a certain time from receiving the message outgoing indication to completing the message transmission, the vehicle-mounted terminal can wait for a preset time to acquire the message data packet after sending the message outgoing indication. The preset time may be set by a programmer according to the processing time required for the mobile terminal to receive the message outgoing indication and complete the message transmission according to the message outgoing indication.
In still other examples, the vehicle terminal side sends a message to the fixed service number by sending a message to instruct the mobile terminal, and after the corresponding service number receives the message of the mobile terminal, a response message is fed back to the mobile terminal, so that the received message of the mobile terminal also changes. Therefore, in these examples, the object to which the in-vehicle terminal acquires the message packet may also be the received message of the mobile terminal. Of course, since there is a variation in both the transmitted and received messages of the mobile terminal in these examples, it is possible for at least one of them to be used when the in-vehicle terminal acquires the message data packet.
In some examples of this embodiment, in order to ensure timely acquisition of a message data packet when a new message dynamic occurs in the mobile terminal, the vehicle-mounted terminal side may periodically perform message data packet acquisition after sending an indication from the sending message until a message data packet that may embody the new message dynamic is acquired. Optionally, the vehicle-mounted terminal may acquire the message data packet once before sending the message outgoing indication, and take the message data packet as the reference message data packet, then acquire the message data packet after sending the message outgoing indication to the mobile terminal, and compare the currently acquired message data packet with the reference message data packet, if the two message data packets are different, it is indicated that the mobile terminal side has new message dynamics. If the two message data packets are the same, the mobile terminal side is not finished with the new message sending or the new message receiving. The vehicle-mounted terminal side can continue to acquire the message data packet from the mobile terminal according to the acquisition period until the acquired message data packet is different from the reference message data packet: when a message data packet different from the reference message data packet is acquired, the vehicle-mounted terminal side can set the system time according to the latest acquired message data packet.
Referring to fig. 5, a flowchart of time synchronization of the vehicle-mounted terminal based on the second mode is shown below:
s502: acquiring a current message data packet of the mobile terminal as a reference message data packet;
s504: sending a message outgoing indication to the mobile terminal;
s506: acquiring a current message data packet of a mobile terminal;
s508: judging whether the current message data packet is the same as the reference message data packet;
if yes, then S510 is executed, otherwise S512 is executed.
S510: judging whether a new acquisition period is reached;
if yes, executing S506, otherwise continuing executing S510;
s512: analyzing the current message data packet to obtain the latest message time information;
s514: and setting the system time of the vehicle-mounted terminal according to the latest message time information.
In the above example, the reference message data packet selected by the vehicle-mounted terminal side is fixed during the one-time system time setting, but in other examples of this embodiment, the reference message data packet of the vehicle-mounted terminal side may also be non-fixed, for example, in some examples, the vehicle-mounted terminal side always compares the current message data packet (i.e., the latest message data packet) with the latest history message data packet, i.e., the vehicle-mounted terminal side always selects the latest history message data packet as the reference message data packet. The latest historical message data packet is a message data packet which is acquired before the current message data packet and is nearest to the current moment. For example, assuming that the vehicle-mounted terminal side acquires a message data packet a at time t1, acquires a message data packet B at time t2, and acquires a message data packet C at time t3, for time t2, the latest message data packet is B, and the latest history message data packet is a; for time t3, the latest message packet is C and the latest history message packet is B. Therefore, at time t2, after the vehicle-mounted terminal side acquires the latest message data packet B, comparing B with a to determine whether the two are the same, if so, waiting for a period of time, and then acquiring the message data packet again, and if the two are different, directly performing system time synchronization according to the message data packet B by the vehicle-mounted terminal side.
In this embodiment, in order to improve the accuracy of time synchronization of the vehicle-mounted terminal system, when the acquisition period of the message data packet is set, the acquisition period is set to be less than or equal to the allowable error of the vehicle-mounted terminal system time, that is, the time difference of the acquisition time between the current message data packet and the latest historical message data packet is less than or equal to the allowable error of the vehicle-mounted terminal system time. For example, assuming that the allowable error of the system time of the vehicle-mounted terminal is 3 minutes, the acquisition period is less than or equal to 3 minutes, so that after the mobile terminal has new message dynamic, the vehicle-mounted terminal side can certainly acquire a message data packet showing the new message dynamic within 3 minutes, and naturally, the gap between the system time and the actual time set according to the latest message time information in the message data packet is not more than 3 minutes.
And continuing to assume that the allowable error of the system time of the vehicle-mounted terminal is 3 minutes, the vehicle-mounted terminal acquires a message data packet every two minutes from 13:26, meanwhile, assuming that a mobile phone in Bluetooth communication connection with the vehicle-mounted terminal sends a short message at 13:27, the vehicle-mounted terminal will contain the message data information of the outgoing short message in the message data packet acquired at 13:28, or the latest message time information carried in the message data packet acquired at 13:28 is 13:27 (it can be understood that the information such as the year, month and the day is omitted here), and when the vehicle-mounted terminal is in the actual time of 13:28, the system time of the vehicle-mounted terminal is set to be 13:27 according to the latest message time information, and the error of the system time and the actual time is 1 minute, which is completely within the allowable error range of the system time of the vehicle-mounted terminal. In an extreme example, the mobile terminal side has a new message dynamic state just after the acquisition of the message data packet n is completed, and obviously the new message dynamic state can only be reflected in the message data packet n+1, and the acquisition time of the message data packet n+1 and the acquisition time of the message data packet n are only two minutes different, so that the vehicle terminal side can certainly acquire the corresponding latest message time information within two minutes after the new message dynamic state occurs, thereby limiting the error of the vehicle terminal system time within two minutes.
Mode three:
the vehicle-mounted terminal can periodically acquire the message data packet of the mobile terminal, and compare the current message data packet with the latest historical message data packet after acquiring the current message data packet, so as to determine whether the message of the mobile terminal has new dynamic state. And the vehicle-mounted terminal only carries out system time updating according to the latest information data packet acquired currently after determining that the information of the mobile terminal is newly dynamic. The scheme is similar to the method for periodically acquiring the message data packet after the mobile terminal is controlled to actively send out the message in the second example, but in the third mode, the vehicle-mounted terminal passively waits for the new dynamic of the message of the mobile terminal, and the new dynamic is not actively promoted to occur. One scheme of system time synchronization based on mode three on the vehicle terminal side is described below with reference to the flowchart shown in fig. 6:
s602: acquiring a current message data packet of a mobile terminal;
s604: judging whether a latest historical message data packet exists or not;
if yes, then S606 is executed, otherwise S608 is executed.
S606: judging whether the current message data packet is the same as the latest historical message data packet;
If yes, then S608 is executed, otherwise S610 is executed.
S608: judging whether a new acquisition period is reached;
if yes, executing S602, otherwise continuing to execute S608;
s610: analyzing the current message data packet to obtain the latest message time information;
s612: and setting the system time of the vehicle-mounted terminal according to the latest message time information.
In the example shown in fig. 6, the vehicle-mounted terminal side uses the latest history message data packet as the reference message data packet, and in fact, in other examples of this embodiment, the vehicle-mounted terminal may also use the first message data packet acquired by itself as the reference message data packet, and these two schemes are substantially equivalent.
In addition, in the example corresponding to fig. 6, the time difference between two adjacent acquisition message data packets is also less than or equal to the error allowed by the system time of the vehicle-mounted terminal, that is, the acquisition period is less than or equal to the error allowed by the system time of the vehicle-mounted terminal.
In practical situations, the vehicle-mounted terminal side may support only any one of the three modes, or may support at least two of the three modes at the same time.
It can be understood that the vehicle-mounted terminal is provided with a timer, so that after the vehicle-mounted terminal side synchronizes the system time according to the latest message time information in the message data packet, the vehicle-mounted terminal can automatically update the system time by using the timer on the basis of the system time without using the message data packet of the mobile terminal side for time synchronization. Therefore, in some examples, after synchronizing the system time according to the latest message time information in the message data packet from the vehicle-mounted terminal side, the message data packet of the mobile terminal does not need to be acquired any more until the system time is reset (or initialized).
Of course, in some examples, the vehicle-mounted terminal side may also continuously acquire the message data packet of the mobile terminal while automatically updating the system clock based on the timer or the timer, and if the system time of the vehicle-mounted terminal is found to lag behind the latest message time in the message data packet, the system time may be adjusted again according to the latest message time information in the message data packet, so that the system time of the vehicle-mounted terminal approaches the actual time infinitely. Please refer to a flowchart shown in fig. 7:
s702: acquiring a current message data packet of a mobile terminal;
s704: analyzing the current message data packet to obtain the latest message time information;
s706: judging whether the system time of the vehicle-mounted terminal is behind the latest message time;
if yes, executing S708, otherwise, continuing to end the flow;
s708: and setting the system time of the vehicle-mounted terminal according to the latest message time information.
For example, assuming that the vehicle-mounted terminal starts from the actual time 13:26:30, the acquisition of the message data packet is performed every two minutes, and meanwhile, assuming that the mobile terminal sends a short message at the actual time 13:27:00 and receives a reply of the short message at the actual time 13:30:00, the latest message time information carried in the message data packet acquired by the vehicle-mounted terminal at the actual time 13:28:30 is 13:27:00, and then the vehicle-mounted terminal side sets the vehicle-mounted terminal system time to be 13:27:00, and at this time, the error between the vehicle-mounted terminal system time and the actual time is 1 minute 30 seconds. The latest message time information carried in the message data packet acquired by the vehicle-mounted terminal side at the actual time 13:30:30 is 13:30:00, but at this time, the system time of the vehicle-mounted terminal is 13:29:00, and the vehicle-mounted terminal side determines that the own system time 13:29:00 lags behind the latest message time 13:30:00 through judgment, so that the own system time is updated to 13:30:00, and in this case, the error between the system time and the actual time of the vehicle-mounted terminal is reduced by 1 minute, and becomes 30 seconds. It can be understood that in actual situations, the latest message time information acquired by the vehicle-mounted terminal side generally includes information such as year, month, day and the like, so that the vehicle-mounted terminal side can conveniently determine the sequence of two times of the cross day.
According to the time synchronization method of the vehicle-mounted terminal, the timeliness of the message data packet for updating the system time can be guaranteed through at least one of a new message notification mechanism, active control of the mobile terminal for message sending, message data packet acquisition according to the time interval smaller than or equal to the allowable error, and the like, so that the accuracy of the time synchronization of the vehicle-mounted terminal system is improved.
And after the system time is synchronized once according to the latest information of the message time, the message data packet can be continuously acquired, so that the accuracy degree of the system time is improved continuously according to the latest information of the message time in the message data packet.
Embodiment III:
in order to make the advantages and details of the method for synchronizing the time of the vehicle-mounted terminal in the foregoing embodiment more clear for those skilled in the art, the foregoing solution will be further described in this embodiment in conjunction with examples, where in this embodiment, system time synchronization is implemented by interaction between the vehicle-mounted terminal and bluetooth of a mobile phone, where the vehicle-mounted terminal is used as a bluetooth slave device, and the mobile phone is used as a bluetooth master device. In the definition of the MAP protocol, the bluetooth master is also defined as MSE (Message Server Equipment, message server device) and the bluetooth slave is also defined as MCE (Message Client Equipment, message client device). The MCE issues a request, the MSE responds to the request, and the message data packet that the MSE interacts with the MCE contains message time information.
Example 1:
this example mainly describes a process of system time synchronization in a situation where the vehicle-mounted terminal passively waits for a mobile phone side message, please refer to a flowchart of a vehicle-mounted terminal time synchronization method shown in fig. 8:
s802: and after the vehicle-mounted terminal is powered on, the storage resources are allocated.
The storage resource here includes at least one of a memory unit (RAM) and a storage unit (NOR FLASH).
The method comprises the steps that when the vehicle-mounted terminal is powered on and initialized, a memory unit or a storage unit is emptied, then the vehicle-mounted terminal designates/allocates the memory unit or the storage unit, and a part of storage resources are used for storing the latest message time information; and a portion for storing at least two message data packets.
S804: and the vehicle-mounted terminal establishes Bluetooth communication connection with the mobile phone and establishes MAP-based application layer connection.
The vehicle-mounted terminal can initialize Bluetooth connection parameters, set application MAP service parameters and wait for a mobile phone Bluetooth connection request. And after receiving the Bluetooth connection request from the mobile phone, receiving the Bluetooth connection request, and establishing connection between a Bluetooth physical layer and a link layer with the mobile phone. After the bluetooth physical layer and link layer connections are established, MAP defined application layer connections are established.
S806: the vehicle-mounted terminal applies MAP service to the mobile phone to acquire the authority for operating the mobile phone message.
S808: and judging whether to obtain the authorization of operating the mobile phone message.
If yes, then S812 is performed, otherwise S810 is performed.
S810: waiting for a first preset time period.
In this embodiment, the first preset duration may be set according to actual requirements, for example, if the user expects the vehicle-mounted terminal to complete the system time synchronization as soon as possible after power-up, the first preset duration will be set to be relatively short, so that the vehicle-mounted terminal will relatively frequently apply for authorization to operate the mobile phone message to the mobile phone. However, if the user considers that there are many other more important matters to be processed after the vehicle-mounted terminal is started, the importance of synchronous update of the system time is not high, and the first preset duration can be set to be shorter. In still other examples, the first preset time period may be set by a designer of the in-vehicle terminal according to a processing capability of the in-vehicle terminal, or the like.
S812: the vehicle-mounted terminal acquires the current message data packet of the mobile phone.
If the vehicle-mounted terminal determines that the vehicle-mounted terminal obtains the authorization of operating the mobile phone message, a received or transmitted message list of the mobile phone can be read based on the MAP protocol and cached in a pre-allocated memory unit or a storage unit; or the vehicle-mounted terminal can also select to read the latest received message or the latest outgoing message on the mobile phone and cache the latest received message or the latest outgoing message in a pre-allocated memory unit or a storage unit.
S814: and starting a timer with the timing duration being the second preset duration.
The length of the second preset duration determines the time interval of the vehicle-mounted terminal for obtaining the message data packet from the mobile phone side twice, and also determines the accuracy of the system time after the vehicle-mounted terminal synchronizes the system time according to the message data packet. In this embodiment, the second preset duration is less than or equal to an error allowed by the system time of the vehicle-mounted terminal.
S816: and when the timer is finished, the vehicle-mounted terminal acquires the current message data packet of the mobile phone again, and compares whether the current message data packet is identical with the latest historical message data packet.
If so, S814 is performed, otherwise S818 is performed.
S818: the vehicle-mounted terminal obtains the latest information time information from the current information data packet, and synchronizes the system time according to the latest information time information.
In addition, in this embodiment, after the vehicle terminal is powered on and initialized, it is also monitored whether the vehicle terminal can update the system time directly according to the timer interrupt mechanism, please refer to the flow chart shown in fig. 9:
s902: and after the vehicle-mounted terminal is powered on, the storage resources are allocated.
The memory resources also include at least one of memory cells and storage cells. And a part of storage resources are allocated to the power-on initialization of the vehicle-mounted terminal for realizing the caching of the system time of the vehicle-mounted terminal. It can be understood that S902 and S802 may be performed substantially together, that is, after the vehicle-mounted terminal is powered on, the storage resource is allocated while the storage of the system time, the storage of the message data packet, and the storage of the latest message time information are simultaneously considered.
S904: and initializing the system time by the vehicle-mounted terminal, setting the time initialization mark as '1', and starting a timing interruption mechanism.
After the vehicle-mounted terminal is initialized, the initialized system time is displayed as 00:00, and in addition, the vehicle-mounted terminal also sets a time initialization mark as 1, wherein the time initialization mark is used for representing whether the vehicle-mounted terminal has performed system time synchronization according to a message data packet at a mobile phone side: when the time initialization mark is 1, the vehicle-mounted terminal is characterized in that the system time synchronization is not realized according to the message data packet at the mobile phone side, and the system time is still the initialized time, so that the vehicle-mounted terminal does not need to automatically update the system time according to a timer in the case; when the time initialization mark is 0, the vehicle-mounted terminal is characterized in that the system time is synchronized according to the message data packet at the mobile phone side, and the system time at the moment is not the initialized time any more, so that the vehicle-mounted terminal can automatically update the system time according to the timer. Therefore, the time initialization flag is actually a flag indicating whether the in-vehicle terminal can automatically update the system time according to the timer.
On the other hand, the vehicle-mounted terminal also starts a system timer, the timer realizes that a fixed timer interrupt mechanism is adopted, when the timer interrupt occurs, if the vehicle-mounted terminal finds that the time initialization mark is 0, the system time can be increased by one time by the timed time, the new system time is cached in a pre-allocated storage resource, and meanwhile, a control screen displays the time according to the system time. If the vehicle-mounted terminal determines that the time initialization mark is '1' when the timer interrupt occurs, the vehicle-mounted terminal does not need to process.
S906: when the timing interrupt occurs, whether the time initialization mark is 0 is judged.
After the vehicle-mounted terminal synchronizes the system time according to the latest message time information of the message data packet, that is, after S818 in fig. 8 is executed, the vehicle-mounted terminal may set the time initialization flag to "0", and at the same time, the vehicle-mounted terminal may store the synchronized system time into the pre-allocated storage resource.
If yes, S908 is executed, otherwise S906 is continued.
S908: and adding the system time stored in the storage resource by one time of timing time to realize the updating of the system time.
Example 2:
this example mainly describes a process in which the vehicle-mounted terminal actively causes the system time synchronization of the mobile phone side message under the new dynamic situation, please refer to a flowchart of a vehicle-mounted terminal time synchronization method shown in fig. 10:
S1002: and after the vehicle-mounted terminal is powered on, the storage resources are allocated.
The storage resources comprise memory units and/or storage units, the memory units or the storage units can be emptied when the vehicle-mounted terminal is powered on and initialized, then the vehicle-mounted terminal designates/allocates the memory units or the storage units, and a part of the storage resources are used for storing the latest message time information; and a portion for storing at least two message data packets.
S1004: and the vehicle-mounted terminal establishes Bluetooth communication connection with the mobile phone and establishes MAP-based application layer connection.
The vehicle-mounted terminal can initialize Bluetooth connection parameters, set application MAP service parameters and wait for a mobile phone Bluetooth connection request. And after receiving the Bluetooth connection request from the mobile phone, receiving the Bluetooth connection request, and establishing connection between a Bluetooth physical layer and a link layer with the mobile phone. After the bluetooth physical layer and link layer connections are established, MAP defined application layer connections are established.
S1006: the vehicle-mounted terminal applies MAP service to the mobile phone to acquire the authority for operating the mobile phone message.
S1008: and judging whether to obtain the authorization of operating the mobile phone message.
If yes, then S1012 is executed, otherwise S1010 is executed.
S1010: waiting for a first preset time period.
In this embodiment, the first preset duration may be set according to actual requirements, for example, if the user expects the vehicle-mounted terminal to complete the system time synchronization as soon as possible after power-up, the first preset duration will be set to be relatively short, so that the vehicle-mounted terminal will relatively frequently apply for authorization to operate the mobile phone message to the mobile phone. However, if the user considers that there are many other more important matters to be processed after the vehicle-mounted terminal is started, the importance of synchronous update of the system time is not high, and the first preset duration can be set to be shorter. In still other examples, the first preset time period may be set by a designer of the in-vehicle terminal according to a processing capability of the in-vehicle terminal, or the like.
S1012: the vehicle-mounted terminal acquires the current message data packet of the mobile phone.
If the vehicle-mounted terminal determines that the vehicle-mounted terminal obtains the authorization of operating the mobile phone message, a received or transmitted message list of the mobile phone can be read based on the MAP protocol and cached in a pre-allocated memory unit or a storage unit; or the vehicle-mounted terminal can also select to read the latest received message or the latest outgoing message on the mobile phone and cache the latest received message or the latest outgoing message in a pre-allocated memory unit or a storage unit.
S1014: and controlling the mobile phone to send out a Message through the MAP service Push Message.
S1016: and starting a timer with the timing duration being the second preset duration.
The length of the second preset duration determines the time interval of the vehicle-mounted terminal for obtaining the message data packet from the mobile phone side twice, and also determines the accuracy of the system time after the vehicle-mounted terminal synchronizes the system time according to the message data packet. In this embodiment, the second preset duration is less than or equal to an error allowed by the system time of the vehicle-mounted terminal.
S1018: and when the timer is finished, the vehicle-mounted terminal acquires the current message data packet of the mobile phone again, and compares whether the current message data packet is identical with the latest historical message data packet.
If so, then S1014 is performed, otherwise S1020 is performed.
S1020: the vehicle-mounted terminal obtains the latest information time information from the current information data packet, and synchronizes the system time according to the latest information time information.
In addition, in this embodiment, after the vehicle-mounted terminal is powered on and initialized, it may also be monitored whether the vehicle-mounted terminal can directly update the system time according to the timer interrupt mechanism, and after it is determined that the system time is synchronized based on the message data packet, the vehicle-mounted terminal updates the system time according to the timer interrupt mechanism, and specifically please refer to the description of fig. 9, which is not repeated herein.
In the time synchronization method of the vehicle-mounted terminal provided by the embodiment, the vehicle-mounted terminal can acquire the mobile phone time from the mobile phone side and display the mobile phone time to the user, so that the driver can know the current accurate time.
Embodiment four:
the present embodiments provide a storage medium including volatile or nonvolatile, removable or non-removable media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, computer program modules or other data. Storage media includes, but is not limited to, RAM (Random Access Memory ), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory, charged erasable programmable Read-Only Memory), flash Memory or other Memory technology, CD-ROM (Compact Disc Read-Only Memory), digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
The storage medium may store one or more computer programs that may be read, compiled and executed by one or more processors, and in this embodiment, the storage medium may store a vehicle-mounted terminal time synchronization program, where the vehicle-mounted terminal time synchronization program may be used by the one or more processors to execute a procedure for implementing any of the vehicle-mounted terminal time synchronization methods described in the foregoing embodiments.
The present embodiment also provides a computer program product comprising computer readable means having stored thereon a computer program as shown above. The computer readable means in this embodiment may comprise a computer readable storage medium as shown above. For example, the computer program product includes a vehicle-mounted terminal, as shown in fig. 11: the in-vehicle terminal 11 includes a processor 111, a memory 112, and a communication bus 113 for connecting the processor 111 and the memory 112, wherein the memory 112 may be a storage medium storing the aforementioned in-vehicle terminal time synchronization program. The processor 111 may read the time synchronization program of the vehicle-mounted terminal, compile and execute the flow of implementing the time synchronization method of the vehicle-mounted terminal in the foregoing embodiment:
the processor 111 first obtains the current message data packet of the mobile terminal, where the mobile terminal is connected to the vehicle terminal through bluetooth communication, and the message data packet includes data generated by the message interaction between the mobile terminal and other terminals. The processor 111 then parses the latest message time information from the current message data packet and synchronizes the system time of the vehicle-mounted terminal according to the latest message time information. The latest information time information is the latest information time information in the mobile terminal.
In some examples of this embodiment, before the processor 111 obtains the current message data packet of the mobile terminal, after the bluetooth communication connection is established between the vehicle-mounted terminal and the mobile terminal, an application layer connection based on the MAP protocol is also established between the vehicle-mounted terminal and the mobile terminal. Then, when the processor 111 acquires the current message packet of the mobile terminal, the current message packet may be acquired from the mobile terminal through the MAP protocol.
Optionally, the message data packet includes at least one of a message and a message list of the mobile terminal, and the message includes at least one of a short message, a multimedia message, an instant messaging message and a mail; when the processor 111 acquires the current Message packet from the mobile terminal through the MAP protocol, the current Message packet may be acquired from the mobile terminal through at least one of Get messages, get Messages Listing, get Conversation Listing of the MAP protocol.
In some examples, the processor 111 may also send a message outgoing indication to the mobile terminal before acquiring the current message data packet of the mobile terminal, where the message outgoing indication is used to instruct the mobile terminal to send a message.
Alternatively, the processor 111 may send a Message outgoing indication to the mobile terminal through a Push Message of the MAP protocol.
After acquiring the current message data packet of the mobile terminal and before parsing the latest message time information from the message data packet, the processor 111 may further compare the current message data packet with the latest history message data packet, and determine that the current message data packet and the latest history message data packet have a difference. The latest historical data packet is a message data packet which is acquired before the current message data packet and is closest to the current moment, and the time difference between two adjacent message data packets is smaller than or equal to the allowable error of the vehicle-mounted terminal system time.
After comparing the current message data packet with the latest history message data packet, if the processor 111 determines that the current message data packet is the same as the latest history message data packet, it may continue to obtain the current message data packet of the mobile terminal by the processor 111 and continue to compare the current message data packet with the latest history message data packet until the current message data packet is different from the latest history message data packet.
Alternatively, before acquiring the current message data packet of the mobile terminal, the processor 111 may also send a new message notification request to the mobile terminal, where the new message notification request is used to request the mobile terminal to notify the vehicle-mounted terminal when receiving the new message. Subsequently, the processor 111 acquires the current message packet of the mobile terminal upon receiving a new message notification sent by the mobile terminal.
In this embodiment, for specific details of the method for implementing the time synchronization of the vehicle-mounted terminal system by using the vehicle-mounted terminal, please refer to the description of the foregoing embodiment, and details are not repeated here.
It will be appreciated that the in-vehicle terminal 11 may include, in addition to the processor 111, the memory 112, etc., other devices, such as at least one of a user input unit, a WiFi module, a sensor, a display screen, etc.
According to the vehicle-mounted terminal and the storage medium, when the system time of the vehicle-mounted terminal is synchronized, the user does not need to manually participate, the system time setting can be automatically realized based on the message data packet of the mobile terminal side, the automation degree of time synchronization is improved, the operation burden of the user is reduced, and the user experience is improved.
It will be apparent to one skilled in the art that all or some of the steps of the methods, systems, functional modules/units in the apparatus disclosed above may be implemented as software (which may be implemented in program code executable by a computing apparatus), firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media), for execution by a computing device, and in some cases, the steps shown or described may be performed in a different order than that described herein. The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Therefore, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a further detailed description of embodiments of the invention in connection with the specific embodiments, and it is not intended that the invention be limited to the specific embodiments described. It will be apparent to those skilled in the art that several simple deductions or substitutions may be made without departing from the spirit of the invention, and these should be considered to be within the scope of the invention.

Claims (10)

1. The time synchronization method for the vehicle-mounted terminal is characterized by comprising the following steps of:
acquiring a current message data packet of a mobile terminal, wherein the mobile terminal is connected with a vehicle-mounted terminal through Bluetooth communication, the message data packet comprises data generated by message interaction between the mobile terminal and other terminals, and the message data packet carries latest message time information;
analyzing latest information time information from the current information data packet, wherein the latest information time information is the time information of the latest information received or sent by the mobile terminal, and if the latest information is the information received by the mobile terminal, the latest information time information refers to the time when the information is received by the mobile terminal; if the latest information is the information sent by the mobile terminal, the latest information time information refers to the time of the mobile terminal sending the information;
And synchronizing the system time of the vehicle-mounted terminal according to the latest message time information.
2. The method for time synchronization of an in-vehicle terminal according to claim 1, wherein before the step of obtaining the current message data packet of the mobile terminal, further comprises:
after the Bluetooth communication connection is established between the vehicle-mounted terminal and the mobile terminal, establishing application layer connection based on a message access profile MAP protocol between the vehicle-mounted terminal and the mobile terminal;
the step of obtaining the current message data packet of the mobile terminal comprises the following steps:
and acquiring the current message data packet of the mobile terminal through the MAP protocol.
3. The method for time synchronization of a vehicle-mounted terminal according to claim 2, wherein the message data packet includes at least one of a message and a message list of the mobile terminal, and the message includes at least one of a short message, a multimedia message, an instant messaging message, and a mail; the obtaining the current message data packet of the mobile terminal through the MAP protocol comprises the following steps:
the current Message data packet is acquired from the mobile terminal through at least one of a Message acquisition function Get Message, a Message list acquisition function Get Messages Listing, and a dialogue list acquisition function Get Conversation Listing of the MAP protocol.
4. The method for time synchronization of an in-vehicle terminal according to claim 1, wherein before the step of obtaining the current message data packet of the mobile terminal, further comprises:
and sending a message outgoing instruction to the mobile terminal, wherein the message outgoing instruction is used for instructing the mobile terminal to send the message.
5. The method for time synchronization of an in-vehicle terminal according to claim 4, wherein said sending a message outgoing indication to the mobile terminal comprises:
and sending a Message outgoing instruction to the mobile terminal through a Message pushing function Push Message of a Message access configuration file MAP protocol.
6. The method for time synchronization of an in-vehicle terminal according to any one of claims 1 to 5, wherein after the current message data packet of the mobile terminal is obtained, before the latest message time information is parsed from the message data packet, the method further comprises:
comparing the current message data packet with a latest historical message data packet, wherein the latest historical message data packet is a message data packet which is acquired before the current message data packet and is closest to the current moment, and the time difference of acquiring the message data packet in two adjacent times is smaller than or equal to the allowable error of the system time of the vehicle-mounted terminal;
And determining that the current message data packet is different from the latest historical message data packet.
7. The method for time synchronization of an in-vehicle terminal according to claim 6, wherein after comparing the current message data packet with the latest history message data packet, if it is determined that the current message data packet is identical to the latest history message data packet, the method for time synchronization of an in-vehicle terminal further comprises:
continuously acquiring a current message data packet of the mobile terminal;
and comparing the current message data packet with the latest historical message data packet until the current message data packet and the latest historical message data packet are different.
8. The method for time synchronization of an in-vehicle terminal according to any one of claims 1 to 5, wherein before the step of obtaining the current message data packet of the mobile terminal, the method further comprises:
a new message notification request is sent to the mobile terminal, and the new message notification request is used for requesting the mobile terminal to notify the vehicle-mounted terminal when receiving a new message;
the step of obtaining the current message data packet of the mobile terminal comprises the following steps:
and when receiving a new message notification sent by the mobile terminal, acquiring a current message data packet of the mobile terminal.
9. The vehicle-mounted terminal is characterized by comprising a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in a memory to implement the steps of the in-vehicle terminal time synchronization method according to any one of claims 1 to 8.
10. A storage medium storing one or more programs executable by one or more processors to implement the steps of the in-vehicle terminal time synchronization method of any one of claims 1 to 8.
CN202110057905.2A 2021-01-04 2021-01-15 Vehicle-mounted terminal and time synchronization method and storage medium thereof Active CN112911543B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110004246 2021-01-04
CN2021100042466 2021-01-04

Publications (2)

Publication Number Publication Date
CN112911543A CN112911543A (en) 2021-06-04
CN112911543B true CN112911543B (en) 2023-04-25

Family

ID=76113914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110057905.2A Active CN112911543B (en) 2021-01-04 2021-01-15 Vehicle-mounted terminal and time synchronization method and storage medium thereof

Country Status (1)

Country Link
CN (1) CN112911543B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115673B (en) * 2021-11-25 2023-10-27 海信集团控股股份有限公司 Control method of vehicle-mounted screen
CN117527123A (en) * 2023-12-07 2024-02-06 小米汽车科技有限公司 Time synchronization method, device, vehicle and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495263A (en) * 2018-11-16 2019-03-19 上海银基信息安全技术股份有限公司 Clock synchronizing method, system, device, intelligent terminal, vehicle termination and medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729127A (en) * 2008-10-17 2010-06-09 中兴通讯股份有限公司 Time synchronization node and method thereof
AT518725B1 (en) * 2016-06-13 2018-02-15 Zkw Group Gmbh Device and method for generating a light distribution with a vehicle headlight

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495263A (en) * 2018-11-16 2019-03-19 上海银基信息安全技术股份有限公司 Clock synchronizing method, system, device, intelligent terminal, vehicle termination and medium

Also Published As

Publication number Publication date
CN112911543A (en) 2021-06-04

Similar Documents

Publication Publication Date Title
CN112911543B (en) Vehicle-mounted terminal and time synchronization method and storage medium thereof
CN110166791B (en) Connection establishing method, device, equipment and storage medium
CN112312060B (en) Screen sharing method and device and electronic equipment
CN111246228B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN111163329B (en) Live broadcast room gift list configuration method, device, medium and electronic equipment
CN111432001B (en) Method, apparatus, electronic device and computer readable medium for jumping scenes
EP4109892A1 (en) Interaction method and apparatus, and electronic device
CN110336592B (en) Data transmission method suitable for Bluetooth card reader, electronic equipment and storage medium
CN114390360B (en) Live voting method and device, electronic equipment and storage medium
CN114527925B (en) Conversation method, conversation device, electronic equipment and storage medium
CN110865846A (en) Application management method, device, terminal, system and storage medium
US20140068020A1 (en) Method and apparatus for transmitting and/or receiving data
EP2549724A1 (en) Apparatus and Method for Providing Authorization Based Enhanced Address Book Service in Mobile Communication System
CN115587860A (en) Service processing method, device, storage medium and electronic equipment
CN111212296B (en) Live broadcast room gift list configuration method, device, medium and electronic equipment
CN113507750A (en) Terminal control method and device, terminal and storage medium
CN112068688A (en) Power saving method and device, electronic equipment and computer readable medium
CN111444457A (en) Data distribution method and device, storage medium and electronic equipment
CN111142740A (en) Data updating method, device and storage medium
CN111246229B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
CN113518314B (en) Quick connection method for low-power-consumption Bluetooth and low-power-consumption Bluetooth communication system
US20170134486A1 (en) Method and device for information synchronization
CN112351202B (en) Multimedia data interaction method, system, device, electronic equipment and storage medium
CN115695358A (en) Message pushing method and device, storage medium and electronic equipment

Legal Events

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