Device delay calibration method, terminal apparatus, and storage medium

By calculating the signal round-trip delay and delay judgment base of the device group in the terminal device, time synchronization of the device group is achieved, and network synchronization problems caused by the lack of timers or inaccurate timers in the device group are solved.

WO2024221393A1PCT designated stage expired Publication Date: 2024-10-31SMART LIGHTING HLDG LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/091521
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

The device group lacks a timer or the timer is inaccurate, resulting in failure to achieve network synchronization, especially when there are problems such as network delay, packet loss, and error packets.

Method used

Provides a device delay calibration method, which calculates the round-trip delay of signal transmission by sending preset instructions in the terminal device and receiving feedback signals, calculates the delay judgment base based on the round-trip delay, and performs delay calibration on the equipment based on the base , ensure that the devices in the device group can achieve time synchronization of signals or actions.

Benefits of technology

Even if there is a lack of timers in the equipment group, the round-trip delay can be calculated by the timer of the terminal device, and it can accurately determine whether the equipment needs calibration and perform calibration, thereby achieving time synchronization of all equipment and solving the problem of timer inconsistency. Accurately causing network synchronization issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023091521_31102024_PF_FP_ABST
    Figure CN2023091521_31102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a device delay calibration method, a terminal apparatus, and a storage medium. The terminal apparatus communicates with a device group. The method comprises: sending a preset instruction to at least one device in a device group, and receiving a feedback signal from the at least one device to the preset instruction; according to the preset instruction and the feedback signal, calculating a round-trip delay of signal transmission between a terminal apparatus and the at least one device; on the basis of the round-trip delay, calculating a delay determination base corresponding to the at least one device; and performing delay calibration on the at least one device according to the delay determination base. By means of said method, network synchronization of a device group can be implemented when the device group is not provided with a timer or when the timer is inaccurate.
Need to check novelty before this filing date? Find Prior Art

Description

Equipment delay calibration method, terminal device and storage medium Technical Field

[0001] The present application relates to the field of communications, and in particular to a device delay calibration method, a terminal device, and a storage medium. Background Art

[0002] Current network synchronization methods require device groups to have timers. If a device group does not have a timer or if the timer is inaccurate (for example, the timer cannot accurately synchronize with the world's standard clock) due to network problems (such as network delays, packet loss, or packet errors) within the device group, it will be difficult for the device group to achieve network synchronization.

[0003] Summary of the Invention

[0004] In view of the above, it is necessary to provide a device delay calibration method, terminal device and storage medium to solve the technical problem that when the device group does not have a timer or the timer is inaccurate, it is difficult for the device group to achieve network synchronization.

[0005] On the one hand, the present application provides a device delay calibration method, which is applied to a terminal device, wherein the terminal device communicates with a device group. The method includes: sending a preset instruction to at least one device in the device group, receiving a feedback signal from the at least one device to the preset instruction, and calculating the round-trip delay of signal transmission between the terminal device and the at least one device based on the preset instruction and the feedback signal. Based on the round-trip delay, calculating the delay judgment base corresponding to the at least one device, and performing delay calibration on the at least one device according to the delay judgment base.

[0006] In some embodiments, the delay judgment base is determined according to time values ​​of all round-trip delays corresponding to each device in the device group that are determined in a probabilistic and statistical manner.

[0007] In some embodiments, the calculation method of the delay judgment base includes: calculating the time value based on all round-trip delays of each device in the device group, and calculating the delay judgment base based on the time value and the round-trip delay corresponding to each device.

[0008] In some embodiments, the method for calculating the delay judgment cardinality further includes: calculating the delay judgment cardinality according to probability statistics.

[0009] In some embodiments, calculating the round-trip delay of signal transmission between the terminal device and the at least one device based on the preset instruction and the feedback signal includes: obtaining the first time point when the terminal device sends the preset instruction and / or the second time point when the feedback signal is received, and calculating the round-trip delay based on the first time point and / or the second time point.

[0010] In some embodiments, the delay calibration of the at least one device according to the delay judgment base further includes: judging whether the at least one device needs to be calibrated according to the round-trip delay, the delay judgment base and a preset probability statistics calibration threshold.

[0011] In some embodiments, judging whether the at least one device needs to be calibrated based on the round-trip delay, the delay judgment base and the preset probability statistical calibration threshold includes: if there are multiple devices, performing calculations on the round-trip delay and the delay judgment base corresponding to each device to obtain the calculation results corresponding to each device, and based on the comparison result between the calculation results and the probability statistical calibration threshold, determining whether the device corresponding to the calculation result needs to be calibrated.

[0012] In some embodiments, the delay calibration of the at least one device according to the delay judgment base includes: if it is determined according to the delay judgment base that any one of the at least one devices has a time delay, by shortening the signal sending duration of the any one device, so that the any one device can achieve signal synchronization or action synchronization with other devices in the device group; or, if it is determined according to the delay judgment base that any one of the at least one devices has a time advance, by extending the signal sending duration of the any one device, so that the any one device can achieve signal synchronization or action synchronization with other devices in the device group.

[0013] In some embodiments, the method further includes: after delay calibration of the at least one device, sending the preset instruction to the calibrated device, and verifying whether the calibrated device is calibrated correctly according to the preset instruction.

[0014] On the other hand, the present application provides a device delay calibration device, which runs on a terminal device, and the device delay calibration device includes: a sending unit, which is used to send a preset instruction to at least one device in the device group; a receiving unit, which is used to receive a feedback signal of the at least one device to the preset instruction; a calculation unit, which is used to calculate the round-trip delay of signal transmission between the terminal device and the at least one device based on the preset instruction and the feedback signal; the calculation unit is also used to calculate the delay judgment base corresponding to the at least one device based on the round-trip delay; and a delay calibration unit, which is used to perform delay calibration on the at least one device according to the delay judgment base.

[0015] On the other hand, the present application provides a terminal device, which includes: a memory storing at least one instruction; and a processor executing the at least one instruction to implement the device delay calibration method.

[0016] On the other hand, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a terminal device to implement the device delay calibration method.

[0017] Through the above-described embodiment, the round-trip delay is the sum of the transmission delay of the preset instruction to the at least one device and the reception delay of the feedback signal to the terminal device. Since the terminal device includes a timer, even if a device in the device group does not have a timer, the round-trip delay can be calculated from the timer in the terminal device by obtaining the time point of sending the preset instruction and the time point of receiving the feedback signal, thereby resolving the technical problem of network synchronization failure due to the lack of a timer in the device group. In addition, when there are multiple devices and each device has multiple round-trip delays, since the delay determination base is calculated based on all the round-trip delays of the multiple devices, the delay determination base can represent the round-trip delays of the multiple devices. By calculating the operation result between each round-trip delay of each device and the corresponding delay determination base, and comparing each operation result with the probability statistical calibration threshold, it is possible to accurately determine whether the device corresponding to the operation result requires calibration. Calibrating the device in the device group that requires calibration can synchronize the time of the signals / actions of all devices in the device group without requiring a timer to accurately synchronize the world standard clock, thereby resolving the technical problem of network synchronization failure of the device group due to inaccurate timers. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] FIG1 is a diagram showing an application environment of a device delay calibration method provided in an embodiment of the present application.

