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

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

Info

Publication number
CN112911543A
CN112911543A CN202110057905.2A CN202110057905A CN112911543A CN 112911543 A CN112911543 A CN 112911543A CN 202110057905 A CN202110057905 A CN 202110057905A CN 112911543 A CN112911543 A CN 112911543A
Authority
CN
China
Prior art keywords
message
data packet
vehicle
message data
mobile terminal
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.)
Granted
Application number
CN202110057905.2A
Other languages
Chinese (zh)
Other versions
CN112911543B (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 the vehicle-mounted terminal side firstly acquires a current message data packet of the mobile terminal, the message data packet comprises data generated by message interaction between the mobile terminal and other terminals, and because the data generated by message sending and receiving comprises time information when the mobile terminal performs the message interaction with other terminals, 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 after the vehicle-mounted terminal side acquires the current message data packet of the mobile terminal, 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 vehicle-mounted terminal can automatically realize system time setting based on the message data packet of the mobile terminal side without manual participation of a user, so that 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, time synchronization method thereof and storage medium
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 the time setting of the vehicle-mounted terminal system can be finished only by manually timing by a user under many conditions. In order to reduce the burden of a user for setting the system time of the vehicle-mounted terminal, 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 through HFP (Hands Free Profile, Bluetooth telephone protocol) and an AT (Attention) command of 'AT + CCLK', and then the system time setting is automatically completed. However, this time synchronization scheme is only applicable to the case where the paired terminal of the in-vehicle terminal is an iphone, and when the mobile terminal based on the android system is connected to the in-vehicle terminal in bluetooth communication, the in-vehicle terminal cannot automatically set the system time in this way, or needs manual adjustment by the user.
Therefore, it is desirable to provide a new time synchronization scheme for a vehicle-mounted terminal to reduce the burden of manual time synchronization for a user.
Disclosure of Invention
The embodiment of the invention provides a vehicle-mounted terminal, a time synchronization method thereof and a storage medium, and mainly solves the technical problems that: the problem of need the manual system time to vehicle-mounted terminal of user to set up among the prior art, user's operation burden is big is solved.
In order to solve the technical problem, an embodiment of the present invention provides a time synchronization method for a vehicle-mounted terminal, including:
acquiring a current message data packet of the mobile terminal, wherein the mobile terminal is in communication connection with the vehicle-mounted terminal through Bluetooth, and the message data packet comprises data generated by message interaction between the mobile terminal and other terminals;
analyzing latest message time information from a current message data packet, wherein the latest message time information is the time information of the latest message in the mobile terminal;
and synchronizing the system time of the vehicle-mounted terminal according to the latest message time information.
Optionally, before acquiring the current message data packet of the mobile terminal, the method further includes:
after the vehicle-mounted terminal and the mobile terminal establish Bluetooth communication connection, establishing application layer connection based on an MAP (Message Access Profile) protocol between the vehicle-mounted terminal and the mobile terminal;
the step of acquiring 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 of the mobile terminal and a message list, and the message includes at least one of a short message, a multimedia message, instant messaging information, and an email; the step of acquiring 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 Get Message (Message acquiring function), Get Messages Listing (Message list acquiring function) and Get conversion Listing (Conversation list acquiring function) of the MAP protocol.
Optionally, before acquiring 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, the 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 pushing function) of the MAP protocol.
Optionally, after acquiring the current message data packet of the mobile terminal, before parsing the latest message time information 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 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 between two adjacent acquired message data packets is less than or equal to the error allowed by the time of the vehicle-mounted terminal system;
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 time synchronization method for the vehicle-mounted terminal further includes:
continuously acquiring a current message data packet of the mobile terminal;
and continuing to compare the current message data packet with the latest historical message data packet until the current message data packet is different from the latest historical message data packet.
Optionally, before acquiring the current message data packet of the mobile terminal, the method further includes:
sending a new message notification request to the mobile terminal, wherein 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 acquiring 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 used for executing one or more programs stored in the memory so as to realize the steps of the vehicle-mounted terminal time synchronization method.
The embodiment of the invention also provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to realize the steps of the vehicle-mounted terminal time synchronization method.
The invention has the beneficial effects that:
according to the vehicle-mounted terminal, the time synchronization method and the storage medium thereof, the vehicle-mounted terminal side firstly obtains the current message data packet of the mobile terminal, the message data packet comprises data generated by message interaction between the mobile terminal and other terminals, and because the data generated by message sending and receiving comprises time information when the mobile terminal and other terminals carry out message interaction, after the vehicle-mounted terminal side obtains the current message data packet of the mobile terminal, 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 system time of the vehicle-mounted terminal is synchronized according to the latest message time information. In the time synchronization scheme, the vehicle-mounted terminal can automatically realize system time setting based on the message data packet of the mobile terminal side without manual participation of a user, so that 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 part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a flowchart of a time synchronization method for a vehicle-mounted terminal according to a first embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a message dynamic state of a mobile terminal according to a first embodiment of the present invention;
fig. 3 is a flowchart of a time synchronization method for a vehicle-mounted terminal according to a second embodiment of the present invention;
fig. 4 is a flowchart of acquiring a current message data packet of a mobile terminal according to a second embodiment of the present invention;
fig. 5 is another flowchart of a time synchronization method for a vehicle-mounted terminal according to a second embodiment of the present invention;
fig. 6 is another flowchart of a time synchronization method for a vehicle-mounted terminal according to a second embodiment of the present invention;
fig. 7 is a flowchart illustrating the process of continuing to improve the accuracy of the 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 for 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 according to a third embodiment of the present invention;
fig. 10 is another flowchart of a time synchronization method for a vehicle-mounted terminal according to a third embodiment of the present invention;
fig. 11 is a schematic diagram of a hardware structure of the vehicle-mounted terminal according to the third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The first embodiment is as follows:
the vehicle-mounted terminal can be connected with mobile terminals such as a mobile phone, a PAD (Portable Android Device) and an intelligent wearable Device through a Bluetooth communication technology. The vehicle-mounted terminal comprises a bluetooth transmitter, and the bluetooth transmitter can be connected with a vehicle-mounted radio through an FM (Frequency Modulation) broadcasting technology or an AUX (audio input interface) output technology, so that media audio or telephone voice of the mobile terminal can be transmitted to the vehicle-mounted radio and played through a loudspeaker of a car. 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 using the HFP protocol in the bluetooth protocol stack, the mobile terminals of other systems cannot help the vehicle-mounted terminal to realize the automatic setting of the system time, so that if the mobile terminal of the user is not the apple system, the user is still 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 above problem, the present embodiment provides a vehicle-mounted terminal time synchronization method, which is implemented by a vehicle-mounted terminal side, for example, the vehicle-mounted terminal may execute the method, or the vehicle-mounted terminal may execute the method due to a device to which the vehicle-mounted terminal is connected. Please refer to an optional flowchart of the time synchronization method of the vehicle-mounted terminal shown in fig. 1:
s102: and acquiring a 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 message interaction comprises the messages transmitted between the mobile terminal and other terminals: take the message as an example: the message data packet includes a "sending short message" (also referred to as a "sent short message" or a "sent short message") generated by the mobile terminal sending a short message to other terminals, or includes a "receiving short message" (also referred to as a "received short message" or a "received short message") generated by the mobile terminal receiving a short message from other terminals, and in addition, may also include a "short message session" formed by short messages between the mobile terminal and another terminal in a time sequence. Of course, the message data packet may also be a message list: continuing with 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, such as Instant messaging (Instant Message), multimedia Message, mail, and the like, in addition to the short Message.
It should be understood that the message data packet acquired by the vehicle-mounted terminal side should contain the latest message data information of the mobile terminal at the acquisition time, for example, assuming that the message dynamics of the mobile terminal between the times t0-t4 are as follows: referring to fig. 2, the mobile terminal receives the short message a at time t0, sends the short message b at time t2, and sends the instant messaging message c at time t 4. If the vehicle-mounted terminal side acquires the first message data packet from the mobile terminal at the time t1 and acquires the 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 no message data information related to the short message b and the instant messaging information c exists; the second message data packet should include the message data information related to the short message b, but also should not include 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 that the vehicle-mounted terminal needs to establish the bluetooth communication connection with the mobile terminal before the vehicle-mounted terminal side acquires the message data packet. In some examples, the in-vehicle terminal side may obtain the current message data packet from the mobile terminal based on a MAP protocol in a bluetooth communication protocol stack. The MAP protocol is a bluetooth application layer protocol, and is used for control interaction between a bluetooth slave device (e.g., a vehicle-mounted terminal) and a bluetooth master device (e.g., a mobile phone) to realize functions of viewing, notifying, receiving, sending and the like of messages and message lists. Therefore, in these examples, after the vehicle-mounted terminal establishes the bluetooth communication connection with the mobile terminal, the application layer connection based on the MAP protocol needs to be established.
The following will proceed to the explanation of the process of acquiring the current message data packet from the mobile terminal by the vehicle-mounted terminal side by taking the MAP protocol as an example:
according to 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 sent Message and a received Message.
If the vehicle-mounted terminal side requires that the message data packet contains a message list or a session list, the vehicle-mounted terminal may acquire the message data packet by using Get Messages Listing or Get conversion Listing in the MAP protocol.
Of course, it can be understood by those skilled in the art that the vehicle-mounted terminal may also obtain the Message data packet through a combination of at least two of Get Message, Get Messages Listing and Get conversion Listing at the same time.
S104: and analyzing the latest message time information from the current message data packet.
After the vehicle-mounted terminal side acquires the current message data packet of the mobile terminal, 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 when 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 the message data packet does not need to contain the latest message itself in this embodiment. For example, in some examples, the message data packet acquired by the in-vehicle terminal does not include the message itself, but includes a message list, in which case, the in-vehicle 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 one example, a message data packet acquired by a vehicle-mounted terminal side includes the following message data information:
Figure BDA0002901275830000061
Figure BDA0002901275830000071
wherein, "Date: fri.1aug201401: 29:12+01: 00" is the time information carried in the message data information, and it characterizes the time when the mobile terminal sends or receives the message. The vehicle-mounted terminal side can determine the latest message time information according to the front and back sequence of the time information.
In some other examples of this embodiment, the message data packet acquired by the in-vehicle 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 in-vehicle terminal side may extract the message time information from the message 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 obtaining the latest message time information, the vehicle-mounted terminal side can synchronize the system time according to the latest message time information. For example, in some examples, the in-vehicle terminal directly adjusts its system time to the time of the latest message. In some examples, the in-vehicle terminal may perform some processing on the latest message time and then set the system time according to the processing result, for example, in one example, the in-vehicle terminal may increase the latest message time by 1 minute and then use the increased time result as the system time. Of course, this is merely an example of one processing method and is not the only processing method.
According to the time synchronization method for the vehicle-mounted terminal, the message data packet carrying the message time information can be acquired 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.
Example two:
in some examples of the embodiment, the vehicle-mounted terminal side may periodically or non-periodically acquire the message data packet from the mobile terminal, and update the system clock directly according to the message data packet as long as the message data packet is acquired.
In still other examples, the in-vehicle terminal side sets the system time only once according to the message packet after the in-vehicle 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 time difference between the time represented by the latest message time information carried in the message data packet and the current time determines the accuracy of the vehicle-mounted terminal system time after time synchronization: if the time difference between the latest message time information in the message data packet and the current time is larger, that is, the latest change of the message of the mobile terminal is a long-term past, the time of the vehicle-mounted terminal system is seriously lagged after the vehicle-mounted terminal system is updated according to the latest message time information in the message data packet, and the accuracy is poor. For example, if the latest message dynamic of the mobile terminal appears at 13:00, but the actual time for the vehicle-mounted terminal 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. On the contrary, if the time difference between the latest message time information in the message data packet acquired by the vehicle-mounted terminal side and the current time is very small, the vehicle-mounted terminal will display more accurate time after updating the system time according to the latest message time information, so as to provide reliable time information for the user.
Therefore, in some examples of this embodiment, the vehicle-mounted terminal side may ensure the real-time property 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 property. In order to achieve the purpose, the vehicle-mounted terminal side should ensure that the message data packet is obtained in time when the message of the mobile terminal is new and dynamic, and for this reason, the embodiment provides the following vehicle-mounted terminal time synchronization methods:
the first method is as follows:
the vehicle-mounted terminal side can subscribe the message notification to the mobile terminal, so that the mobile terminal can actively notify the vehicle-mounted terminal side when the message dynamic exists in the mobile terminal. For example, please refer to a flowchart of the time synchronization method of the vehicle-mounted terminal shown in fig. 3:
s302: and sending a new message notification request to the mobile terminal.
In this embodiment, the in-vehicle terminal side may transmit a new message notification request for requesting the mobile terminal to notify the in-vehicle terminal when a new message is received to the mobile terminal. Alternatively, the new message Notification may be implemented based on a new message Notification mechanism (Notification Feature) in the MAP protocol, and after the in-vehicle terminal establishes an application layer connection based on the MAP protocol with the mobile terminal, the in-vehicle terminal may request the mobile terminal to enable the Notification Feature, where the request may be a new message Notification request sent by the in-vehicle terminal to the mobile terminal.
S304: it is monitored whether a new message notification is received.
If the judgment result is yes, the step S306 is entered, otherwise, the monitoring is continued.
S306: and acquiring a current message data packet of the mobile terminal.
After monitoring the new message notification, it indicates that the mobile terminal currently receives the new message, therefore, if the current message data packet of the mobile terminal is immediately obtained, the message data packet necessarily contains the time information of the just received message, 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 set 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 is understood that in the above example, the new message notification request sent by 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 some other examples of the embodiment, the new message notification request may allow the mobile terminal to notify the vehicle-mounted terminal side when the mobile terminal has a message sending operation; or in some other examples, the mobile terminal may notify the in-vehicle terminal according to the new message notification request when both the self-existence message transmission and the message reception exist.
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.
The second method comprises the following steps:
the vehicle-mounted terminal side may cause the mobile terminal side to appear a new message dynamic state by controlling the mobile terminal, for example, a message sending dynamic state and/or a message receiving dynamic state, please refer to another flowchart of fig. 4 for the vehicle-mounted terminal to obtain a message data packet:
s402: and sending a message outgoing indication to the mobile terminal.
The vehicle-mounted terminal side may control the mobile terminal to send the message through the message outgoing instruction, and the vehicle-mounted terminal may indicate the message receiving end and the message content of the outgoing message in the message outgoing instruction, of course, the message outgoing instruction is not limited to these two kinds of information, for example, in some other examples, the message outgoing instruction 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 instruction, the mobile terminal can send a message to a corresponding receiving end according to the message outgoing instruction.
It should be appreciated that, because the in-vehicle terminal controls the mobile terminal to perform message transmission, only for the purpose of allowing the mobile terminal to present new message dynamics, rather than transferring information to the outside, the message content may be empty. Moreover, in order to avoid the problem that the message sent by the mobile terminal may be confusing to a certain general user if the message is successfully received by the general user, in some examples of the embodiment, the vehicle-mounted terminal may control the mobile terminal to send the message to a fixed service number, so that the message of the mobile terminal may be prevented from being received by the general user. In some examples, the in-vehicle terminal may control the mobile terminal to send a message that is not successfully sent, for example, the message receiving end indicated by the in-vehicle terminal in the message outgoing indication is a blank number, and optionally, the currently valid telephone number is generally 11 bits, so if the number of the message receiving end indicated by the in-vehicle terminal side may not be 11 bits (and the number is not an operator service number, a bank service number, or the like), the message sending operation performed by the mobile terminal according to the message outgoing indication will fail. It can be understood that, although the message transmission fails, the mobile terminal still generates the message data information of the failed 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-mounted terminal side may send a Message outgoing instruction to the mobile terminal through a Push Message of the MAP protocol, and prompt the mobile terminal to send a Message by using the Push Message.
S404: and acquiring a 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 conversion Listing and the like.
It should be understood that after the mobile terminal sends the message, the sent message is necessarily changed, so the object targeted by the vehicle-mounted terminal side when acquiring the message data packet is the sent message of the mobile terminal.
It can be understood that, the vehicle-mounted terminal side should acquire the message data packet as soon as possible after the mobile terminal has a new message dynamic state, and preferably, the vehicle-mounted terminal should acquire the message data packet immediately when the mobile terminal has the new message dynamic state, so in an example of this embodiment, after the vehicle-mounted terminal transmits the message outgoing instruction to the mobile terminal, the vehicle-mounted terminal immediately acquires the message data packet. Considering that the mobile terminal needs a certain time from receiving the message outgoing instruction to finishing the message sending, the vehicle-mounted terminal can wait for the preset time and then acquire the message data packet after sending the message outgoing instruction. The preset time may be set by a programmer based on 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 some examples, the in-vehicle terminal side controls the mobile terminal to send a message to a fixed service number through the message outgoing instruction, and after receiving the message of the mobile terminal, the corresponding service number immediately feeds back a response message to the mobile terminal, so that the received message of the mobile terminal also changes. Therefore, in these examples, the object for which the in-vehicle terminal acquires the message data packet may also be the received message of the mobile terminal. Of course, since there is a variation in both the sent message and the received message of the mobile terminal in these examples, at least one of them is possible when the in-vehicle terminal acquires the message packet.
In some examples of this embodiment, in order to ensure that a message data packet when a new message dynamic state occurs in the mobile terminal is obtained in time, the vehicle-mounted terminal side may periodically obtain the message data packet after sending the message outgoing instruction until obtaining the message data packet that can reflect the new message dynamic state. Optionally, the vehicle-mounted terminal may obtain the message data packet once before sending the message outgoing instruction, and use the message data packet as a reference message data packet, and then obtain the message data packet after sending the message outgoing instruction to the mobile terminal, and compare the currently obtained message data packet with the reference message data packet, and if the two message data packets are different, it indicates that a new message dynamic state occurs at the mobile terminal side. If the two message data packets are the same, the mobile terminal side does not finish the new message sending or receiving. The vehicle-mounted terminal side can continue to acquire the message data packet from the mobile terminal according to the acquisition cycle until the acquired message data packet is different from the reference message data packet: after 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.
Please refer to the flowchart of the time synchronization of the vehicle-mounted terminal based on the mode two shown in fig. 5:
s502: acquiring a current message data packet of the mobile terminal as a reference message data packet;
s504: sending a message outgoing instruction to the mobile terminal;
s506: acquiring a current message data packet of the mobile terminal;
s508: judging whether the current message data packet is the same as the reference message data packet or not;
if yes, go to step S510, otherwise go to step S512.
S510: judging whether a new acquisition period is reached;
if yes, executing S506, otherwise continuing to execute 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, in the process of setting the system time once, the reference message data packet selected by the vehicle-mounted terminal side is fixed, but in some other examples of this embodiment, the reference message data packet of the vehicle-mounted terminal side may also be unfixed, 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, that is, 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 the message data packet which is acquired before the current message data packet and is closest to the current moment. For example, assuming that the vehicle-mounted terminal side acquires the message packet a at time t1, the message packet B at time t2, and the message packet C at time t3, the latest message packet is B and the latest history message packet is a for time t 2; for time t3, the newest message packet is C and the newest historical message packet is B. Therefore, at time t2, after the vehicle-mounted terminal side acquires the latest message packet B, B is compared with a to determine whether the two are the same, if so, the vehicle-mounted terminal side waits for a period of time and then acquires the message packet again, and if not, the vehicle-mounted terminal side can directly perform system time synchronization according to the message packet B.
In this embodiment, in order to improve the accuracy of time synchronization of the vehicle-mounted terminal system, when the message data packet acquisition period is set, the acquisition period is set to be less than or equal to an error allowed by the vehicle-mounted terminal system time, that is, a time difference between the current message data packet and the latest historical message data packet is less than or equal to an error allowed by 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 obtaining period is less than or equal to 3 minutes, so that it can be ensured that the vehicle-mounted terminal can obtain the message data packet reflecting the new message dynamics within 3 minutes after the new message dynamics occurs in the mobile terminal, and naturally, the difference between the system time set according to the latest message time information in the message data packet and the actual time will not exceed 3 minutes.
And continuing to assume that the system time allowed error of the vehicle-mounted terminal is 3 minutes, the vehicle-mounted terminal acquires a message data packet every two minutes from 13:26, and meanwhile, assuming that a mobile phone connected with the vehicle-mounted terminal in a Bluetooth communication mode transmits a short message at 13:27, the vehicle-mounted terminal acquires the message data packet at 13:28, wherein the message data packet contains message data information of the outgoing short message, or the latest message time information carried in the message data packet acquired at 13:28 is 13:27 (it can be understood that information such as year, month and day is omitted here), and then when the actual time is 13:28, the vehicle-mounted terminal sets the system time of the vehicle-mounted terminal to be 13:27 according to the latest message time information, and the error between the system time and the actual time is 1 minute, which is completely within the error range allowed by the system time of the vehicle-mounted terminal. In an extreme example, a new message dynamic state appears on the mobile terminal side just after the vehicle-mounted terminal side finishes acquiring the message data packet n, obviously, the new message dynamic state can only be embodied in the message data packet n +1, and the acquiring time difference between the message data packet n +1 and the message data packet n is only two minutes, so that the vehicle-mounted terminal side can acquire the corresponding latest message time information within two minutes after the new message dynamic state appears, and the error of the vehicle-mounted terminal system time is limited within two minutes.
The third method comprises the following steps:
the vehicle-mounted terminal can periodically acquire the message data packet of the mobile terminal, and after the current message data packet is acquired, the current message data packet is compared with the latest historical message data packet, so that whether the message of the mobile terminal has new dynamic state or not is determined. And the vehicle-mounted terminal updates the system time according to the latest message data packet acquired currently only after determining that the message of the mobile terminal is new and dynamic. The scheme is similar to the method of controlling the mobile terminal to periodically acquire the message data packet after actively sending out the message in the second example, except that in the third mode, the vehicle-mounted terminal passively waits for the message of the mobile terminal to naturally generate new dynamics, and cannot actively promote the new dynamics to appear. A scheme for performing system time synchronization on the vehicle-mounted terminal side based on the three modes is described below with reference to a flowchart shown in fig. 6:
s602: acquiring a current message data packet of the mobile terminal;
s604: judging whether a latest historical message data packet exists or not;
if yes, go to step S606, otherwise go to step S608.
S606: judging whether the current message data packet is the same as the latest historical message data packet;
if yes, go to step S608, otherwise go to step S610.
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 historical message data packet as the reference message data packet, and in fact, in some 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 acquired message data packets is also smaller than or equal to the error allowed by the vehicle-mounted terminal system time, that is, the acquisition cycle is smaller than or equal to the error allowed by the vehicle-mounted terminal system time.
In practical cases, the vehicle-mounted terminal side may support only any one of the three modes, or may support at least two of the modes simultaneously.
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 of the vehicle-mounted terminal by using the timer on the basis of the system time without using the message data packet on the mobile terminal side for time synchronization. Therefore, in some examples, after the vehicle-mounted terminal side synchronizes the system time according to the latest message time information in the message data packet, the message data packet of the mobile terminal does not need to be acquired until the system time is reset (or initialized).
Of course, in some examples, the vehicle-mounted terminal side may also continue to 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 be later than 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 may approach the actual time infinitely. Please refer to a flowchart shown in fig. 7:
s702: acquiring a current message data packet of the 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 lags behind the latest message time or not;
if yes, executing S708, otherwise, continuing to end the process;
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 performs message data packet acquisition every two minutes from the actual time of 13:26:30, and meanwhile assuming that the mobile terminal sends a short message at the actual time of 13:27:00 and receives a reply of the short message at the actual time of 13:30:00, the latest message time information carried in the message data packet acquired by the vehicle-mounted terminal at the actual time of 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 at the actual time 13:30:30 is 13:30:00, but the system time of the vehicle-mounted terminal is 13:29:00 at the moment, and the vehicle-mounted terminal updates the system time of the vehicle-mounted terminal to 13:30:00 after determining that the system time 13:29:00 lags behind the latest message time 13:30:00, so that 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 an actual situation, the latest message time information acquired by the vehicle-mounted terminal side usually includes information such as the year, month, day, and the like, so that it is convenient for the vehicle-mounted terminal side to determine the sequence of two times across days.
The time synchronization method for the vehicle-mounted terminal provided by the embodiment of the invention can ensure the timeliness of the message data packet for updating the system time through at least one of a plurality of modes of actively controlling the mobile terminal to send the message through a new message notification mechanism and obtaining the message data packet according to the time interval less than or equal to the allowable error, thereby improving the accuracy of the system time synchronization of the vehicle-mounted terminal.
And after the system time is synchronized once according to the latest message time information, the message data packet can be continuously acquired, so that the accuracy of the system time is continuously improved according to the latest message time information in the message data packet.
Example three:
in order to make the advantages and details of the time synchronization method for the vehicle-mounted terminal in the foregoing embodiment clearer for those skilled in the art, the present embodiment will be described with reference to an example, where in the present embodiment, a system time synchronization is implemented by a vehicle-mounted terminal and a mobile phone through bluetooth interaction, 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 device is also defined as MSE (Message Server Equipment), and the bluetooth slave device is also defined as MCE (Message Client Equipment). And the MCE sends a request, the MSE responds to the request, and the message data packet interacted between the MSE and the MCE comprises message time information.
Example 1:
this example mainly explains a process of system time synchronization in a situation where the vehicle-mounted terminal passively waits for a new dynamic mobile phone side message, please refer to a flowchart of a vehicle-mounted terminal time synchronization method shown in fig. 8:
s802: and allocating storage resources after the vehicle-mounted terminal is powered on.
The storage resources include at least one of a memory cell (RAM) and a storage cell (NOR FLASH).
When the vehicle-mounted terminal is powered on and initialized, the memory unit or the storage unit can be emptied, then the vehicle-mounted terminal appoints/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 packets.
S804: the vehicle-mounted terminal establishes Bluetooth communication connection with the mobile phone and establishes application layer connection based on the MAP.
The vehicle-mounted terminal can initialize the Bluetooth connection parameters, set the MAP service application parameters and then wait for the mobile phone Bluetooth connection request. After receiving the Bluetooth connection request from the mobile phone, the mobile phone receives the Bluetooth connection request and establishes connection between a Bluetooth physical layer and a link layer with the mobile phone. After the connection between the Bluetooth physical layer and the link layer is established, the application layer connection defined by the MAP is established.
S806: and the vehicle-mounted terminal applies for MAP service to the mobile phone to acquire the authority of operating the mobile phone message.
S808: and judging whether the authorization for operating the mobile phone message is obtained or not.
If yes, then S812 is executed, otherwise S810 is executed.
S810: and waiting for a first preset time length.
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 system time synchronization as soon as possible after powering on, the first preset duration is set to be relatively short, so that the vehicle-mounted terminal may apply for authorization for operating a mobile phone message to the mobile phone relatively frequently. However, if the user thinks that there are many other more important items to be processed after the vehicle-mounted terminal is started, and the importance of the synchronization update of the system time is not high, the first preset time period may 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: and 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 for operating the mobile phone message, the received or sent message list of the mobile phone can be read based on the MAP protocol and cached in a pre-allocated memory unit or 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 storage unit.
S814: and starting a timer with the timing duration being a second preset duration.
The length of the second preset time determines the time interval between two adjacent times of obtaining the message data packet from the mobile phone side by the vehicle-mounted terminal, and also determines the precision 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 time period is less than or equal to an error allowed by the system time of the vehicle-mounted terminal.
S816: and when the timer finishes timing, the vehicle-mounted terminal acquires the current message data packet of the mobile phone again and compares whether the current message data packet is the same as the latest historical message data packet.
If so, then perform S814, otherwise perform S818.
S818: and the vehicle-mounted terminal obtains the latest message time information from the current message data packet and synchronizes the system time according to the latest message time information.
In addition, in this embodiment, after the vehicle-mounted terminal is powered on and initialized, it is also monitored whether the vehicle-mounted terminal can directly update the system time according to the timer interrupt mechanism, please refer to the flow shown in fig. 9:
s902: and allocating storage resources after the vehicle-mounted terminal is powered on.
The storage resources also include at least one of memory cells and storage cells. And distributing a part of storage resources for realizing the caching of the system time of the vehicle-mounted terminal when the vehicle-mounted terminal is electrified and initialized. It can be understood that S902 and S802 may be substantially performed together, that is, after the vehicle-mounted terminal is powered on, the storage resource is allocated while the system time, the message data packet, and the latest message time information are stored.
S904: the vehicle-mounted terminal initializes systematization time, sets a time initialization identifier as '1', and starts a timed interruption mechanism.
After the vehicle-mounted terminal is initialized, the initialized system time is displayed as 00:00, in addition, the vehicle-mounted terminal also can set a time initialization identifier as '1', and the time initialization identifier is used for representing whether the vehicle-mounted terminal carries out system time synchronization according to a message data packet at the mobile phone side: when the time initialization identifier is '1', the characteristic that the vehicle-mounted terminal does not realize the synchronization of the system time according to the message data packet at the mobile phone side yet, and the system time at the moment is still the initialization time, so that the vehicle-mounted terminal does not need to automatically update the system time according to the timer in the case; when the time initialization mark is '0', the system time is synchronized by the vehicle-mounted terminal according to the message data packet at the mobile phone side, and the system time at the moment is not the initialization 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 also 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 is realized by adopting a fixed timing interruption mechanism, when the timing interruption occurs, if the vehicle-mounted terminal finds that the time initialization identifier is '0', the system time can be increased by one time of timing, the new system time is cached in a pre-allocated storage resource, and meanwhile, the screen is controlled to display the time according to the system time. If the in-vehicle terminal determines that the time initialization flag is "1" when the timer interruption occurs, no processing may be performed.
S906: and judging whether the time initialization flag is '0' when the timer interruption occurs.
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 in the pre-allocated storage resource.
If yes, go to step S908, otherwise go to step S906.
S908: and increasing the system time stored in the storage resource by one time of timing to realize the updating of the system time.
Example 2:
this example mainly explains a process of actively prompting, by a vehicle-mounted terminal, system time synchronization in a new dynamic situation of a mobile phone side message, please refer to a flowchart of a vehicle-mounted terminal time synchronization method shown in fig. 10:
s1002: and allocating storage resources after the vehicle-mounted terminal is powered on.
The storage resources comprise a memory unit and/or a storage unit, the memory unit or the storage unit can be emptied when the vehicle-mounted terminal is powered on and initialized, then the vehicle-mounted terminal appoints/allocates the memory unit or the storage unit, and part of the storage resources are used for storing the latest message time information; and a portion for storing at least two message packets.
S1004: the vehicle-mounted terminal establishes Bluetooth communication connection with the mobile phone and establishes application layer connection based on the MAP.
The vehicle-mounted terminal can initialize the Bluetooth connection parameters, set the MAP service application parameters and then wait for the mobile phone Bluetooth connection request. After receiving the Bluetooth connection request from the mobile phone, the mobile phone receives the Bluetooth connection request and establishes connection between a Bluetooth physical layer and a link layer with the mobile phone. After the connection between the Bluetooth physical layer and the link layer is established, the application layer connection defined by the MAP is established.
S1006: and the vehicle-mounted terminal applies for MAP service to the mobile phone to acquire the authority of operating the mobile phone message.
S1008: and judging whether the authorization for operating the mobile phone message is obtained or not.
If so, executing S1012, otherwise, executing S1010.
S1010: and waiting for a first preset time length.
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 system time synchronization as soon as possible after powering on, the first preset duration is set to be relatively short, so that the vehicle-mounted terminal may apply for authorization for operating a mobile phone message to the mobile phone relatively frequently. However, if the user thinks that there are many other more important items to be processed after the vehicle-mounted terminal is started, and the importance of the synchronization update of the system time is not high, the first preset time period may 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: and 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 for operating the mobile phone message, the received or sent message list of the mobile phone can be read based on the MAP protocol and cached in a pre-allocated memory unit or 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 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 a second preset duration.
The length of the second preset time determines the time interval between two adjacent times of obtaining the message data packet from the mobile phone side by the vehicle-mounted terminal, and also determines the precision 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 time period is less than or equal to an error allowed by the system time of the vehicle-mounted terminal.
S1018: and when the timer finishes timing, the vehicle-mounted terminal acquires the current message data packet of the mobile phone again and compares whether the current message data packet is the same as the latest historical message data packet.
If so, then execute S1014, otherwise execute S1020.
S1020: and the vehicle-mounted terminal obtains the latest message time information from the current message data packet and synchronizes the system time according to the latest message time information.
In addition, in this embodiment, after the vehicle-mounted terminal is initialized by powering on, 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, which is specifically described with reference to fig. 9 and will not be described herein again.
In the time synchronization method for 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 vehicle-mounted terminal can enable the driver to know the current accurate time.
Example four:
the present embodiments provide a storage medium including volatile or non-volatile, 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), flash Memory or other Memory technology, CD-ROM (Compact disk 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 can 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 that can be executed by one or more processors to implement the process of implementing any one of the vehicle-mounted terminal time synchronization methods described in the foregoing embodiments.
The present embodiments also provide a computer program product comprising a computer readable means on which a computer program as shown above is stored. The computer readable means in this embodiment may include 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 the aforementioned storage medium storing the in-vehicle terminal time synchronization program. The processor 111 may read the vehicle-mounted terminal time synchronization program, compile and execute the flow of implementing the vehicle-mounted terminal time synchronization method described in the foregoing embodiment:
the processor 111 first obtains a current message data packet of the mobile terminal, and the mobile terminal is in communication connection with the vehicle-mounted terminal through bluetooth, wherein the message data packet includes data generated by message interaction between the mobile terminal and other terminals. Then, the processor 111 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. Wherein, the latest message time information is the time information of the latest message in the mobile terminal.
In some examples of this embodiment, before the processor 111 acquires the current message packet of the mobile terminal, the MAP protocol-based application layer connection is also established between the vehicle-mounted terminal and the mobile terminal after the vehicle-mounted terminal establishes the bluetooth communication connection with the mobile terminal. When the processor 111 then retrieves the current message packet of the mobile terminal, the current message packet may be retrieved from the mobile terminal via the MAP protocol.
Optionally, the message data packet includes at least one of a message of the mobile terminal and a message list, and the message includes at least one of a short message, a multimedia message, instant messaging information, and an email; 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 Message, Get Messages Listing, and Get conversion Listing of the MAP protocol.
In some examples, before acquiring the current message data packet of the mobile terminal, the processor 111 may further send a message outgoing indication to the mobile terminal, where the message outgoing indication is used to instruct the mobile terminal to perform message sending.
Alternatively, the processor 111 may send the Message-out indication to the mobile terminal via a Push Message of the MAP protocol.
After acquiring the current message data packet of the mobile terminal, before analyzing the latest message time information from the message data packet, the processor 111 may further compare the current message data packet with the latest historical message data packet, and determine that there is a difference between the current message data packet and the latest historical message data packet. 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 acquired message data packets is less than or equal to the error allowed by the system time of the vehicle-mounted terminal.
After comparing the current message data packet with the latest historical message data packet, if the processor 111 determines that the current message data packet is the same as the latest historical message data packet, the processor 111 may continue to acquire the current message data packet of the mobile terminal and continue to compare the current message data packet with the latest historical message data packet until the current message data packet is different from the latest historical message data packet.
Optionally, 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 in-vehicle terminal when receiving a new message. Subsequently, the processor 111 acquires the current message data packet of the mobile terminal when receiving a new message notification sent by the mobile terminal.
For details of the method for implementing system time synchronization of the vehicle-mounted terminal in this embodiment, please refer to the description of the foregoing embodiment, which is not described herein again.
It is understood that the in-vehicle terminal 11 may include other devices, such as at least one of a user input unit, a WiFi module, a sensor, a display screen, etc., besides the processor 111, the memory 112, etc.
The vehicle-mounted terminal and the storage medium provided by the embodiment can realize the setting of the system time automatically based on the message data packet at the mobile terminal side without the manual participation of a user when the system time of the vehicle-mounted terminal is synchronized, thereby improving the automation degree of time synchronization, reducing the operation burden of the user and improving the user experience.
It will be apparent to those skilled in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software (which may be implemented in program code executable by a computing device), firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between 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 by several physical components in cooperation. 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 over computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media), executed by a computing device, and in some cases may perform the steps shown or described in a different order than here. The term computer storage media includes 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 is well known to those of ordinary skill 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. In addition, 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 as known to those skilled in the art. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of embodiments of the present invention, and the present invention is not to be considered limited to such descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (10)

