CN116318512A - Vehicle time timing method and device, vehicle and storage medium - Google Patents

Vehicle time timing method and device, vehicle and storage medium Download PDF

Info

Publication number
CN116318512A
CN116318512A CN202310270358.5A CN202310270358A CN116318512A CN 116318512 A CN116318512 A CN 116318512A CN 202310270358 A CN202310270358 A CN 202310270358A CN 116318512 A CN116318512 A CN 116318512A
Authority
CN
China
Prior art keywords
time
vehicle
result
determining
clock source
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.)
Pending
Application number
CN202310270358.5A
Other languages
Chinese (zh)
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.)
Great Wall Motor Co Ltd
Original Assignee
Great Wall Motor 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 Great Wall Motor Co Ltd filed Critical Great Wall Motor Co Ltd
Priority to CN202310270358.5A priority Critical patent/CN116318512A/en
Publication of CN116318512A publication Critical patent/CN116318512A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0644External master-clock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • 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
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Electric Clocks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The embodiment of the application is suitable for the technical field of vehicles and provides a vehicle time service method, a device, a vehicle and a storage medium, wherein the method comprises the following steps: acquiring a first time to be time service under the current time from a vehicle-mounted system, and respectively acquiring the first time from a plurality of external clock sources; aiming at the first time corresponding to any external clock source, processing the first time to be timed and the first time according to a preset timing rule corresponding to the external clock source to obtain a timing result; the preset timing rule is used for judging the effectiveness of the first time and the error result of the first time to be given time relative to the first time; from all timing results, determining that the first time is effective and the error result is a target timing result with error; and carrying out time service on the first time to be time service time of the vehicle-mounted system by adopting the first time corresponding to the target time correction result. By adopting the method, the time precision of the first time to be given time of the vehicle-mounted system can be improved.

Description