[0019] FIG2 is a flowchart of a device delay calibration method provided in an embodiment of the present application.

[0020] FIG3 is a flowchart of a method for calculating a round-trip delay provided in an embodiment of the present application.

[0021] FIG4 is a flowchart of a device delay calibration method provided by another embodiment of the present application.

[0022] FIG5 is a functional module diagram of a device delay calibration apparatus provided in an embodiment of the present application.

[0023] FIG6 is a structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0025] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner. The following embodiments and features in the embodiments may be combined with each other unless there is a conflict.

[0026] When a typical device group synchronizes with the network, the terminal device first sends and receives signals to the device group, and then calibrates the device group based on the sent and received signals. The device group then adjusts its timer based on the received signals to synchronize the device group's time control.

[0027] However, related device network synchronization methods require that the device group have a timer. Furthermore, various network issues, such as delays, packet loss, and errors, can occur when sending or receiving signals. This can cause errors in the device group's timer, making it inaccurate and preventing precise synchronization with the world's standard clock.

[0028] If the device group does not have a timer or the timer is inaccurate (for example, the timer cannot be accurately synchronized with the world standard clock) due to network problems (such as network delay, packet loss, packet error, etc.) in the device group, the device group will be unable to perform network synchronization.

[0029] In order to solve the above problems, the embodiments of the present application provide a device delay calibration method, a terminal device and a storage medium, which will be introduced below in conjunction with the relevant drawings.

[0030] Figure 1 illustrates an application environment for a device delay calibration method according to an embodiment of the present application. In Figure 1 , a terminal device 1 communicates with multiple devices 2, each of which constitutes a device group. The terminal device 1 can connect to the multiple devices 2 in the device group via Bluetooth, hotspots, Wi-Fi, or other methods, enabling the terminal device 1 to control the multiple devices.

[0031] The terminal device 1 is a device that can automatically calculate parameter values ​​and / or process information according to pre-set or stored instructions. Its hardware includes, but is not limited to: a microprocessor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.

[0032] The terminal device 1 can be any electronic product that can interact with the user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device (such as a control bracelet), a vehicle-mounted device, etc.

[0033] The terminal device 1 may also include network equipment and / or user equipment. The network equipment includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers. Figure 1 is merely an example of a terminal device 1 and does not limit the terminal device 1. The terminal device 1 may include more or fewer components than shown, or a combination of certain components, or different components. For example, the terminal device 1 may also include input and output devices, network access devices, buses, etc.

[0034] The network where the terminal device 1 is located includes but is not limited to: the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.

[0035] The multiple devices 2 may be monitoring devices, lamps, any home appliances (such as air conditioners and televisions), speakers and other IoT devices.

[0036] Figure 2 is a flowchart of a device delay calibration method according to an embodiment of the present application. The method is performed by a terminal device, such as terminal device 1 shown in Figure 1. Depending on different needs, the order of the steps in this flowchart can be adjusted according to actual requirements, and some steps can be omitted.

[0037] S11 , sending a preset instruction to at least one device in the device group, and receiving a feedback signal of the at least one device in response to the preset instruction.

[0038] In some embodiments, the device group can be monitoring equipment (such as monitoring cameras, etc.), smart home appliances (such as air conditioners and televisions, etc.), speakers and lamps (such as smart lights, light strips, table lamps and chandeliers, etc.) and other devices.

[0039] In some embodiments, the preset instruction is an instruction for causing the at least one device to perform delay calibration. The preset instruction is set by the user according to the device type of the device group, and this application does not impose any restrictions on this. For example, if the at least one device is a plurality of lamps, the preset instruction may be a "music rhythm" instruction. When the "music rhythm" instruction is executed, the plurality of lamps will follow the rhythm of the music and change the color of the lights. Upon receiving the "music rhythm" instruction, the plurality of lamps may first execute the "music rhythm" instruction and then execute delay calibration, or, upon receiving the "music rhythm" instruction, the plurality of lamps may first execute delay calibration and then execute the "music rhythm" instruction; in addition, the plurality of lamps may also simultaneously execute delay calibration and the "music rhythm" instruction.

