Time difference determination methods, devices and electronic equipment
By directly recording operation times between functional modules of the same device in an autonomous vehicle and calculating the time difference, the problem of low time synchronization accuracy in existing technologies is solved, achieving higher measurement accuracy and resource conservation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2022-11-03
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies use network tools for time comparison programs when measuring the time synchronization accuracy between multiple modules, resulting in low accuracy of time difference measurement and wasted computing resources.
By sending target signals between functional modules within the same device, the operation time of the actuator is directly recorded, and the time difference between modules is calculated, thus avoiding the use of timestamps in network tools.
It improves the accuracy of time difference measurement, saves computing resources, and enhances the intelligence and safety of autonomous vehicles.
Smart Images

Figure CN115686127B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of cloud computing technology, and more particularly to the fields of autonomous driving and big data technology, specifically to a time difference determination method, apparatus, and electronic device. Background Technology
[0002] Currently, it is often necessary to measure the accuracy of time synchronization between multiple modules, thus requiring testing of the time difference between them. The current approach typically uses network time comparison tools to test this time difference. These tools usually calculate the transmission time between modules using timestamps, and then determine the time difference between them. Summary of the Invention
[0003] This disclosure provides a method, apparatus, and electronic device for determining time difference.
[0004] According to a first aspect of this disclosure, a method for determining a time difference is provided, comprising:
[0005] Target signals are synchronously sent to the first actuator of the first module and the second actuator of the second module. The target signals are used to control the first actuator and the second actuator to perform target operations. The first module and the second module are functional modules in the same device.
[0006] The system receives a first moment sent by the first actuator and a second moment sent by the second actuator, wherein the first moment is the moment when the first actuator performs the target operation according to the target signal, and the second moment is the moment when the second actuator performs the target operation according to the target signal;
[0007] The time difference between the first module and the second module is determined based on the first time and the second time.
[0008] According to a second aspect of this disclosure, a time difference determination apparatus is provided, comprising:
[0009] The first sending module is used to synchronously send target signals to the first actuator of the first module and the second actuator of the second module. The target signals are used to control the first actuator and the second actuator to perform target operations. The first module and the second module are functional modules in the same device.
[0010] A first receiving module is configured to receive a first moment sent by the first actuator and a second moment sent by the second actuator, wherein the first moment is the moment when the first actuator performs the target operation according to the target signal, and the second moment is the moment when the second actuator performs the target operation according to the target signal;
[0011] The first determining module is used to determine the time difference between the first module and the second module based on the first time and the second time.
[0012] According to a third aspect of this disclosure, an electronic device is provided, comprising:
[0013] At least one processor; and
[0014] A memory that is communicatively connected to at least one processor; wherein,
[0015] The memory stores instructions that can be executed by at least one processor to enable the at least one processor to perform any of the methods in the first aspect.
[0016] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing a computer to perform any of the methods in the first aspect.
[0017] According to a fifth aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the methods in the first aspect.
[0018] In this embodiment of the disclosure, the time difference between the first module and the second module can be determined based on the first moment when the first actuator performs the target operation and the second moment when the second actuator performs the target operation. The time difference determined by this method has a smaller error and higher accuracy. At the same time, it does not require a separate network tool time comparison program to calculate the time difference, thus saving computing resources.
[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0020] Figure 1 This is a flowchart of a time difference determination method provided in an embodiment of this disclosure;
[0021] Figure 2 This is an application scenario diagram of a time difference determination method provided in an embodiment of this disclosure;
[0022] Figure 3 This is an application scenario diagram of another time difference determination method provided in this disclosure embodiment;
[0023] Figure 4 This is a schematic diagram of the structure of a time difference determination device provided in an embodiment of this disclosure;
[0024] Figure 5 This is a schematic diagram of another time difference determination device provided in an embodiment of this disclosure;
[0025] Figure 6 This is a schematic diagram of another time difference determination device provided in an embodiment of this disclosure;
[0026] Figure 7 This is a schematic block diagram of an example electronic device used to implement embodiments of the present disclosure. Detailed Implementation
[0027] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0028] Currently, when calculating the time difference between different modules, it is usually necessary to use network tools for time comparison to test the time difference. These network tools typically use timestamps to calculate the transmission time between modules, and then calculate the time difference between modules. However, the accuracy of the time difference calculated in this way is usually at the millisecond level, meaning that the accuracy of the calculated time difference is low.
[0029] In addition, a separate network tool is required to calculate the time difference, which leads to a waste of computing resources.
[0030] Meanwhile, when network tools calculate time differences, they usually use Internet Control Message Protocol (ICMP) or Internet Protocol Address (IP) timestamps. However, ICMP or IP timestamps are easily ignored by other modules during transmission, resulting in the inability to measure the time difference between modules or low accuracy of the measured time difference. The aforementioned other modules can be routing modules or other functional modules.
[0031] To address the above problems, the present disclosure proposes the following solutions:
[0032] It should be noted that the embodiments disclosed herein can be applied to the controller of the first module, that is, the execution subject of each step in the embodiments disclosed herein can be the controller of the first module.
[0033] See Figure 1 , Figure 1 A flowchart of a time difference determination method provided in this disclosure embodiment is shown below. Figure 1 As shown, the method for determining the time difference includes the following steps:
[0034] Step S101: Synchronously send a target signal to the first actuator of the first module and the second actuator of the second module. The target signal is used to control the first actuator and the second actuator to perform the target operation. The first module and the second module are functional modules in the same device.
[0035] The synchronous transmission of target signals to the first and second actuators can be described as follows: the error between the transmission times of the target signals to the first and second actuators can be less than or equal to a preset difference, and the preset difference can be 0.
[0036] Among them, the first actuator and the second actuator can be referred to as external actuators, while the first module and the second module are functional modules in the same device. The functions of the first module and the second module can be the same or different, and the functions that the first module and the second module can achieve are not specifically limited here.
[0037] The number of second modules is not limited here. As an optional implementation, there can be multiple second modules. The calculation method of the time difference between each second module and the first module can refer to this implementation. In this way, by synchronously sending target signals to the first actuator of the first module and the second actuators of multiple second modules, the time difference between the first module and each of the multiple second modules can be calculated, thereby improving the calculation efficiency of the time difference.
[0038] As an optional implementation, the first module and the second module are different functional modules in an autonomous vehicle.
[0039] In this embodiment of the disclosure, since the first module and the second module are different functional modules in the autonomous vehicle, the time difference between the first module and the second module can be accurately calculated, thereby improving the intelligence and safety of the autonomous vehicle.
[0040] The specific details of the target signal and target operation are not limited here.
[0041] As an optional implementation, the target signal can be a braking signal, and the target operation can be a braking operation.
[0042] As an optional implementation, the target signal is an interrupt signal, and the target operation is an interrupt operation.
[0043] In this embodiment of the disclosure, when the target signal is an interrupt signal and the target operation is an interrupt operation, the first actuator and the second actuator can directly respond to and execute the interrupt operation when they receive the target signal, without needing to decode and parse the target signal. That is, there is no need to spend time decoding and parsing the target signal, thereby making the accuracy of the recorded first moment and second moment higher, and thus improving the accuracy of the calculated time difference.
[0044] For example, when the target signal is an interrupt signal and the target operation is an interrupt operation, if the target signal is sent synchronously at 1.05 microseconds, the first module receives the target signal at 1.1 microseconds, and the second module receives the target signal at 1.15 microseconds, then the time when the first actuator executes the target operation (i.e., the first moment mentioned later) can be 1.1 microseconds, and the time when the second actuator executes the target operation (i.e., the second moment mentioned later) can be 1.15 microseconds. Therefore, the time difference between the first module and the second module can be 1.15 - 1.1 = 0.05 microseconds.
[0045] When the target signal is a non-interruptible signal and the target operation is a non-interruptible operation, the time when the target signal is synchronously sent is 1.05 microseconds. When the first module receives the target signal is 1.1 microseconds and the second module receives the target signal is 1.15 microseconds, the first module needs to decode and parse the target signal, which takes 0.1 microseconds. The time when the first actuator executes the target operation (i.e., the first moment in the following text) can be 1.1 + 0.1 = 1.2 microseconds. Similarly, the second module needs to decode and parse the target signal, which takes 0.2 microseconds. The time when the second actuator executes the target operation (i.e., the second moment in the following text) can be 1.15 + 0.2 = 1.35 microseconds. Therefore, the time difference between the first module and the second module can be 1.35 - 1.2 = 0.15 microseconds. It is evident that when the target signal is an interrupt signal and the target operation is an interrupt operation, the accuracy of the time difference between the first module and the second module can be improved because there is no need to decode and parse the target signal.
[0046] Step S102: Receive a first moment sent by the first actuator and a second moment sent by the second actuator. The first moment is the moment when the first actuator performs the target operation according to the target signal, and the second moment is the moment when the second actuator performs the target operation according to the target signal.
[0047] Wherein, after the first actuator receives the target signal, the first actuator can perform the target operation according to the target signal, and the first module can record the first moment when the first actuator performs the target operation; similarly, after the second actuator receives the target signal, the second actuator can perform the target operation according to the target signal, and the second module can record the second moment when the second actuator performs the target operation.
[0048] Step S103: Determine the time difference between the first module and the second module based on the first time and the second time.
[0049] In this embodiment of the disclosure, through steps S101 to S103, the time difference between the first module and the second module can be determined based on the first moment when the first actuator performs the target operation and the second moment when the second actuator performs the target operation. The time difference determined by this method has a smaller error and higher accuracy. At the same time, it does not require the use of a separate network tool time comparison program to calculate the time difference, thus saving computing resources. That is, the calculation of the time difference between the first module and the second module can be realized without relying on other devices outside the device.
[0050] Furthermore, since the embodiments of this disclosure calculate the time difference between the first module and the second module using the target signal, there is no need to calculate the time difference between the first module and the second module using ICMP or IP timestamps. Therefore, the time difference will not be ignored by either the first module or the second module, thereby improving the availability and accuracy of the time difference.
[0051] It should be noted that the specific method for determining the time difference between the first module and the second module based on the first and second moments is not limited here.
[0052] As an alternative implementation, the time difference can be obtained by subtracting the smaller time from the larger time between the first and second time points.
[0053] As an optional implementation, determining the time difference between the first module and the second module based on the first time and the second time includes:
[0054] Determine the absolute value of the difference between the first time point and the second time point;
[0055] The absolute value is determined as the time difference between the first module and the second module.
[0056] In this embodiment of the disclosure, the absolute value of the difference between the first time point and the second time point is determined as the time difference between the first module and the second module. This makes the calculation of the time difference more convenient and increases the diversity of the calculation methods for the time difference.
[0057] As an optional implementation, it also includes:
[0058] Receive the target time sent by the time source module;
[0059] The calibration time is determined based on the target time and the time difference;
[0060] The calibration time is sent to the second module.
[0061] The time source module can be a module in the device, that is, it can be a module in the same device as the first module and the second module.
[0062] Alternatively, the time source module can also be a module in other devices, meaning the time source module is a module in a different device than the first and second modules. For example, the time source module can be a module in a time server, and the time server can include at least one of the following servers: a Global Positioning System (GPS) time server and a Network Time Protocol (NTP) server.
[0063] It should be noted that since the target time is provided by the time source module, its accuracy can be considered relatively high. Furthermore, both the first and second modules can be equipped with counters, allowing them to operate independently. This means that the times of the first and second modules are not identical. Upon receiving the target time, the first module can update its own time and send a calibration time to the second module. This allows the second module to update its time based on the calibration time, thus achieving time synchronization between the first and second modules.
[0064] The specific method for determining the calibration time based on the time difference and the target time is not limited here. As an optional implementation method, the sum or difference between the target time and the time difference can be used to determine the calibration time.
[0065] As another alternative implementation, the product of the time difference and the target coefficient can be determined first, and then the sum or difference of the target time and the product can be determined as the calibration time. The target coefficient can be a scene coefficient, and different scenes correspond to different scene coefficients. Alternatively, the target coefficient can be a module function coefficient, and different modules correspond to different function coefficients.
[0066] In this embodiment of the disclosure, the calibration time can be determined based on the time difference and the target time, and the calibration time can be sent to the second module. In this way, the second module can update the time on the second module according to the calibration time, thereby enhancing the correlation and consistency of the time between the second module and the first module, and improving the accuracy of the time update of the second module.
[0067] For example: see Figure 2 , Figure 2 It includes a time source module 201, a first module 202, and three second modules 203. The first module 201 can be called the receiving time module, while the second modules 203 can be called other functional modules (such as a calculation module or an autonomous driving module). The three second modules 203 can be called module 1, module 2, and module 3, respectively. In this way, time synchronization between the first module 201 and the three second modules 203 can be achieved.
[0068] As an optional implementation, the first module and the second actuator are connected via a first data transmission line and a wireless network, respectively, and the first actuator is connected to the second data transmission line.
[0069] The synchronous transmission of target signals to the first actuator of the first module and the second actuator of the second module includes:
[0070] The target signal is transmitted synchronously to the second actuator and the first actuator through the first data transmission line and the second data transmission line, respectively.
[0071] Receiving the first moment sent by the first module and receiving the second moment sent by the second module includes:
[0072] The first moment is received from the first actuator via the second data transmission line, and the second moment is received from the second actuator via the first data transmission line and / or the wireless network.
[0073] The second data transmission line can be considered to be electrically connected to the controller and the first actuator of the first module respectively. The controller and the first actuator of the first module can transmit the target signal and the first moment through the second data transmission line.
[0074] The controller and the second actuator of the first module can be connected via a first data transmission line and a wireless network, respectively. In this way, the controller and the second actuator of the first module can transmit target signals and second moments through the first data transmission line and the wireless network.
[0075] In this embodiment of the disclosure, since the controller of the first module can synchronously send target signals to the second actuator and the first actuator through the first data transmission line and the second data transmission line respectively, and the first data transmission line and the second data transmission line can be understood as pure hardware, that is, when the target signal is transmitted through pure hardware, the data transmission delay is small, or even negligible, thereby reducing the error caused by the transmission delay of the target signal between the first module and the second module, that is, further improving the accuracy of the time difference between the first module and the second module.
[0076] See Figure 3 , Figure 3 This is an application scenario diagram of an embodiment of this disclosure, such as... Figure 3 As shown, it includes module 0, module 1, module 2, module 3, and module n. Module 0 can be understood as the first module in the above embodiment, and modules 1, 2, 3, and n can all be understood as the second modules in the above embodiment. Figure 3 The dashed line in the middle can be understood as the transmission direction of the target signal sent by module 0 to modules 1, 2, 3, and n. Figure 3 The solid line in the middle can be understood as the transmission direction of the first or second moment when modules 1, 2, 3 and n send data to module 0.
[0077] Specifically, Figure 3 The interaction between the modules in the application scenario diagram can be understood as follows:
[0078] Step S301: Centered on module 0 (i.e. the first module in the above embodiment), each module sets the external interrupt priority to the highest priority. When it is necessary to measure the time difference, module 0 first sends an external interrupt signal to other modules (other modules are modules 1 to n, and modules 1 to n are the second module in the above embodiment) and module 0 itself (i.e. the first actuator of the first module).
[0079] Step S302: After receiving the external interrupt sent by itself, module 0 (the first actuator of the first module) records the time T0 of module 0 at this moment (i.e. the first moment);
[0080] Step S303: After receiving the external interrupt signal, modules 1 to n record the system time of their respective modules (i.e., the second time) at the time of the interruption. That is, when module 1 receives the external interruption, it is T1, and when module n receives the external interruption, it is Tn.
[0081] Step S304: Modules 1 to n send their respective recorded T1 to Tn to module 0. The sending method can be data cable transmission or wireless network communication.
[0082] Step S305: Module 0 is responsible for calculating the time difference between each module. For example, the time difference between Module 1 and Module 2 is the absolute value of T1-T2.
[0083] Thus, the embodiments disclosed herein can also improve the accuracy of the time difference and save computing resources.
[0084] See Figure 4 , Figure 4 A structural diagram of a time difference determination device provided in an embodiment of this disclosure is shown below. Figure 4 As shown, the time difference determining device 400 includes:
[0085] The first sending module 401 is used to synchronously send target signals to the first actuator of the first module and the second actuator of the second module. The target signals are used to control the first actuator and the second actuator to perform target operations. The first module and the second module are functional modules in the same device.
[0086] The first receiving module 402 is configured to receive a first moment sent by the first actuator and a second moment sent by the second actuator, wherein the first moment is the moment when the first actuator performs the target operation according to the target signal, and the second moment is the moment when the second actuator performs the target operation according to the target signal;
[0087] The first determining module 403 is used to determine the time difference between the first module and the second module based on the first time and the second time.
[0088] Optionally, see Figure 5 The first determining module 503 includes:
[0089] The first determining submodule 5031 is used to determine the absolute value of the difference between the first time point and the second time point;
[0090] The second determining submodule 5032 is used to determine the absolute value as the time difference between the first module and the second module.
[0091] in, Figure 5 The first transmitting module 501 and the first receiving module 502 can be referred to respectively. Figure 4 The relevant descriptions of the first transmitting module 401 and the first receiving module 402 will not be repeated here.
[0092] Optionally, see Figure 6 The time difference determining device 600 also includes:
[0093] The second receiving module 604 is used to receive the target time sent by the time source module;
[0094] The second determining module 605 is used to determine the calibration time based on the target time and the time difference;
[0095] The second sending module 606 is used to send the calibration time to the second module.
[0096] in, Figure 6 The first transmitting module 601, the first receiving module 602, and the first determining module 603 can be referred to respectively. Figure 4 The relevant descriptions of the first sending module 401, the first receiving module 402, and the first determining module 403 will not be repeated here.
[0097] Optionally, the target signal is an interrupt signal, and the target operation is an interrupt operation.
[0098] Optionally, the first module and the second actuator are connected via a first data transmission line and a wireless network, respectively, and the first actuator is connected to a second data transmission line.
[0099] The first transmitting module is further configured to synchronously transmit the target signal to the second actuator and the first actuator via the first data transmission line and the second data transmission line, respectively;
[0100] The first receiving module is further configured to receive a first moment sent by the first actuator via the second data transmission line, and to receive a second moment sent by the second actuator via the first data transmission line and / or the wireless network.
[0101] Optionally, the first module and the second module are different functional modules in an autonomous vehicle.
[0102] The time difference determination apparatus provided in this disclosure can implement all the processes implemented in the time difference determination method embodiments and can achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0103] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0104] Figure 7A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0105] like Figure 7 As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded from storage unit 708 into random access memory (RAM) 703. RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.
[0106] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0107] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the time difference determination method. For example, in some embodiments, the time difference determination method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by computing unit 701, one or more steps of the time difference determination method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the time difference determination method by any other suitable means (e.g., by means of firmware).
[0108] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0109] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0110] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0111] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0112] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0113] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0114] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0115] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for determining time difference, comprising: Target signals are synchronously sent to the first actuator of the first module and the second actuator of the second module. The target signals are used to control the first actuator and the second actuator to perform target operations. The first module and the second module are functional modules in the same device. The system receives a first moment sent by the first actuator and a second moment sent by the second actuator, wherein the first moment is the moment when the first actuator performs the target operation according to the target signal, and the second moment is the moment when the second actuator performs the target operation according to the target signal; Based on the first time point and the second time point, determine the time difference between the first module and the second module; The first module and the second actuator are connected via a first data transmission line, and the first actuator is connected to a second data transmission line. The first data transmission line is used to transmit the target signal and the second time; the second data transmission line is used to transmit the target signal and the first time. The first module and the second module are different functional modules in an autonomous vehicle.
2. The method of claim 1, wherein, Determining the time difference between the first module and the second module based on the first time point and the second time point includes: Determine the absolute value of the difference between the first time point and the second time point; The absolute value is determined as the time difference between the first module and the second module.
3. The method of claim 1, wherein, Also includes: Receive the target time sent by the time source module; The calibration time is determined based on the target time and the time difference; The calibration time is sent to the second module.
4. The method of any one of claims 1 to 3, wherein, The target signal is an interrupt signal, and the target operation is an interrupt operation.
5. The method according to any one of claims 1 to 3, wherein, The first module and the second actuator are connected via a first data transmission line and a wireless network, respectively, and the first actuator is connected to the second data transmission line. The synchronous transmission of target signals to the first actuator of the first module and the second actuator of the second module includes: The target signal is transmitted synchronously to the second actuator and the first actuator through the first data transmission line and the second data transmission line, respectively. Receiving the first moment sent by the first module and receiving the second moment sent by the second module includes: The first moment is received from the first actuator via the second data transmission line, and the second moment is received from the second actuator via the first data transmission line and / or the wireless network.
6. A time difference determination device, comprising: The first sending module is used to synchronously send target signals to the first actuator of the first module and the second actuator of the second module. The target signals are used to control the first actuator and the second actuator to perform target operations. The first module and the second module are functional modules in the same device. A first receiving module is configured to receive a first moment sent by the first actuator and a second moment sent by the second actuator, wherein the first moment is the moment when the first actuator performs the target operation according to the target signal, and the second moment is the moment when the second actuator performs the target operation according to the target signal; The first determining module is used to determine the time difference between the first module and the second module based on the first time and the second time. The first module and the second actuator are connected via a first data transmission line, and the first actuator is connected to a second data transmission line. The first data transmission line is used to transmit the target signal and the second time; the second data transmission line is used to transmit the target signal and the first time. The first module and the second module are different functional modules in an autonomous vehicle.
7. The apparatus according to claim 6, wherein, The first determining module includes: The first determining submodule is used to determine the absolute value of the difference between the first time point and the second time point; The second determining submodule is used to determine the absolute value as the time difference between the first module and the second module.
8. The apparatus according to claim 6, further comprising: The second receiving module is used to receive the target time sent by the time source module; The second determining module is used to determine the calibration time based on the target time and the time difference; The second sending module is used to send the calibration time to the second module.
9. The apparatus according to any one of claims 6 to 8, wherein, The target signal is an interrupt signal, and the target operation is an interrupt operation.
10. The apparatus according to any one of claims 6 to 8, wherein, The first module and the second actuator are connected via a first data transmission line and a wireless network, respectively, and the first actuator is connected to the second data transmission line. The first transmitting module is further configured to synchronously transmit the target signal to the second actuator and the first actuator via the first data transmission line and the second data transmission line, respectively; The first receiving module is further configured to receive a first moment sent by the first actuator via the second data transmission line, and to receive a second moment sent by the second actuator via the first data transmission line and / or the wireless network.
11. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-5.
13. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-5.