Vehicle time timing method and device, vehicle and storage medium
Technical Field
The application belongs to the technical field of vehicles, and particularly relates to a vehicle time timing method, a device, a vehicle and a storage medium.
Background
With the development of network communication technology, vehicle-mounted equipment in a vehicle needs to perform real-time data transmission with satellites according to internet functions so as to meet various functions such as vehicle positioning, external communication or automatic driving. Therefore, the synchronicity between the vehicle-mounted system time displayed by the vehicle-mounted device and the satellite time is highly required.
Currently, the Time of the on-board device is usually obtained from a Clock source in a global navigation satellite on-board system (Global Navigation Satellite System, GNSS) or a local Clock source (RTC) set up using the on-board device itself.
However, in the case where the satellite signal is weak and the output time of the local clock source tends to deviate more and more from the actual time as the use time is prolonged, the accuracy of the on-vehicle system time displayed by the on-vehicle apparatus is lower.
Disclosure of Invention
The embodiment of the application provides a vehicle time timing method, a device, a vehicle and a storage medium, which can solve the problem of lower accuracy of vehicle-mounted system time displayed by the vehicle.
In a first aspect, an embodiment of the present application provides a vehicle time service method, including:
Acquiring a first time to be time service under the current time from a vehicle-mounted system, and respectively acquiring the first time from a plurality of external clock sources;
aiming at the first time corresponding to any external clock source, processing the first time to be timed and the first time according to a preset timing rule corresponding to the external clock source to obtain a timing result; the preset timing rule is used for judging the effectiveness of the first time and the error result of the first time to be given time relative to the first time;
from all timing results, determining that the first time is effective and the error result is a target timing result with error;
and carrying out time service on the first time to be time service time of the vehicle-mounted system by adopting the first time corresponding to the target time correction result.
In a second aspect, an embodiment of the present application provides a vehicle time service apparatus, including:
the time acquisition module is used for acquiring a first time to be given time at the current time from the vehicle-mounted system and respectively acquiring the first time from a plurality of external clock sources;
the timing module is used for processing the first time to be timed and the first time according to a preset timing rule corresponding to any external clock source aiming at the first time corresponding to any external clock source to obtain a timing result; the preset timing rule is used for judging the effectiveness of the first time and the error result of the first time to be given time relative to the first time;
The target timing result determining module is used for determining that the first time is effective and the error result is a target timing result with error from all timing results;
the first time service module is used for carrying out time service on the first time to be time service time of the vehicle-mounted system by adopting the first time corresponding to the target time correction result.
In a third aspect, embodiments of the present application provide a vehicle comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the method of the first aspect as described above when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements a method as in the first aspect described above.
In a fifth aspect, embodiments of the present application provide a computer program product for, when run on a vehicle, causing the vehicle to perform the method of the first aspect described above.
Compared with the prior art, the embodiment of the application has the beneficial effects that: the time service device can firstly acquire the first time to be time service under the current time from the vehicle-mounted system, and respectively acquire the first time from a plurality of external clock sources. And then, for the first time corresponding to each external clock source, processing the first time to be time and the first time according to a preset time correction rule corresponding to the external clock source so as to judge the validity of the first time and an error result of the first time to be time relative to the first time. And then, the time service device can determine the effective first time and the target time correction result with the first time to be time-service time error relative to the first time from all time correction results. And finally, carrying out time service on the first time to be time service time of the local clock source by adopting the first time corresponding to the target time correction result. Based on the time service device, the first time of the target timing result can be directly used for timing the first time to be time-serviced of the vehicle-mounted system, so that the time displayed by the vehicle-mounted system can be corrected. Furthermore, the situation that the deviation between the displayed time for waiting time and the actual time is larger and larger along with the extension of the service time of the vehicle-mounted system can be avoided. Therefore, the time accuracy of display can be improved when the vehicle displays the time on the display screen based on the first time waiting time of the vehicle-mounted system.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for time service of a vehicle according to an embodiment of the present application;
fig. 2 is a schematic diagram of an application scenario for acquiring a first time in a vehicle time service method according to an embodiment of the present application;
FIG. 3 is a flowchart of an implementation of obtaining a timing result in a vehicle time service method according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of a method for obtaining timing results in a vehicle time service method according to another embodiment of the present disclosure;
FIG. 5 is a schematic structural diagram of a vehicle time service device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a vehicle according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular vehicle-mounted system configurations, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known in-vehicle systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
With the development of network communication technology, vehicle-mounted equipment in a vehicle needs to perform real-time data transmission with satellites according to internet functions so as to meet various functions such as vehicle positioning, external communication or automatic driving. Therefore, there is a high demand for synchronicity between the time of the vehicle-mounted system displayed by the vehicle-mounted device and the time of the satellite.
Currently, the Time displayed by the on-board device is usually obtained from a Clock source in the global navigation satellite system (Global Navigation Satellite System, GNSS), or a local Clock source (RTC) set up using the on-board device itself, or a Clock source in the global positioning system (Global Positioning System, GPS).
However, in a scene where the satellite signal is weak, data communication is easy to be unsmooth, so that the acquired time information has a certain error. For example, the vehicle is in a scene with no or very weak GNSS signal coverage. For example, when a vehicle is in a tunnel, or in a cloud, fog, rain, and snow weather, or underground parking, etc., the vehicle is typically unable to acquire time from within a clock source in the GNSS; alternatively, the time taken from within the clock source in the GNSS has a delay such that the time service accuracy is not high.
In addition, the accuracy of the time information output by the RTC clock source is generally lower than that of the time information output by the GNSS clock source, so as the usage time is prolonged, the deviation between the time information output by the RTC and the actual time is larger and larger, and thus the time displayed by the vehicle-mounted device has larger deviation from the actual time.
Based on the above, in order to improve accuracy of time displayed by the vehicle-mounted device, the embodiment of the application provides a vehicle time timing method, which is applied to a vehicle time timing device. The time service device may be a vehicle-mounted network communication terminal (T-Box) or a controller in the vehicle, which is not limited.
Referring to fig. 1, fig. 1 shows a flowchart of an implementation of a vehicle time service method according to an embodiment of the present application, where the method includes the following steps:
s101, acquiring a first time to be transmitted at the current time from a vehicle-mounted system, and respectively acquiring the first time from a plurality of external clock sources.
In an embodiment, the vehicle-mounted system may be a software vehicle-mounted system, and may be a vehicle-mounted system with a combination of soft and hard. The first time to be sent acquired from the vehicle-mounted system may be the time when the vehicle-mounted system displays on the display interface at the current moment, or may be the local time acquired from the local clock source of the vehicle-mounted system, which is not limited.
In one embodiment, the above-mentioned vehicle-mounted system may be an operating system of a vehicle, which refers to a set of programs that control and manage the hardware and software resources of the entire computing vehicle-mounted system, and reasonably organize and schedule the work and resources of the computer to provide interfaces and environments for users to communicate with other software. Specifically, in the field of intelligent networking vehicles, a system that carries a complex of artificial intelligence, big data, and cloud computing technologies may be considered as an operating system.
In an embodiment, the local clock source may be an RTC clock source. The RTC is used as a clock source integrated inside the vehicle-mounted system, and the speed of responding to the vehicle-mounted system is faster and more stable than that of an external clock source. For example, the external clock source is limited by the scene in which the vehicle is located, making the clock signal acquired from within the external clock source unstable. Thus, the time displayed by the in-vehicle system is typically a local time obtained from a local clock source.
In one embodiment, the external clock source includes, but is not limited to: the GNSS clock source, the clock source in the cloud platform (Telematics Service Provider, TSP) of the internet of vehicles, or the clock source within the base station is not limited thereto.
Specifically, referring to fig. 2, fig. 2 is a schematic view of an application scenario for acquiring a first time in a vehicle time service method according to an embodiment of the present application. The T-BOX vehicle time timing device is internally composed of a micro control unit (Micro Control Unit, MCU), a vehicle-mounted System On Chip (SOC) and the like. As can be seen from fig. 2, the time service apparatus may further obtain the first time from the TSP, the GNSS and the base station based on the internet function.
The MCU is a chip integrating a central processing unit, a random access memory, a read-only memory, a timing counter and various I/O interfaces in the computer; the SOC is a chip integrating a microprocessor, an analog IP core, a digital IP core, and a memory (or an off-chip memory control interface). The SOC can interact with the MCU to acquire vehicle-mounted system time from an RTC clock source arranged in the MCU. And other controllers in the vehicle can also interact with the MCU to acquire the vehicle-mounted system time, and further, the validity of the communication instruction is checked according to the vehicle-mounted system time so as to maintain the normal operation of the vehicle-mounted system of the whole vehicle. Among them, the communication modes include, but are not limited to, ethernet communication, controller area network (Controller Area Network, CAN) communication, etc. The other controller may be an electronic control unit (Electronic Control Unit, ECU).
When the vehicle time timing method needs to be executed, the timing device may execute the vehicle time timing method in real time or at intervals of a preset timing interval, which is not limited.
It can be appreciated that, because the time service device may execute the vehicle time service method once every a preset time service interval duration, the time displayed by the vehicle-mounted system is usually obtained from the local clock source during the time service interval duration.
Based on this, in this embodiment, when the above-mentioned vehicle time timing method is executed, the timing device may mainly obtain the first time to be timing from the local clock source, and perform timing on the local clock source according to the first time of the external clock source, so as to correct that the local clock source runs for a long time, so that the deviation between the local time and the actual time is greater. Therefore, after the local time of the local clock source is corrected each time, the accuracy of the time acquired and displayed by the vehicle-mounted system from the local clock source is higher within the preset time service interval duration.
In another embodiment, the above-mentioned vehicle-mounted system may further restart, so that the first time to be timed obtained from the vehicle-mounted system is abnormal. At this time, the acquired first time to be time may be different from the actual time. For example, when the time service device determines that the state of the local clock source is in the power-on state in the restarting process of the vehicle-mounted system, the local clock source can be considered to be in normal operation in the restarting process, so that the first time to be time service acquired from the local clock source of the vehicle-mounted system may be the same as the actual time. However, when the state of the local clock source is a power-down state, the local clock source may be considered to be inactive for a long time. That is, the first time to time acquired from the local clock source of the in-vehicle system after the restart typically has an error. Based on this, the time service device may determine the initialized preset time service waiting time as the first time service waiting time.
Based on the above description, when it is determined that the state of the local clock source is the power-on state in the restarting process of the vehicle-mounted system, the first time to be time-stamped may be the same as the actual time, so the time stamping device may execute the vehicle time stamping method once every preset time stamping interval duration. However, if it is determined that the state of the local clock source is the powered-down state in the restarting process of the vehicle-mounted system, the time service device may immediately execute the vehicle time service method once, and then execute the vehicle time service method once at intervals of a preset time service interval, so as to ensure the accuracy of the time displayed by the vehicle-mounted system.
S102, processing the first time to be timed and the first time according to a preset timing rule corresponding to an external clock source aiming at the first time corresponding to any external clock source to obtain a timing result; the preset timing rule is used for judging the validity of the first time and the error result of the first time to be given time relative to the first time.
In an embodiment, the different external clock sources may have the same preset timing rule, or may have different preset timing rules, which is not limited. The first time is the time acquired from the external clock source at the current time.
Specifically, when the external clock source includes a satellite clock source, it may determine the validity of the first time and the error result of the first time to be transmitted with respect to the first time according to S301-S305 shown in fig. 3. The details are as follows:
s301, acquiring a time sequence; the time series includes a plurality of second times continuously acquired from the satellite clock source for a first predetermined duration.
In an embodiment, the satellite clock source may be the above-described GNSS clock source and GPS clock source, which will not be described. The first preset duration may be set according to actual situations, which is not limited. It should be noted that, for different first clock sources, the corresponding first preset durations may be different.
In an embodiment, the number of the first times may be determined according to a first receiving period in which the time service device obtains the second time from the first time Zhong Yuanna. Specifically, the time service device may determine a ratio of the first preset duration to the first receiving period as the number of second times received in the first preset duration.
Wherein the first time sequence should include a second time received every second first receiving period prior to the current time. Wherein when the current time becomes the next time, the first time at this time will become the second time, and the time acquired from the first clock source at the next time will be the first time. That is, "first" in the first time is only used to distinguish the time acquired by the first time as the current time.
The second time is not acquired from the first clock source for a long time, or is not acquired in the time sequence after the vehicle-mounted system is restarted. Based on this, the second time at this time may be initialized to a preset time. For example, 00:00:00 participates in the subsequent step processing.
It will be appreciated that in the time series, since the first preset duration is fixed and the first reception period for receiving the second time from the first clock source is fixed, the number of second times in the time series is also fixed. Based on this, the second time in the time series will typically change over time. The first preset duration should be greater than the first receiving period, otherwise, a plurality of second times cannot exist in the time sequence.
For example, the first preset duration may be 1s, and the first receiving period may be 100ms. That is, a second time is acquired every 100ms from within the first clock source.
In an embodiment, n second times may be fixedly stored in the time sequence, where Tn may be considered as the nth acquired second time; t1 is the first time acquired earliest in this time sequence. When the current moment changes, the received first time Tn+1 is taken as a second time to cover Tn in the time sequence and becomes a new second time; and sequentially covering the time sequences until the second time T1 acquired earliest before is covered by the T2 to form a new time sequence.
S302, determining a first time difference between the first time and the second time acquired earliest in the time sequence and a first preset duration.
S303, determining a second time difference between the first time and the first time to be given.
In an embodiment, the first time difference is a time difference obtained by subtracting the second time from the first time of the current time and a first preset duration. The second time difference is a time difference obtained by subtracting the first time to be time service from the first time.
It should be noted that, in the calculation process, the first time difference and the second time difference should take absolute values to participate in the subsequent processing.
S304, determining a time jump result between any two adjacent acquired second times.
In an embodiment, the time hopping result includes both a non-hopping result and a hopping result. Specifically, if the second time with the later acquisition time is later than the second time with the earlier acquisition time in the first time acquired by any two adjacent times, determining that the time hopping result is not hopping; if the second time with the later acquisition time is longer than or equal to the second time with the earlier acquisition time in the second time acquired by any two adjacent times, the time jump result can be determined to be jump.
It will be appreciated that the time service means continuously takes the second times from the first clock source, so that normally two adjacent second times, which take the second time later than the second time earlier than the taking time, should be earlier. Normally, a first reception period should be earlier.
Based on the above, when the second time with the later acquisition time is later than the second time with the earlier acquisition time, the time hopping result can be determined as non-hopping; for example, ti is later than Ti-1; otherwise, the time hopping result may be determined to be a hop. I.e. Ti is earlier than Ti-1. Wherein i is more than or equal to 1 and n is more than or equal to n.
It should be noted that, when there is a second time of the jump in the time sequence, although the first time may not jump, the second time due to the jump may have an effect on the subsequent reception of the second time in the time sequence. Therefore, in order to improve the time service accuracy, when the time hopping result is a hopping, the first time received at this time is considered to be invalid.
It should be added that, when the time jump result is determined to be jump, in order that the time jump result will not affect the validity judgment of the next acquired target first time, the second time with the earlier acquired time and the second time acquired before should be deleted from the time sequence to form a new time sequence.
Specifically, when Ti is earlier than Ti-1, the second time between T1 and Ti-1 may be deleted, at which time Ti is re-used as T1 in the time series, and a new time series is formed with a plurality of second times that are continuously acquired subsequently.
S305, determining a timing result of the first time according to the first time difference, the second time difference and the time jump result.
In an embodiment, the above described preset timing rule is used to determine validity of the first time and an error result of the first time to be timed relative to the first time. Based on the above, the time service device can determine that the first time is effective when the first time difference is smaller than a first preset duration and the time hopping result is non-hopping; and determining that the first time is invalid when the first time difference is greater than or equal to a first preset duration and/or the time jump result is jump. And determining that the error result is error when the second time difference is larger than the first preset time length; and when the second time difference is smaller than or equal to the first preset time length, determining that the error result is that the error does not exist.
Specifically, since the time sequence includes a plurality of second times continuously acquired from the external first clock source for a first preset duration, the first time and the second time acquired earliest in the time sequence should be separated by the first preset duration under normal conditions. That is, the first time difference is typically 0 after subtracting the second time acquired earliest in the time series from the first time and subtracting the first preset time period.
Based on this, when determining whether the first time is valid based on the first time difference, the time service device may directly determine that the first time is invalid when determining that the first time difference is greater than or equal to a first preset duration, that is, a time interval between the first time and the second time acquired earliest in the time sequence is greater than or equal to two first preset durations.
However, when the first time difference is determined to be smaller than the first preset time length, further determination needs to be performed by combining the time jump result. For example, when the time hopping result is non-hopping, the first time length is determined to be valid. Furthermore, the invalid first time is prevented from being used as the first time to be transmitted of the vehicle-mounted system, the problems that an external clock source generates clock backflow and clock jump in the time transmission process are solved, and the time transmission precision of the vehicle-mounted system is improved.
In another embodiment, the external clock source may further include a cloud clock source of the vehicle-mounted system, where different external clock sources may have different preset timing rules. Therefore, the timing device usually performs timing on the first time of the cloud clock source in a different manner from the steps S301-S305 described above. Specifically, the time service device may determine the validity of the first time and the error result of the first time to be time-serviced with respect to the first time according to S401-S403 shown in fig. 4. The details are as follows:
S401, determining the interval duration of time service for the second time service waiting time in the vehicle-mounted system.
In an embodiment, the interval duration is a current time, and the first time corresponding to the last time the target timing result is adopted is a time when the first time to be timed of the vehicle-mounted system is timed.
It will be appreciated that in order to improve the timing accuracy, the manner in which the timing device obtains the first time from multiple external clock sources should be different. Furthermore, when an abnormal condition occurs in one external clock source, the time service device can still execute the vehicle time service method.
For example, the method of acquiring the first time from the external clock source in the steps S301 to S305 may depend on the satellite signal, and the method of acquiring the first time from the external clock source in the steps S401 to S403 may depend on the functions such as network communication or broadcasting a message. For example, the cloud clock source may be a TSP clock source or a clock source within a base station.
Specifically, when the vehicle is in a special scene (for example, in a scene where the satellite signal is weak) and cannot acquire the first time from the satellite clock source (the GNSS clock source or the GPS clock source), in order to improve the time service precision, the time service device may further acquire the first time from the cloud clock source (the TSP clock source or the clock source in the base station) so as to time the first time to be serviced.
S402, determining a third time difference between the first time and the first time to be given.
In an embodiment, the third time difference is a time difference between the first time and the first time to be sent, and the absolute value of the third time difference may be used for processing when the subsequent steps are performed.
S403, determining a timing result of the first time according to the interval duration and the third time difference.
Specifically, when the interval time length is longer than the preset interval time length, the time service device can determine that the first time is effective; when the interval duration is less than or equal to the preset interval duration, the first time may be determined to be invalid. And when the third time difference is greater than the second preset time length, the time service device can determine that the error result is error; and if the interval duration is smaller than or equal to the preset interval duration, determining that the error result is not provided with the error.
The preset interval duration and the second preset duration can be set according to actual conditions, which is not limited. For example, the preset interval duration may be 24 hours.
S103, from all timing results, determining that the first time is effective and the error result is a target timing result with errors.
In an embodiment, the target timing result is a result that the first time is valid, and the first time to be sent is determined to have an error with respect to the valid first time.
In the step S102, there is usually only one target timing result among the plurality of timing results. However, when the first time is valid and the target timing result that the first time to be time-transferred has an error with respect to the valid first time is determined, the time transfer device may transfer time to the first time to be time-transferred by using the first time corresponding to the target timing result with the highest priority according to the priorities of the external clock sources corresponding to the target timing results, so as to further improve the precision of time transfer to the first time to be time-transferred.
Illustratively, the time accuracy of the GNSS external clock source is typically higher than the time accuracy of the TSP external clock source, and thus, the priority of the GNSS external clock source may be set higher than the priority of the TSP external clock source.
In another embodiment, when executing the preset timing rules, the timing device may be provided with a plurality of modules to execute each preset timing rule in parallel. Therefore, when executing step S102, the time service device may further time the first time corresponding to the first target timing result obtained first, so as to further improve the efficiency of time service for the first time to be time-serviced.
Specifically, the time service device may have two independent modules to execute the methods of S101 to S104, so as to determine a target time correction result, and perform a time service step on the first time to be time-serviced time according to the target time correction result. Therefore, the coupling degree of the programming process can be reduced, and a flexible, extensible or changeable clock source can be realized. For example, when a change to the second clock source is required, only the independent module of the second clock source may be programmed.
S104, timing the first time to be timed of the vehicle-mounted system by adopting the first time corresponding to the target timing result.
In an embodiment, the first time to be sent may be a time displayed on the display interface by the vehicle-mounted system at the current time, or may be a local time acquired from a local clock source of the vehicle-mounted system. When the vehicle time service method is not executed, the time displayed on the display interface by the in-vehicle system is usually a local time acquired from a local clock source.
Based on the above, when the first time to be timed is to be timed, the local time of the local clock source can be directly timed. Furthermore, the time service device can correct the situation that the deviation between the local time and the actual time is bigger and bigger due to long-time operation of the local clock source. Therefore, the accuracy of the time acquired and displayed by the vehicle-mounted system from the local clock source can be improved within the preset time service interval duration.
It should be noted that, in summary, the explanation of the steps S102 and S103 above shows that, since the time service device can obtain the time from the local clock source and the first clock source, respectively, if the first time is determined to be valid each time, the frequency of executing the time service by the time service device may be high if the following step S104 is executed. Based on this, the purpose of performing time service at the first time corresponding to the target time correction result is to: the time service frequency can be reduced on the basis of ensuring higher precision of the first time service time in the vehicle-mounted system. That is, when the time service device determines that the first time is effective, the time correction result is also determined according to an error result between the first time and the first time to be time service in the vehicle-mounted system. And then, when the error result is determined to be that the first time to be time of the vehicle-mounted system has an error and the first time is effective, the first time is time-stamped to be the first time to be time stamped of the vehicle-mounted system. Otherwise, when the error result is that the vehicle-mounted system time does not have the error, the first time waiting time of the vehicle-mounted system is still maintained.
In this embodiment, the time service device may first obtain the first time to be time service at the current time from the vehicle-mounted system, and obtain the first time from the plurality of external clock sources, respectively. And then, for the first time corresponding to each external clock source, processing the first time to be time and the first time according to a preset time correction rule corresponding to the external clock source so as to judge the validity of the first time and an error result of the first time to be time relative to the first time. And then, the time service device can determine the effective first time and the target time correction result with the first time to be time-service time error relative to the first time from all time correction results. And finally, carrying out time service on the first time to be time service time of the local clock source by adopting the first time corresponding to the target time correction result. Based on the time service device, the first time of the target timing result can be directly used for timing the first time to be time-serviced of the vehicle-mounted system, so that the time displayed by the vehicle-mounted system can be corrected. Furthermore, the situation that the deviation between the displayed time for waiting time and the actual time is larger and larger along with the extension of the service time of the vehicle-mounted system can be avoided. Therefore, the time accuracy of display can be improved when the vehicle displays the time on the display screen based on the first time waiting time of the vehicle-mounted system.
Referring to fig. 5, fig. 5 is a block diagram of a vehicle time service apparatus according to an embodiment of the present application. The vehicle time timing device in this embodiment includes modules for executing the steps in the embodiments corresponding to fig. 1, 3 and 4. Referring specifically to fig. 1, 3 and 4, and related descriptions in the embodiments corresponding to fig. 1, 3 and 4 are shown. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 5, the vehicle time service apparatus 500 may include: a time acquisition module 510, a timing module 520, a target timing result determination module 530, and a first time service module 540, wherein:
the time obtaining module 510 is configured to obtain a first time to be given at a current time from the vehicle-mounted system, and obtain the first time from a plurality of external clock sources, respectively.
The timing module 520 is configured to process, for a first time corresponding to any external clock source, the first time to be timed and the first time according to a preset timing rule corresponding to the external clock source, so as to obtain a timing result; the preset timing rule is used for judging the validity of the first time and the error result of the first time to be given time relative to the first time.
The target timing result determining module 530 is configured to determine, from all timing results, that the first time is valid and that the error result is the target timing result with the error.
The first time service module 540 is configured to time the first time to be time-serviced time of the vehicle-mounted system by using the first time corresponding to the target timing result.
In one embodiment, the external clock source comprises a satellite clock source; the timing module 520 is further configured to:
acquiring a time sequence; the time sequence comprises a plurality of second times continuously acquired from the satellite clock source in a first preset duration; determining a first time difference between the first time and a second time acquired earliest in the time sequence and a first preset duration; determining a second time difference between the first time and the first time to be time service; determining a time jump result between any two adjacent times of acquired second time; and determining a timing result of the first time according to the first time difference, the second time difference and the time jump result.
In one embodiment, the timing module 520 is further configured to:
if the second time acquired in any two adjacent times is later than the second time acquired in the early stage, determining that the time hopping result is not hopped; and if the second time with the later acquisition time is longer than or equal to the second time with the earlier acquisition time in the second time acquired by any two adjacent times, determining that the time jump result is jump.
In one embodiment, the timing module 520 is further configured to:
if the first time difference is smaller than the first preset duration and the time hopping result is that the time hopping is not performed, determining that the first time is effective; if the first time difference is greater than or equal to a first preset duration and/or the time jump result is jump, determining that the first time is invalid; if the second time difference is greater than the first preset time length, determining that the error result is error; if the second time difference is smaller than or equal to the first preset time length, determining that the error result is that the error does not exist.
In an embodiment, the external clock source includes a cloud clock source of the vehicle-mounted system; the timing module 520 is further configured to:
determining the interval duration of time service of the second time to be time service in the local clock source at the last time; determining a third time difference between the first time and the first time to be time-service time; and determining a timing result of the first time according to the interval duration and the third time difference.
In one embodiment, the timing module 520 is further configured to:
if the interval time length is longer than the preset interval time length, determining that the first time is effective; if the interval duration is smaller than or equal to the preset interval duration, determining that the first time is invalid; if the third time difference is greater than the second preset time length, determining that the error result is error; if the interval duration is smaller than or equal to the preset interval duration, determining that the error result is no error.
In one embodiment, the vehicle time timing device 500 further includes:
the clock state determining module is used for determining the clock state of the local clock source in the restarting process of the vehicle-mounted system.
And the second time service module is used for determining the time to be time service of the local clock source at the current time as the first time to be time service time if the clock state is in the power-on state, and executing the step of time service of the first time to be time service of the vehicle-mounted system by adopting the first time corresponding to the target time service result according to the preset time service interval duration.
A third time service module for determining the initialized preset time to be time service time as the first time to be time service time if the clock state is the power-down state, and executing the step of timing the first time to be timed of the vehicle-mounted system by adopting the first time corresponding to the target timing result.
It should be understood that, in the block diagram of the vehicle time service apparatus shown in fig. 5, each module is configured to perform each step in the embodiment corresponding to fig. 1, and each step in the embodiment corresponding to fig. 1 has been explained in detail in the foregoing embodiment, and reference is specifically made to fig. 1, fig. 3 and fig. 4, and the related descriptions in the embodiments corresponding to fig. 1, fig. 3 and fig. 4 are omitted herein.
Fig. 6 is a block diagram of a vehicle according to an embodiment of the present application. As shown in fig. 6, the vehicle 600 of this embodiment includes: a processor 610, a memory 620, and a computer program 630 stored in the memory 620 and executable on the processor 610, such as a program of a vehicle time timing method. The steps of the various embodiments of the vehicle time timing method described above, such as S101 to S104 shown in fig. 1, are implemented when the processor 610 executes the computer program 630. Alternatively, the processor 610 may implement the functions of the modules in the embodiment corresponding to fig. 5, for example, the functions of the modules 510 to 540 shown in fig. 5, when executing the computer program 630, and refer to the related descriptions in the embodiment corresponding to fig. 5.
For example, the computer program 630 may be partitioned into one or more modules that are stored in the memory 620 and executed by the processor 610 to implement the vehicle time timing method provided by embodiments of the present application. One or more of the modules may be a series of computer program instruction segments capable of performing particular functions for describing the execution of the computer program 630 in the vehicle 600. For example, the computer program 630 may implement the vehicle time service method provided in the embodiments of the present application.
The vehicle 600 may include, but is not limited to, a processor 610, a memory 620. It will be appreciated by those skilled in the art that fig. 6 is merely an example of a vehicle 600 and is not intended to limit the vehicle 600, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the vehicle may further include input and output devices, network access devices, buses, etc.
The processor 610 may be a central processing unit, but may also be other general purpose processors, digital signal processors, application specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 620 may be an internal storage unit of the vehicle 600, such as a hard disk or a memory of the vehicle 600. The memory 620 may also be an external storage device of the vehicle 600, such as a plug-in hard disk, a smart memory card, a flash memory card, etc. provided on the vehicle 600. Further, the memory 620 may also include both internal storage units and external storage devices of the vehicle 600.
The embodiments of the present application provide a computer readable storage medium storing a computer program, where the computer program is executed by a processor to perform the vehicle time timing method in the foregoing embodiments.
Embodiments of the present application provide a computer program product that, when run on a vehicle, causes the vehicle to perform the vehicle time service method of the various embodiments described above.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method of time service of a vehicle, the method comprising:
acquiring a first time to be time service under the current time from a vehicle-mounted system, and respectively acquiring the first time from a plurality of external clock sources;
Aiming at the first time corresponding to any external clock source, processing the first time to be timed and the first time according to a preset timing rule corresponding to the external clock source to obtain a timing result; the preset timing rule is used for judging the validity of the first time and an error result of the first time to be given time relative to the first time;
determining that the first time is valid and the error result is a target timing result with error from all the timing results;
and carrying out time service on the first time to be time service time of the vehicle-mounted system by adopting the first time corresponding to the target time correction result.
2. The method of claim 1, wherein the external clock source comprises a satellite clock source; the processing the first time to be time-transferred and the first time according to a preset time correction rule corresponding to an external clock source to obtain a time correction result comprises the following steps:
acquiring a time sequence; the time sequence comprises a plurality of second times continuously acquired from the satellite clock source in a first preset duration;
determining a first time difference between the first time and a second time acquired earliest in the time sequence and a first preset duration;
Determining a second time difference between the first time and the first time to be given;
determining a time jump result between any two adjacent times of acquired second time;
and determining a timing result of the first time according to the first time difference, the second time difference and the time jump result.
3. The method of claim 2, wherein determining the time jump result between any two adjacent acquired second times comprises:
if the second time acquired in any two adjacent times is later than the second time acquired in the early stage, determining that the time hopping result is not hopping;
and if the second time acquired in any two adjacent times is longer than or equal to the second time acquired in the early time, determining the time jump result as jump.
4. The method of claim 2, wherein the determining the timing result for the first time based on the first time difference, the second time difference, and the time hopping result comprises:
if the first time difference is smaller than the first preset duration and the time hopping result is that the time hopping is not performed, determining that the first time is effective;
If the first time difference is greater than or equal to the first preset duration and/or the time jump result is jump, determining that the first time is invalid;
if the second time difference is larger than the first preset time length, determining that the error result is error;
and if the second time difference is smaller than or equal to the first preset time length, determining that the error result is that the error does not exist.
5. The method of claim 1, wherein the external clock source comprises a cloud clock source of an in-vehicle system; the method comprises the steps of processing the first time to be time-transferred and the first time according to a preset time correction rule corresponding to an external clock source to obtain a time correction result, and further comprises the following steps:
determining the interval duration of time service of the second time to be time service in the vehicle-mounted system last time;
determining a third time difference between the first time and the first time to be given;
and determining a timing result of the first time according to the interval duration and the third time difference.
6. The method of claim 5, wherein said determining a timing result for said first time based on said interval duration and said third time difference comprises:
If the interval time length is longer than the preset interval time length, determining that the first time is effective;
if the interval duration is smaller than or equal to the preset interval duration, determining that the first time is invalid;
if the third time difference is larger than a second preset duration, determining that the error result is error;
if the interval duration is smaller than or equal to the preset interval duration, determining that the error result is that the error does not exist.
7. The method according to claim 1, characterized in that the method further comprises:
determining the clock state of a local clock source in the restarting process of the vehicle-mounted system;
if the clock state is in a power-on state, determining the time to be time-supplied of the local clock source at the current time as the first time to be time-supplied, and executing the step of time-supplying the first time to be time-supplied of the vehicle-mounted system by adopting the first time corresponding to the target time-correcting result according to the preset time-supplied interval duration;
and if the clock state is in a power-down state, determining the initialized preset time to be time as the first time to be time-shared, and executing the step of time-shared the first time to be time-shared of the vehicle-mounted system by adopting the first time corresponding to the target time calibration result.
8. A vehicle time service apparatus, the apparatus comprising:
the time acquisition module is used for acquiring a first time to be given time at the current time from the vehicle-mounted system and respectively acquiring the first time from a plurality of external clock sources;
the timing module is used for processing the first time to be timed and the first time according to a preset timing rule corresponding to the external clock source aiming at the first time corresponding to any external clock source to obtain a timing result; the preset timing rule is used for judging the validity of the first time and an error result of the first time to be given time relative to the first time;
the target timing result determining module is used for determining that the first time is effective and the error result is a target timing result with an error from all the timing results;
and the first time service module is used for carrying out time service on the first time to be time service time of the vehicle-mounted system by adopting the first time corresponding to the target time correction result.
9. A vehicle comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1 to 7.
CN202310270358.5A 2023-03-20 2023-03-20 Vehicle time timing method and device, vehicle and storage medium Pending CN116318512A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310270358.5A CN116318512A (en) 2023-03-20 2023-03-20 Vehicle time timing method and device, vehicle and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310270358.5A CN116318512A (en) 2023-03-20 2023-03-20 Vehicle time timing method and device, vehicle and storage medium