[0040] In another embodiment, if the at least one device is a plurality of monitoring devices and the preset instruction is a rotation instruction, when the rotation instruction is executed, the plurality of monitoring devices will rotate to a preset angle, or rotate according to a preset angle. The plurality of monitoring devices may first execute the rotation instruction and then execute the delay calibration, or, upon receiving the rotation instruction, the plurality of monitoring devices may first execute the delay calibration and then execute the rotation instruction; in addition, the delay calibration and the rotation instruction may also be executed simultaneously. The preset angle may be set voluntarily, and this application does not impose any restrictions on this. The process of the delay calibration will be described in detail below.

[0041] In other embodiments of the present application, the preset instruction may also be other instructions for causing the at least one device to perform delay calibration.

[0042] In some embodiments, the feedback signal is a signal sent by the at least one device to the terminal apparatus according to the preset instruction.

[0043] The feedback signal can be set by yourself, and this application does not impose any restrictions on this.

[0044] In another embodiment, the feedback signal is a signal sent by the at least one device to the terminal device at a preset node according to the preset instruction. The preset node can be set by itself, and this application does not impose any restrictions on this.

[0045] For example, when the at least one device comprises multiple lamps and the preset instruction is the "music rhythm" instruction, the preset node may be the time node corresponding to each device emitting the same color of light when following the music rhythm, and the feedback signal may be the time node corresponding to the emission of the same color of light or the same color. For another example, when the at least one device comprises multiple monitoring devices and the preset instruction is the rotation instruction, the preset node may be the time node corresponding to the multiple monitoring devices rotating to the preset angle, and the feedback signal may be the preset angle or the time node corresponding to the rotation of the preset angle.

[0046] In some other embodiments, when the at least one device is other devices such as multiple household appliances, the relevant processes of other devices receiving the preset instructions and sending the feedback signals are similar to the relevant processes of the multiple lamps and the multiple monitoring devices receiving the preset instructions and sending the feedback signals, so this application will not repeat the description.

[0047] In some embodiments, the number of times the terminal device sends the preset instruction to the at least one device and the number of times the at least one device sends the feedback signal to the terminal device can be set by itself, and this application does not impose any restrictions on this. The number of times the terminal device sends the preset instruction to the at least one device and the number of times the at least one device sends the feedback signal to the terminal device can be the same or different. For example, if the number of the at least one device is 3, the number of times the terminal device sends the preset instruction to each device can be 3 times, and the number of times each device that receives the preset instruction sends the feedback signal to the terminal device can be 3 times each time. Alternatively, the number of times the terminal device sends the preset instruction to each device can be 1 time, and the number of times each device that receives the preset instruction sends the feedback signal to the terminal device can be 600 times, etc. The terminal device can set the number of times each device is required to send the feedback signal in each preset instruction sent, so that each device that receives the preset instruction sends the feedback signal a corresponding number of times.

[0048] In some embodiments, the terminal device can be connected to each device in the device group by wireless communication or wired communication, and the terminal device sends a preset instruction to at least one device in the device group by the wireless communication or wired communication, and receives a feedback signal from the at least one device to the preset instruction. The wireless communication method includes, but is not limited to, Bluetooth, hotspot, and Wi-Fi. The wired communication method can be communication via a bus (such as an I2C bus).

[0049] S12: Calculate the round-trip delay of signal transmission between the terminal device and the at least one device according to the preset instruction and the feedback signal.

[0050] In some embodiments, when there are multiple devices, the round-trip delay includes all round-trip delays of the multiple devices, wherein each round-trip delay of each device is the sum of the transmission delay and the reception delay, wherein the transmission delay is the time it takes for each preset instruction sent by the terminal device to reach each device, and the reception delay is the time it takes for each feedback signal sent by each device to reach the terminal device. Since the number of times the terminal device sends the preset instruction to each device and the number of times each device sends the feedback signal to the terminal device can be set by itself, each device can have multiple transmission delays and reception delays.

[0051] For example, assuming that there are N devices, the terminal device sends a preset instruction to each of the N devices M times. For example, the sending delay corresponding to the Nth device in the N devices includes t1N , t 2N , t 3N ...t MN If the number of times each of the N devices sends the feedback signal to the terminal device is Z, then the receiving delay corresponding to the Nth device in the N devices includes t′ 1N , t′ 2N , t′ 3N ...t′ ZN Assuming N=3, Z=20, and M=2, Table 1 shows an example of the transmission delay, reception delay, and round-trip delay of each device.

[0052] Table 1 Examples of transmit latency, receive latency, and round-trip latency for each device

[0053] In some embodiments, if any one of the at least one devices does not include a timer, any one of the devices cannot record the time point of receiving the preset instruction and / or the time point of sending the feedback signal, and therefore it is necessary to calculate the round-trip delay of any one of the devices through the built-in timer of the terminal device. For each device in the device group or any device that does not have a timer, the terminal device can obtain the first time point of sending the preset instruction and / or the second time point of receiving the feedback signal from the built-in timer, and calculate the round-trip delay based on the first time point and / or the second time point. For example, the terminal device can directly determine the difference between the second time point and the first time point as the round-trip delay.

