Time synchronization method, device and equipment

文档序号:1711704 发布日期:2019-12-13 浏览:10次 中文

阅读说明:本技术 时间同步方法、装置及设备 (Time synchronization method, device and equipment ) 是由 霍建宇 刘建新 于 2019-09-09 设计创作,主要内容包括:本申请公开了一种时间同步方法、装置及设备,涉及通信技术领域,具体涉及智能驾驶,尤其是自主泊车技术领域。具体实现方案为:主设备获取自身的时间信息,并将时间信息携带在第一广播消息中,通过第二射频装置对第一广播消息进行广播发送,从设备通过第一射频装置接收第一广播消息,并根据其中携带的主设备的时间信息,确定自身的本地时间。本实施例中通过采用射频装置进行时间信息的传输,由于射频传输的链路层传输稳定,不会出现广播信道冲突问题,因此,能够保证传输的实时性,降低传输时延,提高时间同步的精度。(The application discloses a time synchronization method, a time synchronization device and time synchronization equipment, relates to the technical field of communication, in particular to the technical field of intelligent driving, and particularly to autonomous parking. The specific implementation scheme is as follows: the master equipment acquires the self time information, carries the time information in the first broadcast message, broadcasts and sends the first broadcast message through the second radio frequency device, and the slave equipment receives the first broadcast message through the first radio frequency device and determines the local time of the slave equipment according to the carried time information of the master equipment. In the embodiment, the radio frequency device is adopted to transmit the time information, and the problem of broadcast channel collision cannot occur due to stable transmission of a link layer of radio frequency transmission, so that the real-time property of transmission can be ensured, the transmission delay is reduced, and the precision of time synchronization is improved.)

1. A method of time synchronization, comprising:

the method comprises the steps that first slave equipment receives a first broadcast message from main equipment through a first radio frequency device, the first broadcast message carries time information of the main equipment, and the first broadcast message is sent by the main equipment through a second radio frequency device in a broadcast mode;

And the first slave equipment determines the local time of the first slave equipment according to the time information of the master equipment.

2. the method of claim 1, wherein the determining, by the first slave device, the local time of the first slave device according to the time information of the master device includes:

The first slave equipment compensates the time information of the master equipment to obtain compensated time information;

And the first slave equipment determines the local time of the first slave equipment according to the compensated time information.

3. The method of claim 2, wherein the compensating the time information of the master device by the first slave device to obtain the compensated time information comprises:

The first slave equipment acquires distance information between the first slave equipment and the master equipment;

The first slave device determines a first compensation value according to the distance information;

And the first slave equipment determines compensated time information according to the time information of the master equipment and the first compensation value.

4. The method of claim 2, wherein the compensating the time information of the master device by the first slave device to obtain the compensated time information comprises:

The first slave equipment acquires static time delay parameters of the first radio frequency device and the second radio frequency device;

the first slave device determines a second compensation value according to the static time delay parameter;

And the first slave equipment determines the compensated time information according to the time information of the master equipment and the second compensation value.

5. The method according to any one of claims 1 to 4, wherein after the first slave device determines its local time according to the time information of the master device, the method further comprises:

the first slave equipment generates a second broadcast message, and the second broadcast message carries the local time of the first slave equipment;

and the first slave equipment transmits the second broadcast information through the first radio frequency device so as to enable second slave equipment to receive the second broadcast information through a third radio frequency device and carry out time synchronization according to the second broadcast information.

6. The method according to any of claims 1 to 4, wherein the first radio frequency device is provided in the first slave device or the first radio frequency device is connected to the first slave device.

7. A method of time synchronization, comprising:

the method comprises the steps that a main device obtains time information of the main device;

the master device generates a first broadcast message, and broadcasts and sends the first broadcast message through a second radio frequency device, so that a first slave device receives the first broadcast message through the first radio frequency device and performs time synchronization according to the first broadcast message, wherein the first broadcast message carries the time information.

8. The method of claim 7, wherein the master device obtains its own time information, comprising:

The main equipment acquires time information of the main equipment through Global Positioning System (GPS) equipment;

alternatively, the first and second electrodes may be,

And the master equipment acquires the time information of the master equipment through a local clock.

9. The method according to claim 7 or 8, wherein the second radio frequency device is provided in the master device or the second radio frequency device is connected to the master device.

10. A time synchronization apparatus applied to a first slave device includes:

A receiving module, configured to receive a first broadcast message from a master device through a first radio frequency apparatus, where the first broadcast message carries time information of the master device, and the first broadcast message is broadcast and sent by the master device through a second radio frequency apparatus;