1. A time synchronization method for a vehicle-mounted terminal is characterized by comprising the following steps:
acquiring a current message data packet of a mobile terminal, wherein the mobile terminal is in communication connection with a vehicle-mounted terminal through Bluetooth, and the message data packet comprises data generated by message interaction between the mobile terminal and other terminals;
analyzing latest message time information from the current message data packet, wherein the latest message time information is the time information of the latest message in the mobile terminal;
and synchronizing the system time of the vehicle-mounted terminal according to the latest message time information.
2. The time synchronization method for vehicle-mounted terminal according to claim 1, wherein before acquiring the current message data packet of the mobile terminal, the method further comprises:
after the vehicle-mounted terminal establishes Bluetooth communication connection with 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 acquiring the current message data packet of the mobile terminal comprises:
and acquiring the current message data packet of the mobile terminal through a MAP protocol.
3. The time synchronization method for the 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 an email; the acquiring the current message data packet of the mobile terminal through the MAP protocol comprises:
and acquiring a current Message data packet 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 Conversation list acquisition function Get conversion Listing of the MAP protocol.
4. The time synchronization method for vehicle-mounted terminal according to claim 1, wherein before acquiring the current message data packet of the mobile terminal, the method 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 time synchronization method for vehicle-mounted terminals according to claim 4, wherein the sending of the message outgoing indication to the mobile terminal comprises:
and sending a Message outgoing instruction to the mobile terminal through the Message Push function of the MAP protocol.
6. The vehicle-mounted terminal time synchronization method according to any one of claims 1 to 5, wherein after acquiring a current message data packet of the mobile terminal, before parsing out latest message time information 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 between two adjacent acquired message data packets is less than or equal to the error allowed by the time of the vehicle-mounted terminal system;
and determining that the current message data packet is different from the latest historical message data packet.
7. The time synchronization method for vehicle-mounted terminals according to claim 6, wherein after comparing the current message data packet with the latest historical message data packet, if the current message data packet is determined to be the same as the latest historical message data packet, the time synchronization method for vehicle-mounted terminals further comprises:
continuously acquiring a current message data packet of the mobile terminal;
and continuing to compare the current message data packet with the latest historical message data packet until the current message data packet is different from the latest historical message data packet.
8. The time synchronization method for vehicle-mounted terminals according to any one of claims 1 to 5, wherein before acquiring the current message data packet of the mobile terminal, the method further comprises:
sending a new message notification request to the mobile terminal, wherein the new message notification request is used for requesting the mobile terminal to notify the vehicle-mounted terminal when receiving a new message;
the acquiring 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 the memory to implement the steps of the vehicle terminal time synchronization method according to any one of claims 1 to 8.
10. A storage medium characterized in that the storage medium stores one or more programs executable by one or more processors to implement the steps of the in-vehicle terminal time synchronization method according to 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
CN2021100042466 2021-01-04
CN202110004246 2021-01-04