[0054] In an embodiment of the present application, the number of times the terminal device sends the preset instruction to each of the at least one device and the number of times each device sends the feedback signal to the terminal device may be the same or different. In addition, since the number of times the terminal device sends the preset instruction to each of the at least one device and the number of times each device sends the feedback signal to the terminal device may be different, not every transmission delay has a corresponding reception delay, and not every reception delay has a corresponding transmission delay. Therefore, when calculating the round-trip delay, the reception delay that does not have a corresponding transmission delay or the transmission delay that does not have a corresponding reception delay can be used to determine the round-trip delay by using a zero-padding calculation method. For example, if the terminal device sends the preset instruction to device A twice, then device A has two sending delays t1A and t2A. Each preset instruction requires device A to send the feedback signal to the terminal device twice, then device A sends the feedback signal to the terminal device four times, and device A has four corresponding receiving delays t'1A, t'2A, t'3A and t'4A. Therefore, the round-trip delay of device A is four, the first round-trip delay is t1A+t'1A, the second round-trip delay is 0+t'2A, the third round-trip delay is t2A+t'2A, the third round-trip delay is 0+t'3A, and the fourth round-trip delay is 0+t'4A.

[0055] In this embodiment, even when there is a device without a timer in the device group, the round-trip delay corresponding to the device without a timer can be calculated by obtaining the time point of sending the preset instruction and the time point of receiving the feedback signal from the timer in the terminal device, thereby solving the technical problem of being unable to perform network synchronization due to the fact that the device in the device group does not have a timer.

[0056] In another embodiment, for any device with a timer, the time point when the preset instruction sent by the terminal device is received and the time point when the feedback signal is sent to the terminal device can be recorded according to the timer in the device with a timer. The terminal device obtains the above two time points from the device with a timer and calculates the corresponding round-trip delay.

[0057] S13: Calculate a delay judgment cardinality corresponding to the at least one device based on the round-trip delay.

[0058] In some embodiments, the delay determination cardinality is determined based on a probabilistically determined time value of all round-trip delays corresponding to each device in the device group. For example, the time value may be a mean, a median, or a weighted average. For example, the terminal device calculates the time value based on all round-trip delays of each device in the device group, and then calculates the delay determination cardinality corresponding to each device based on the time value and the round-trip delay corresponding to each device.

[0059] The terminal device may input the time value and the round-trip delay corresponding to each device into a preset probability statistic to calculate the delay judgment base. The probability statistic includes, but is not limited to, mean analysis, T-test, Z-test, variance analysis, logistic regression model, and decision tree model. Because different probability statistics use different calculation formulas, the delay judgment bases calculated using different probability statistics are also different.

[0060] For example, when the time value is a mean value, the calculation method of the time value may refer to formula (1):

[0061] in, represents the time value of the jth device in the at least one device, M represents the number of times the terminal device sends the preset instruction to the jth device, Z represents the number of times the jth device sends the feedback signal to the terminal device, t ij represents the sending delay of the terminal device sending the preset instruction to the j-th device for the i-th time, t′ kj represents the reception delay of the j-th device sending the feedback signal to the terminal device for the k-th time, max(M,Z) represents the larger value between M and Z, and N represents the number of devices of the at least one device.

[0062] In some embodiments, if the probability statistics is mean analysis and the number of the at least one device is N, the calculation method of the delay judgment cardinality can refer to formula (2):

[0063] Among them, T N represents the delay judgment cardinality of the N devices, N represents the number of the at least one device, Represents the time value of the j-th device.

[0064] S14: Perform delay calibration on the at least one device according to the delay judgment base.

[0065] In some embodiments, the terminal device performs delay calibration on the at least one device according to the delay judgment base, which may include: the terminal device determines whether the at least one device needs to be calibrated based on the round-trip delay, the delay judgment base and a preset probability statistics calibration threshold, and performs delay calibration on the at least one device when it is determined that the at least one device needs to be calibrated.

[0066] The probability statistics calibration threshold value may be set by itself, or the probability statistics calibration threshold value may be set by itself according to the calculation result below, and this application does not impose any limitation on this.

[0067] In some embodiments, the terminal device determines whether the at least one device needs to be calibrated based on the round-trip delay, the delay judgment base and a preset probability statistical calibration threshold, including: the terminal device calculates the round-trip delay corresponding to each device and the delay judgment base to obtain the calculation result corresponding to each device, and then the terminal device determines whether the device corresponding to the calculation result needs to be calibrated based on the comparison result of the calculation result with the probability statistical calibration threshold, and determines the device that needs to be calibrated as the device to be calibrated.

[0068] In some embodiments, the terminal device may use the variance between all round-trip delays of each device and the delay judgment base as the calculation result for each device. For example, continuing with the above embodiment, if the number of the at least one device is N, the terminal device performs calculations based on all round-trip delays of each device and the delay judgment base. The method for obtaining the calculation result for each device can refer to formula (3):

[0069] Among them, S j represents the operation result of the j-th device, M represents the number of times the terminal device sends the preset instruction to the j-th device, Z represents the number of times the j-th device sends the feedback signal to the terminal device, t ij represents the sending delay of the terminal device sending the preset instruction to the j-th device for the i-th time, t′ kj T represents the reception delay of the feedback signal sent by the j-th device to the terminal device for the k-th time, N represents the delay judgment cardinality of the N devices, and max(M,Z) represents the larger value between M and Z.

[0070] In some embodiments, when the terminal device can use the variance between all round-trip delays of each device and the delay judgment base as the calculation result of each device, the terminal device compares the calculation result of each device with the probability statistics calibration threshold with reference to formula (4):

[0071] Wherein, a represents the probability statistics calibration threshold.