Publications (1)

Publication Number Publication Date
CN116318512A true CN116318512A (en) 2023-06-23

Family

ID=86823738

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310270358.5A Pending CN116318512A (en) 2023-03-20 2023-03-20 Vehicle time timing method and device, vehicle and storage medium

Country Status (1)

Country Link
CN (1) CN116318512A (en)

Similar Documents

Publication Publication Date Title
CN113110160B (en) Time synchronization method and device of domain controller, domain controller and storage medium
CN107678045B (en) Global positioning system starting method, user terminal and related medium product
CN112235033B (en) GNSS (Global navigation satellite System) common view system based on RDSS (remote data storage system) communication link
WO2020158319A1 (en) Vehicular device, and time synchronization method for vehicular device
CN111948686B (en) Time synchronization method and device
CN112653533B (en) Intelligent time service management method for complex system
US20110016343A1 (en) Synchronizing a Clock in a Vehicle Telematic System
CN112255906B (en) Timing method, visual navigation aid equipment control method and related device
WO2022062671A1 (en) Timing synchronization method, visual navigation aid device control method, and related apparatuses
CN110023778B (en) Positioning method and device
CN116318512A (en) Vehicle time timing method and device, vehicle and storage medium
US20210116577A1 (en) Positioning system, positioning device, and center device
CN111208543B (en) Quick positioning method and system by utilizing GEO satellite of BDS (brain-based data service) system
CN112752218A (en) Vehicle addressing method, vehicle, terminal and storage medium
CN114553353B (en) Timing method and device and vehicle-mounted wireless communication box
CN115441980A (en) Time synchronization method, time synchronization device and time synchronization equipment
CN110794426B (en) Cold start control method and device of receiver, terminal equipment and medium
CN114422066A (en) Navigation time calibration method and device and electronic equipment
CN113127082A (en) Data processing method, server, service node, system and storage medium
CN112512111A (en) Time determination method and device, and signal sending method and device
CN216014047U (en) Driving auxiliary system test equipment and vehicle
US10049060B2 (en) Semiconductor device and control method of the same
CN118018172B (en) Domain controller time synchronization system
CN111694033B (en) Position determining method and device for mobile device and mobile device
CN110737005B (en) Method for positioning chip and terminal 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