Publications (2)

Publication Number Publication Date
CN112911543A true CN112911543A (en) 2021-06-04
CN112911543B 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)

Cited By (2)

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

Citations (3)

* 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
CN109495263A (en) * 2018-11-16 2019-03-19 上海银基信息安全技术股份有限公司 Clock synchronizing method, system, device, intelligent terminal, vehicle termination and medium
US20190161001A1 (en) * 2016-06-13 2019-05-30 Zkw Group Gmbh Vehicle headlight

Patent Citations (3)

* 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
US20190161001A1 (en) * 2016-06-13 2019-05-30 Zkw Group Gmbh Vehicle headlight
CN109495263A (en) * 2018-11-16 2019-03-19 上海银基信息安全技术股份有限公司 Clock synchronizing method, system, device, intelligent terminal, vehicle termination and medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115673A (en) * 2021-11-25 2022-03-01 海信集团控股股份有限公司 Control method of vehicle-mounted screen
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

Also Published As

Publication number Publication date
CN112911543B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN101836428B (en) Accessing subscribed content with a mobile computing device
CN102172099B (en) Finding mobile station for device-to-device communication
US20220159620A1 (en) Methods, apparatuses, user equipment and base stations for determing sidelink resource
CN112911543B (en) Vehicle-mounted terminal and time synchronization method and storage medium thereof
US8959557B2 (en) Mobile terminal, display device and controlling method thereof
CN111246228B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
EP4109892A1 (en) Interaction method and apparatus, and electronic device
CN111432001B (en) Method, apparatus, electronic device and computer readable medium for jumping scenes
US20230164543A1 (en) Nomination of a primary cell phone from a pool of cell phones
KR20130113283A (en) Acquiring method vehicle contents, displaying method vehicle contents, displaying system for vehicle contents and automotive electronic device
CN105872028B (en) Server-side, client and access strategy management method
CN108353362B (en) System message receiving method and system message receiving device
CN110855655B (en) Information verification method, device, equipment and storage medium
CN112689012A (en) Cross-network proxy communication method and device
US20150072662A1 (en) Resumption of data connectivity between mobile devices via switching application
CN102387500B (en) A kind of business cipher key management method and system
EP2209339B1 (en) Mobile communication terminal device, qos control device, mobile communication system, and method of guaranteeing qos
US20140068020A1 (en) Method and apparatus for transmitting and/or receiving data
CN114124925A (en) Electronic mail synchronization method and electronic equipment
EP2549724A1 (en) Apparatus and Method for Providing Authorization Based Enhanced Address Book Service in Mobile Communication System
CN116192546A (en) Control method of intelligent equipment, control terminal and control system
CN115587860A (en) Service processing method, device, storage medium and electronic equipment
CN113507750A (en) Terminal control method and device, terminal and storage medium
CN111246229B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
US20230017797A1 (en) Internet of things communication method and apparatus

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