[0072] In this embodiment, if the operation result S of the j-th device j If the probability statistical calibration threshold a is greater than or equal to the probability statistical calibration threshold a, the terminal device determines that the j-th device needs to be calibrated, determines the j-th device as the device to be calibrated, and calibrates the j-th device. Alternatively, if the calculation result S of the j-th device is j If the value of the jth device is less than the probability statistics calibration threshold a, the terminal device determines that the jth device does not need calibration.

[0073] In this embodiment, the variance between all round-trip delays of each of the at least one device and the delay judgment base is used as the calculation result of each device. Since the data is squared in the process of calculating the calculation result of each device, the value of the calculation result can be increased. When the calculation result of each device is compared with the probability statistics calibration threshold, each comparison result can be made more accurate.

[0074] In some other embodiments, since the time value of each device in the at least one device is calculated based on the round-trip delay corresponding to each device, the terminal device may also use the difference between the time value of each device and the delay judgment base as the calculation result for each device. For example, continuing with the above embodiment, if the number of the at least one device is N, the terminal device calculates the time value of each device in the at least one device and the delay judgment base, and the method for obtaining the corresponding calculation result for each device can refer to formula (5):

[0075] Among them, S j Indicates the operation result of the jth device Represents the time value of the j-th device, T N Indicates the delay judgment cardinality of the N devices.

[0076] In some embodiments, when the difference between the time value of each device and the delay judgment base is used as the calculation result of each device, based on the comparison result of the calculation result with the probability statistics calibration threshold, it is determined whether the device corresponding to the calculation result needs to be calibrated, and the steps of calibrating the device to be calibrated can refer to the process description shown in Figure 4 below.

[0077] In some other embodiments of the present application, the terminal device may also use other probabilistic statistical methods, such as mean squared error (MSE), mean absolute error (MAE), and probabilistic hypothesis testing, to calculate the operation results of each device. The present application does not limit the method for generating each operation result.

[0078] Through the above-described embodiment, the round-trip delay is the sum of the transmission delay of the preset instruction to the at least one device and the reception delay of the feedback signal to the terminal device. Since the terminal device includes a timer, even if a device in the device group does not have a timer, the round-trip delay can be calculated from the timer in the terminal device by obtaining the time point of sending the preset instruction and the time point of receiving the feedback signal, thereby resolving the technical problem of network synchronization failure due to the lack of a timer in the device group. In addition, when there are multiple devices and each device has multiple round-trip delays, since the delay determination base is calculated based on all the round-trip delays of the multiple devices, the delay determination base can represent the round-trip delays of the multiple devices. By calculating the operation result between each round-trip delay of each device and the corresponding delay determination base, and comparing each operation result with the probability statistical calibration threshold, it is possible to accurately determine whether the device corresponding to the operation result requires calibration. Calibrating the device in the device group that requires calibration can synchronize the time of the signals / actions of all devices in the device group without requiring a timer to accurately synchronize the world standard clock, thereby resolving the technical problem of network synchronization failure of the device group due to inaccurate timers.

[0079] In some embodiments, FIG3 is a flowchart of a method for calculating round-trip delay provided by an embodiment of the present application. Specifically, the method includes the following steps:

[0080] S121, the terminal device obtains a first time point at which the terminal device sends the preset instruction and / or a second time point at which the terminal device receives the feedback signal.

[0081] In this embodiment, since the number of times the terminal device sends the preset instruction and the number of times the at least one device sends the feedback signal can be multiple, the first time point and the second time point can both be multiple, and the terminal device can obtain multiple first time points and multiple second time points from the built-in timer.

[0082] S122: The terminal apparatus obtains, from any device that has received the preset instruction and has a timer, a third time point at which the device receives the preset instruction and / or a fourth time point at which the device sends the feedback signal.

[0083] In this embodiment, since the number of times the terminal device sends the preset instruction and the number of times the device sends the feedback signal can be multiple, the third time point and the fourth time point can be multiple. In addition, since the terminal device is communicatively connected to each device, the terminal device can send a preset time acquisition instruction to the device, and the time acquisition instruction requires the device to obtain the third time point when the device receives the preset instruction and / or the fourth time point when the device sends the feedback signal from the built-in timer, and send the third time point and the fourth time point to the terminal device, so that the terminal device obtains the third time point and the fourth time point. The preset time acquisition instruction can be set by yourself, and this application does not impose any restrictions on this.

[0084] S123: The terminal device calculates the round-trip delay according to the first time point, the second time point, the third time point, and the fourth time point.

[0085] In some embodiments, the terminal device calculates a first difference between the third time point and the first time point, and calculates a second difference between the second time point and the fourth time point, and then the terminal device determines the sum of the first difference and the second difference as the round-trip delay.

[0086] In this embodiment, since the third time point and the fourth time point are accurate time points and do not include the time length for any device to respond to and execute the preset instruction, the round-trip delay calculated by the first time point, the second time point, the third time point and the fourth time point is more accurate.

[0087] In some embodiments, if the terminal device uses the difference between the time value of each device and the delay judgment base as the calculation result of each device, FIG4 is a flowchart of a device delay calibration method provided by another embodiment of the present application. Specifically, the following steps are included:

[0088] S141: The terminal device takes the absolute value of the calculation result of each device.

[0089] In this embodiment, taking the absolute value of the calculation result is only an example and not a limitation. The absolute value method can quickly screen out the devices that need to be calibrated.

[0090] In some other embodiments, the terminal device may not take the absolute value of each calculation result.

[0091] S142: The terminal device compares the absolute value of each operation result with the probability statistics calibration threshold to determine whether the absolute value of each operation result is greater than or equal to the probability statistics calibration threshold.