And the processing module is used for determining the local time of the first slave equipment according to the time information of the master equipment.

11. the apparatus of claim 10, wherein the processing module is specifically configured to:

Compensating the time information of the main equipment to obtain compensated time information;

and determining the local time of the first slave device according to the compensated time information.

12. The apparatus of claim 11, wherein the processing module is specifically configured to:

acquiring distance information between the first slave equipment and the master equipment;

Determining a first compensation value according to the distance information;

and determining compensated time information according to the time information of the main equipment and the first compensation value.

13. the apparatus of claim 11, wherein the processing module is specifically configured to:

Obtaining static time delay parameters of the first radio frequency device and the second radio frequency device;

determining a second compensation value according to the static time delay parameter;

and determining compensated time information according to the time information of the main equipment and the second compensation value.

14. the apparatus of any one of claims 10 to 13, further comprising:

A sending module, configured to generate a second broadcast message, send the second broadcast information through the first radio frequency device, so that a second slave device receives the second broadcast message through a third radio frequency device, and perform time synchronization according to the second broadcast message, where the second broadcast message carries a local time of the first slave device.

15. the apparatus according to any one of claims 10 to 13, wherein the first radio frequency device is provided in the first slave device, or wherein the first radio frequency device is connected to the first slave device.

16. A time synchronization apparatus applied to a master device includes:

the acquisition module is used for acquiring the time information of the main equipment;

a sending module, configured to generate a first broadcast message, broadcast and send the first broadcast message through a second radio frequency device, so that a first slave device receives the first broadcast message through the first radio frequency device, and perform time synchronization according to the first broadcast message, where the first broadcast message carries the time information.

17. the apparatus of claim 16, wherein the obtaining module is specifically configured to:

acquiring time information of the main equipment through Global Positioning System (GPS) equipment;

Alternatively, the first and second electrodes may be,

and acquiring the time information of the master equipment through a local clock.

18. The apparatus according to claim 16 or 17, wherein the second radio frequency apparatus is provided in the master device, or wherein the second radio frequency apparatus is connected to the master device.

19. a time synchronization apparatus, comprising:

At least one processor; and

A memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 6 or to perform the method of any one of claims 7 to 9.

20. a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 6 or the method of any one of claims 7 to 9.

Technical Field

The present application relates to the field of communications technologies, and in particular, to a time synchronization method, apparatus, and device.

background

in a network with multiple nodes, the nodes need to be aligned to a uniform time. If the time difference of each node is too large, problems of data misalignment and the like can be caused, and the normal operation of the system is influenced.

Taking the intelligent driving system as an example, the intelligent driving system includes various intelligent devices, such as: cameras, laser radars, electronic maps, positioning sensors, and the like. These smart devices communicate over a wireless local area network (e.g., wifi). Currently, an intelligent driving system generally uses a Network Time Protocol (NTP) Protocol to perform Time synchronization. Specifically, the intelligent devices and the NTP server send messages to each other, and network delay is calculated according to the messages, so that the intelligent devices adjust the time of the intelligent devices to be consistent with the time of the NTP server according to the network delay.

However, when the NTP protocol is applied to a wireless local area network, the network jitter is large, and the accuracy of time synchronization is low, which is only tens of milliseconds (ms). The intelligent driving system is high in time sensitivity, and the NTP protocol is applied to the intelligent driving system, so that the safety of intelligent driving cannot be guaranteed.

Disclosure of Invention

the application provides a time synchronization method, a time synchronization device and time synchronization equipment, so that the time synchronization precision is improved.

in a first aspect, the present application provides a time synchronization method, including:

the method comprises the steps that first slave equipment receives a first broadcast message from main equipment through a first radio frequency device, the first broadcast message carries time information of the main equipment, and the first broadcast message is sent by the main equipment through a second radio frequency device in a broadcast mode;

and the first slave equipment determines the local time of the first slave equipment according to the time information of the master equipment.

In the embodiment, the radio frequency device is adopted to transmit the time information, and the problem of broadcast channel collision cannot occur due to stable transmission of a link layer of radio frequency transmission, so that the real-time property of transmission can be ensured, the transmission delay is reduced, and the precision of time synchronization is improved.

In a possible implementation manner, the determining, by the first slave device, the local time of the first slave device according to the time information of the master device includes:

The first slave equipment compensates the time information of the master equipment to obtain compensated time information;

