Network real-time time acquisition method, device, equipment, medium, product and vehicle
By receiving and responding to network real-time time acquisition requests, and determining the network real-time time based on the node's current time and pre-calculated deviation, the data fusion problem caused by vehicle node time deviation is solved, achieving high-precision time synchronization and meeting service requirements.
Patent Information
- Application Number
- CN202410725420.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2025-12-05
AI Technical Summary
In existing technologies, the time of vehicle nodes deviates significantly from NTP time, causing problems with data fusion and failing to meet the service requirements of nodes that rely on real-time network time.
By receiving network real-time time requests from the target application service, and determining and feeding back the network real-time time based on the node's current time and pre-calculated time deviation, the synchronization between the master node and the NTP server is avoided, and the nodes maintain high-precision time synchronization.
It achieves high-precision time synchronization among all nodes while meeting the service requirements of nodes that rely on real-time network time, thus avoiding time jumps and data fusion issues.
Smart Images

Figure CN121077602A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of vehicles, and particularly relates to a network real-time time acquisition method, device, equipment, medium, product and vehicle. BACKGROUND
[0002] With the rapid development of the automobile industry, more and more nodes (for example, cameras, radars and positioning boxes) are installed in vehicles. In order to successfully fuse the data of each node, each node and the vehicle master node need to keep high-precision time synchronization.
[0003] In the related art, an application service running on a node is based on the time of the node to provide services. In order to prevent time jumps of each node from causing problems in the fusion of data of each node, the vehicle master node usually only synchronizes time with a network time protocol (NTP) when the vehicle starts, which causes the time of each node to deviate more and more from the NTP time, and cannot meet the needs of services in the node that depend on network real-time time. SUMMARY
[0004] The application embodiment provides a network real-time time acquisition method, device, equipment, medium, product and vehicle, which can meet the needs of services in the node that depend on network real-time time.
[0005] In a first aspect, the application embodiment provides a network real-time time acquisition method, comprising:
[0006] receiving a network real-time time acquisition request sent by a target application service, wherein the target application service is any application service in the vehicle;
[0007] in response to the network real-time time acquisition request, determining network real-time time according to a current time of a node where the target application service is located and a time deviation, wherein the time deviation is calculated in advance according to a first real-time time of an NTP server when the node is at a first time, and the first time is a time before the current time;
[0008] feeding back the network real-time time to the target application service.
[0009] In a second aspect, the application embodiment provides a network real-time time acquisition device, comprising:
[0010] a receiving module configured to receive a network real-time time acquisition request sent by a target application service, wherein the target application service is any application service in the vehicle;
[0011] The first determining module is configured to determine the network real-time time according to the current time of the node where the target application service is located and the time deviation in response to the network real-time time acquisition request, wherein the time deviation is calculated in advance according to the first real-time time of the NTP server when the node is at a first time, and the first time is a time before the current time.
[0012] The feedback module is configured to feed back the network real-time time to the target application service.
[0013] In a third aspect, an electronic device is provided, and the electronic device includes a processor and a memory storing computer program instructions; and the processor reads and executes the computer program instructions to implement the steps of the network real-time time acquisition method.
[0014] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer program instructions; and the computer program instructions are executed by a processor to implement the steps of the network real-time time acquisition method.
[0015] In a fifth aspect, a computer program product is provided, and the computer program product includes computer program instructions; and the computer program instructions are executed by a processor to implement the steps of the network real-time time acquisition method.
[0016] In a sixth aspect, a vehicle is provided, and the vehicle includes at least one of the following:
[0017] The network real-time time acquisition device provided in the embodiments of the present application;
[0018] The electronic device provided in the embodiments of the present application;
[0019] The computer readable storage medium provided in the embodiments of the present application.
[0020] In the embodiments of the present application, the network real-time time acquisition request sent by the target application service is received; the network real-time time is determined according to the current time of the node where the target application service is located and the time deviation, wherein the time deviation is calculated in advance according to the first real-time time of the NTP server when the node is at a first time, and the first time is a time before the current time; and the network real-time time is fed back to the target application service. In this way, the target application service can acquire the network real-time time, meet the demand of the target application service for the network real-time time, and in the process, the time of the vehicle master node is not synchronized with the real-time time of the NTP server, so that the time jump of each node and the data fusion problem are avoided. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly introduced. Those drawings can help the ordinary skilled in the art to obtain other drawings without creative labor.
[0022] Figure 1 is a flow diagram of a network real-time time acquisition method provided by the embodiments of the present application.
[0023] Figure 2 is a schematic diagram of a service acquiring network real-time time provided by the embodiments of the present application.
[0024] Figure 3 is an architecture diagram of a node in a vehicle provided by the embodiments of the present application.
[0025] Figure 4 is a structural schematic diagram of a network real-time time acquisition device provided by the embodiments of the present application.
[0026] Figure 5 is a structural schematic diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly introduced. Those drawings can help the ordinary skilled in the art to obtain other drawings without creative labor.
[0028] In the following description, many specific details are set forth in order to fully understand the present application, but the present application can also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some of the embodiments of the present application, not all the embodiments.
[0029] The network real-time time acquisition method, device, equipment, medium, product and vehicle provided by the embodiments of the present application will be described in detail below in combination with the drawings and specific embodiments and application scenarios.
[0030] The network real-time time acquisition method in the embodiments of the present application can be applied to an electronic device, which can be a Full-Self Driving (FSD) controller in a vehicle.
[0031] Figure 1 is a flow diagram of a network real-time time acquisition method provided by the embodiments of the present application. As shown in Figure 1 , the network real-time time acquisition method can include:
[0032] Step 101: receiving a network real-time time acquisition request sent by a target application service, wherein the target application service is any one of application services in the vehicle;
[0033] In some possible implementations of the embodiments of the present application, when the target application service needs to provide services based on the network real-time time, the FSD controller can be sent a network real-time time acquisition request, and the FSD controller receives the network real-time time acquisition request sent by the target application service.
[0034] In some possible implementations of the embodiments of the present application, the target application service in the embodiments of the present application is not limited to: a navigation service (which needs to provide the geographic position of the vehicle in real time), an automatic parking service (which needs to monitor obstacles in real time), and the like.
[0035] Step 102: in response to the network real-time time acquisition request, determining the network real-time time according to the current time of the node where the target application service is located and the time deviation, wherein the time deviation is calculated in advance according to the first real-time time of the NTP server when the node is at a first time, and the first time is a time before the current time.
[0036] In some possible implementations of the embodiments of the present application, the current time is the time of the node where the target application service is located when the target application service sends the network real-time time acquisition request to the FSD controller.
[0037] In some possible implementations of the embodiments of the present application, the FSD controller can maintain the time deviation between the time of each node and the real-time time of the NTP server, and the NTP server can provide accurate real-time time.
[0038] After the FSD controller receives the network real-time time acquisition request sent by a certain application service, the FSD controller determines the network real-time time according to the current time of the node where the application service is located and the time deviation when the application service sends the network real-time time acquisition request.
[0039] In some possible implementations of the embodiments of the present application, the sum of the current time and the time deviation can be determined as the network real-time time.
[0040] In some possible implementations of the embodiments of the present application, before step 102, the network real-time time acquisition method provided by the embodiments of the present application can further include: acquiring the first real-time time of the network time protocol server and the first time of the node where the target application service is located when acquiring the first real-time time every preset time length; and determining the difference between the first real-time time and the first time as the time deviation.
[0041] In some possible implementations of the embodiments of the present application, the preset time length can be set according to actual needs.
[0042] Exemplarily, asFigure 2 As shown in Figure 2 is a schematic diagram of service obtaining network real-time time provided by an embodiment of the present application. When the time of the node where the service is located is T1, the real-time time of the NTP server obtained is T2, and the time offset is offset=T2-T1; when the time of the node where the service is located is T3, the network real-time time needs to be obtained, and it is determined that when the time of the node where the service is located is T3, the network real-time time T4=T3+offset=T3+(T2-T1).
[0043] In some possible implementations of the embodiment of the present application, the FSD controller can obtain the first real-time time of the NTP server through the mobile network.
[0044] Exemplarily, as Figure 3 As shown in Figure 3 is an architecture diagram of a node in a vehicle provided by an embodiment of the present application.
[0045] In Figure 3 , when the vehicle starts, the master node controller synchronizes with the NTP server through the mobile network, and the nodes in the vehicle (for example, radar, positioning box, camera, etc.) keep high-precision time synchronization with the master node controller through the FSD controller.
[0046] The FSD controller obtains the time of the NTP server through the mobile network every preset time length, and obtains the time of each node. For each node, the time offset between the time of the NTP server and the time of the node is calculated, and the time offset of the node is maintained. It should be noted that, since the time of each node is high-precision time synchronized with the time of the master node, the time offset between the time of the NTP server and the time of the master node can be used as the time offset between the time of the NTP server and the time of each node.
[0047] When a service on a node needs to provide a service based on the network real-time time, the service sends a network real-time time obtaining request to the FSD controller, and the FSD calculates the sum of the time of the node and the time offset to obtain the network real-time time.
[0048] Step 103: feeding back the network real-time time to the target application service.
[0049] In the embodiment of the present application, a network real-time time acquisition request sent by a target application service is received, and the network real-time time is determined according to the current time of the node where the target application service is located and the time deviation, wherein the time deviation is calculated according to the first real-time time of the NTP server when the node is at the first time, and the first time is a time before the current time; the network real-time time is fed back to the target application service. In this way, the target application service can obtain the network real-time time, meet the demand of the target application service, and in the process, the time of the vehicle master node is not synchronized with the real-time time of the network time protocol server, avoiding the time jump of each node and the problem of data fusion. That is, while maintaining high-precision time synchronization between each node and the vehicle master node, the demand of the service in the node that depends on the network real-time time can be met.
[0050] The network real-time time acquisition method provided by the embodiment of the present application will be described below in combination with specific examples.
[0051] The vehicle master node controller is in communication connection with the NTP server through the mobile network, and the FSD controller is in communication connection with the NTP server through the mobile network.
[0052] Suppose the vehicle starts at 12:10:00.000, when the vehicle starts, the master node controller synchronizes with the NTP server through the mobile network, and each node (such as radar, positioning box, and camera, etc.) in the vehicle keeps high-precision time synchronization with the master node controller through the FSD controller.
[0053] The FSD controller acquires the time of the NTP server through the mobile network every preset time interval, and acquires the time of each node, calculates the time deviation between the time of the NTP server and the time of each node for each node, and maintains the time deviation of the node.
[0054] For example, the FSD controller acquires the time of the NTP server through the mobile network every 10 minutes.
[0055] Suppose the acquired time of the NTP server is 12:10:00.000, and the time of the vehicle positioning box is 12:09:59.900, then the time deviation between the time of the NTP server and the time of the vehicle positioning box is 100 milliseconds.
[0056] When the navigation service is started, the vehicle's geographic position needs to be provided in real time at this time, the navigation service sends a network real-time time acquisition request to the FSD controller, the FSD controller acquires the current time of the vehicle positioning box in real time, calculates the sum of the current time of the vehicle positioning box and the above-mentioned time deviation of 100 milliseconds, obtains the network real-time time, sends the calculated network real-time time to the vehicle positioning box, and the navigation service in the vehicle positioning box provides the geographic position required for navigation in real time based on the network real-time time.
[0057] After an interval of 10 minutes, the acquired time of the NTP server is 12:20:00.000, and the time of the vehicle positioning box is 12:19:59.950, so the time deviation between the time of the NTP server and the time of the vehicle positioning box is 50 milliseconds.
[0058] Assuming that the navigation service is not closed, at this time, the FSD controller continues to acquire the current time of the vehicle positioning box in real time, calculates the sum of the current time of the vehicle positioning box and the above-mentioned time deviation of 50 milliseconds, obtains the network real-time time, and sends the calculated network real-time time to the vehicle positioning box. The navigation service in the vehicle positioning box continues to provide the geographic position required for navigation in real time based on the network real-time time.
[0059] For another example, the FSD controller acquires the time of the NTP server through the mobile network every 1 minute.
[0060] Assuming that the acquired time of the NTP server is 12:10:00.000, and the time of the vehicle radar is 12:09:59.900, then the time deviation between the time of the NTP server and the time of the vehicle radar is 100 milliseconds.
[0061] When the automatic parking service is started, the vehicle radar needs to detect obstacles in real time at this time to prevent collisions, the automatic parking service sends a network real-time time acquisition request to the FSD controller, the FSD controller acquires the current time of the vehicle radar in real time, calculates the sum of the current time of the vehicle radar and the above-mentioned time deviation of 100 milliseconds, obtains the network real-time time, and sends the calculated network real-time time to the radar. The automatic parking service in the radar is based on the network real-time time for parking.
[0062] After an interval of 1 minute, the acquired time of the NTP server is 12:11:00.000, and the time of the vehicle radar is 12:10:59.990, so the time deviation between the time of the NTP server and the time of the vehicle radar is 10 milliseconds.
[0063] Assuming that the automatic parking service is not closed, at this time, the FSD controller continues to obtain the current time of the vehicle radar in real time, calculates the sum of the current time of the vehicle radar and the time deviation 10 milliseconds described above, obtains the network real-time time, and sends the calculated network real-time time to the vehicle positioning box. The automatic parking service in the vehicle positioning box continues to park based on the network real-time time.
[0064] Corresponding to the method embodiments described above, the embodiments of the present application also provide a network real-time time obtaining device. As shown in Figure 4 Figure 4 is a structural schematic diagram of the network real-time time obtaining device provided by the embodiments of the present application. The network real-time time obtaining device 400 can include:
[0065] The receiving module 401 is configured to receive a network real-time time obtaining request sent by a target application service, wherein the target application service is any application service in the vehicle.
[0066] The first determining module 402 is configured to determine a network real-time time according to the current time of the node where the target application service is located and a time deviation in response to the network real-time time obtaining request, wherein the time deviation is calculated in advance according to a first real-time time of an NTP server when the node is at a first time, and the first time is a time before the current time.
[0067] The feedback module 403 is configured to feed back the network real-time time to the target application service.
[0068] In the embodiments of the present application, the network real-time time obtaining request sent by the target application service is received. The network real-time time is determined according to the current time of the node where the target application service is located and the time deviation, wherein the time deviation is calculated in advance according to the first real-time time of the NTP server when the node is at the first time, and the first time is a time before the current time. The network real-time time is fed back to the target application service. In this way, the target application service can obtain the network real-time time, meet the needs of the target application service, and in the process, the time of the vehicle master node is not synchronized with the real-time time of the network time protocol server, avoiding the time jump of each node and the problem of data fusion. That is, the needs of the services in the node that depend on the network real-time time can be met while maintaining high-precision time synchronization between each node and the vehicle master node.
[0069] In some possible implementations of the embodiments of the present application, the first determining module 402 is specifically configured to:
[0070] determine the sum of the current time and the time deviation as the network real-time time.
[0071] In some possible implementations of the embodiments of the present application, the network real-time time obtaining apparatus 400 provided by the embodiments of the present application further includes:
[0072] The obtaining module is configured to obtain the first real-time time of the network time protocol server and the first time at which the target application service is located every preset time length.
[0073] The second determining module is configured to determine the difference between the first real-time time and the first time as the time deviation.
[0074] In some possible implementations of the embodiments of the present application, the obtaining module is specifically configured to:
[0075] The first real-time time of the network time protocol server is obtained through a mobile network.
[0076] Figure 5 FIG. 1 is a structural schematic diagram of an electronic device provided by the embodiments of the present application.
[0077] The electronic device can include a processor 501 and a memory 502 storing computer program instructions.
[0078] Specifically, the processor 501 can include a central processing unit (CPU), or a specific integrated circuit (ASIC), or can be configured to implement one or more integrated circuits of the embodiments of the present application.
[0079] The memory 502 can include a mass storage for data or instructions. For example, but not limited to, the memory 502 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of the above. The memory 502 can include a removable or non-removable (or fixed) medium, as appropriate. The memory 502 can be internal or external to the electronic device, as appropriate. In some specific embodiments, the memory 502 is a non-volatile solid-state memory.
[0080] In some particular embodiments, the memory can include Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions that, when executed (e.g., by one or more processors), are operable to perform the operations described with reference to the network real-time time acquisition method according to the present application.
[0081] The processor 501 implements the steps of the network real-time time acquisition method provided by the embodiments of the present application by reading and executing the computer program instructions stored in the memory 502.
[0082] In some examples, the electronic device can also include a communication interface 503 and a bus 510. Wherein, as shown in the figure, the processor 501, the memory 502, the communication interface 503 are connected through the bus 510 and complete the communication between each other. Figure 5
[0083] The communication interface 503 is mainly used to realize the communication between each module, device, unit and / or equipment in the embodiments of the present application.
[0084] Bus 510 includes a hardware, software, or both that couples components of electronic device to each other. As an example and not by way of limitation, bus can include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand™ interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or another suitable bus or a combination of two or more of these. Where appropriate, bus 510 can include one or more buses. Although this application describes and shows a particular bus, this application contemplates any suitable bus or interconnect.
[0085] The electronic device can execute the network real-time time obtaining method provided by the embodiments of the present application, so as to achieve the corresponding technical effects of the network real-time time obtaining method provided by the embodiments of the present application.
[0086] In addition, in combination with the network real-time time obtaining method in the above embodiments, the embodiments of the present application also provide a computer readable storage medium for implementation. The computer readable storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to implement the steps of the network real-time time obtaining method provided by the embodiments of the present application. Examples of the computer readable storage medium include non-transitory computer readable media, such as ROM, RAM, magnetic disk or optical disk, etc.
[0087] The embodiments of the present application also provide a computer program product, which includes computer program instructions, and the computer program instructions are executed by a processor to implement the steps of the network real-time time obtaining method provided by the embodiments of the present application, and can achieve the same technical effects. To avoid repetition, it will not be repeated here.
[0088] The embodiment of the present application further provides a vehicle comprising at least one of the following:
[0089] The embodiment of the present application provides a network real-time time acquisition device.
[0090] The embodiment of the present application provides an electronic device.
[0091] The embodiment of the present application provides a computer readable storage medium.
[0092] It should be noted that, in this document, relational terms such as“first” and“second”, and the like, are used solely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms“comprises”,“comprising”,“includes”,“including” or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by“comprises a...” does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
Claims
1. A network real-time time acquisition method, characterized by, The method comprises: receiving a network real-time time acquisition request sent by a target application service, wherein the target application service is any application service in a vehicle; in response to the network real-time time acquisition request, determining a network real-time time according to a current time of a node where the target application service is located and a time offset, wherein the time offset is calculated in advance according to a first real-time time of a network time protocol server when the node is at a first time, and the first time is a time before the current time; feeding back the network real-time time to the target application service.
2. The method of claim 1, wherein, The determination of the network real-time time according to the current time of the node where the target application service is located and the time offset comprises: determining a sum of the current time and the time offset as the network real-time time.
3. The method of claim 1, wherein, Before the determination of the network real-time time according to the current time of the node where the target application service is located and the time offset, the method further comprises: acquiring the first real-time time of the network time protocol server and a first time when the node is located at every preset time interval; determining a difference between the first real-time time and the first time as the time offset.
4. The method of claim 3, wherein, The acquisition of the first real-time time of the network time protocol server comprises: acquiring the first real-time time of the network time protocol server through a mobile network.
5. A network real-time time acquisition apparatus characterized by comprising: The apparatus comprises: a receiving module configured to receive a network real-time time acquisition request sent by a target application service, wherein the target application service is any application service in a vehicle; a first determining module configured to determine a network real-time time according to a current time of a node where the target application service is located and a time offset in response to the network real-time time acquisition request, wherein the time offset is calculated in advance according to a first real-time time of a network time protocol server when the node is at a first time, and the first time is a time before the current time; a feeding back module configured to feed back the network real-time time to the target application service.
6. The apparatus of claim 5, wherein, The first determining module is specifically configured to: determine a sum of the current time and the time offset as the network real-time time.
7. The apparatus of claim 5, wherein, The apparatus further comprises: an acquiring module configured to acquire the first real-time time of the network time protocol server and a first time when the node is located at every preset time interval; a second determining module configured to determine a difference between the first real-time time and the first time as the time offset.
8. The apparatus of claim 7, wherein, The acquiring module is specifically configured to: acquire the first real-time time of the network time protocol server through a mobile network.
9. An electronic device, comprising: The electronic device comprises a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the steps of the network real-time time acquisition method according to any one of claims 1-4.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the steps of the network real-time time acquisition method according to any one of claims 1-4.
11. A computer program product, characterised in that, The computer program product comprises computer program instructions which, when executed by a processor, implement the steps of the network real-time time acquisition method according to any one of claims 1-4.
12. A vehicle characterized by comprising: The vehicle comprises at least one of: The network real-time time acquisition apparatus according to any one of claims 5-8; The electronic device according to claim 9; The computer readable storage medium according to claim 10.