[0092] For example, continuing with the above embodiment, if the number of the at least one device is N, the terminal device may compare each operation result with the probability statistics calibration threshold by referring to formula (6) or (6):

[0093] Wherein, b represents the probability statistics calibration threshold.

[0094] In this embodiment, the difference between the time value of each device and the delay judgment base is directly used as the calculation result of each device, and the absolute value of the calculation result of each device is compared with the probability statistics calibration threshold, so that the comparison result can be quickly obtained.

[0095] S143: If the absolute value of any calculation result is greater than or equal to the probability statistics calibration threshold, the terminal device determines that the device corresponding to any calculation result needs to be calibrated, and determines the device corresponding to any calculation result as the device to be calibrated.

[0096] In some embodiments, when the absolute value of any calculation result is greater than or equal to the probability statistics calibration threshold, it means that the round-trip delay of the device corresponding to any calculation result is abnormal, and the device corresponding to any calculation result needs to be calibrated.

[0097] S144: The terminal device compares the calculation result corresponding to the device to be calibrated with the probability statistics calibration threshold to determine whether the calculation result corresponding to the device to be calibrated is greater than or equal to the probability statistics calibration threshold.

[0098] In some embodiments, when the absolute value of the calculation result corresponding to the device to be calibrated is greater than or equal to the probability statistical calibration threshold, the size relationship between the calculation result corresponding to the device to be calibrated and the probability statistical calibration threshold includes that the calculation result corresponding to the device to be calibrated is greater than or equal to the probability statistical calibration threshold, or that the calculation result corresponding to the device to be calibrated is less than the probability statistical calibration threshold.

[0099] S145: If the calculation result corresponding to the device to be calibrated is greater than or equal to the probability statistics calibration threshold, the terminal device determines that a time delay occurs in the device to be calibrated.

[0100] In one embodiment of the present application, the calculation result corresponding to the device to be calibrated is compared with the probabilistic statistical calibration threshold to determine a calibration method for the device to be calibrated. If the calculation result corresponding to the device to be calibrated is greater than or equal to the probabilistic statistical calibration threshold, it indicates that the signal transmission duration of the device to be calibrated is greater than the signal transmission duration of other devices in the at least one device, and measures such as reducing the information segment in the signal should be taken to reduce the signal transmission duration of the device to be calibrated.

[0101] In another embodiment of the present application, if there are multiple devices to be calibrated corresponding to calculation results greater than the probability statistics calibration threshold, the signal transmission durations of the multiple devices to be calibrated are all greater than the signal transmission durations of other devices in the at least one device.

[0102] In this embodiment, when the device to be calibrated corresponds to multiple round-trip delays, since the delay judgment base of the device to be calibrated can characterize the degree of fluctuation between the multiple round-trip delays corresponding to the device to be calibrated, the calculation result corresponding to the device to be calibrated is compared with the probability statistics calibration threshold, so as to accurately determine whether the device to be calibrated has a time delay.

[0103] S146 , when it is determined that the device to be calibrated has a time delay, the terminal apparatus shortens the signal transmission duration of the device to be calibrated so as to achieve signal synchronization or action synchronization between the device to be calibrated and other devices in the device group.

[0104] In this embodiment, the terminal device can control the device to be calibrated to reduce the information segment in the signal sent to shorten the signal sending time of the device to be calibrated, so that the device to be calibrated can achieve signal synchronization or action synchronization with other devices in the device group.

[0105] In some embodiments, the terminal device may send a calibration instruction to the device to be calibrated so that the device to be calibrated reduces the information segment in the signal sent. The calibration instruction may be set by the terminal device itself and is not limited in this application.

[0106] In some other embodiments, the terminal device may adopt other methods to control the device to be calibrated to shorten the signal sending time of the device to be calibrated. The above description of this application is only an example and not a limitation.

[0107] S147: If the calculation result corresponding to the device to be calibrated is less than the probability statistics calibration threshold, the terminal device determines that the occurrence time of the device to be calibrated is advanced.

[0108] In one embodiment of the present application, if the calculation result corresponding to the device to be calibrated is less than the probability statistical calibration threshold, it means that the signal sending duration of the device to be calibrated is less than the signal sending duration of other devices in the at least one device, and it is necessary to delay the time of sending the signal or increase the information segment in the signal to increase the signal sending duration of the device to be calibrated.

[0109] In another embodiment of the present application, if there are multiple devices to be calibrated corresponding to calculation results less than the probability statistics calibration threshold, the signal transmission durations of the multiple devices to be calibrated are all less than the signal transmission durations of other devices in the at least one device.

[0110] S148 , when it is determined that the device to be calibrated is ahead of time, the terminal device extends the signal transmission time of the device to be calibrated to achieve signal synchronization or action synchronization between the device to be calibrated and other devices in the device group.

[0111] In this embodiment, the terminal device can control the device to be calibrated to increase the information segment in the signal it transmits to extend the duration of the device's signal transmission, thereby achieving signal or motion synchronization between the device to be calibrated and other devices in the device group. The method by which the terminal device controls the device to be calibrated to increase the information segment in the signal it transmits is essentially the same as the method by which the terminal device controls the device to be calibrated to decrease the information segment in the signal it transmits, and therefore will not be described again.

[0112] S149: If the absolute value of any of the calculation results is less than the probability statistics calibration threshold, the terminal device determines that the device corresponding to any of the calculation results does not need to be calibrated.