And the first slave equipment determines the local time of the first slave equipment according to the compensated time information.

in a possible implementation manner, the compensating, by the first slave device, the time information of the master device to obtain compensated time information includes:

The first slave equipment acquires distance information between the first slave equipment and the master equipment;

The first slave device determines a first compensation value according to the distance information;

And the first slave equipment determines compensated time information according to the time information of the master equipment and the first compensation value.

in a possible implementation manner, the compensating, by the first slave device, the time information of the master device to obtain compensated time information includes:

the first slave equipment acquires static time delay parameters of the first radio frequency device and the second radio frequency device;

the first slave device determines a second compensation value according to the static time delay parameter;

and the first slave equipment determines the compensated time information according to the time information of the master equipment and the second compensation value.

In each of the above implementation manners, the slave device further compensates the time information of the master device after receiving the time information through the radio frequency device, and then takes the compensated time as its own local time. And the slave equipment also performs time compensation when performing time synchronization, so that the precision of time synchronization is further improved.

in a possible implementation manner, after the first slave device determines its local time according to the time information of the master device, the method further includes:

the first slave equipment generates a second broadcast message, and the second broadcast message carries the local time of the first slave equipment;

And the first slave equipment transmits the second broadcast information through the first radio frequency device so as to enable second slave equipment to receive the second broadcast information through a third radio frequency device and carry out time synchronization according to the second broadcast information.

in the implementation manner, after the slave device receives the first broadcast message from the master device and determines the local time of the slave device according to the first broadcast message, the slave device can also carry the local time of the slave device in the second broadcast message for broadcasting, so that the slave device which cannot be covered by the master device can also receive the second broadcast message and perform time synchronization according to the second broadcast message. On one hand, the coverage range limitation of the main equipment is broken through, the coverage range of the time synchronization system is expanded, and on the other hand, the flexibility of network node deployment is improved.

In a possible implementation manner, the first radio frequency device is disposed in the first slave device, or the first radio frequency device is connected to the first slave device.

In a second aspect, the present application provides a time synchronization method, including:

The method comprises the steps that a main device obtains time information of the main device;

The master device generates a first broadcast message, and broadcasts and sends the first broadcast message through a second radio frequency device, so that a first slave device receives the first broadcast message through the first radio frequency device and performs time synchronization according to the first broadcast message, wherein the first broadcast message carries the time information.

in a possible implementation manner, the acquiring, by the master device, time information of the master device includes:

the main equipment acquires time information of the main equipment through Global Positioning System (GPS) equipment;

Alternatively, the first and second electrodes may be,

and the master equipment acquires the time information of the master equipment through a local clock.

In a possible implementation manner, the second radio frequency device is disposed in the main device, or the second radio frequency device is connected to the main device.

In a third aspect, the present application provides a time synchronization apparatus, applied to a first slave device, including:

A receiving module, configured to receive a first broadcast message from a master device through a first radio frequency apparatus, where the first broadcast message carries time information of the master device, and the first broadcast message is broadcast and sent by the master device through a second radio frequency apparatus;

And the processing module is used for determining the local time of the first slave equipment according to the time information of the master equipment.

in a possible implementation manner, the processing module is specifically configured to:

Compensating the time information of the main equipment to obtain compensated time information;

and determining the local time of the first slave device according to the compensated time information.

in a possible implementation manner, the processing module is specifically configured to:

Acquiring distance information between the first slave equipment and the master equipment;

determining a first compensation value according to the distance information;

And determining compensated time information according to the time information of the main equipment and the first compensation value.

In a possible implementation manner, the processing module is specifically configured to:

obtaining static time delay parameters of the first radio frequency device and the second radio frequency device;

Determining a second compensation value according to the static time delay parameter;

And determining compensated time information according to the time information of the main equipment and the second compensation value.

in a possible implementation manner, the apparatus further includes:

a sending module, configured to generate a second broadcast message, send the second broadcast information through the first radio frequency device, so that a second slave device receives the second broadcast message through a third radio frequency device, and perform time synchronization according to the second broadcast message, where the second broadcast message carries a local time of the first slave device.

in a possible implementation manner, the first radio frequency device is disposed in the first slave device, or the first radio frequency device is connected to the first slave device.

in a fourth aspect, the present application provides a time synchronization apparatus, applied to a master device, including:

The acquisition module is used for acquiring the time information of the main equipment;

a sending module, configured to generate a first broadcast message, broadcast and send the first broadcast message through a second radio frequency device, so that a first slave device receives the first broadcast message through the first radio frequency device, and perform time synchronization according to the first broadcast message, where the first broadcast message carries the time information.

in a possible implementation manner, the obtaining module is specifically configured to:

Acquiring time information of the main equipment through Global Positioning System (GPS) equipment;

Alternatively, the first and second electrodes may be,

and acquiring the time information of the master equipment through a local clock.

In a possible implementation manner, the second radio frequency device is disposed in the main device, or the second radio frequency device is connected to the main device.

In a fifth aspect, the present application provides a time synchronization apparatus, comprising:

At least one processor; and

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the first aspect or to perform the method of any one of the second aspect.

In a sixth aspect, the present application provides a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of the first aspect or the second aspect.

According to the time synchronization method, the time synchronization device and the time synchronization equipment, the main equipment obtains the self time information, carries the time information in the first broadcast message, broadcasts and sends the first broadcast message through the second radio frequency device, the slave equipment receives the first broadcast message through the first radio frequency device, and determines the self local time according to the carried time information of the main equipment. In the embodiment, the radio frequency device is adopted to transmit the time information, and the problem of broadcast channel collision cannot occur due to stable transmission of a link layer of radio frequency transmission, so that the real-time property of transmission can be ensured, the transmission delay is reduced, and the precision of time synchronization is improved.

Drawings

the drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:

fig. 1 is a schematic diagram of a network architecture in which embodiments of the present application may be implemented;

FIG. 2 is an interaction diagram of a time synchronization method according to an embodiment of the present application;

fig. 3 is a schematic flowchart of a time synchronization method according to an embodiment of the present application;

FIG. 4 is a process diagram of time synchronization provided by an embodiment of the present application;

FIG. 5A is a schematic diagram of an application scenario of the present application;

FIG. 5B is a schematic diagram of an application scenario of the present application;

Fig. 6 is a schematic structural diagram of a time synchronization apparatus according to an embodiment of the present application;

Fig. 7 is a schematic structural diagram of a time synchronization apparatus according to an embodiment of the present application;

Fig. 8 is a schematic structural diagram of a time synchronization apparatus according to an embodiment of the present application.

Detailed Description

the following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

fig. 1 is a schematic diagram of a network architecture in which the embodiments of the present application may be implemented. As shown in fig. 1, the network includes a plurality of devices. One of the devices is called a master device and the remaining devices are called slave devices. Wireless communication may be performed between the master device and the slave device. The master device can send its own time information to the slave device, and the slave device can adjust its own local time according to the time information of the master device, thereby realizing the time consistency of each device in the network.

It should be noted that the network architecture shown in fig. 1 may be used in a variety of wireless communication scenarios, including but not limited to smart driving scenarios. For the purpose of description, when the embodiments of the present application relate to illustration, only the intelligent driving scenario is described as an example. Intelligent driving scenarios include a variety of intelligent devices, such as: perception equipment, positioning equipment, calculation equipment and the like at the vehicle end. The sensing devices include, but are not limited to, cameras, laser radars, infrared sensors, and the like. Positioning-type devices include, but are not limited to, Global Navigation Satellite System (GNSS) devices, Inertial Measurement Units (IMUs), and the like. Computing devices include, but are not limited to, Graphics Processing Units (GPUs), Central Processing Units (CPUs), and the like.

In addition, in order to further improve the safety and control accuracy of intelligent driving, the field side and the vehicle side are usually merged. Specifically, various intelligent devices are also deployed at the field end and used for bearing partial sensing, positioning and other tasks, so that the hardware cost of the vehicle end is reduced, and the driving safety is improved. For example: when parking area light is not enough or is in sleet weather, sensor perceptibility such as the camera of car end is limited, at this moment, through close cooperation of field end sensor and car end sensor, can promote the comprehensive perceptibility of vehicle.

In the embodiment of the present application, the vehicle end refers to a vehicle end. The field end refers to a driving environment end of the vehicle, and may be a parking lot, a test field, a road, or the like, for example.

In the above-mentioned intelligent driving system, each intelligent device of vehicle end, field end constitutes wireless local area network, for example, wifi local area network. Namely, the intelligent devices communicate with each other through the wireless local area network. In order to ensure time consistency among intelligent devices in an intelligent driving system, an NTP protocol is generally adopted for time synchronization. Specifically, in conjunction with the network architecture shown in fig. 1, the NTP server is used as a master device, and the above-mentioned smart device is used as a slave device. The intelligent devices and the NTP server send messages mutually, and network delay is calculated according to the messages, so that the intelligent devices adjust the time of the intelligent devices to be consistent with the time of the NTP server according to the network delay.