[0113] In some embodiments, when the absolute value of any one of the calculation results is less than the probability statistics calibration threshold, it represents that the round-trip delay of the device corresponding to any one of the calculation results is normal.

[0114] As shown in Figure 5, it is a functional module diagram of a device delay calibration device provided in one embodiment of the present application. The device delay calibration device 11 includes a sending unit 110, a receiving unit 111, a calculating unit 112, and a delay calibration unit 113. The module / unit referred to in this application refers to a series of computer-readable instruction segments that can be obtained by the processor 13 in Figure 6 and can perform fixed functions, which are stored in the memory 12 in Figure 6. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0115] In some embodiments, the sending unit 110 is configured to send a preset instruction to at least one device in the device group.

[0116] In some embodiments, the receiving unit 111 is configured to receive a feedback signal from the at least one device in response to the preset instruction.

[0117] In some embodiments, the calculation unit 112 is configured to calculate a round-trip delay of signal transmission between the terminal apparatus and the at least one device according to the preset instruction and the feedback signal.

[0118] In one embodiment of the present application, the calculation unit 112 is further used to obtain the first time point when the terminal device sends the preset instruction and / or the second time point when the feedback signal is received, and calculate the round-trip delay based on the first time point and / or the second time point.

[0119] In some embodiments, the calculation unit 112 is further configured to calculate a delay judgment cardinality corresponding to the at least one device based on the round-trip delay.

[0120] In one embodiment of the present application, the delay judgment base is determined according to time values ​​of all round-trip delays corresponding to each device in the device group that are determined in a probabilistic and statistical manner.

[0121] In one embodiment of the present application, the calculation unit 112 is further used to calculate the time value based on all round-trip delays of each device in the device group, and calculate the delay judgment base based on the time value and the round-trip delay corresponding to each device.

[0122] In an embodiment of the present application, the calculation unit 112 is further configured to calculate the delay judgment cardinality based on probability statistics.

[0123] In some embodiments, the delay calibration unit 113 is configured to perform delay calibration on the at least one device according to the delay judgment base.

[0124] In one embodiment of the present application, the delay calibration unit 113 is further configured to determine whether the at least one device needs to be calibrated based on the round-trip delay, the delay judgment base, and a preset probability statistics calibration threshold.

[0125] In one embodiment of the present application, the delay calibration unit 113 is also used to, if there are multiple at least one devices, calculate the round-trip delay corresponding to each device and the delay judgment base to obtain the calculation result corresponding to each device, and determine whether the device corresponding to the calculation result needs to be calibrated based on the comparison result between the calculation result and the probability statistical calibration threshold.

[0126] In one embodiment of the present application, the delay calibration unit 113 is further used to, if it is determined according to the delay judgment base that any of the at least one devices has a time delay, shorten the signal sending duration of the any device, so that the any device can achieve signal synchronization or action synchronization with other devices in the device group; or, if it is determined according to the delay judgment base that any of the at least one device has a time advance, extend the signal sending duration of the any device, so that the any device can achieve signal synchronization or action synchronization with other devices in the device group.

[0127] In one embodiment of the present application, after delay calibration is performed on the at least one device, the delay calibration unit 113 is further used to send the preset instruction to the calibrated device, and check whether the calibrated device is calibrated correctly according to the preset instruction.

[0128] Through the above-described embodiment, the round-trip delay is the sum of the transmission delay of the preset instruction to the at least one device and the reception delay of the feedback signal to the terminal device. Since the terminal device includes a timer, even if a device in the device group does not have a timer, the round-trip delay can be calculated from the timer in the terminal device by obtaining the time point of sending the preset instruction and the time point of receiving the feedback signal, thereby resolving the technical problem of network synchronization failure due to the lack of a timer in the device group. In addition, when there are multiple devices and each device has multiple round-trip delays, since the delay determination base is calculated based on all the round-trip delays of the multiple devices, the delay determination base can represent the round-trip delays of the multiple devices. By calculating the operation result between each round-trip delay of each device and the corresponding delay determination base, and comparing each operation result with the probability statistical calibration threshold, it is possible to accurately determine whether the device corresponding to the operation result requires calibration. Calibrating the device in the device group that requires calibration can synchronize the time of the signals / actions of all devices in the device group without requiring a timer to accurately synchronize the world standard clock, thereby resolving the technical problem of network synchronization failure of the device group due to inaccurate timers.

[0129] As shown in FIG6 , a structural diagram of a terminal device provided in an embodiment of the present application is shown.

[0130] In one embodiment of the present application, the terminal device 1 includes, but is not limited to, a memory 12, a processor 13, and a computer program stored in the memory 12 and executable on the processor 13, such as a device delay calibration program.

[0131] Those skilled in the art will understand that the schematic diagram is merely an example of the terminal device 1 and does not constitute a limitation on the terminal device 1. The terminal device 1 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device 1 may also include input and output devices, network access devices, buses, etc.

[0132] The processor 13 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor. The processor 13 is the computing core and control center of the terminal device 1, connecting various parts of the entire terminal device 1 using various interfaces and lines, and obtaining the operating system of the terminal device 1 and various installed applications, program codes, etc.

[0133] The processor 13 obtains the operating system and various installed applications of the terminal device 1. The processor 13 obtains the applications to implement the steps in the above-mentioned embodiments of the device delay calibration method, such as the steps shown in Figures 2, 3 and 4.

[0134] For example, the computer program can be divided into one or more modules / units, such as an acceleration unit. One or more modules / units are stored in the memory 12 and retrieved by the processor 13 to complete the present application. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions. The instruction segments are used to describe the acquisition process of the computer program in the terminal device 1.

[0135] The memory 12 can be used to store computer programs and / or modules. The processor 13 implements various functions of the terminal device 1 by running or accessing the computer programs and / or modules stored in the memory 12, as well as calling data stored in the memory 12. The memory 12 may primarily include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.), and the data storage area may store data created based on the use of the server. In addition, the memory 12 may include non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device.

[0136] The memory 12 may be an external memory and / or an internal memory of the terminal device 1. Furthermore, the memory 12 may be a physical memory such as a memory stick, a TF card (Trans-flash Card), and the like.

[0137] If the module / unit integrated in the terminal device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is obtained by the processor, it can implement the steps of the above-mentioned various method embodiments.

[0138] The computer program includes computer program code, which may be in source code form, object code form, an accessible file, or some intermediate form. Computer-readable media may include any entity or device capable of carrying computer program code, recording media, USB flash drives, removable hard drives, magnetic disks, optical disks, computer memory, and read-only memory (ROM).

[0139] In conjunction with Figure 2, the memory 12 in the terminal device 1 stores multiple instructions to implement a device delay calibration method, and the processor 13 can obtain multiple instructions to achieve: sending a preset instruction to at least one device in the device group, and receiving a feedback signal of the at least one device to the preset instruction; calculating the round-trip delay of the signal transmission between the terminal device and the at least one device based on the preset instruction and the feedback signal; calculating the delay judgment base corresponding to the at least one device based on the round-trip delay; and performing delay calibration on the at least one device according to the delay judgment base.

[0140] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of Figure 2, which will not be repeated here.

[0141] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is merely a logical function division, and other division methods may be used in actual implementation.

[0142] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these modules may be selected based on actual needs to achieve the purpose of this embodiment.

[0143] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0144] Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the present application is defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the claims are intended to be embraced therein. Any reference to a figure in a claim should not be construed as limiting the claim to which it relates.

[0145] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in this application may also be implemented by a single unit or device through software or hardware. Terms such as first and second are used to indicate names and do not imply any particular order.

[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not limiting. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.

Claims

1. A device delay calibration method, applied to a terminal device, characterized in that: The terminal device communicates with a device group, and the method includes: Sending a preset instruction to at least one device in the device group, and receiving a feedback signal of the at least one device in response to the preset instruction; Calculating a round trip delay of signal transmission between the terminal device and the at least one device according to the preset instruction and the feedback signal; Based on the round-trip delay, calculating a delay judgment cardinality corresponding to the at least one device; Delay calibration is performed on the at least one device according to the delay judgment base.

2. The device delay calibration method according to claim 1, characterized in that: The delay judgment cardinality is determined according to time values ​​of all round-trip delays corresponding to each device in the device group that are determined in a probabilistic and statistical manner.

3. The device delay calibration method according to claim 2, characterized in that: The calculation method of the delay judgment base includes: Calculating the time value according to all round trip delays of each device in the device group; The delay judgment base is calculated according to the time value and the round-trip delay corresponding to each device.

4. The device delay calibration method according to claim 1, characterized in that: The calculation method of the delay judgment base also includes: The delay judgment cardinality is calculated according to probability statistics.

5. The device delay calibration method according to claim 1, characterized in that: The calculating, according to the preset instruction and the feedback signal, the round trip delay of the signal transmission between the terminal device and the at least one device comprises: Acquire a first time point at which the terminal device sends the preset instruction and / or a second time point at which the terminal device receives the feedback signal; The round trip delay is calculated according to the first time point and / or the second time point.

6. The device delay calibration method according to claim 1, characterized in that: The performing delay calibration on the at least one device according to the delay judgment base further comprises: According to the round-trip delay, the delay judgment base and a preset probability statistics calibration threshold, It is determined whether the at least one device needs to be calibrated.

7. The device delay calibration method according to claim 6, characterized in that: The determining, according to the round-trip delay, the delay judgment base, and a preset probability statistics calibration threshold, whether the at least one device needs to be calibrated includes: If there are multiple at least one device, calculate the round trip delay corresponding to each device and the delay judgment cardinality to obtain a calculation result corresponding to each device; Based on the comparison result between the operation result and the probability statistics calibration threshold, it is determined whether the device corresponding to the operation result needs to be calibrated.

8. The device delay calibration method according to any one of claims 1 to 7, characterized in that: The performing delay calibration on the at least one device according to the delay judgment base comprises: If it is determined according to the delay judgment base that any one of the at least one device has a time delay, by shortening the signal sending duration of the any one device, the any one device is synchronized with other devices in the device group in signal or action; or If it is determined according to the delay judgment base that the occurrence time of any device in the at least one device is advanced, the signal sending duration of any device is extended so that the any device can achieve signal synchronization or action synchronization with other devices in the device group.

9. The device delay calibration method according to claim 1, characterized in that: The method further comprises: After delay calibration is performed on the at least one device, the preset instruction is sent to the calibrated device, and whether the calibrated device is calibrated correctly is checked according to the preset instruction.

10. A terminal device, the terminal device communicating with a device group, the terminal device comprising: A memory storing at least one instruction; and The processor executes the at least one instruction to implement the device delay calibration method as described in any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in the terminal device to implement the device delay calibration method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and equipment for cooperation between terminal equipment

    CN104467928A

  • Data processing method, device and equipment and storage medium

    CN112086095A

  • Multi-sensor time domain synchronization method and device, storage medium and terminal

    CN114727253A

  • Round-Trip Time Evaluation System, Method, and Apparatus

    US20210203578A1

  • Synchronizing bluetooth data capture to data playback

    US20220038769A1