However, when the NTP protocol is applied to a wireless local area network, the network jitter is large, and the accuracy of time synchronization is low, which is only tens of milliseconds (ms). The intelligent driving system is high in time sensitivity, and the NTP protocol is applied to the intelligent driving system, so that the safety of intelligent driving cannot be guaranteed.

In order to solve the above problems, the present application provides a time synchronization method to improve the accuracy of time synchronization and ensure the safety of intelligent driving. The technical solution of the present application will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.

fig. 2 is an interaction diagram of a time synchronization method according to an embodiment of the present application. The method of the embodiment can be applied to the time synchronization system shown in fig. 1, and the time synchronization system comprises a master device and at least one slave device. Taking the unmanned driving system as an example, the master device and the slave device can both be intelligent devices at a vehicle end or a field end in the intelligent driving system. The master device may be a device providing time service in the intelligent driving system, for example: time service base stations, time service equipment and the like. The slave device can be any intelligent device which needs time synchronization in the intelligent driving system. The master device and the slave device of the embodiment can execute the method shown in fig. 2 to realize the time consistency of the intelligent driving system.

as shown in fig. 2, the method of the present embodiment includes:

s201: the master device obtains its own time information.

The main equipment is integrated with a time service module, and can provide time service. In one possible implementation, the master device is connected with a global positioning system GPS device, and obtains its own time information through the GPS device. In another possible implementation, a local clock is provided in the master device, and the time information of the master device can be obtained through the local clock.

S202: and the master equipment generates a first broadcast message and broadcasts and sends the first broadcast message through a second radio frequency device, wherein the first broadcast message carries the time information.

s203: the slave device receives a first broadcast message from the master device via the first radio frequency means.

the difference between this embodiment and the existing time synchronization method based on the NTP protocol is that the NTP protocol is based on a wireless local area network and uses UDP messages for transmission, but this embodiment uses radio frequency transmission. That is, the master broadcasts time information via the radio frequency device, and the slave receives the time information via the radio frequency device. The radio frequency device refers to a device capable of transmitting data through a link layer operating radio frequency, and includes, but is not limited to, a 433MHz radio transceiver module and a 2.4GHz 24L01 module.

It can be understood that the NTP protocol based on the wireless local area network is limited by the characteristic of large network jitter in the message transmission process, and the problems of unstable link layer transmission, broadcast channel collision and the like are easily caused, so that the time synchronization precision is low. In the embodiment, the radio frequency device is used for sending and receiving the time information, and since the link layer transmission of the radio frequency transmission is stable, the broadcast channel collision problem cannot occur, so that the real-time property of the transmission can be ensured, the transmission delay is reduced, and the precision of time synchronization is improved.

For convenience of description, the device corresponding to the slave device is referred to as a first radio frequency device, and the device corresponding to the master device is referred to as a second radio frequency device. The first and second radio frequency devices may be the same or different. Illustratively, the first radio frequency device and the second radio frequency device may each employ a 2.4GHz 24L01 module.

in a possible embodiment, the radio frequency device may be integrated in the master device and the slave device. For example: the first radio frequency device is arranged in the slave equipment, and the second radio frequency device is integrally arranged in the master equipment. In another possible embodiment, the radio frequency device may be a device independent of the master and slave. For example: the first video device is connected with the slave equipment, and the second radio frequency device is connected with the master equipment.

for example, after acquiring the time information of the master device, the master device generates a first broadcast message according to the time information of the master device, where the time information is carried in the first broadcast message. Then, the main device broadcasts and sends the first broadcast message through the second radio frequency device. In this way, after each slave device within the broadcast coverage of the master device receives the first broadcast message, the first broadcast message is analyzed to obtain the time information of the master device.

In this embodiment, the message format and the message content of the broadcast message are not limited, as long as the broadcast message carries the time information of the master device. Specifically, a message protocol negotiated in advance by the master device and the slave device is adopted.

S204: and the slave equipment determines the local time of the slave equipment according to the time information of the master equipment.

after the slave device acquires the time information of the master device, the local time of the slave device can be determined according to the time information of the master device. For example, the time of the master device may be used as the local time of the master device, so that the time of the master device and the time of the master device are kept synchronous. Of course, the slave device may also compensate the time of the master device, and the compensated time is used as its local time. The embodiment is not particularly limited to a specific compensation method, and several possible embodiments may be referred to in the detailed description of the following embodiments.

The time synchronization method of the present embodiment may be performed every other cycle. For example: every 1 second. The specific execution period can be set according to the actual application scene.

in the time synchronization method provided in this embodiment, the master device obtains its own time information, carries the time information in the first broadcast message, broadcasts and transmits the first broadcast message through the second radio frequency device, and the slave device receives the first broadcast message through the first radio frequency device and determines its own local time according to the carried time information of the master device. In the embodiment, the radio frequency device is adopted to transmit the time information, and the problem of broadcast channel collision cannot occur due to stable transmission of a link layer of radio frequency transmission, so that the real-time property of transmission can be ensured, the transmission delay is reduced, and the precision of time synchronization is improved.

Fig. 3 is a flowchart illustrating a time synchronization method according to an embodiment of the present application. The execution subject of the method of the embodiment can be a slave device. As shown in fig. 3, the method of the present embodiment includes:

S301: the slave equipment receives a first broadcast message from the master equipment through a first radio frequency device, wherein the first broadcast message carries time information of the master equipment.

S302: and the slave equipment compensates the time information of the master equipment to obtain compensated time information.

S303: and the slave equipment determines the local time of the slave equipment according to the compensated time information.

in this embodiment, the S302 slave device compensates for the time information of the master device, and may compensate in a plurality of ways. The following is a description of three possible compensation methods.

The first compensation mode is as follows: the slave device can compensate for the time according to the distance between itself and the master device.

it can be understood that, since there is a certain distance between the master device and the slave device, the transmission process of the radio frequency signal also needs to consume a certain time, and there is a certain delay already in the time when the slave device receives the broadcast message compared with the time carried in the broadcast message. Therefore, time compensation can be performed based on the distance information between the two devices.

illustratively, the slave device obtains distance information between itself and the master device, determines a first compensation value according to the distance information, then determines compensated time information according to the time information of the master device and the first compensation value, and takes the compensated time as its local time.

for example, assume that the time of the master device carried in the broadcast message received by the slave device is t. The distance information between the slave device and the master device is L, the transmission speed of the radio frequency signal is known as v, and the first compensation value Δ t1 ═ L/v can be determined. Therefore, the slave device can determine that its local time is:

tfrom=t+Δt1=t+L/v

the second compensation mode is as follows: the slave device may perform time compensation based on the delay characteristics of the radio frequency apparatus.

It will be appreciated that there is typically some fixed time delay for each type of radio frequency device. For example, a 24L01 RF device would produce a fixed 130 μ s delay. When the master device transmits using a 24L01 rf device, a delay of 130 mus is fixedly generated at the transmitting side. When the slave device receives with a 24L01 rf device, a delay of 130 mus is fixedly generated at the receiving side. Thus, time can be statically compensated based on the time delay characteristics of the radio frequency device.

Illustratively, the slave device obtains static delay parameters of a first radio frequency device and a second radio frequency device, and determines a second compensation value according to the static delay parameters; and then the slave equipment determines compensated time information according to the time information of the master equipment and the second compensation value.

For example: let t be the time of the master device carried in the broadcast message received by the slave device. The first radio frequency device and the second radio frequency device are both 24L01 modules. The slave device determines that the second compensation value Δ t2 is 260 μ s according to the delay characteristics of the first and second radio frequency devices. Therefore, the slave device can determine that its local time is:

tFrom=t+Δt2=t+260μs

the third compensation mode is as follows: the two compensation methods are combined, that is, when compensating, the delay caused by the time delay characteristic of the radio frequency device is considered, and the transmission delay caused by the distance between the master device and the slave device is also considered. For a specific embodiment, reference may be made to the above two compensation manners, which are not described herein again.

in the time synchronization method provided in this embodiment, after receiving the time information of the master device through the radio frequency device, the slave device further compensates the time information, and further takes the compensated time as its local time. And the slave equipment also performs time compensation when performing time synchronization, so that the precision of time synchronization is further improved.

In practical applications, because the radio frequency coverage of the master device is limited, when the geographic area corresponding to the application scenario is large, the master device may not cover all the slave devices, so that some of the slave devices cannot perform time synchronization through the above-described embodiment.

In order to solve the above problem, in this embodiment, the slave device may also serve as a relay device. That is to say, after obtaining the local time of the slave device through the above process, the slave device may broadcast the local time of the slave device through the radio frequency device, so that the slave devices that cannot be covered by the master device may also receive the broadcast message, and perform time synchronization according to the broadcast message.

fig. 4 is a schematic process diagram of time synchronization according to an embodiment of the present application. As shown in fig. 4, it is assumed that a master device, a slave device 1, a slave device 2, a slave device 3, a slave device 4, and a slave device 5 are included in the network. Referring to fig. 4, the slave device 1, the slave device 2, the slave device 3, and the device 4 are closer to the master device and can be covered by the radio frequency of the master device, so that the slave device 1, the slave device 2, the slave device 3, and the slave device 4 can receive the first broadcast message sent by the master device and determine their local time according to the time information of the master device carried in the first broadcast message.

With continued reference to fig. 4, the slave device 5 is located a relatively large distance from the master device and cannot be covered by the radio frequency of the master device. Therefore, the slave device 5 cannot receive the first broadcast message transmitted by the master device. In this embodiment, the slave device 1 may function as a relay device. For example, after determining the local time of the slave device 1 according to the first broadcast message, the slave device 1 carries the local time of the slave device in the second broadcast message to perform broadcast transmission, so that the slave device 5 can receive the second broadcast message and determine the local time of the slave device 1 according to the time information of the slave device 1 carried in the second broadcast message.

It should be noted that, in this embodiment, each slave device may serve as a relay device. In practical application, which slave devices are used as relay devices can be determined according to the deployment situation of an actual network.

In this embodiment, after receiving the first broadcast message from the master device and determining the local time of the slave device according to the first broadcast message, the slave device may also carry the local time of the slave device in the second broadcast message to perform broadcasting, so that the slave device that cannot be covered by the master device may also receive the second broadcast message and perform time synchronization according to the second broadcast message. On one hand, the coverage range limitation of the main equipment is broken through, the coverage range of the time synchronization system is expanded, and on the other hand, the flexibility of network node deployment is improved.

the time synchronization method of the present embodiment can be applied to the smart driving scenario as shown in fig. 5A or 5B. Fig. 5A is a schematic diagram of an application scenario of the present application, and fig. 5A illustrates a vehicle driving scenario. As shown in fig. 5A, the master device is a time service device, and the two vehicles that are automatically driven on the road are the slave device 1 and the slave device 2, respectively. Referring to fig. 5A, during the automatic driving process (for example, in a scene where the slave device 2 needs to change lanes), two vehicles need to exchange information with each other to cooperate with each other, so as to ensure the safety of automatic driving. Therefore, the two slave devices need to be time synchronized. In this embodiment, the master device sends the broadcast message through the radio frequency device, and carries its own time information in the broadcast message, and after receiving the broadcast message through the radio frequency device, the slave device 1 and the slave device 2 can determine their own local time according to the time information in the broadcast message, thereby implementing time consistency between the two slave devices. Thus, after the time synchronization is established between the two vehicle sides (the slave device 1 and the slave device 2), information can be exchanged with high time precision, and the safety of automatic driving is improved.

Fig. 5B is a schematic diagram of an application scenario of the present application, and fig. 5B illustrates a vehicle parking scenario. As shown in fig. 5B, the master device is a time service device, and the slave devices include a vehicle to be parked and a server device in a parking lot. Taking a vehicle as the slave device 1 and a server device of a parking lot as the slave device 2 as an example, the slave device 1 and the slave device 2 need to perform information interaction to ensure safe parking, and therefore, time consistency of the slave device 1 and the slave device 2 needs to be ensured. In this embodiment, the master device sends the broadcast message through the radio frequency device, and carries its own time information in the broadcast message, and after receiving the broadcast message through the radio frequency device, the slave device 1 and the slave device 2 can determine their own local time according to the time information in the broadcast message, thereby implementing time consistency between the two slave devices. Therefore, after the time synchronization is established between the vehicle end (the slave device 1) and the field end (the slave device 2), the sensing information of the field end can be used for making up the sensing blind area of the vehicle end, and the safety of automatic parking is improved.

Fig. 6 is a schematic structural diagram of a time synchronization apparatus according to an embodiment of the present application. The time synchronization apparatus provided in this embodiment may be in the form of software and/or hardware, and the apparatus may be disposed in the slave device. As shown in fig. 6, the time synchronizer 600 provided in this embodiment includes: a receiving module 601 and a processing module 602. Wherein the content of the first and second substances,

A receiving module 601, configured to receive a first broadcast message from a master device through a first radio frequency apparatus, where the first broadcast message carries time information of the master device, and the first broadcast message is broadcast and sent by the master device through a second radio frequency apparatus;

the processing module 602 is configured to determine the local time of the first slave device according to the time information of the master device.

In a possible implementation manner, the processing module 602 is specifically configured to:

compensating the time information of the main equipment to obtain compensated time information;

And determining the local time of the first slave device according to the compensated time information.

in a possible implementation manner, the processing module 602 is specifically configured to:

Acquiring distance information between the first slave equipment and the master equipment;

determining a first compensation value according to the distance information;

And determining compensated time information according to the time information of the main equipment and the first compensation value.

In a possible implementation manner, the processing module 602 is specifically configured to:

obtaining static time delay parameters of the first radio frequency device and the second radio frequency device;

Determining a second compensation value according to the static time delay parameter;

And determining compensated time information according to the time information of the main equipment and the second compensation value.

In a possible implementation manner, as shown in fig. 6, the time synchronization apparatus of this embodiment may further include: a sending module 603.

a sending module 603, configured to generate a second broadcast message, and send the second broadcast message through the first radio frequency device, so that a second slave device receives the second broadcast message through a third radio frequency device, and performs time synchronization according to the second broadcast message, where the second broadcast message carries a local time of the first slave device.

In a possible implementation manner, the first radio frequency device is disposed in the first slave device, or the first radio frequency device is connected to the first slave device.

the time synchronization apparatus provided in this embodiment may be used to execute the time synchronization method on the slave device side in any of the above method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.

fig. 7 is a schematic structural diagram of a time synchronization apparatus according to an embodiment of the present application. The time synchronization apparatus of the present embodiment may be in the form of software and/or hardware, and the apparatus may be disposed in the master device. As shown in fig. 7, the time synchronizer 700 of the present embodiment includes: an acquisition module 701 and a sending module 702. Wherein the content of the first and second substances,

An obtaining module 701, configured to obtain time information of the master device;

a sending module 702, configured to generate a first broadcast message, and broadcast and send the first broadcast message through a second radio frequency device, so that a first slave device receives the first broadcast message through the first radio frequency device, and performs time synchronization according to the first broadcast message, where the first broadcast message carries the time information.

in a possible implementation manner, the obtaining module 701 is specifically configured to:

acquiring time information of the main equipment through Global Positioning System (GPS) equipment;

Alternatively, the first and second electrodes may be,

and acquiring the time information of the master equipment through a local clock.

in a possible implementation manner, the second radio frequency device is disposed in the main device, or the second radio frequency device is connected to the main device.

The time synchronization apparatus provided in this embodiment may be used to execute the time synchronization method on the master device side in any of the above method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.

fig. 8 is a schematic structural diagram of a time synchronization apparatus according to an embodiment of the present application. The time synchronization device of the present embodiment may be used as a slave device to execute the time synchronization method executed by the slave device in the above method embodiments. The time synchronization device of this embodiment may also be used as a master device to execute the time synchronization method executed by the master device in the above embodiments.

As shown in fig. 8, the time synchronization apparatus 800 includes: one or more processors 801, memory 802, and interfaces for connecting the various components, including a high speed interface and a low speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the time synchronization apparatus, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple time synchronization devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Fig. 8 illustrates an example of a processor 801.

The memory 802 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the time synchronization method provided herein. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to perform the time synchronization method provided by the present application.

The memory 802 is a non-transitory computer readable storage medium, and can be used for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the time synchronization method in the embodiment of the present application (for example, the receiving module 601, the processing module 602, and the transmitting module 603 shown in fig. 6, or the obtaining module 701 and the transmitting module 702 shown in fig. 7). The processor 801 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 802, that is, implements the time synchronization method in the above-described method embodiments.

The memory 802 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by use of the time synchronization apparatus, and the like. Further, the memory 802 may include high speed random access memory and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 802 optionally includes memory located remotely from the processor 801, which may be connected to a time synchronization device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

the time synchronization apparatus may further include: an input device and an output device. The processor 801, memory 802, input devices, and output devices may be connected by a bus 803 or otherwise, as exemplified by the bus connections in fig. 8.

The input device may receive input numeric or character information and generate key signal inputs related to user settings and function control of the time synchronization apparatus, such as a touch screen, keypad, mouse, track pad, touch pad, pointer, one or more mouse buttons, track ball, joystick, or other input device. The output devices may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.

Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.

these computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.

To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a 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 may be received in any form, including acoustic, speech, or tactile input.

the systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

the computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

it should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.

The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于动态响应的免时间戳同步频率偏移跟踪方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!