Distance measurement method, device, storage medium and equipment

By using the equipment in the ranging system to send and receive the ranging frames, and calculating the distance between the devices through the acquired time information, the problem of difficulty in achieving accurate ranging between any two devices in the prior art is solved, and the distance measurement effect with high precision and high capacity is achieved.

CN114509748BActive Publication Date: 2025-04-22TSINGOAL BEIJING TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202011183778.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-29
Publication Date
2025-04-22
Estimated Expiration
2040-10-29

AI Technical Summary

Technical Problem

Existing ranging systems are difficult to achieve accurate ranging between any two devices.

Method used

The distance measurement frame is sent and received by the first device, and the time information is obtained to calculate the distance between the devices. The specific method includes sending at least one ranging frame, receiving at least one ranging frame, and calculating the distance between the devices through the acquired time information.

Benefits of technology

Accurate distance measurement between any two devices is achieved, improving the equipment capacity and distance measurement accuracy of the distance measurement system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114509748B_ABST
    Figure CN114509748B_ABST
Patent Text Reader

Abstract

The present application discloses a ranging method, device, storage medium and equipment, which relate to the field of communication technology. The method includes: sending at least one ranging frame, and receiving at least one ranging frame. The ranging between any two devices can be achieved through the above method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a ranging method, device, storage medium and equipment. Background Art

[0002] With the development of information technology, communication technology has also developed, and then ranging technology has also developed. Among them, ranging technology is used to measure the distance between two devices. In the existing ranging system, ranging can be achieved between certain devices (for example, mobile phones, computers and other terminal devices) and base stations to determine the distance between the device and the base station. However, with the development of production and life, in addition to the distance between certain devices and base stations, the distance between any two devices is becoming more and more important. Therefore, how to achieve ranging between any two devices has become a key issue. Summary of the invention

[0003] In view of this, the present application provides a ranging method, apparatus, storage medium and device for solving at least one of the above technical problems.

[0004] According to a first aspect of the present application, a ranging method is provided, which is performed by a first device, and the method includes:

[0005] sending at least one ranging frame; and,

[0006] At least one ranging frame is received.

[0007] In another possible implementation, the method further includes:

[0008] At least four pieces of time information are acquired by sending at least one ranging frame and receiving at least one ranging frame.

[0009] In another possible implementation, the method further includes at least one of the following:

[0010] Acquire at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame;

[0011] At least six pieces of time information are acquired by sending at least one ranging frame and receiving at least two ranging frames.

[0012] In another possible implementation, the method further includes:

[0013] receiving at least one time information;

[0014] The acquiring of at least four pieces of time information by sending at least one ranging frame and receiving at least one ranging frame includes:

[0015] At least four pieces of time information are acquired by sending at least one ranging frame, receiving at least one ranging frame, and receiving the at least one piece of time information.

[0016] In another possible implementation, at least one received ranging frame carries time information;

[0017] The acquiring of at least four pieces of time information by sending at least one ranging frame and receiving at least one ranging frame includes:

[0018] At least four pieces of time information are acquired by sending at least one ranging frame, receiving at least one ranging frame and the time information carried in the at least one received ranging frame.

[0019] In another possible implementation, the method further includes:

[0020] receiving at least one time information;

[0021] The acquiring of at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame includes:

[0022] Acquire at least six time information by sending at least two ranging frames, receiving at least one ranging frame, and receiving at least one time information;

[0023] The step of acquiring at least six pieces of time information by sending at least one ranging frame and receiving at least two ranging frames includes:

[0024] At least six pieces of time information are acquired by sending at least one ranging frame, receiving at least two ranging frames, and receiving at least one piece of time information.

[0025] In another possible implementation, at least one received ranging frame carries time information;

[0026] The acquiring of at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame includes:

[0027] Acquire at least six pieces of time information by sending at least two ranging frames, at least one received ranging frame, and time information carried in the at least one received ranging frame;

[0028] The step of acquiring at least six pieces of time information by sending at least one ranging frame and receiving at least two ranging frames includes:

[0029] At least six pieces of time information are acquired by sending at least one ranging frame, receiving at least two ranging frames, and time information carried in the at least one received ranging frame.

[0030] In another possible implementation, the method further includes at least one of the following: the at least two ranging frames sent include at least one Final frame;

[0031] The at least two received ranging frames include at least one Final frame.

[0032] In another possible implementation manner, the time information is carried in a ranging frame; and / or the time information is not carried in a ranging frame.

[0033] In another possible implementation, the method further includes:

[0034] When the time information is not carried by the ranging frame, the time information is sent through the first channel; and / or,

[0035] When the time information is not carried by the ranging frame, the data frame is sent through the second channel;

[0036] Wherein, the first channel includes a channel for sending and receiving ranging frames;

[0037] The second channel is a channel that does not include sending or receiving ranging frames.

[0038] In another possible implementation manner, the second channel is a Bluetooth channel.

[0039] In another possible implementation manner, the frame format of the received ranging frame is specifically the fourth frame format;

[0040] The fourth frame format does not include payload data.

[0041] In another possible implementation manner, the frame format of the ranging frame includes at least one of the following:

[0042] A first frame format, a second frame format, and a third frame format.

[0043] In another possible implementation, the first frame format includes: synchronization SYNC, frame start symbol SFD, physical frame header PHR, and packet payload PHR Payload;

[0044] The second frame format includes: SYNC, SFD, scrambled timestamp sequence STS, PHR, and PHY Payload;

[0045] The third frame format includes: SYNC, SFD, PHR, PHY Payload, and STS.

[0046] In another possible implementation, the carried time information includes at least one of the following:

[0047] The transmission time of at least one received ranging frame and the reception time information of at least one sent ranging frame;

[0048] Sending time information of at least one ranging frame is sent, and receiving time information of at least one ranging frame is received.

[0049] In another possible implementation manner, the sending at least one ranging frame; and receiving at least one ranging frame include:

[0050] Sending at least one ranging frame to at least two peer devices;

[0051] Receive at least one ranging frame respectively sent by at least two of the opposite end devices.

[0052] In another possible implementation manner, the at least one ranging frame sent to the at least two opposite-end devices is the same frame.

[0053] In another possible implementation manner, sending at least one ranging frame includes:

[0054] At least one ranging initiation frame is sent to at least one second device among at least two opposite-end devices, and at least one ranging reply frame is sent to at least one third device among the at least two opposite-end devices.

[0055] In another possible implementation manner, the sending at least one ranging initiation frame to at least one second device among the at least two opposite-end devices further includes:

[0056] receiving at least one ranging reply frame sent by the at least one second device;

[0057] Wherein, before sending at least one ranging reply frame to at least one third device among the at least two opposite-end devices, the method further includes:

[0058] Receive at least one ranging initiation frame sent by the at least one third device.

[0059] In another possible implementation, the method further includes:

[0060] The at least one ranging initiation frame includes at least one ranging initiation frame which is the same frame as the corresponding ranging reply frame.

[0061] In another possible implementation, the method further includes:

[0062] According to the at least four pieces of time information, distance information between the first device and the opposite device is acquired.

[0063] In another possible implementation manner, acquiring the distance information between the first device and the opposite device according to the at least four pieces of time information includes at least one of the following:

[0064] Determine the distance information between the first device and the opposite device according to the sending time of the sending ranging frame, the receiving time of the receiving ranging frame and the received time information;

[0065] Receive distance information between the first device and the opposite device sent by the opposite device.

[0066] In another possible implementation, the method further includes:

[0067] According to the at least six pieces of time information, distance information between the first device and the opposite device is acquired.

[0068] In another possible implementation manner, acquiring the distance information between the first device and the opposite device according to the at least six pieces of time information includes at least one of the following:

[0069] Determine the distance information between the first device and the opposite device according to the sending time information corresponding to sending at least two ranging frames, the receiving time information corresponding to receiving at least one ranging frame, and the received time information;

[0070] Determine the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the receiving time corresponding to receiving at least two ranging frames, and the received time information;

[0071] Receive distance information between the first device and the opposite device sent by an opposite device.

[0072] In another possible implementation manner, determining the distance information between the first device and the opposite device according to sending time information corresponding to sending at least two ranging frames, receiving time information corresponding to receiving at least one ranging frame, and received time information includes:

[0073] Determine the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the sending time of sending the final frame, and the receiving time information of receiving at least one ranging frame;

[0074] The determining of the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the receiving time corresponding to receiving at least two ranging frames, and the received time information includes:

[0075] The distance information between the first device and the opposite device is determined according to the sending time information of sending at least one ranging frame, the receiving time information of receiving at least one ranging frame, and the receiving time information of receiving the final frame.

[0076] In another possible implementation, the method further includes:

[0077] Receive ranging instructions;

[0078] Based on the ranging instruction, sending at least one ranging frame; and

[0079] Based on the ranging instruction, at least one ranging frame is received.

[0080] In another possible implementation, the ranging instruction includes: ranging time slot information;

[0081] The sending of at least one ranging frame based on the ranging instruction includes:

[0082] Based on the ranging time slot information, sending at least one ranging frame;

[0083] The step of receiving at least one ranging frame based on the ranging instruction includes:

[0084] Based on the ranging time slot information, at least one ranging frame is received.

[0085] In another possible implementation, the ranging time slot information includes: a preset time slot;

[0086] The sending at least one ranging frame based on the ranging time slot information includes:

[0087] Sending at least one ranging frame in a preset time slot;

[0088] The receiving at least one ranging frame based on the ranging time slot information includes:

[0089] At least one ranging frame is received in the preset time slot.

[0090] In another possible implementation manner, sending at least one ranging frame based on the ranging instruction; and receiving at least one ranging frame based on the ranging instruction include:

[0091] Based on the ranging instruction, sending at least one ranging frame in a random time slot; and,

[0092] Based on the ranging instruction, at least one ranging frame is received in a random time slot.

[0093] In another possible implementation, the method further includes:

[0094] The random time slot is determined according to the own device information.

[0095] In another possible implementation, the method further includes:

[0096] The device information is sent so that the opposite device determines the ranging instruction based on the device information.

[0097] In another possible implementation, the method further includes:

[0098] The ranging instruction is sent so that the device receiving the ranging instruction sends and / or receives the ranging frame.

[0099] In another possible implementation manner, the ranging instruction includes ranging time slot information:

[0100] The method of determining the ranging time slot information includes:

[0101] Get the device information sent by the peer device;

[0102] The ranging time slot information is determined based on the device information sent by the opposite device and the device information of the device itself.

[0103] In another possible implementation, the device information includes: a device identification;

[0104] Wherein, determining the ranging time slot information based on the device information sent by the opposite device and the own device information includes:

[0105] Sorting is performed based on the device identifiers corresponding to each device;

[0106] The ranging time slot information is determined based on the sorting result.

[0107] In another possible implementation, the method further includes:

[0108] The device information is transmitted via the first channel and / or the second channel;

[0109] The distance measurement instruction is transmitted through the first channel and / or the second channel.

[0110] In another possible implementation manner, the communication distance of the first channel matches the communication distance of the second channel.

[0111] In another possible implementation, the method further includes:

[0112] The first channel is specifically an ultra-wideband UWB channel; and / or,

[0113] The second channel is specifically a Bluetooth channel.

[0114] In another possible implementation, the method further includes:

[0115] Uploading the distance information between the first device and the opposite device to the corresponding device;

[0116] The corresponding device includes at least one of the following:

[0117] Mobile terminals;

[0118] Gateway;

[0119] server.

[0120] In another possible implementation manner, uploading the distance information between the first device and the opposite device to the corresponding device includes:

[0121] The distance information between the first device and the opposite device is uploaded to the corresponding device through the first channel or the second channel.

[0122] In another possible implementation manner, the uploading the distance information between the first device and the opposite device to the corresponding device further includes:

[0123] Receiving an upload success message sent by the corresponding device, wherein the upload success message is used to inform the first device of distance information of successful upload;

[0124] Based on the upload success message, the successfully uploaded distance information is deleted.

[0125] In another possible implementation, if the distance information is uploaded via at least two data packets, then,

[0126] Based on the upload success message, deleting the successfully uploaded distance information includes:

[0127] Based on the upload success message, determine the data packet that has been uploaded successfully;

[0128] Delete the distance information corresponding to the successfully uploaded data packet.

[0129] According to a second aspect of the present application, a distance measuring device is provided, the device comprising:

[0130] A first sending module is configured to send at least one ranging frame; and

[0131] The first receiving module is used to receive at least one ranging frame.

[0132] In another possible implementation, the device further includes: a first acquisition module, wherein:

[0133] The first acquisition module is used to acquire at least four time information by sending at least one ranging frame and receiving at least one ranging frame.

[0134] In another possible implementation, the device further includes: at least one of a second acquisition module and a third acquisition module, wherein:

[0135] The second acquisition module is used to acquire at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame;

[0136] The third acquisition module is used to acquire at least six pieces of time information by sending at least one ranging frame and receiving at least two ranging frames.

[0137] In another possible implementation,

[0138] The first receiving module is further used to receive at least one time information;

[0139] Wherein, when acquiring at least four pieces of time information by sending at least one ranging frame and receiving at least one ranging frame, the first acquisition module is specifically used to:

[0140] At least four pieces of time information are acquired by sending at least one ranging frame, receiving at least one ranging frame, and receiving the at least one piece of time information.

[0141] In another possible implementation, at least one received ranging frame carries time information;

[0142] Wherein, when acquiring at least four pieces of time information by sending at least one ranging frame and receiving at least one ranging frame, the first acquisition module is specifically used to:

[0143] At least four pieces of time information are acquired by sending at least one ranging frame, receiving at least one ranging frame and the time information carried in the at least one received ranging frame.

[0144] In another possible implementation,

[0145] The first receiving module is further used to receive at least one time information;

[0146] Wherein, when acquiring at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame, the second acquisition module is specifically used to:

[0147] Acquire at least six time information by sending at least two ranging frames, receiving at least one ranging frame, and receiving at least one time information;

[0148] Wherein, when acquiring at least six pieces of time information by sending at least one ranging frame and receiving at least two ranging frames, the third acquisition module is specifically used to:

[0149] At least six pieces of time information are acquired by sending at least one ranging frame, receiving at least two ranging frames, and receiving at least one piece of time information.

[0150] In another possible implementation, at least one received ranging frame carries time information;

[0151] Wherein, when acquiring at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame, the second acquisition module is specifically used to:

[0152] Acquire at least six pieces of time information by sending at least two ranging frames, at least one received ranging frame, and time information carried in the at least one received ranging frame;

[0153] Wherein, when acquiring at least six pieces of time information by sending at least one ranging frame and receiving at least two ranging frames, the third acquisition module is specifically used to:

[0154] At least six pieces of time information are acquired by sending at least one ranging frame, receiving at least two ranging frames, and time information carried in the at least one received ranging frame.

[0155] In another possible implementation manner, the device further includes: the at least two ranging frames sent include at least one Final frame; and / or,

[0156] The at least two received ranging frames include at least one Final frame.

[0157] In another possible implementation manner, the time information is carried in a ranging frame; and / or the time information is not carried in a ranging frame.

[0158] In another possible implementation, the device method further includes:

[0159] When the time information is not carried by the ranging frame, the time information is sent through the first channel; and / or,

[0160] When the time information is not carried by the ranging frame, the data frame is sent through the second channel;

[0161] Wherein, the first channel includes a channel for sending and receiving ranging frames;

[0162] The second channel is a channel that does not include sending or receiving ranging frames.

[0163] In another possible implementation manner, the second channel is a Bluetooth channel.

[0164] In another possible implementation manner, the frame format of the received ranging frame is specifically the fourth frame format;

[0165] The fourth frame format does not include payload data.

[0166] In another possible implementation manner, the frame format of the ranging frame includes at least one of the following:

[0167] A first frame format, a second frame format, and a third frame format.

[0168] In another possible implementation, the first frame format includes: synchronization SYNC, frame start symbol SFD, physical frame header PHR, and packet payload PHR Payload;

[0169] The second frame format includes: SYNC, SFD, scrambled timestamp sequence STS, PHR, and PHY Payload;

[0170] The third frame format includes: SYNC, SFD, PHR, PHY Payload, and STS.

[0171] In another possible implementation, the carried time information includes at least one of the following:

[0172] The transmission time of at least one received ranging frame and the reception time information of at least one sent ranging frame;

[0173] Sending time information of at least one ranging frame is sent, and receiving time information of at least one ranging frame is received.

[0174] In another possible implementation, when the first sending module sends at least one ranging frame, it is specifically used to send at least one ranging frame to at least two opposite-end devices; and when the first receiving module receives at least one ranging frame, it is specifically used to:

[0175] Receive at least one ranging frame respectively sent by at least two of the opposite end devices.

[0176] In another possible implementation manner, the at least one ranging frame sent to the at least two opposite-end devices is the same frame.

[0177] In another possible implementation manner, when sending at least one ranging frame, the first sending module is specifically configured to:

[0178] At least one ranging initiation frame is sent to at least one second device among at least two opposite-end devices, and at least one ranging reply frame is sent to at least one third device among the at least two opposite-end devices.

[0179] In another possible implementation manner, the first receiving module is further configured to receive at least one ranging reply frame sent by the at least one second device;

[0180] Wherein, the first receiving module is further used to: receive at least one ranging initiation frame sent by the at least one third device.

[0181] In another possible implementation, the device further includes:

[0182] The at least one ranging initiation frame includes at least one ranging initiation frame which is the same frame as the corresponding ranging reply frame.

[0183] In another possible implementation, the device further includes: a fourth acquisition module, wherein:

[0184] The fourth acquisition module is used to acquire the distance information between the first device and the opposite device according to the at least four time information.

[0185] In another possible implementation, when the fourth acquisition module acquires the distance information between the first device and the opposite device according to the at least four pieces of time information, it is specifically used for at least one of the following:

[0186] Determine the distance information between the first device and the opposite device according to the sending time of the sending ranging frame, the receiving time of the receiving ranging frame and the received time information;

[0187] Receive distance information between the first device and the opposite device sent by the opposite device.

[0188] In another possible implementation, the device further includes: a fifth acquisition module, wherein:

[0189] The fifth acquisition module is used to acquire the distance information between the first device and the opposite device according to the at least six time information.

[0190] In another possible implementation, when the fifth acquisition module acquires the distance information between the first device and the opposite device according to the at least six pieces of time information, it is specifically used for at least one of the following:

[0191] Determine the distance information between the first device and the opposite device according to the sending time information corresponding to sending at least two ranging frames, the receiving time information corresponding to receiving at least one ranging frame, and the received time information;

[0192] Determine the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the receiving time corresponding to receiving at least two ranging frames, and the received time information;

[0193] Receive distance information between the first device and the opposite device sent by an opposite device.

[0194] In another possible implementation manner, when the fifth acquisition module determines the distance information between the first device and the opposite device according to the sending time information corresponding to sending at least two ranging frames, the receiving time information corresponding to receiving at least one ranging frame, and the received time information, the fifth acquisition module is specifically used to:

[0195] Determine the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the sending time of sending the final frame, and the receiving time information of receiving at least one ranging frame;

[0196] Wherein, when the fifth acquisition module determines the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the receiving time corresponding to receiving at least two ranging frames, and the received time information, it is specifically used to:

[0197] The distance information between the first device and the opposite device is determined according to the sending time information of sending at least one ranging frame, the receiving time information of receiving at least one ranging frame, and the receiving time information of receiving the final frame.

[0198] In another possible implementation, the device further includes:

[0199] The first receiving module is further used to receive a distance measurement instruction;

[0200] The first sending module is further configured to send at least one ranging frame based on the ranging instruction; and

[0201] The first receiving module is further configured to receive at least one ranging frame based on the ranging instruction.

[0202] In another possible implementation, the ranging instruction includes: ranging time slot information;

[0203] Wherein, when the first sending module sends at least one ranging frame based on the ranging instruction, it is specifically used to: send at least one ranging frame based on the ranging time slot information;

[0204] Wherein, when the first receiving module receives at least one ranging frame based on the ranging instruction, it is specifically used to: receive at least one ranging frame based on the ranging time slot information.

[0205] In another possible implementation, the ranging time slot information includes: a preset time slot;

[0206] When the first sending module sends at least one ranging frame based on the ranging time slot information, it is specifically configured to:

[0207] Sending at least one ranging frame in a preset time slot;

[0208] Wherein, when the first receiving module receives at least one ranging frame based on the ranging time slot information, it is specifically used to:

[0209] At least one ranging frame is received in the preset time slot.

[0210] In another possible implementation, when the first sending module sends at least one ranging frame based on the ranging instruction, the first sending module sends at least one ranging frame in a random time slot based on the ranging instruction; and when the first receiving module receives at least one ranging frame based on the ranging instruction, the first receiving module is specifically used to: receive at least one ranging frame in a random time slot based on the ranging instruction.

[0211] In another possible implementation, the device further includes: a determination module, wherein:

[0212] The determining module is used to determine the random time slot according to its own device information.

[0213] In another possible implementation manner, the apparatus further includes: the first sending module is further configured to send device information, so that the opposite end device determines the ranging instruction based on the device information.

[0214] In another possible implementation, the device further includes:

[0215] The first sending module is further used to send a ranging instruction so that the device receiving the ranging instruction sends and / or receives a ranging frame.

[0216] In another possible implementation manner, the ranging instruction includes ranging time slot information:

[0217] When determining the ranging time slot information, the determining module is specifically used to:

[0218] Get the device information sent by the peer device;

[0219] The ranging time slot information is determined based on the device information sent by the opposite device and the device information of the device itself.

[0220] In another possible implementation, the device information includes: a device identification;

[0221] Wherein, when the determination module determines the ranging time slot information based on the device information sent by the opposite device and the device information of the device itself, it is specifically used to:

[0222] Sorting is performed based on the device identifiers corresponding to each device;

[0223] The ranging time slot information is determined based on the sorting result.

[0224] In another possible implementation, the device further includes:

[0225] The device information is transmitted via the first channel and / or the second channel;

[0226] The distance measurement instruction is transmitted through the first channel and / or the second channel.

[0227] In another possible implementation manner, the communication distance of the first channel matches the communication distance of the second channel.

[0228] In another possible implementation, the device further includes:

[0229] The first channel is specifically an ultra-wideband UWB channel; and / or,

[0230] The second channel is specifically a Bluetooth channel.

[0231] In another possible implementation, the device further includes: an uploading module, wherein:

[0232] The uploading module is used to upload the distance information between the first device and the opposite device to the corresponding device;

[0233] The corresponding device includes at least one of the following:

[0234] Mobile terminals;

[0235] Gateway;

[0236] server.

[0237] In another possible implementation, when the uploading module uploads the distance information between the first device and the opposite device to the corresponding device, it is specifically used to:

[0238] The distance information between the first device and the opposite device is uploaded to the corresponding device through the first channel or the second channel.

[0239] In another possible implementation, the first receiving module is further used to receive an upload success message sent by the corresponding device, where the upload success message is used to inform the first device of the distance information of the successful upload;

[0240] The device further comprises: a deletion module, wherein:

[0241] The deleting module is used to delete the successfully uploaded distance information based on the successfully uploaded message.

[0242] In another possible implementation, when the distance information is uploaded via at least two data packets,

[0243] When the deletion module deletes the successfully uploaded distance information based on the successfully uploaded message, it is specifically used to:

[0244] Based on the upload success message, determine the data packet that has been uploaded successfully;

[0245] Delete the distance information corresponding to the successfully uploaded data packet.

[0246] According to a third aspect of the present application, a storage medium is provided, wherein the computer storage medium is used to store computer instructions, and when the computer is run on a computer, the computer can execute the ranging method described in the first aspect or any possible implementation method shown in the first aspect.

[0247] According to a fourth aspect of the present application, a first device is provided.

[0248] one or more processors;

[0249] Memory;

[0250] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to: perform operations corresponding to the ranging method described in the first aspect or any possible implementation manner shown in the first aspect.

[0251] According to a fifth aspect of the present application, a ranging method is provided, which is performed by a second device and includes:

[0252] receiving at least one ranging frame; and,

[0253] At least one ranging frame is sent.

[0254] In a possible implementation manner, the receiving at least one ranging frame includes:

[0255] receiving at least one ranging frame sent by at least one first device; and / or,

[0256] receiving at least one ranging frame sent by at least one third device;

[0257] The sending of at least one ranging frame includes:

[0258] Sending at least one ranging frame to the at least one first device; and / or,

[0259] At least one ranging frame is sent to the at least one third device.

[0260] In another possible implementation, if there are at least two first devices, then:

[0261] Among the at least one ranging frame sent to each first device, at least one ranging frame is the same frame.

[0262] In another possible implementation, if there are at least two third devices, then,

[0263] Among the at least one ranging frame sent to each third device, at least one ranging frame is the same frame.

[0264] In another possible implementation, the method further includes:

[0265] At least one of the at least one ranging frame sent to the at least one third device and the at least one ranging frame sent to the at least one first device is the same ranging frame.

[0266] In another possible implementation, the method further includes:

[0267] For each first device, at least four pieces of time information are acquired by receiving at least one ranging frame and sending at least one ranging frame; and / or,

[0268] For each first device, at least six pieces of time information are acquired by receiving at least two ranging frames and sending at least one ranging frame; and / or,

[0269] For each first device, at least six pieces of time information are acquired by receiving at least one ranging frame and sending at least two ranging frames.

[0270] In another possible implementation, the method further includes at least one of the following:

[0271] For each first device, based on the at least four pieces of time information, obtain distance information between the second device and each of the first devices;

[0272] For each first device, based on the at least six pieces of time information, obtain distance information between the second device and each first device.

[0273] In another possible implementation, the method further includes at least one of the following:

[0274] For each third device, acquiring at least four pieces of time information by sending at least one ranging frame and receiving at least one ranging frame;

[0275] For each third device, acquiring at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame;

[0276] For each third device, at least six pieces of time information are acquired by sending at least one ranging frame and receiving at least two ranging frames.

[0277] In another possible implementation, the method further includes at least one of the following:

[0278] For each third device, based on the at least two pieces of time information, obtain distance information between the second device and each of the third devices;

[0279] For each third device, based on the at least four pieces of time information, obtain distance information between the second device and each of the third devices;

[0280] For each third device, based on the at least six pieces of time information, obtain distance information between the second device and each third device.

[0281] In another possible implementation, the method further includes:

[0282] At least one received ranging frame is a ranging initiation frame;

[0283] At least one ranging frame sent is a ranging reply frame.

[0284] According to a sixth aspect of the present application, a distance measuring device is provided, including:

[0285] A second receiving module is configured to receive at least one ranging frame; and

[0286] The second sending module is used to send at least one ranging frame.

[0287] In a possible implementation manner, when receiving at least one ranging frame, the second receiving module is specifically configured to:

[0288] receiving at least one ranging frame sent by at least one first device; and / or,

[0289] receiving at least one ranging frame sent by at least one third device;

[0290] Wherein, when sending at least one ranging frame, the second sending module is specifically used to:

[0291] Sending at least one ranging frame to the at least one first device; and / or,

[0292] At least one ranging frame is sent to the at least one third device.

[0293] In another possible implementation manner, when there are at least two first devices, at least one ranging frame among the at least one ranging frame sent to each first device is the same frame.

[0294] In another possible implementation, when there are at least two third devices,

[0295] Among the at least one ranging frame sent to each third device, at least one ranging frame is the same frame.

[0296] In another possible implementation, the device further includes:

[0297] At least one of the at least one ranging frame sent to the at least one third device and the at least one ranging frame sent to the at least one first device is the same ranging frame.

[0298] In another possible implementation, the device further includes: a sixth acquisition module;

[0299] The sixth acquisition module is configured to acquire at least four pieces of time information for each first device by receiving at least one ranging frame and sending at least one ranging frame; and / or,

[0300] The sixth acquisition module is configured to acquire at least six pieces of time information for each first device by receiving at least two ranging frames and sending at least one ranging frame; and / or,

[0301] The sixth acquisition module is used to acquire at least six pieces of time information for each first device by receiving at least one ranging frame and sending at least two ranging frames.

[0302] In another possible implementation, the device further includes: a seventh acquisition module, wherein:

[0303] The seventh acquisition module is configured to acquire, for each first device, distance information between the second device and each first device based on the at least four pieces of time information; and / or,

[0304] The seventh acquisition module is used to acquire, for each first device, distance information between the second device and each first device based on the at least six pieces of time information.

[0305] In another possible implementation, the device further includes: an eighth acquisition module, wherein:

[0306] The eighth acquisition module is configured to acquire at least four pieces of time information for each third device by sending at least one ranging frame and receiving at least one ranging frame; and / or,

[0307] The eighth acquisition module is configured to acquire at least six pieces of time information for each third device by sending at least two ranging frames and receiving at least one ranging frame; and / or,

[0308] The eighth acquisition module is used to acquire at least six pieces of time information for each third device by sending at least one ranging frame and receiving at least two ranging frames.

[0309] In another possible implementation, the device further includes: a ninth acquisition module, wherein:

[0310] The ninth acquisition module is configured to acquire, for each third device, distance information between the second device and each third device based on the at least four pieces of time information; and / or,

[0311] The ninth acquisition module is used to acquire, for each third device, distance information between the second device and each third device based on the at least six pieces of time information.

[0312] In another possible implementation, the device further includes:

[0313] At least one received ranging frame is a ranging initiation frame;

[0314] At least one ranging frame sent is a ranging reply frame.

[0315] According to the seventh aspect of the present application, a storage medium is provided, wherein the computer storage medium is used to store computer instructions, and when the computer is run on the computer, the computer can execute the ranging method described in the fifth aspect or any possible implementation method shown in the fifth aspect.

[0316] According to an eighth aspect of the present application, a second device is provided.

[0317] one or more processors;

[0318] Memory;

[0319] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to: perform operations corresponding to the ranging method described in the fifth aspect or any possible implementation method shown in the fifth aspect.

[0320] According to a ninth aspect of the present application, a ranging method is provided, which is performed by a third device and includes:

[0321] receiving at least one ranging frame; and,

[0322] At least one ranging frame is sent.

[0323] In another possible implementation manner, the receiving at least one ranging frame includes:

[0324] receiving at least one ranging frame sent by at least one first device; and / or,

[0325] At least one ranging frame sent by at least one second device is received.

[0326] The sending of at least one ranging frame includes:

[0327] Sending at least one ranging frame to the at least one first device; and / or,

[0328] At least one ranging frame is sent to the at least one second device.

[0329] In another possible implementation, if there are at least two first devices, then:

[0330] Among the at least one ranging frame received and sent by each first device, at least one ranging frame is the same frame.

[0331] In another possible implementation, if there are at least two second devices, then,

[0332] Among the at least one ranging frame received and sent by each second device, at least one ranging frame is the same frame.

[0333] In another possible implementation, the method further includes:

[0334] At least one of the at least one ranging frame sent to the at least one second device and the at least one ranging frame sent to the at least one first device is the same ranging frame.

[0335] In another possible implementation, the method further includes: at least one ranging frame sent is a ranging initiation frame;

[0336] At least one received frame is a ranging reply frame.

[0337] According to a tenth aspect of the present application, a distance measuring device is provided, including:

[0338] A third receiving module is configured to receive at least one ranging frame; and

[0339] The third sending module is used to send at least one ranging frame.

[0340] In a possible implementation manner, when receiving at least one ranging frame, the third receiving module is specifically configured to:

[0341] receiving at least one ranging frame sent by at least one first device; and / or,

[0342] At least one ranging frame sent by at least one second device is received.

[0343] Wherein, when sending at least one ranging frame, the third sending module is specifically used to:

[0344] Sending at least one ranging frame to the at least one first device; and / or,

[0345] At least one ranging frame is sent to the at least one second device.

[0346] In another possible implementation manner, when there are at least two first devices, at least one ranging frame received from at least one ranging frame sent by each first device is the same frame.

[0347] In another possible implementation manner, when there are at least two second devices, at least one ranging frame received from at least one ranging frame sent by each second device is the same frame.

[0348] In another possible implementation, the device further includes:

[0349] At least one of the at least one ranging frame sent to the at least one second device and the at least one ranging frame sent to the at least one first device is the same ranging frame.

[0350] In another possible implementation, the device further includes:

[0351] At least one ranging frame sent is a ranging initiation frame;

[0352] At least one received frame is a ranging reply frame.

[0353] According to an eleventh aspect of the present application, a storage medium is provided, wherein the computer storage medium is used to store computer instructions, and when the computer is run on a computer, the computer can execute the ranging method described in the ninth aspect or any possible implementation method shown in the ninth aspect.

[0354] According to the twelfth aspect of the present application, a third device is provided.

[0355] one or more processors;

[0356] Memory;

[0357] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to: perform operations corresponding to the ranging method described in the ninth aspect or any possible implementation method shown in the ninth aspect.

[0358] The present application provides a ranging method, an apparatus, a storage medium and a first device. Compared with the prior art, the first device in the present application sends at least one ranging frame and receives at least one ranging frame. In the present application, the first device can achieve ranging between any two devices by sending and / or receiving at least one ranging frame.

[0359] The present application provides a ranging method, an apparatus, a storage medium and a second device. Compared with the prior art, in the present application, the second device receives at least one ranging frame, and the second device sends at least one ranging frame. In the present application, the second device can achieve ranging between any two devices by sending and / or receiving at least one ranging frame.

[0360] The present application provides a ranging method, an apparatus, a storage medium and a third device. Compared with the prior art, the third device in the present application receives at least one ranging frame, and the third device sends at least one ranging frame. In the present application, the third device can achieve ranging between any two devices by sending and / or receiving at least one ranging frame. BRIEF DESCRIPTION OF THE DRAWINGS

[0361] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0362] Figure 1a A schematic diagram of a distance measurement application scenario provided by an embodiment of the present application is shown;

[0363] Figure 1b A schematic diagram of a flow chart of a distance measurement method provided in an embodiment of the present application is shown;

[0364] Figure 2 A schematic structural diagram of a distance measuring device provided in an embodiment of the present application is shown;

[0365] Figure 3 A schematic diagram of the structure of a first device provided in an embodiment of the present application is shown;

[0366] Figure 4 A schematic diagram showing a connection method of a base station, an industrial computer host and a switch provided in an embodiment of the present application is shown;

[0367] Figure 5 A schematic diagram of data packet uploading provided by an embodiment of the present application is shown;

[0368] Figure 6 A schematic diagram of sending a ranging frame between devices in an embodiment of the present application is shown;

[0369] Figure 7 A schematic diagram of device discovery in an embodiment of the present application is shown;

[0370] Figure 8 A schematic diagram of a frame configuration in an embodiment of the present application is shown;

[0371] Fig. 9 A schematic diagram of a flow chart of another distance measurement method in an embodiment of the present application is shown;

[0372] Fig.10 A schematic diagram showing a flow chart of another distance measurement method in an embodiment of the present application is shown;

[0373] Fig.11 A schematic diagram showing a flow chart of another distance measurement method in an embodiment of the present application is shown;

[0374] Fig.12 A schematic diagram showing a flow chart of another distance measurement method in an embodiment of the present application is shown;

[0375] Fig.13 A schematic diagram showing a flow chart of another distance measurement method in an embodiment of the present application is shown;

[0376] Fig.14 A schematic diagram showing a flow chart of another distance measurement method in an embodiment of the present application is shown;

[0377] Fig.15 A schematic diagram of four timestamp acquisition methods in an embodiment of the present application is shown;

[0378] Fig.16 A schematic diagram of six timestamp acquisition methods in an embodiment of the present application is shown;

[0379] Fig.17A schematic diagram showing the relationship between the distance measuring devices provided in the embodiment of the present application;

[0380] Fig.18 A schematic diagram showing the structure of another distance measuring device provided in an embodiment of the present application is shown;

[0381] Fig.19 A schematic structural diagram of another distance measuring device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0382] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0383] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such use is interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to".

[0384] In production and life, in many application scenarios, we need to measure the distance between any two devices, for example, between people carrying tags and other devices, between people and devices, and between devices, so as to ensure safety and bring important guiding significance to production and life.

[0385] For example, Figure 1a As shown in , when five people (1, 2, 3, 4, 5) are relatively close, we need to measure the distance between the five people, that is, the precise distance between each person and all the people nearby. Figure 1a As shown, the distances between 1, 2, 3, 4, and 5 are measured in real time, that is, d 12 ,d 13 ,d 14 ,d 15 , d 23 ,d 24 ,d 34 .

[0386] Therefore, how to achieve ranging between any two devices becomes a key issue.

[0387] The ranging method, apparatus, storage medium and device provided in the embodiments of the present application are intended to solve the above technical problems in the prior art.

[0388] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0389] The present application embodiment provides a distance measurement method, which is performed by a first device. In the present application embodiment, the first device may be an electronic device. In the present application embodiment, the electronic device may include: a mobile tag, a mobile phone, a tablet computer, etc. Figure 1b The specific implementation is as follows:

[0390] Step S101, sending at least one ranging frame;

[0391] Step S102: Receive at least one ranging frame.

[0392] Further, in the embodiment of the present application, step S101 may be performed before step S102, may be performed after step S102, or may be performed simultaneously with step S102, which is not limited in the embodiment of the present application. Figure 1b It only shows a possible implementation method and is not intended to limit the specific execution order.

[0393] Specifically, step S101 and step S102 are executed simultaneously, that is, the receiving device corresponding to step S101 (used to receive at least one ranging frame sent by the first device in step S101) and the transmitting device corresponding to step S102 (used to send at least one ranging frame received by the first device in step S102) are different devices, and the corresponding transmitting and receiving frequencies are also different.

[0394] An embodiment of the present application provides a ranging method. Compared with the prior art, in the embodiment of the present application, the first device sends at least one ranging frame and receives at least one ranging frame. In the present application, the first device can achieve ranging between any two devices by sending and / or receiving at least one ranging frame.

[0395] Specifically, in the embodiment of the present application, in step S101, the ranging frame sent by the first device may be a ranging initiation frame or a ranging reply frame; in step S102, the ranging frame received by the first device may be a ranging initiation frame or a ranging reply frame. In the embodiment of the present application, the ranging frame sent by the first device and / or the ranging frame received by the first device is a ranging initiation frame and / or a ranging reply frame, which is determined specifically for different application scenarios and is not limited in the embodiment of the present application.

[0396] Specifically, between any two devices, a ranging initiation frame and a ranging reply frame constitute a ranging round trip.

[0397] In another possible implementation of the embodiment of the present application, the method further includes: step Sa3 (not shown in the figure), wherein:

[0398] Step Sa3: Acquire at least four pieces of time information by sending at least one ranging frame and receiving at least one ranging frame.

[0399] Specifically, if four time information is obtained, it can be obtained through any sent ranging frame and any received ranging frame among at least one sent ranging frame and at least one received ranging frame. In the embodiment of the present application, any sent ranging frame can be a ranging initiation frame or a ranging reply frame, and any received ranging frame can be a ranging initiation frame or a ranging reply frame.

[0400] Specifically, in an embodiment of the present application, the four time information may be four timestamps, which may specifically include: a sending timestamp of a ranging frame sent by the first device to the opposite device, a receiving timestamp of a ranging frame received by the opposite device from the first device, a sending timestamp of a ranging frame sent by the opposite device to the first device, and a receiving timestamp of a ranging frame received by the first device from the opposite device.

[0401] Further, in the embodiment of the present application, the four time information may also be reflected as two time differences; in the embodiment of the present application, each time difference is the difference between two timestamps; in the embodiment of the present application, the two time differences may include: the difference between the sending timestamp of the ranging frame sent by the first device to the opposite device and the receiving timestamp of the ranging frame received by the first device from the opposite device, and the difference between the receiving timestamp of the ranging frame sent by the first device and the sending timestamp of the ranging frame sent by the opposite device to the first device. In the embodiment of the present application, it is not limited.

[0402] Further, in the embodiment of the present application, the four time information may also be embodied as two timestamps and a time difference (the time difference is the difference between the two timestamps); in the embodiment of the present application, the time difference is the difference between the sending timestamp of the ranging frame sent by the opposite device to the first device and the receiving timestamp of the ranging frame sent by the opposite device to the first device; the two timestamps include: the sending timestamp of the ranging frame sent by the first device to the opposite device, and the receiving timestamp of the ranging frame sent by the first device to the opposite device. In the embodiment of the present application, it is not limited.

[0403] Furthermore, in the embodiment of the present application, the at least four time information acquired by the first device can be used for distance measurement, that is, to determine the distance information between the first device and the opposite device. Of course, the first device can also implement other operations based on the at least four time information acquired.

[0404] Among them, the manner in which the first device implements other operations based on the at least four time information obtained is not described in detail in the embodiments of the present application; the manner in which the first device performs ranging based on the at least four time information obtained is detailed in the following embodiments.

[0405] Further, in the above embodiment, taking four time information as an example, the first device can generally accurately determine the sending timestamp of the ranging frame sent by the first device and the receiving timestamp of the ranging frame sent by the opposite device by sending the ranging frame and receiving the ranging frame by the first device by sending the ranging frame (it can also be the difference between the receiving timestamp of the ranging frame sent by the opposite device and the sending timestamp of the ranging frame sent by the first device), but the receiving time of the ranging frame sent by the opposite device and the sending timestamp of the ranging frame sent by the opposite device cannot be accurately determined. In order to more accurately obtain the ranging information between the first device and the opposite device to achieve more accurate ranging, the method also includes: step Sb (not shown in the figure), wherein,

[0406] Step Sb, receiving at least one time information;

[0407] Specifically, in the embodiment of the present application, a distance (the distance between any two devices) is determined through a ranging round trip (i.e., a ranging initiation frame and a ranging reply frame). In the embodiment of the present application, the first device can receive the at least one time information carried in the ranging frame by the opposite device through a ranging frame not in the ranging round trip, or the at least one time information carried by the opposite device through a non-ranging frame. This is not limited in the embodiment of the present application.

[0408] Specifically, in an embodiment of the present application, at least one time information may include: a timestamp when the opposite device receives the ranging frame sent by the first device and a timestamp when the opposite device sends the ranging frame to the first device; and / or, at least one time information may also include: difference information between a timestamp when the opposite device sends the ranging frame to the first device and a timestamp when the opposite device receives the ranging frame sent by the first device.

[0409] Specifically, in the embodiment of the present application, if the above time information can be received through a moment measurement frame and a non-range measurement frame that are not within the current ranging round trip, the frame format of the received ranging frame is specifically the fourth frame format;

[0410] It is worth noting that the received ranging frame involved here is the ranging frame used for ranging in the above text, not the additional ranging frame used to carry time information here.

[0411] The fourth frame format does not include payload data. For example, the fourth frame format may include: synchronization (SYNC), start frame delimiter (SFD), scrambled timestamp sequence (STS), as shown in the following figure. Figure 8 The frame format shown in the scrambled timestamp sequence packet configuration 3 (STSpacket configuration 3) in the embodiment of the present application is shown in the frame format. In the embodiment of the present application, the ranging frame for ranging between devices does not include a payload, and the frame length is shorter than that of the ranging frame including a payload, thereby reducing the ranging power consumption.

[0412] Based on the first device receiving at least one time information, at least four time information are obtained by sending at least one ranging frame and at least one received ranging frame, including: obtaining at least four time information by sending at least one ranging frame, at least one received ranging frame, and at least one received time information.

[0413] In the above embodiment, the first device may receive at least one time information sent through a ranging frame and / or a non-ranging frame that is not in the current ranging round trip. In order to reduce the number of ranging frames and improve the equipment capacity of the ranging system, that is, to increase the number of devices performing ranging in the ranging system, in the embodiment of the present application, the method may also include: at least one time information carried in at least one received ranging frame. The at least one ranging frame involved here is a ranging frame used for ranging this time. In the embodiment of the present application, the at least one time information is similar to the at least one time information received through a ranging frame and / or a non-ranging frame that is not in the current ranging round trip in the above embodiment. And in the embodiment of the present application, by carrying the above at least one time information in the ranging frame used for ranging, without the need for an additional frame to carry the at least one time information, the frame transmission between the first device and the opposite device can be saved, thereby improving the equipment capacity of the ranging system.

[0414] For example, when device 1 (corresponding to the first device mentioned above) and device 2 (corresponding to the opposite device mentioned above) perform ranging, device 1 sends a ranging initiation frame to device 2, and device 1 receives a ranging reply frame sent by device 2, the ranging reply frame received by device 1 may carry at least one time information, that is, including: the timestamp of the ranging initiation frame sent by device 1 received by device 2, the sending timestamp of the ranging reply frame sent by device 2, or including: the difference between the sending timestamp of the ranging reply frame sent by device 2 and the timestamp of the ranging initiation frame sent by device 1 received by device 2. In an embodiment of the present application, the sending timestamp of the ranging reply frame sent by device 2 may be a preset sending timestamp or a real sending timestamp. This is not limited in the embodiment of the present application.

[0415] Specifically, on the basis of the above embodiment, at least four time information are obtained by sending at least one ranging frame and receiving at least one ranging frame, including: obtaining at least four time information by sending at least one ranging frame, receiving at least one ranging frame and the time information carried in the received at least one ranging frame. In the embodiment of the present application, the carried time information includes: the sending time of at least one ranging frame received and the receiving time information of at least one ranging frame sent; and / or, the sending time information of at least one ranging frame sent, and the receiving time information of at least one ranging frame received.

[0416] In the above embodiment, whether obtaining at least two time information or obtaining at least four time information is for ranging, further, in order to perform ranging more accurately, at least six time information (timestamps) can be obtained, and then ranging is performed based on the obtained at least six time information.

[0417] In another possible implementation of the embodiment of the present application, the method further includes: at least one of step Sd (not shown in the figure) and step Se (not shown in the figure), wherein:

[0418] Step Sd: Acquire at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame.

[0419] Step Se, acquiring at least six pieces of time information by sending at least one ranging frame and receiving at least two ranging frames.

[0420] Specifically, in the embodiment of the present application, taking six timestamps as an example, since when any two devices are performing ranging, if the two devices want to obtain six timestamps, they need to send and receive at least three ranging frames, that is, if the first device obtains at least six timestamps when performing ranging, it needs to send and receive at least three ranging frames, that is, the first device obtains at least six timestamps by sending at least two ranging frames and receiving at least one ranging frame, or the first device obtains at least six timestamps by sending at least one ranging frame and receiving at least two ranging frames. In the embodiment of the present application, by obtaining at least six timestamps and then performing ranging according to the obtained at least six timestamps, the accuracy of ranging can be further improved.

[0421] Specifically, in an embodiment of the present application, at least six timestamps may include: a sending timestamp corresponding to at least two ranging frames sent by the first device to the opposite device, a receiving timestamp corresponding to at least one ranging frame received by the first device, a receiving timestamp corresponding to at least two ranging frames sent by the first device received by the opposite device, and a sending timestamp of at least one ranging frame sent by the opposite device to the first device.

[0422] Specifically, in the embodiment of the present application, the at least six timestamps may also include: a sending timestamp of at least one ranging frame sent by the first device to the opposite device, a receiving timestamp corresponding to at least two ranging frames received by the first device, a receiving timestamp corresponding to at least one ranging frame sent by the opposite device, and a sending timestamp corresponding to at least two ranging frames sent by the opposite device to the first device;

[0423] In the above embodiment, if the first device obtains at least six timestamps by sending at least two ranging frames and receiving at least one ranging frame, the first device can obtain the sending timestamps of sending at least two ranging frames and the receiving timestamp of receiving at least one ranging frame, but the receiving timestamps of at least two ranging frames received by the opposite device and the sending timestamps of at least one ranging frame sent by the opposite device can be obtained by the first device through the received ranging frames not within the current ranging round trip, and can also be obtained through the received non-ranging frames, and of course can also be obtained through the already received ranging frames (that is, the ranging frames within the current ranging round trip);

[0424] Further, if the first device obtains at least six timestamps by sending at least one ranging frame and receiving at least two ranging frames, the manner in which the first device obtains the at least six timestamps is as described below.

[0425] In another possible implementation of the embodiment of the present application, the method further includes: step Sf (not shown in the figure), wherein:

[0426] Step Sf, receiving at least one time information.

[0427] Specifically, in the embodiment of the present application, the first device may receive at least one time information sent by the opposite device via an additional ranging frame, or may receive at least one time information sent by the opposite device via a non-ranging frame. This is not limited in the embodiment of the present application.

[0428] Specifically, on the basis of step Sf, at least six time information are obtained by sending at least two ranging frames and at least one received ranging frame, including: obtaining at least six time information by sending at least two ranging frames, at least one received ranging frame, and at least one received time information; in this embodiment of the present application, for the reception timestamps corresponding to the at least two ranging frames sent by the first device respectively received by the opposite device, at least one timestamp in the transmission timestamp of at least one ranging frame sent by the opposite device to the first device can be obtained by the first device from the received additional ranging frames and / or additional non-ranging frames.

[0429] Specifically, on the basis of step Sf, at least six time information are obtained by sending at least one ranging frame and at least two ranging frames received, including: obtaining at least six time information by sending at least one ranging frame, at least two ranging frames received, and at least one time information received. In the embodiment of the present application, for the receiving timestamp corresponding to at least one ranging frame sent by the first device received by the opposite device, the sending timestamps corresponding to at least two ranging frames sent by the opposite device to the first device can be obtained by the first device through ranging frames and / or non-ranging frames not within the current ranging round trip.

[0430] Further, in the above embodiment, if the at least one time information received can be obtained through a ranging frame and / or a non-ranging frame that is not within the current ranging round trip, the frame format of the received ranging frame is specifically the fourth frame format;

[0431] The fourth frame format does not include payload data. In the embodiment of the present application, the ranging frames (ranging frames used for ranging) sent and received between devices are all in the fourth frame format, that is, they do not include payload data, so that the ranging power consumption is the lowest.

[0432] For example, the fourth frame format may include: SYNC, SFD, STS.

[0433] For the embodiment of the present application, in order to reduce the number of ranging frames and improve the capacity of the ranging device in the ranging system, at least one time information can be obtained from the ranging frame that has been received for ranging (ranging frame within the current ranging round trip). Specifically as follows:

[0434] In another possible implementation of the embodiment of the present application, the method further includes: step Sg (not shown in the figure), wherein:

[0435] Step Sg, at least one received ranging frame carries time information;

[0436] For the embodiment of the present application, the time information can be carried in at least one ranging frame that has been received, and the first device obtains the time information (the sending timestamp of the ranging frame sent by the opposite device and the receiving timestamp of the ranging frame received by the opposite device) from at least one ranging frame that has been received for ranging.

[0437] Specifically, on the basis of step Sg, at least six time information are obtained by sending at least two ranging frames and at least one received ranging frame, including: obtaining at least six time information by sending at least two ranging frames, at least one received ranging frame, and time information carried in at least one received ranging frame; in an embodiment of the present application, if the first device obtains at least six time information by sending at least two ranging frames and receiving at least one ranging frame, then at least one of the reception timestamps corresponding to the at least two ranging frames received by the opposite device and the transmission timestamp of the at least one ranging frame sent by the opposite device can be obtained through the at least one ranging frame that has been received.

[0438] Specifically, on the basis of step Sg, at least six time information are obtained by sending at least one ranging frame and receiving at least two ranging frames, including: obtaining at least six time information by sending at least one ranging frame, receiving at least two ranging frames, and time information carried in at least one ranging frame received. In an embodiment of the present application, if the first device obtains at least six timestamps by sending at least one ranging frame and receiving at least two ranging frames, then at least one of the receiving timestamps corresponding to the at least two ranging frames received by the opposite device and the sending timestamp of the at least one ranging frame sent by the opposite device can be obtained from at least one ranging frame in the at least two ranging frames received.

[0439] Another possible implementation manner of the embodiment of the present application is to obtain at least six pieces of time information by sending at least one ranging frame and receiving at least one ranging frame, including:

[0440] Acquire at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame, wherein the at least two ranging frames sent include at least one Final frame; and / or,

[0441] At least six pieces of time information are acquired by sending at least one ranging frame and receiving at least two ranging frames, wherein the at least two received ranging frames include at least one Final frame.

[0442] Specifically, in the embodiment of the present application, sending at least two ranging frames and receiving at least one ranging frame can constitute at least two ranging round trips. In the embodiment of the present application, even if the two ranging frames sent contain at least one Final frame, at least two ranging round trips can be constituted; that is, in a possible implementation, two ranging round trips can be constituted by sending a ranging frame, receiving a ranging frame, and sending a Final frame. Among them, two ranging round trips can obtain six time information.

[0443] That is, in an embodiment of the present application, if at least six pieces of time information are obtained, the first device needs to send and receive at least three ranging frames with the opposite device (including: sending at least two ranging frames and receiving at least one ranging frame, and / or, sending at least one ranging frame and receiving at least two ranging frames), wherein, in an embodiment of the present application, the at least three ranging frames sent and received may include at least one Final frame.

[0444] Further, it can be seen from the above embodiments that the time information is carried in the ranging frame; and / or the time information is not carried in the ranging frame.

[0445] In another possible implementation manner of the embodiment of the present application, the frame format of the ranging frame includes at least one of the following: a first frame format, a second frame format, and a third frame format.

[0446] The first frame format includes: synchronization SYNC, frame start symbol SFD, physical frame header PHR, packet load PHRPayload;

[0447] The second frame format includes: SYNC, SFD, scrambled timestamp sequence STS, PHR, and PHY Payload;

[0448] The third frame format includes: SYNC, SFD, PHR, PHY Payload, and STS.

[0449] Specifically, the first frame format includes: synchronization SYNC, frame start symbol SFD, physical frame header PHR, packet load PHRPayload; the second frame format includes: SYNC, SFD, scrambled timestamp sequence (STS), PHR, PHY Payload; the third frame format includes: SYNC, SFD, PHR, PHY Payload, STS. In the embodiment of the present application, if Figure 8As shown, the configuration of the first frame format can also be called Scrambled Timestamp Sequence packet configuration (STS packet configuration). When the value of STSpacket configuration is set to 0, the frame format is configured as the first frame format, including SYNC, SFD, PHR, and PHR Payload, that is, the first frame format does not include STS; when the value of STS packet configuration is set to 1, the frame format is configured as the second frame format, including SYNC, SFD, STS, PHR, and PHY Payload; when the value of STS packet configuration is set to 2, the frame format is configured as the third frame format, including SYNC, SFD, PHR, PHY Payload, and STS; when the value of STS packet configuration is set to 3, the frame format is configured as the fourth frame format, including: SYNC, SFD, and STS.

[0450] In another possible implementation manner of the embodiment of the present application, when the time information is not carried by the ranging frame, the time information is sent through the first channel; and / or when the time information is not carried by the ranging frame, the time information is sent through the second channel;

[0451] The first channel includes a channel for sending and receiving ranging frames, and the second channel does not include a channel for sending and receiving ranging frames. In an embodiment of the present application, when time information is transmitted through a channel that does not include sending and receiving ranging frames, the capacity of the ranging device in the ranging system can be increased.

[0452] Specifically, the first channel is a UWB channel and / or the second channel is a Bluetooth channel.

[0453] Furthermore, the above-mentioned ranging method can be applied to a ranging system, which may include two devices or multiple devices. When the ranging system includes two devices, ranging can be performed between the two devices. The specific ranging method can be detailed in the above-mentioned embodiment. When the ranging system includes multiple devices, ranging can be performed between any two devices. The method of performing ranging between any two devices can be detailed in the above-mentioned embodiment.

[0454] When the ranging system includes multiple devices, another possible implementation of the embodiment of the present application is to send at least one ranging frame; and receive at least one ranging frame, including: sending at least one ranging frame to at least two opposite-end devices; and receiving at least one ranging frame respectively sent by at least two opposite-end devices.

[0455] That is, when the first device performs ranging with at least two opposite devices in the ranging system, the first device sends at least one ranging frame to the at least two opposite devices, and receives at least one ranging frame respectively sent by the at least two opposite devices to achieve ranging.

[0456] For example, the ranging system includes device 1, device 2 and device 3, wherein device 1 needs to perform ranging with device 2 and device 3. Device 1 sends at least one ranging frame to device 2 and device 3, and receives at least one ranging frame sent by device 2 and device 3 respectively to achieve ranging.

[0457] Among them, when the first device sends a ranging frame to at least two opposite devices, it can send at least one ranging frame to each opposite device respectively, and at least one ranging frame sent to at least two opposite devices can be the same frame. In an embodiment of the present application, the first device performs ranging with at least two opposite devices. In order to reduce frame transmission between devices and improve the capacity of ranging devices in the ranging system, the first device can multiplex ranging frames when performing ranging with at least two opposite devices. That is, at least one ranging frame sent by the first device to at least two opposite devices can include at least one ranging frame as the same ranging frame. That is to say, if the first device sends at least two ranging frames to at least two devices respectively, at least one ranging frame in at least two ranging frames can be the same ranging frame.

[0458] For example, the ranging system includes device 1, device 2, and device 3, wherein device 1 needs to perform ranging with device 2 and device 3, and device 1 can send the same ranging frame to device 2 and device 3; that is, if device 1 initiates ranging, the ranging initiation frame sent by device 1 to device 2 and device 3 is the same frame. If device 1 sends at least two ranging frames to device 2 and also sends at least two ranging frames to device 3, then at least one ranging frame in the at least two ranging frames sent by device 1 to device 2 is the same frame as at least one ranging frame in the at least two ranging frames sent by device 1 to device 3. That is, device 1 sends a ranging initiation frame to device 2 and device 3, and then receives ranging reply frames sent by device 2 and device 3 respectively, and then device 1 sends a ranging initiation frame to device 2 and device 3, then the ranging initiation frame sent by device 1 to device 2 and device 3 each time can be the same frame, or the ranging frames sent to device 2 and device 3 at one time can be the same frame.

[0459] Furthermore, in the ranging system, the first device can be any device that initiates ranging, or a device that does not initiate ranging. When the ranging system includes multiple ranging devices, the first device can be a device that initiates ranging, or a device that does not initiate ranging. In the embodiment of the present application, the first device can be any device of this type (that is, a device that initiates ranging, or a device that does not initiate ranging). The details are as follows:

[0460] Another possible implementation manner of the embodiment of the present application is to send at least one ranging frame, including: sending at least one ranging initiation frame to at least one second device among at least two opposite devices, and sending at least one ranging reply frame to at least one third device among at least two opposite devices.

[0461] Specifically, in an embodiment of the present application, the step of sending at least one ranging initiation frame to at least one second device among at least two opposite devices may be performed before the step of sending at least one ranging reply frame to at least one third device among at least two opposite devices, or may be performed after the step of sending at least one ranging reply frame to at least one third device among at least two opposite devices, or may be performed simultaneously with the step of sending at least one ranging reply frame to at least one third device among at least two opposite devices. This is not limited in the embodiment of the present application. In an embodiment of the present application, the first device is a ranging initiation device for at least one second device, and the first device is not a ranging initiation device for at least one third device (or the first device is a ranging response device for at least one third device).

[0462] For example, if the ranging system includes device 1, device 2, device 3 and device 4, in the process of ranging between device 1 and device 2, device 3 and device 4, device 1 is a ranging initiating device relative to device 2, device 3 and device 4 (that is, device 1 is a ranging initiating device of device 2, device 3 and device 4), in the process of ranging between device 2 and device 3 and device 4, device 2 is a ranging initiating device, and in the process of ranging between device 3 and device 4, device 3 is a ranging initiating device; that is, if device 2 is the first device, device 1 is the third device, and device 3 and device 4 are the second devices; if device 3 is the first device, device 1 and device 2 are the third devices, and device 4 is the second device, as shown in the following example. Fig.17 shown.

[0463] Further, at least one ranging initiation frame is sent to at least one second device among at least two opposite devices, and then at least one ranging reply frame is received from at least one second device. At least one ranging reply frame is sent to at least one third device among at least two opposite devices, and before at least one ranging initiation frame is received from at least one third device.

[0464] Specifically, the first device sends at least one ranging initiation frame to at least one second device, and receives a ranging reply frame sent by at least one second device to implement ranging; in another possible implementation, the first device receives a ranging initiation frame sent by at least one third device, and the first device returns a ranging reply frame to at least one third device.

[0465] In the above embodiment, the first device can determine the distance between the first device and each second device, and then send the determined distance information to each second device; at least one third device can also determine the distance information between itself and the first device, and then send the distance information to the first device. That is, when a certain device determines the distance information between itself and the opposite device, it sends the distance information to the opposite device to avoid the opposite device from performing distance measurement again, thereby improving the capacity of the ranging device in the ranging system and avoiding the waste of device computing power.

[0466] For example, the ranging system includes four devices, including: device 1, device 2, device 3 and device 4, wherein device 1 can initiate ranging to device 2, device 3 and device 4 respectively, device 2 can initiate ranging to device 3 and device 4 respectively, and device 3 can initiate ranging to device 4, so as to achieve ranging between any two devices. In a specific implementation method, device 1 sends at least one ranging initiation frame to device 2, device 3 and device 4, and device 1 receives ranging reply frames sent by device 2, device 3 and device 4 respectively; device 2 sends at least one ranging initiation frame to device 3 and device 4, and device 2 receives ranging reply frames sent by device 3 and device 4 respectively; device 3 sends at least one ranging initiation frame to device 4, and receives at least one ranging reply frame sent by device 4, so as to achieve ranging.

[0467] Specifically, at least one ranging initiation frame includes at least one ranging initiation frame and a corresponding ranging reply frame that are the same frame. That is to say, if the first device can send both ranging initiation frames and ranging reply frames, in order to save frame transmission in the ranging system and improve the capacity of the ranging device in the ranging system, frame multiplexing can be performed. For example, the ranging initiation frame sent by device 2 to device 3 and device 4 and the ranging reply frame sent by device 2 to device 1 can be the same ranging frame.

[0468] Further, in order to maximize the capacity of the ranging device in the ranging system, when there are at least two second devices and there is one third device, the ranging initiation frame sent by the first device to the at least two second devices may be the same frame (that is, the ranging initiation frame is sent to the at least two second devices by multiplexing), and the ranging reply frame sent by the first device to the third device, and the ranging reply frame is also the same frame as the ranging initiation frame sent by the first device to the at least two second devices; when there are at least two third devices and there is one second device, the ranging reply frame sent by the first device to the at least two third devices may be the same frame, the ranging initiation frame sent by the first device to the second device, and the ranging initiation frame is also the same frame as the ranging reply frame sent by the first device to the at least two third devices; when there are at least two second devices and there are at least two third devices, the ranging initiation frame sent by the first device to the at least two second devices may be the same frame, the ranging reply frame sent by the first device to the at least two third devices may also be the same frame, and the initiation frame and the reply frame are the same frame.

[0469] In another possible implementation of the embodiment of the present application, the method further includes: step Sh (not shown in the figure), wherein:

[0470] Step Sh: acquiring distance information between the first device and the opposite device according to at least four pieces of time information.

[0471] Specifically, the at least four time information involved in the embodiment of the present application refers to at least four timestamps. In the embodiment of the present application, the first device can determine the distance information between itself and the opposite device based on the at least four time information, and can also obtain the distance information between the first device and the opposite device sent by the opposite device. In the embodiment of the present application, the opposite device can be any device except the first device in the ranging system.

[0472] Specifically, step Sh may include at least one of step Sh1 (not shown in the figure) and step Sh2 (not shown in the figure), wherein:

[0473] Step Sh1, determining the distance information between the first device and the opposite device according to the sending time of the sending ranging frame, the receiving time of the receiving ranging frame and the received time information;

[0474] The time information received in the embodiment of the present application may include: the receiving time when the opposite device receives the ranging frame and the sending time when the opposite device sends the ranging frame. Specifically, if the first device is a device that initiates ranging, the sending time of sending the ranging frame, the receiving time of receiving the ranging frame, the receiving time of the opposite device receiving the ranging frame, and the sending time of the opposite device sending the ranging frame may specifically be: the sending time when the first device sends the ranging initiation frame, the receiving time when the first device receives the ranging reply frame, the time when the opposite device receives the ranging initiation frame, and the sending time when the opposite device sends the ranging reply frame; if the first device is not a device that initiates ranging, the sending time of sending the ranging frame, the receiving time when the ranging frame is received, the receiving time when the opposite device receives the ranging frame, and the sending time when the opposite device sends the ranging frame may specifically include: the sending time when the first device sends the ranging reply frame, the receiving time when the first device receives the next frame of the ranging initiation frame, the receiving time when the opposite device receives the ranging initiation frame, and the sending time when the opposite device sends the next frame of the ranging initiation frame.

[0475] Specifically, in the embodiment of the present application, after acquiring the time information, the first device can determine the distance information between the first device and the opposite device according to Formula 1.

[0476]

[0477] Among them, TS1 is the sending time of the first device sending the ranging frame, TS2 is the receiving time of the opposite device receiving the ranging frame, TS3 is the sending time of the opposite device sending the ranging frame, TS4 is the receiving time of the first device receiving the ranging frame, and C is the speed of light.

[0478] Furthermore, after determining the distance information between the first device and the opposite device, the first device sends the determined distance information between the first device and the opposite device to the opposite device. Specifically, the determined distance information between the first device and the opposite device can be sent to the opposite device through the first channel and / or the second channel.

[0479] Step Sh2: receiving distance information between the first device and the opposite device sent by the opposite device.

[0480] For the embodiment of the present application, the distance information between the first device and the opposite device can also be determined by the opposite device, and after the opposite device determines the distance information between the first device and the opposite device, the distance information between the first device and the opposite device is sent to the first device.

[0481] Continuing with the above example, the ranging system includes four devices, namely, device 1, device 2, device 3 and device 4. If the first device is device 1, the first device (device 1) determines the distance information between the first device and the opposite device according to the sending time of the ranging frame, the receiving time of the ranging frame and the received time information, that is, only step Sh1 needs to be executed; when the first device is device 4, the first device (device 4) receives the distance information between device 1, device 2 and device 3 and device 4 respectively, that is, only step Sh2 needs to be executed; when the first device is device 2, the first device (device 2) determines the distance information between device 2 and device 3 and device 4 respectively, and also needs to receive the distance information between device 1 and device 2 sent by device 1, that is, steps Sh1 and Sh2 need to be executed. Similarly, when the first device is device 3, the first device (device 3) determines the distance information between device 3 and device 4, and also needs to receive the distance information between device 1 and device 2 and device 3 respectively sent by device 1, that is, steps Sh1 and Sh2 need to be executed.

[0482] Further, continuing with the above example, for a pair of devices, device 1 and device 3, the F1 frame is the initiation frame of device 1, and the subsequent F3 frame is the reply frame of device 3. These two frames are stamped with 4 timestamps on the two devices, so that the distance between device 1 and device 3 can be recorded and calculated on the device 1 side.

[0483] In the above embodiment, the distance measurement is performed by using four time stamps, and the four time stamps are obtained as follows: Fig.15 As shown, device 1 and device 3 perform ranging, device 1 sends ranging frame 1 to device 3, and device 1 receives the ranging frame sent by device 2. Through the above three ranging frames, a ranging round trip can be obtained, and four timestamps can be obtained, that is, Fig.15 Timestamp 1, timestamp 2, timestamp 3, timestamp 4 shown in .

[0484] Furthermore, in the above embodiment, when the first device receives the distance information between the first device and the opposite device, that is, the distance information between the first device and the opposite device is calculated (determined) by the opposite device. In the embodiment of the present application, the way in which the opposite device determines the distance information between the first device and the opposite device can be found in the way in which the first device determines the distance information, which will not be repeated here.

[0485] The above-described method of obtaining the distance information between the first device and the opposite device through at least four time information is described. In order to obtain more accurate distance information, the distance information between the first device and the opposite device can be obtained based on at least six time information. In the embodiment of the present application, since the distance measurement is performed based on at least six time information, that is, at least six time information can constitute at least two ranging round trips, each ranging round trip can obtain a distance information, and the average processing based on at least two distance information can eliminate the crystal oscillator error of the local clock of the device, thereby further improving the accuracy of obtaining the ranging information. For example, Fig.16 As shown, device 1 and device 3 perform ranging, device 1 sends ranging frame 1 to device 3, device 1 receives ranging frame sent by device 3, and device 1 sends ranging frame to device 3. Through the above three ranging frames, two ranging round trips can be obtained, and six timestamps can be obtained, that is, Fig.16 Timestamp 1, timestamp 2, timestamp 3, timestamp 4, timestamp 5 and timestamp 6 are shown in .

[0486] In another possible implementation of the embodiment of the present application, the method further includes: step S1 (not shown in the figure), wherein:

[0487] Step S1: Obtain distance information between the first device and the opposite device according to at least six pieces of time information.

[0488] Specifically, the at least six time information involved in the embodiment of the present application refers to at least six timestamps. In the embodiment of the present application, the first device can determine the distance information between itself and the opposite device based on the at least six time information, and can also obtain the distance information between the first device and the opposite device sent by the opposite device. In the embodiment of the present application, the opposite device can be any device in the ranging system except the first device.

[0489] Specifically, step Si may include at least one of step Si1 (not shown in the figure), step Si2 (not shown in the figure) and step Si3 (not shown in the figure), wherein:

[0490] Step Si1, determining the distance information between the first device and the opposite device according to the sending time information corresponding to the sending of at least two ranging frames, the receiving time information corresponding to the receiving of at least one ranging frame, and the received time information. In an embodiment of the present application, the received time information may include: the receiving time information corresponding to the receiving of at least two ranging frames sent by the first device by the opposite device, and the sending time corresponding to the sending of at least one ranging frame by the opposite device.

[0491] Specifically, step Si1 may include: determining the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the sending time of sending the final frame, and the receiving time information of receiving at least one ranging frame. In the embodiment of the present application, the specific introduction of the final frame is detailed in the above embodiment, which will not be repeated here.

[0492] Step Si2, determining the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the receiving time corresponding to receiving at least two ranging frames, and the received time information. In the embodiment of the present application, the received time information may include: the receiving time information of the opposite device receiving at least one ranging frame, and the sending time information corresponding to the sending of at least two ranging frames by the opposite device.

[0493] Specifically, step Si2 may include: determining the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the receiving time information of receiving at least one ranging frame, and the receiving time information of receiving the final frame.

[0494] Step Si3: Receive the distance information between the first device and the opposite device sent by the opposite device.

[0495] Specifically, the first device may not need to determine the distance information between the first device and the opposite device, and only needs to perform the receiving step, that is, receive the distance information between the first device and the opposite device sent by the opposite device. In an embodiment of the present application, the first device receives the distance information between the first device and the opposite device sent by the opposite device, which can avoid the first device from performing ranging with the opposite device based on the transmission and reception of ranging frames, thereby saving computing resources, and in an embodiment of the present application, the first device can receive the distance information between the first device and the opposite device sent by the ranging opposite end, and does not need to perform distance calculation, so the first device can also be a device without computing capability, that is, a device without computing capability can also obtain the distance between devices.

[0496] For the embodiment of the present application, the opposite device can determine the distance information between the first device and the opposite device based on the at least six time information obtained. In the embodiment of the present application, the way in which the opposite device determines the distance information between the first device and the opposite device based on at least six time information is similar to the way in which the first device determines the distance information between the first device and the opposite device based on at least six time information, and the details are not repeated here.

[0497] Continuing with the previous example, the distance measurement system includes four devices, namely device 1, device 2, device 3, and device 4. The device side directly calculates the distance:

[0498] Device 1: d 12 , d 13 , d 14 ;

[0499] Device 2: d 23 , d 24 ;

[0500] Device 3: d 34 ;

[0501] Subsequently, the devices that directly calculate the distance broadcast their local calculated distances in turn through the second channel or the UWB channel. For example, device 1 broadcasts d 12 , d 13 , d 14 The R1 frame (return frame) is broadcasted, and after the return frame is received by devices 2, 3, and 4, devices 2, 3, and 4 can also obtain the distance between them and device 1. In the embodiment of the present application, the return frame can be a ranging frame that is not within the current ranging round trip, or a non-ranging frame.

[0502] After devices 123 broadcast ranging frames in sequence, all devices can obtain distance information from other devices.

[0503]

[0504] Specifically, in the embodiment of the present application, the F1 frame, the F2 frame, the F3 frame, and the F4 frame are all ranging frames. In the embodiment of the present application, the F1 frame and the F2 frame constitute a ranging round trip, the F2 frame and the F3 frame constitute a ranging round trip, the F3 frame and the F4 frame constitute a ranging round trip, the F1 frame and the F3 frame can also constitute a ranging round trip, and the F1 frame and the F4 frame also constitute a ranging round trip. Further, in the embodiment of the present application, the R1 frame, the R2 frame, and the R3 frame are all return frames. For the introduction based on the return frame, please refer to the above embodiment for details, which will not be repeated here.

[0505] Each of the above-mentioned devices (device 1, device 2, device 3 and device 4) may obtain the distance information between the devices through at least two time information, at least four time information, or at least six time information. The specific implementation method is detailed in the above-mentioned embodiment and will not be repeated here.

[0506] The above embodiments introduce a specific implementation method for distance measurement between devices (between any two devices). The following embodiments introduce the preparation work before distance measurement. For details, please refer to the following embodiments:

[0507] In another possible implementation manner of the embodiment of the present application, the method further includes: receiving a ranging instruction; sending at least one ranging frame based on the ranging instruction; and receiving at least one ranging frame based on the ranging instruction.

[0508] It can be seen from the above embodiments that: the first device sends and receives ranging frames based on the received ranging instructions. In the embodiment of the present application, the method also includes: sending device information so that the opposite device determines the ranging instruction based on the device information. That is, before the first device receives the ranging instruction, the first device sends device information so that the opposite device (a certain device at the opposite end) determines the ranging instruction based on the received device information. In the embodiment of the present application, the opposite device (a certain device at the opposite end) can determine the ranging instruction corresponding to the first device only based on the received device information of the first device, and can also determine the ranging instruction based on the received device information of the first device and its own device; when the ranging system includes multiple devices, the opposite device (a certain device at the opposite end) can also determine the ranging instruction based on all the received device information and its own device information. The specific method of determining the ranging instruction is not limited in the embodiment of the present application.

[0509] In the above embodiment, the first device receives the ranging instruction and sends and receives the ranging frame according to the received ranging instruction, thereby avoiding the collision of the ranging frames sent and received between the devices, which may further cause the ranging failure.

[0510] Further, in an embodiment of the present application, the first device may receive a ranging instruction through the first channel and / or the second channel. In an embodiment of the present application, the first channel may include: a UWB channel, and the second channel may include a Bluetooth channel. In an embodiment of the present application, since the Bluetooth channel has lower power consumption than other channels, the ranging instruction is transmitted through the Bluetooth channel, which can reduce power consumption and save resources of the ranging channel, thereby further improving the capacity of the ranging device in the ranging system. Further, in an embodiment of the present application, the ranging instruction is transmitted through the Bluetooth channel before UWB ranging can be performed, thereby avoiding turning on UWB ranging all the time, thereby reducing ranging power consumption.

[0511] Further, after the opposite device determines the distance measurement instruction, the opposite device sends the distance measurement instruction to the first device.

[0512] For the embodiment of the present application, the ranging instruction includes at least one of the following: ranging time slot information and device information corresponding to the ranging peer. In the embodiment of the present application, the ranging time slot information is used to determine the time slot for sending and / or receiving the ranging frame; the device information of the ranging peer is used to determine the device information corresponding to the peer device to be ranged.

[0513] Specifically, the ranging instruction includes: ranging time slot information; based on the ranging instruction, sending at least one ranging frame, including: based on the ranging time slot information, sending at least one ranging frame; based on the ranging instruction, receiving at least one ranging frame, including: based on the ranging time slot information, receiving at least one ranging frame. In an embodiment of the present application, the ranging time slot information can be a specific ranging time slot, or a relationship with a certain time slot. After determining the specific time slot based on the ranging time slot information, at least one ranging frame is sent in the determined specific time slot. In an embodiment of the present application, the time slots in which the first device sends ranging frames to different devices can be the same, different, or at least two of them can be the same, which is not limited in the embodiment of the present application.

[0514] Furthermore, in an embodiment of the present application, the ranging time slot information may also include time slot information corresponding to each opposite device, so that the first device can determine the time slot corresponding to each opposite device (the time slot in which each opposite device sends a ranging frame), so that the first device receives the ranging frames sent by other opposite devices in the corresponding time slot.

[0515] Specifically, the ranging time slot information includes: a preset time slot; when the preset time slot is included in the ranging time slot information, sending at least one ranging frame based on the ranging time slot information includes: sending at least one ranging frame in the preset time slot; receiving at least one ranging frame based on the ranging time slot information includes: receiving at least one ranging frame in the preset time slot.

[0516] That is, since the ranging instruction is sent by other devices and received by the first device, the other device (a certain device) can pre-set the ranging time slot information corresponding to each device in the ranging system, or only pre-set the ranging time slot corresponding to the first device, or determine the ranging time slot corresponding to the first device based on other information. Of course, after receiving the ranging instruction, the first device can also determine the corresponding ranging time slot according to the ranging instruction, so that the first device sends at least one ranging frame in the preset time slot.

[0517] Another possible implementation of the embodiment of the present application, based on the ranging instruction, sending at least one ranging frame; and, based on the ranging instruction, receiving at least one ranging frame, includes: based on the ranging instruction, sending at least one ranging frame in a random time slot; and, based on the ranging instruction, receiving at least one ranging frame in a random time slot. In the embodiment of the present application, at each ranging, the first device may randomly select a time slot to send a ranging frame. In the embodiment of the present application, the random time slot selected by the first device may not be determined based on any parameters, or may be determined based on its own device information. In the embodiment of the present application, its own device information may include a device identifier. For example, the ranging system includes 3 devices, and the device identifiers are device 1, device 2, and device 3, respectively, and the corresponding device identifiers are 1, 2, and 3, respectively. Then, device 1 determines that the random time slot of device 1 can be time slot 1 according to device identifier 1, device 2 determines that the random time slot of device 2 can be time slot 2 according to device identifier 2, and device 3 determines that the random time slot of device 3 can be time slot 3 according to device identifier 3. Furthermore, based on the ranging instruction, the first device may also determine the time slot information of the opposite device sending the ranging frame, so that the opposite device receives at least one ranging frame in a random time slot.

[0518] In another possible implementation of the embodiment of the present application, the first device may receive a ranging instruction determined by other devices (opposite devices, and / or devices other than the first device and the opposite device in the ranging system), or may determine the ranging instruction by itself and then send the ranging instruction so that the device receiving the ranging instruction sends and / or receives the ranging frame. In the embodiment of the present application, by sending the ranging instruction so that the device receiving the ranging instruction sends and receives the ranging frame according to the ranging instruction, the situation where the ranging failure is caused by the collision of frames between devices can also be avoided.

[0519] Specifically, when the ranging instruction includes ranging time slot information, the method for determining the ranging time slot information includes: obtaining device information sent by the opposite device; determining the ranging time slot information based on the device information sent by the opposite device and its own device information. In an embodiment of the present application, the first device obtains the device information corresponding to each device respectively, determines the ranging time slot information based on the device information corresponding to each device respectively, and then sends the ranging time slot information to each device, so that each device sends and receives ranging frames according to the ranging time slot information. In an embodiment of the present application, the ranging time slot information corresponding to each device may include the ranging time slot information corresponding to each device respectively, or may only include the ranging time slot information corresponding to each device. In an embodiment of the present application, determining the ranging time slot information based on the device information of the opposite device can improve the accuracy of the determined ranging time slot information.

[0520] Specifically, the device information is transmitted through the first channel and / or the second channel; in the embodiment of the present application, whether the first device obtains the device information of each other device or the first device sends the device information to the opposite device, the device information can be transmitted through the first channel and / or the second channel. In the embodiment of the present application, the first channel is a ranging channel, and the second channel is a non-ranging channel. In the embodiment of the present application, the first channel and / or the second channel may include: UWB channel, Nth generation mobile communication technology channel (N is 3, 4, 5...), Bluetooth channel, ZigBee, Wireless Fidelity (Wireless Fidelity, Wi-Fi), etc. Specifically, the first channel is a UWB channel, and the second channel is a Bluetooth channel. In the embodiment of the present application, the Bluetooth channel has lower power consumption than other channels. Moreover, the device information is transmitted through the Bluetooth channel, which can save the channel resources of the ranging channel and improve the capacity of the ranging device in the ranging system.

[0521] Specifically, the device information includes: a device identifier; in an embodiment of the present application, the ranging time slot information is determined based on the device information sent by the opposite device and the device information of the device itself, including: sorting based on the device identifiers corresponding to each device; determining the ranging time slot information based on the sorting result. In an embodiment of the present application, the ranging time slot information may include the ranging time slots corresponding to each device. That is, each device sends a ranging frame in the determined ranging time slot. In an embodiment of the present application, the determined ranging time slot information may be a ranging time slot list, which includes the ranging time slots corresponding to each device; the determined ranging time slot information may also be the ranging time slots corresponding to each device, or the determined ranging time slot information may be the sorting information of each device. In an embodiment of the present application, sorting is performed based on the device identifiers corresponding to each device, and the ranging time slot is determined based on the sorting result, which can also improve the accuracy of the determined ranging time slot.

[0522] For example, the ranging system includes three devices, device 1, device 2 and device 3, wherein device 1, device 2 and device 3 are 1, 2 and 3 respectively, and device 1 is the first device, then device 1 determines the sorting results of each device as device 1, device 2 and device 3 based on device identifiers 1, 2 and 3, then the determined ranging time slot information may be the sorting result (device 1, device 2 and device 3); or based on the ranging sorting result, the ranging time slot information is determined to be ranging time slot 1, ranging time slot 2 and ranging time slot 3 respectively, then the determined ranging time slot information may be ranging time slot 1, ranging time slot 2 and ranging time slot 3, or may be a ranging list including ranging time slot 1, ranging time slot 2 and ranging time slot 3. In this example, device 1 and device 2 perform ranging, device 1 sends a ranging frame in ranging time slot 1, and device 2 receives the ranging frame sent by device 1 in ranging time slot 1; and device 2 sends a ranging frame in ranging time slot 2, and device 1 receives the ranging frame in ranging time slot 2.

[0523] Specifically, the ranging instruction is transmitted through the first channel and / or the second channel. In an embodiment of the present application, when the first device determines the ranging instruction, the ranging instruction can be sent to other ranging devices (opposite devices or other devices other than the opposite device in the ranging system) through the first channel and / or the second channel, or after other devices determine the ranging instruction, they can be transmitted to the first device. In an embodiment of the present application, the ranging instruction information can be transmitted through the first channel and / or the second channel. In an embodiment of the present application, the first channel is a ranging channel, and the second channel is a non-ranging channel. Specifically, the first channel is a UWB channel, and the second channel is a Bluetooth channel.

[0524] Furthermore, in the above embodiment, the method for determining the ranging time slot information is introduced by taking the first device as an example. The method for determining the ranging time slot information of other devices is similar to the method for determining the ranging time slot information of the above first device, and will not be repeated in the embodiment of the present application.

[0525] In the above embodiments, the ranging instruction information and / or the device information can be transmitted through the first channel and / or the second channel. In the embodiment of the present application, the communication distance of the first channel matches the communication distance of the second channel. In the embodiment of the present application, the communication distance of the first channel and the communication distance of the second channel can be the same, and the communication distance of the first channel and the communication distance of the second channel can also be not much different; in the embodiment of the present application, the communication distance of the first channel and the communication distance of the second channel can be determined by each other. For example, the communication distance of the first channel and the communication distance of the second channel can be about ten to twenty meters.

[0526] Furthermore, in an embodiment of the present application, the first channel may be a UWB channel, and the second channel may be a Bluetooth channel. The communication distance of the Bluetooth channel matches the communication distance of the UWB channel, that is, a device that can transmit a ranging instruction can perform UWB ranging, thereby avoiding the need for devices that do not need to perform ranging to perform UWB ranging, which in turn leads to a waste of ranging resources, and can further improve the ranging capacity of the ranging device in the ranging system.

[0527] Specifically, when transmitting in the second channel, the transmission power is controlled so that the communication distance of the second channel matches the communication distance of the first channel. In an embodiment of the present application, the communication distance of the second channel matches the communication distance of the first channel so that the information (ranging instruction information and / or device information, etc.) sent in the second channel can be received by other devices. In an embodiment of the present application, the communication distance of the first channel is not much different from the communication distance of the second channel, which can further save power consumption.

[0528] Specifically, the communication distance of the second channel is not greater than a preset threshold, and the preset threshold is determined according to the communication distance of the first channel.

[0529] In the following embodiments, the ranging method is introduced in the form of a specific example, wherein the first device and the opposite device involved in the above embodiments are located in a ranging system, and the devices included in the ranging system can be fixed or dynamically changed in real time; in the embodiment of the present application, the devices included in the ranging system are dynamically changed, then each device can send a discovery frame at a preset time, and each other device in the ranging system starts frame reception. After receiving the discovery frame, the device included in the current ranging system is determined. In the embodiment of the present application, the discovery frame sent by each device at a preset time can be a UWB ranging frame (that is, a ranging frame sent in the UWB ranging channel), or a UWB broadcast frame (that is, a ranging frame broadcast in the UWB ranging channel), or an out-of-band broadcast frame (that is, a ranging frame broadcast in the second channel). In the embodiment of the present application, each device can always turn on frame reception to receive the discovery frame sent by each device. Of course, it is also possible to turn on the channel reception for a whole cycle every certain number of cycles, for example, every 5 cycles (T), the reception is turned on for a whole cycle, as shown in the following example. Figure 7As shown. Since the start time is an entire cycle, and other devices broadcast periodically, the broadcasts of other devices must be received during this entire cycle. If the devices included in the ranging system are fixed, each device in the ranging system can predetermine the devices included in the ranging system, or each device can pre-send a discovery frame so that each device receives the discovery frame sent by other devices and determines the devices included in the ranging system. In an embodiment of the present application, the discovery frame carries device information so that the device receiving the discovery frame can be aware of the devices that exist nearby. Furthermore, in an embodiment of the present application, since the devices included in the ranging system are dynamically changing, ranging between any two devices can be achieved through the above embodiment.

[0530] Furthermore, the discovery frame sent by each device may carry device information corresponding to each device, for example, the identification of each device. After receiving the device information sent by other devices, each device can determine the ranging initiating device during ranging. In an embodiment of the present application, each device can determine the ranging initiating device during ranging between any two devices based on the acquired device ID and its own device ID. In an embodiment of the present application, the device with the smallest device ID can determine the ranging time slots corresponding to each device and send them to each device.

[0531] For example, the ranging system includes four devices, namely, device 1, device 2, device 3 and device 4, and the corresponding device identifiers are 1, 2, 3 and 4 respectively. When ranging is performed between device 1 and device 2, device 3 and device 4, device 1 sends a ranging initiation frame to device 2, device 3 and device 4 in a multiplexed frame manner. When ranging is performed between device 2 and device 3 and device 4, device 2 sends a ranging initiation frame to device 3 and device 4 in a multiplexed frame manner. When ranging is performed between device 3 and device 4, device 3 sends a ranging initiation frame to device 4. In addition, the ranging initiation frame and the ranging reply frame may be multiplexed frames, that is, the ranging reply frame sent by device 2 to device 1 is the same frame as the ranging initiation frame sent by device 2 to device 3 and device 4, the ranging initiation frame sent by device 3 to device 4 is the same frame as the ranging reply frame sent by device 3 to device 1 and device 2, and the ranging reply frame sent by device 4 to device 1, device 2, device 3 and device 4 is the same frame.

[0532] For example, Figure 6 As shown, device 1 sends an F1 ranging frame (ranging initiation frame) to device 2, device 3, and device 4, device 2 sends an F2 frame (ranging initiation frame) to device 3 and device 4, device 2 sends an F2 frame (ranging reply frame) to device 1, device 3 sends an F3 frame (ranging initiation frame) to device 4, device 3 sends an F3 frame (ranging reply frame) to device 1 and device 2, and device 4 sends an F4 frame (ranging reply frame) to device 1, device 2, and device 3.

[0533] Furthermore, in the above embodiment, it is introduced that the device information is sent so that the device receiving the device information determines the devices included in the surroundings, and then determines the ranging time slot information, etc., so that the device can perform ranging by sending and receiving ranging frames through the ranging time slot information, etc. However, in another possible implementation of the embodiment of the present application, any two ranging devices are in a fixed ranging system, that is, each device is aware of the device information of other devices and the corresponding ranging time slot information, etc. in advance, that is, before ranging, it is not necessary to perform the operation of sending device information between devices as shown in the above embodiment to determine the ranging time slot information, etc., but the ranging between any two devices can be performed directly according to the device information and ranging time slot information, etc. that have been known in advance.

[0534] Further, after performing distance measurement in the manner in the above embodiment and obtaining distance information, in order to subsequently analyze and use the distance information between the devices, another possible implementation method of the embodiment of the present application is to upload the distance information between the first device and the opposite device to the corresponding device;

[0535] The corresponding equipment includes at least one of the following:

[0536] Mobile terminals;

[0537] Gateway;

[0538] server.

[0539] For the embodiment of the present application, after the first device obtains the distance information between the first device and the opposite device, the first device can upload the obtained distance information to the corresponding device, which is also convenient for subsequent analysis and use. Of course, the first device can also store the distance information itself for subsequent analysis and use. In the embodiment of the present application, if the device needs to store the distance information, etc., the device needs to be equipped with a storage chip, etc.

[0540] Furthermore, data collection base stations, gateways, etc. need to be deployed in the scene. Data collection base stations and / or gateways are deployed in key locations of the scene, such as at the main door, at the stairwell, etc., to ensure that the equipment has as much opportunity to contact the base station and / or gateway as possible when it is active. There can be one or more data collection base stations in a scene. In an embodiment of the present application, after the base station receives the uploaded distance information, it uploads the collected distance information to the industrial computer host. In an embodiment of the present application, the data collection base station and the industrial computer host are connected to the same local area network through a switch for aggregation. Among them, the connection method between the base station, the industrial computer host and the switch is as follows: Figure 4 As shown, information is exchanged between the industrial computer host and the switch, and information is exchanged between the switch and the base station.

[0541] Furthermore, the first device may also upload the distance information between the first device and the opposite device to a mobile terminal device or a server, etc., for subsequent analysis and use.

[0542] Specifically, uploading the distance information between the first device and the opposite device to the corresponding device includes: uploading the distance information between the first device and the opposite device to the corresponding device through the first channel or the second channel. In the embodiment of the present application, uploading the distance information between the first device and the opposite device through the first channel does not require a communication module other than the ranging module for transmission, and uploading the distance information between the first device and the opposite device through the second channel can further save ranging channel resources and save the capacity of the ranging device in the ranging system.

[0543] Specifically, the first channel may be a UWB channel, and the second channel may be a Bluetooth channel. In the embodiment of the present application, the advantages of transmitting distance information through the Bluetooth channel are specifically described in the above embodiment, and will not be repeated in the embodiment of the present application.

[0544] Another possible implementation method of the embodiment of the present application is to upload the distance information between the first device and the opposite device to the corresponding device, and then also include: receiving an upload success message sent by the corresponding device; based on the upload success message, deleting the successfully uploaded distance information.

[0545] The upload success message is used to inform the first device of the distance information of the successful upload.

[0546] Specifically, if the distance information is uploaded via at least two data packets, the successfully uploaded distance information is deleted based on the upload success message, including: determining the successfully uploaded data packet based on the upload success message; and deleting the distance information corresponding to the successfully uploaded data packet.

[0547] For the embodiment of the present application, when the first device uploads the distance information to the corresponding device, the corresponding device may send an upload success message to the first device as soon as it receives the data packet, or may send an upload success message to the first device after receiving a preset number of data packets, or may send an upload success message to the first device after receiving all the data packets. In the embodiment of the present application, the upload success message may carry the packet information of the successfully uploaded data packet. For example, the packet information may include: the identifier of the data packet.

[0548] For the embodiment of the present application, after the device completes a cycle of ranging, the main control chip stores the obtained distance information in the storage chip. The tag searches for nearby base stations at regular intervals. After finding the base station, it packages the data information into segments and uploads them to the data collection base station. After the upload is successful, the corresponding data segments are deleted to release storage space.

[0549] Furthermore, after the device and the base station establish a connection through the exploration base station frame and the base station's reply frame, after uploading multiple data packets, the base station replies to the tag with a reply frame to tell the tag which packets with the same sequence number have been successfully received. The tag then deletes the corresponding packet to free up storage space. Then repeat this process to continue uploading data packets, for example Figure 5 As shown, the device establishes a connection with the data collection base station by exploring the base station frame and replying to the exploration frame, and then the device uploads data packet 1, data packet 2...data n in sequence, and then the data collection base station determines the successfully uploaded data packet and sends a successful upload message, so that the device deletes the successfully uploaded data packet and releases storage space.

[0550] In many cases, this distance value needs to be encrypted, such as the distance measurement between people. Based on the consideration of protecting the privacy of people, it cannot be read and viewed at will. In this demand scenario, it is necessary to install an encryption chip in the device. Once the distance information is generated, it is encrypted by the encryption chip and then stored. Subsequent reporting, storage in the industrial computer and other operations also act on the encrypted information. In the embodiment of the present application, the decryption key is stored in the department that has the authority to view this private information. When you need to view the distance information of a certain device, you need the authorization of this department to view it.

[0551] The following embodiments introduce the distance measurement method through specific examples, which are as follows:

[0552] Example 1: In some embodiments, the second channel is a Bluetooth channel, that is, the ranging system includes device 1, device 2...device N, and device 1, device 2...device N are connected via Bluetooth. In the embodiment of the present application, ranging instructions, etc. are transmitted via the Bluetooth connection, so that each device performs ranging on the first channel (e.g., UWB channel), that is, each device in device 1, device 2...device N starts UWB ranging, and device 1 sends ranging control information to each device in device 2...device N, for example, through the first frame format, and then device 1 sends a ranging start message to each device in device 2...device N (it can also be sent through a ranging initiation frame), for example, through the second frame format, and then each device in device 2...device N returns a ranging response message to device 1, and the ranging response message can carry a ranging report message (the ranging report message can carry at least one time information). In this example, the ranging response message can be sent through a ranging reply frame, and the frame format can be a third frame format, specifically as Fig. 9In the embodiment of the present application, the ranging control information includes ranging-related parameters, including the time segment length (ie, the length of the ranging time slot), the type of ranging method, and the like. In the embodiment of the present application, the stage in which device 1 sends a ranging control message to device 2 and device 3 belongs to the ranging control phase (Ranging Control Phase, RCP), and the stage in which a ranging initiation message is sent belongs to the ranging initiation phase (Ranging Initial Phase, RIP); the stage in which device 2 and device 3 send a ranging response message carrying a ranging report message to device 1 belongs to the result report phase (Result Report Phase, RRP) and the measurement report phase (Measurement Report Phase, MRP); wherein, in the result report phase, device 2 and device 3 may send at least one time information recorded locally by device 2 and device 3 to device 1 respectively; wherein, in the measurement report phase, device 2 and device 3 may send at least one time difference information locally obtained by device 2 and device 3 to device 1 respectively, and / or, at least one distance information; wherein, the result report phase may also be the same phase as the measurement report phase, in other words, device 2 sends time information and distance information to device 1 in the same frame, and device 3 sends time information and distance information to device 1 in the same frame;

[0553] Example 2: The ranging system includes device 1, device 2...device N, which are connected via Bluetooth, and each of devices 1, device 2...device N starts UWB ranging. Device 1 sends a ranging start message carrying a ranging control message to each of devices 2...device N (specifically, it can be sent through a ranging initiation frame), and the frame format used can be the second frame format. Then, device 1 sends a ranging start message to each of devices 2...device N (it can also be sent through a ranging initiation frame), for example, it can be through the second frame format, and then each of devices 2...device N returns a ranging response message to device 1, and the ranging response message can carry a ranging report message. In this example, the ranging response message can be sent through a ranging reply frame, and the frame format can be the second frame format. The ranging report message can generally carry at least one time information and the determined distance information. In the embodiment of the present application, the stage of sending the ranging initiation message belongs to the ranging initiation phase (Ranging Initial Phase, RIP); the ranging response phase in which device 2 and device 3 send the ranging report message carrying the ranging report to device 1 belongs to the result report phase (Result Report Phase, RRP) and the measurement report phase (Measurement Report Phase, MRP), wherein, in the result report phase, device 2 and device 3 can send at least one time information recorded locally by device 2 and device 3 to device 1 respectively; wherein, in the measurement report phase, device 2 and device 3 can send at least one time difference information locally obtained by device 2 and device 3 to device 1 respectively, and / or, at least one distance information; wherein, the result report phase can also be the same phase as the measurement report phase, in other words, device 2 sends time information and distance information to device 1 in the same frame, and device 3 sends time information and distance information to device 1 in the same frame, specifically as Fig.10 shown.

[0554] Example 3: The ranging system includes device 1, device 2...device N, which are connected via Bluetooth, and each of devices 1, device 2...device N starts UWB ranging. Device 1 sends ranging control information to each of devices 2...device N, for example, through the first frame format, and then device 1 sends a ranging start message to each of devices 2...device N (it can also be sent through a ranging initiation frame), for example, through the second frame format, and then each of devices 2...device N returns a ranging response message to device 1, and the ranging response message can carry a ranging report message. In this example, the ranging response message can be sent through a ranging reply frame, and the frame format can be the second frame format. Then, device 1 sends a ranging final message carrying a ranging report message to each of devices 2...device N, which can be sent through a ranging final frame, and the frame format can be the second frame format. Then, each of devices 2...device N returns a ranging result report message to device 1, and the frame format can include the first frame format. In the embodiment of the present application, the stage of sending the ranging start message belongs to the ranging initiation stage (Ranging Initial The ranging response phase in which device 2 and device 3 send ranging report messages to device 1 belongs to the result report phase (Result Report Phase, RRP) and the measurement report phase (Measurement Report Phase, MRP). The phase in which device 1 sends ranging final messages carrying ranging report messages to device 2...device N belongs to the ranging final phase (Result Final Phase, RFP) and the ranging report phase (Measurement Report Phase, MRP). The phase in which device 2, device 3...device N send ranging result report messages to device 1 belongs to the ranging result report phase. Phase, RRRP), wherein, in the result reporting phase, device 2 and device 3 may send at least one time information locally recorded by device 2 and device 3 to device 1 respectively; wherein, in the measurement reporting phase, device 2 and device 3 may send at least one time difference information locally acquired by device 2 and device 3 to device 1 respectively, and / or at least one distance information; wherein, the result reporting phase may also be the same phase as the measurement reporting phase, in other words, device 2 sends time information and distance information to device 1 in the same frame, and device 3 sends time information and distance information to device 1 in the same frame, specifically as Fig.11 shown.

[0555] Example 4: The ranging system includes device 1, device 2 ... device N, which are connected via Bluetooth, and each of the devices 1, device 2 ... device N starts UWB ranging, and device 1 sends a ranging start message carrying a ranging control message to each of the devices 2 ... device N (specifically, it can be sent through a ranging initiation frame), and the frame format used can be the second frame format, and then device 1 sends a ranging start message to each of the devices 2 ... device N (it can also be sent through a ranging initiation frame), for example, it can be sent through the second frame format, and then each of the devices 2 ... device N sends a ranging start message to the device 2 ... device N. Device 1 returns a ranging response message, which may carry a ranging report message. In this example, the ranging response message may be sent through a ranging reply frame, and the frame format may be the second frame format. Then, device 1 sends a ranging final message carrying a ranging report message to each device in device 2 ... device N, which may be sent through a ranging final frame, and the frame format may be the second frame format. Then, each device in device 2 ... device N returns a ranging result report message to device 1, and the frame format may include the first frame format. In the embodiment of the present application, the stage of sending a ranging start message carrying a ranging control message belongs to the ranging initiation stage (Ranging Initial Phase, RIP) and RCP; the ranging response phase in which device 2 and device 3 send a ranging report message carrying a ranging report message to device 1 belongs to the result report phase (Result Report Phase, RRP) and the measurement report phase (Measurement Report Phase, MRP), the phase in which device 1 sends a ranging final message carrying a ranging report message to device 2...device N belongs to the ranging final phase (Result Final Phase, RFP) and the ranging report phase (Measurement Report Phase, MRP), the phase in which device 2, device 3...device N send a ranging result report message to device 1 belongs to the ranging result report phase (Ranging Result Report Phase, RRRP), wherein, in the result report phase, device 2 and device 3 can send at least one time information recorded locally by device 2 and device 3 to device 1 respectively; wherein, in the measurement report phase, device 2 and device 3 can send at least one time difference information locally obtained by device 2 and device 3 to device 1 respectively; wherein, in the ranging report phase, device 2 and device 3 can send at least one distance information locally obtained by device 2 and device 3 to device 1 respectively; specifically as Fig.12 shown.

[0556] The above embodiment introduces the ranging method from the perspective of the first device. The following embodiment introduces the ranging method from the perspective of the second device and the third device. In the embodiment of the present application, the first device may be a device in the ranging system. After the first device is determined, when ranging is performed between the first device and the first device, the device used to initiate ranging is the third device; the device used to reply to ranging is the second device; for example, the ranging system includes device 1, device 2, device 3, and device 4. If device 1 performs ranging with device 2, device 3, and device 4 respectively, device 1 is a ranging initiating device, and when device 2 performs ranging with device 3 and device 4 respectively, device 2 is a ranging initiating device, and when device 3 initiates ranging with device 4, device 3 is a ranging initiating device. That is, if device 2 is the first device, then device 3 and device 4 are the second devices, and device 1 is the third device; if device 3 is the first device, device 4 is the second device, and device 1 and device 2 are the third devices; furthermore, if device 1 is the first device, then device 2, device 3, and device 4 are the second devices; if device 4 is the first device, then device 1, device 2, and device 3 are all the third devices;

[0557] The present application embodiment provides a distance measurement method, which is performed by a second device. In the present application embodiment, the second device is an electronic device, such as Fig.13 As shown, including:

[0558] Step S201, receiving at least one ranging frame;

[0559] Step S202: Send at least one ranging frame.

[0560] For the embodiment of the present application, step S201 may be performed before step S202, may be performed after step S202, or may be performed simultaneously with step S202. Fig.13 This is only a possible implementation method and is not intended to limit the embodiments of the present application.

[0561] In another possible implementation manner of the embodiment of the present application, step S201 may include: receiving at least one ranging frame sent by at least one first device; and / or, receiving at least one ranging frame sent by at least one third device; specifically, step S201 and step S202 are performed simultaneously, that is, the sending end device corresponding to step S201 (used to send at least one ranging frame received in step S201) and the receiving end device corresponding to step S202 (used to receive at least one ranging frame sent in step S202) are different devices, and the corresponding transmitting and receiving frequencies are also different.

[0562] Specifically, step S202 may include: sending at least one ranging frame to at least one first device; and / or sending at least one ranging frame to at least one third device.

[0563] In another possible implementation manner of the embodiment of the present application, step S201 may specifically include: receiving at least one ranging frame sent by at least one first device; and / or receiving at least one ranging frame sent by at least one third device;

[0564] Specifically, the at least one ranging frame received is a ranging initiation frame. In an embodiment of the present application, at least one ranging initiation frame sent by at least one first device is received; and / or at least one ranging initiation frame sent by at least one third device is received;

[0565] Specifically, the at least one ranging frame sent is a ranging reply frame. In an embodiment of the present application, at least one ranging reply frame is sent to at least one first device; and / or at least one ranging reply frame is sent to at least one third device.

[0566] In another possible implementation manner of the embodiment of the present application, if there are at least two first devices, at least one ranging frame among the at least one ranging frame sent to each first device is the same frame.

[0567] Specifically, if there are at least two first devices, at least one ranging frame in at least one ranging reply frame sent by the second device to each first device is the same frame, thereby achieving frame multiplexing, saving frame transmission in the ranging system, and improving the device capacity of the ranging system.

[0568] In another possible implementation manner of the embodiment of the present application, if there are at least two third devices, at least one ranging frame among the at least one ranging frame sent to each third device is the same frame.

[0569] Specifically, if there are at least two third devices, at least one ranging frame sent by the second device to each third device is the same frame. In the embodiment of the present application, ranging is performed in the above manner so that frame multiplexing can be achieved, frame transmission in the ranging system can be saved, and the device capacity of the ranging system can be improved.

[0570] In another possible implementation of the embodiment of the present application, the method further includes: at least one of the at least one ranging frame sent to at least one third device and at least one ranging frame sent to at least one first device is the same ranging frame. In the embodiment of the present application, ranging is performed in the above manner so that frame multiplexing can be achieved, frame transmission in the ranging system can be saved, and the device capacity of the ranging system can be improved.

[0571] For example, ranging frame 1 is sent to the third device, and ranging frame 2 is sent to the first device, wherein ranging frame 1 and ranging frame 2 are the same ranging frame.

[0572] In another possible implementation manner of the embodiment of the present application, the method further includes: for each first device, obtaining at least two time information by receiving at least one ranging frame and sending at least one ranging frame; and / or, for each first device, obtaining at least four time information by receiving at least one ranging frame and sending at least one ranging frame; and / or, for each first device, obtaining at least six time information by receiving at least two ranging frames and sending at least one ranging frame; and / or, for each first device, obtaining at least six time information by receiving at least one ranging frame and sending at least two ranging frames.

[0573] For the embodiments of the present application, the manner in which the second device obtains at least four time information and / or at least six time information is similar to the manner in which the first device obtains at least four time information and / or at least six time information. Please refer to the above embodiments for details.

[0574] Another possible implementation manner of the embodiment of the present application, the method also includes: for each first device, based on at least two time information, obtaining the distance information between the second device and each first device; and / or, for each first device, based on at least four time information, obtaining the distance information between the second device and each first device; and / or, for each first device, based on at least six time information, obtaining the distance information between the second device and each first device.

[0575] For the embodiments of the present application, the manner in which the second device obtains distance information based on at least two time information, and / or the second device obtains distance information based on at least four time information, and / or the second device obtains distance information based on at least six time information is similar to the manner in which the first device obtains distance information based on at least two time information, and / or obtains distance information based on at least four time information, and / or obtains distance information based on at least six time information. Please refer to the above embodiments for details.

[0576] In another possible implementation manner of the embodiment of the present application, the method further includes: for each third device, acquiring at least two time information by sending at least one ranging frame and receiving at least one ranging frame; and / or, for each third device, acquiring at least four time information by sending at least one ranging frame and receiving at least one ranging frame; and / or, for each third device, acquiring at least six time information by sending at least two ranging frames and receiving at least one ranging frame; and / or, for each third device, acquiring at least six time information by sending at least one ranging frame and receiving at least two ranging frames.

[0577] For the embodiment of the present application, the manner in which the second device obtains at least two time information and / or the second device obtains at least four time information and / or the second device obtains at least six time information is detailed in the manner in which the first device obtains time information, which will not be repeated in the embodiment of the present application.

[0578] Another possible implementation manner of the embodiment of the present application, the method also includes: for each third device, based on the at least two time information, obtaining the distance information between the second device and each third device; and / or, for each third device, based on the at least four time information, obtaining the distance information between the second device and each third device; and / or, for each third device, based on the at least six time information, obtaining the distance information between the second device and each third device.

[0579] For the embodiments of the present application, the manner in which the second device obtains distance information based on at least two time information, and / or the second device obtains distance information based on at least four time information, and / or the second device obtains distance information based on at least six time information is similar to the manner in which the first device obtains distance information based on at least two time information, and / or obtains distance information based on at least four time information, and / or obtains distance information based on at least six time information. Please refer to the above embodiments for details.

[0580] Further, in the embodiment of the present application, the second device performs ranging in a manner similar to the first device, that is, the first device performs ranging in a manner that is also applicable to the second device performs ranging, which will not be described in detail in the present embodiment.

[0581] The present application embodiment further provides a distance measurement method, which is performed by a third device. In the present application embodiment, the third device is an electronic device. Fig.14 As shown,

[0582] Step S301, receiving at least one ranging frame;

[0583] Step S302: Send at least one ranging frame.

[0584] For the embodiment of the present application, step S301 may be performed before step S302, may be performed after step S302, or may be performed simultaneously with step S302. Fig.14 This is only a possible implementation method and is not intended to limit the embodiments of the present application.

[0585] In another possible implementation manner of the embodiment of the present application, step S301 may specifically include: receiving at least one ranging frame sent by at least one first device; and / or receiving at least one ranging frame sent by at least one second device.

[0586] Specifically, at least one received frame is a ranging reply frame. In an embodiment of the present application, at least one ranging reply frame sent by at least one first device is received; and / or at least one ranging reply frame sent by at least one third device is received;

[0587] Specifically, step S302 may specifically include: sending at least one ranging frame to at least one first device; and / or sending at least one ranging frame to at least one second device.

[0588] Specifically, at least one ranging frame sent is a ranging initiation frame; in an embodiment of the present application, at least one ranging initiation frame is sent to at least one first device; and / or, at least one ranging initiation frame is sent to at least one third device.

[0589] Specifically, if there are at least two first devices, at least one ranging frame received from each first device is the same frame. In an embodiment of the present application, at least one ranging frame received from each first device is the same frame, thereby achieving frame multiplexing, saving frame transmission in the ranging system, and improving the device capacity of the ranging system.

[0590] Specifically, if there are at least two second devices, at least one ranging frame received from each second device is the same frame. In an embodiment of the present application, at least one ranging frame received from each second device is the same frame, thereby achieving frame multiplexing, saving frame transmission in the ranging system, and improving the device capacity of the ranging system.

[0591] Furthermore, at least one of the at least one ranging frame sent to at least one second device and at least one ranging frame sent to at least one first device is the same ranging frame. In the embodiment of the present application, ranging is performed in the above manner so that frame multiplexing can be achieved, frame transmission in the ranging system can be saved, and the capacity of the ranging device in the ranging system can be increased.

[0592] The manner in which the third device performs ranging in the embodiment of the present application is similar to the manner in which the first device performs ranging. For details, please refer to the embodiment corresponding to the manner in which the first device performs ranging, which is not limited in the embodiment of the present application.

[0593] The above embodiment introduces a distance measurement method from the perspective of the method flow. Based on the above embodiment, the following embodiment introduces a distance measurement device from the perspective of a module or unit, which is applicable to the above method embodiment, as shown below:

[0594] The present application embodiment provides a distance measuring device, such as Figure 2 As shown, the distance measuring device 20 may include: a first sending module 21 and a first receiving module 22, wherein:

[0595] A first sending module 21 is configured to send at least one ranging frame; and

[0596] The first receiving module 22 is configured to receive at least one ranging frame.

[0597] In another possible implementation of the embodiment of the present application, the device 20 further includes: a first acquisition module, wherein:

[0598] The first acquisition module is used to acquire at least four time information by sending at least one ranging frame and receiving at least one ranging frame.

[0599] In another possible implementation manner of the embodiment of the present application, the device 20 further includes: at least one of a second acquisition module and a third acquisition module, wherein:

[0600] A second acquisition module, configured to acquire at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame;

[0601] The third acquisition module is used to acquire at least six pieces of time information by sending at least one ranging frame and receiving at least two ranging frames.

[0602] Another possible implementation of the embodiment of the present application is as follows:

[0603] The first receiving module 22 is further used to receive at least one time information;

[0604] Among them, when the first acquisition module acquires at least four time information by sending at least one ranging frame and receiving at least one ranging frame, it is specifically used to: acquire at least four time information by sending at least one ranging frame, receiving at least one ranging frame, and receiving at least one time information.

[0605] In another possible implementation manner of the embodiment of the present application, at least one received ranging frame carries time information;

[0606] Among them, when the first acquisition module acquires at least four time information by sending at least one ranging frame and receiving at least one ranging frame, it is specifically used to: acquire at least four time information by sending at least one ranging frame, receiving at least one ranging frame and the time information carried in at least one ranging frame received.

[0607] In another possible implementation of the embodiment of the present application, the first receiving module 22 is further configured to receive at least one piece of time information;

[0608] Wherein, when acquiring at least six pieces of time information by sending at least two ranging frames and at least one received ranging frame, the second acquisition module is specifically used to: acquire at least six pieces of time information by sending at least two ranging frames, at least one received ranging frame, and at least one received time information;

[0609] Among them, when the third acquisition module acquires at least six time information by sending at least one ranging frame and receiving at least two ranging frames, it is specifically used to: acquire at least six time information by sending at least one ranging frame, receiving at least two ranging frames, and receiving at least one time information.

[0610] In another possible implementation manner of the embodiment of the present application, at least one received ranging frame carries time information;

[0611] Wherein, when acquiring at least six pieces of time information by sending at least two ranging frames and at least one received ranging frame, the second acquisition module is specifically used to: acquire at least six pieces of time information by sending at least two ranging frames, at least one received ranging frame, and time information carried in at least one received ranging frame;

[0612] Among them, when the third acquisition module acquires at least six time information by sending at least one ranging frame and receiving at least two ranging frames, it is specifically used to: acquire at least six time information by sending at least one ranging frame, at least two ranging frames received, and time information carried in at least one ranging frame received.

[0613] In another possible implementation manner of the embodiment of the present application, the device 20 further includes: the at least two ranging frames sent include at least one Final frame; and / or the at least two ranging frames received include at least one Final frame.

[0614] In another possible implementation manner of the embodiment of the present application, the time information is carried in the ranging frame; and / or the time information is not carried in the ranging frame.

[0615] In another possible implementation of the embodiment of the present application, the device 20 further includes:

[0616] When the time information is not carried by the ranging frame, the time information is sent through the first channel; and / or,

[0617] When the time information is not carried by the ranging frame, the data frame is sent through the second channel;

[0618] Wherein, the first channel includes a channel for sending and receiving ranging frames;

[0619] The second channel is a channel that does not include the transmission and reception of ranging frames.

[0620] In another possible implementation manner of the embodiment of the present application, the second channel is a Bluetooth channel.

[0621] In another possible implementation manner of the embodiment of the present application, the frame format of the received ranging frame is specifically the fourth frame format;

[0622] The fourth frame format does not include payload data.

[0623] In another possible implementation manner of the embodiment of the present application, the frame format of the ranging frame includes at least one of the following:

[0624] A first frame format, a second frame format, and a third frame format.

[0625] In another possible implementation manner of the embodiment of the present application, the first frame format includes: synchronization SYNC, frame start symbol SFD, physical frame header PHR, and packet load PHR Payload;

[0626] The second frame format includes: SYNC, SFD, scrambled timestamp sequence STS, PHR, PHY Payload;

[0627] The third frame format includes: SYNC, SFD, PHR, PHY Payload, and STS.

[0628] In another possible implementation of the embodiment of the present application, the time information carried includes at least one of the following:

[0629] The transmission time of at least one received ranging frame and the reception time information of at least one sent ranging frame;

[0630] Sending time information of at least one ranging frame is sent, and receiving time information of at least one ranging frame is received.

[0631] In another possible implementation manner of the embodiment of the present application, the first sending module 21 is specifically used to send at least one ranging frame to at least two opposite-end devices when sending at least one ranging frame; and the first receiving module is specifically used to receive at least one ranging frame respectively sent by at least two opposite-end devices when receiving at least one ranging frame.

[0632] In another possible implementation manner of the embodiment of the present application, at least one ranging frame sent to at least two opposite-end devices is the same frame.

[0633] In another possible implementation manner of the embodiment of the present application, when sending at least one ranging frame, the first sending module 21 is specifically used to: send at least one ranging initiation frame to at least one second device among at least two opposite-end devices, and send at least one ranging reply frame to at least one third device among at least two opposite-end devices.

[0634] In another possible implementation manner of the embodiment of the present application, the first receiving module 22 is further configured to receive at least one ranging reply frame sent by at least one second device;

[0635] The first receiving module 22 is further used to receive at least one ranging initiation frame sent by at least one third device.

[0636] In another possible implementation of the embodiment of the present application, the device 20 further includes:

[0637] The at least one ranging initiation frame includes at least one ranging initiation frame and a corresponding ranging reply frame which are the same frame.

[0638] In another possible implementation of the embodiment of the present application, the device 20 further includes: a fourth acquisition module, wherein:

[0639] The fourth acquisition module is used to acquire the distance information between the first device and the opposite device according to at least four time information.

[0640] In another possible implementation manner of the embodiment of the present application, when the fourth acquisition module acquires the distance information between the first device and the opposite device according to the at least four time information, it is specifically used for at least one of the following:

[0641] Determine the distance information between the first device and the opposite device according to the sending time of the sending ranging frame, the receiving time of the receiving ranging frame and the received time information;

[0642] Receive distance information between the first device and the opposite device sent by the opposite device.

[0643] In another possible implementation of the embodiment of the present application, the apparatus 20 further includes: a fifth acquisition module, wherein:

[0644] The fifth acquisition module is used to acquire the distance information between the first device and the opposite device according to at least six time information.

[0645] In another possible implementation manner of the embodiment of the present application, when the fifth acquisition module acquires the distance information between the first device and the opposite device according to the at least six time information, it is specifically used for at least one of the following:

[0646] Determine the distance information between the first device and the opposite device according to the sending time information corresponding to sending at least two ranging frames, the receiving time information corresponding to receiving at least one ranging frame, and the received time information;

[0647] Determine the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the receiving time corresponding to receiving at least two ranging frames, and the received time information;

[0648] Receive distance information between the first device and the opposite device sent by the opposite device.

[0649] In another possible implementation manner of the embodiment of the present application, the fifth acquisition module determines the distance information between the first device and the opposite device according to the sending time information corresponding to the sending of at least two ranging frames, the receiving time information corresponding to the receiving of at least one ranging frame, and the received time information, and is specifically used to:

[0650] Determine the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the sending time of sending the final frame, and the receiving time information of receiving at least one ranging frame;

[0651] Among them, when the fifth acquisition module determines the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the receiving time corresponding to receiving at least two ranging frames, and the received time information, it is specifically used to:

[0652] The distance information between the first device and the opposite device is determined according to the sending time information of sending at least one ranging frame, the receiving time information of receiving at least one ranging frame, and the receiving time information of receiving the final frame.

[0653] In another possible implementation of the embodiment of the present application, the device 20 further includes:

[0654] The first receiving module 22 is also used to receive the ranging instruction;

[0655] The first sending module 21 is further configured to send at least one ranging frame based on the ranging instruction; and

[0656] The first receiving module 22 is further configured to receive at least one ranging frame based on the ranging instruction.

[0657] In another possible implementation manner of the embodiment of the present application, the ranging instruction includes: ranging time slot information;

[0658] Wherein, when the first sending module 21 sends at least one ranging frame based on the ranging instruction, it is specifically used to: send at least one ranging frame based on the ranging time slot information;

[0659] When receiving at least one ranging frame based on the ranging instruction, the first receiving module 22 is specifically configured to: receive at least one ranging frame based on the ranging time slot information.

[0660] In another possible implementation manner of the embodiment of the present application, the ranging time slot information includes: a preset time slot;

[0661] When the first sending module 21 sends at least one ranging frame based on the ranging time slot information, it is specifically used to: send at least one ranging frame in a preset time slot;

[0662] When the first receiving module 22 receives at least one ranging frame based on the ranging time slot information, it is specifically configured to: receive at least one ranging frame in a preset time slot.

[0663] In another possible implementation manner of the embodiment of the present application, when the first sending module 21 sends at least one ranging frame based on the ranging instruction, the first sending module 21 sends at least one ranging frame in a random time slot based on the ranging instruction; and when the first receiving module 22 receives at least one ranging frame based on the ranging instruction, the first receiving module 22 is specifically used to: receive at least one ranging frame in a random time slot based on the ranging instruction.

[0664] In another possible implementation manner of the embodiment of the present application, the apparatus 20 further includes: a determination module, wherein the determination module is configured to determine a random time slot according to its own device information.

[0665] In another possible implementation manner of the embodiment of the present application, the first sending module 21 is further configured to send device information so that the opposite device determines the ranging instruction based on the device information.

[0666] In another possible implementation manner of the embodiment of the present application, the first sending module 21 is further configured to send a ranging instruction so that the device receiving the ranging instruction sends and / or receives a ranging frame.

[0667] In another possible implementation manner of the embodiment of the present application, the ranging instruction includes ranging time slot information; when determining the ranging time slot information, the determination module is specifically used to: obtain device information sent by the opposite device; and determine the ranging time slot information based on the device information sent by the opposite device and its own device information.

[0668] In another possible implementation manner of the embodiment of the present application, the device information includes: a device identification;

[0669] When determining the ranging time slot information based on the device information sent by the opposite device and its own device information, the determination module is specifically used to: perform sorting based on the device identifiers corresponding to each device; and determine the ranging time slot information based on the sorting result.

[0670] In another possible implementation manner of the embodiment of the present application, device information is transmitted through the first channel and / or the second channel; and ranging instructions are transmitted through the first channel and / or the second channel.

[0671] In another possible implementation manner of the embodiment of the present application, the communication distance of the first channel matches the communication distance of the second channel.

[0672] In another possible implementation manner of the embodiment of the present application, the first channel is specifically an ultra-wideband UWB channel; and / or the second channel is specifically a Bluetooth channel.

[0673] In another possible implementation of the embodiment of the present application, the device 20 further includes: an upload module, wherein:

[0674] An uploading module, used to upload the distance information between the first device and the opposite device to the corresponding device;

[0675] The corresponding equipment includes at least one of the following:

[0676] Mobile terminals;

[0677] Gateway;

[0678] server.

[0679] In another possible implementation of the embodiment of the present application, when the uploading module uploads the distance information between the first device and the opposite device to the corresponding device, it is specifically used to: upload the distance information between the first device and the opposite device to the corresponding device through the first channel or the second channel.

[0680] In another possible implementation of the embodiment of the present application, the first receiving module 22 is further used to receive an upload success message sent by a corresponding device, where the upload success message is used to inform the first device of the distance information of the successful upload;

[0681] The device 20 further includes: a deletion module, wherein:

[0682] The deletion module is used to delete the successfully uploaded distance information based on the upload success message.

[0683] Another possible implementation method of the embodiment of the present application is that when the distance information is uploaded through at least two data packets, the deletion module deletes the successfully uploaded distance information based on the successful upload message, and is specifically used to: determine the successfully uploaded data packet based on the successful upload message; and delete the distance information corresponding to the successfully uploaded data packet.

[0684] For the embodiment of the present application, the first acquisition module, the second acquisition module, the third acquisition module, the fourth acquisition module and the fifth acquisition module are all the same module, or they can be different modules, or at least two can be the same module, which is not limited in the embodiment of the present application.

[0685] An embodiment of the present application provides a ranging device. Compared with the prior art, in the embodiment of the present application, a first device sends at least one ranging frame and receives at least one ranging frame. In the embodiment of the present application, the first device can achieve ranging between devices by sending and / or receiving at least one ranging frame.

[0686] The distance measuring device provided in the embodiment of the present application is applicable to the above method embodiment and will not be described in detail here.

[0687] The present application embodiment provides another distance measuring device, such as Fig.18 As shown, the device 180 includes: a second receiving module 181 and a second sending module 182, wherein:

[0688] The second receiving module 181 is configured to receive at least one ranging frame; and

[0689] The second sending module 182 is configured to send at least one ranging frame.

[0690] In another possible implementation of the embodiment of the present application, when receiving at least one ranging frame, the second receiving module 181 is specifically configured to:

[0691] receiving at least one ranging frame sent by at least one first device; and / or,

[0692] receiving at least one ranging frame sent by at least one third device;

[0693] Wherein, when sending at least one ranging frame, the second sending module 182 is specifically used to:

[0694] Sending at least one ranging frame to the at least one first device; and / or,

[0695] At least one ranging frame is sent to the at least one third device.

[0696] In another possible implementation manner of the embodiment of the present application, when there are at least two first devices, at least one ranging frame among the at least one ranging frame sent to each first device is the same frame.

[0697] In another possible implementation manner of the embodiment of the present application, when there are at least two third devices,

[0698] Among the at least one ranging frame sent to each third device, at least one ranging frame is the same frame.

[0699] In another possible implementation manner of the embodiment of the present application, at least one of the at least one ranging frame sent to the at least one third device and the at least one ranging frame sent to the at least one first device is the same ranging frame.

[0700] In another possible implementation manner of the embodiment of the present application, the device 180 further includes: a sixth acquisition module;

[0701] The sixth acquisition module is configured to acquire at least four pieces of time information for each first device by receiving at least one ranging frame and sending at least one ranging frame; and / or,

[0702] The sixth acquisition module is configured to acquire at least six pieces of time information for each first device by receiving at least two ranging frames and sending at least one ranging frame; and / or,

[0703] The sixth acquisition module is used to acquire at least six pieces of time information for each first device by receiving at least one ranging frame and sending at least two ranging frames.

[0704] In another possible implementation of the embodiment of the present application, the device 180 further includes: a seventh acquisition module, wherein:

[0705] The seventh acquisition module is configured to acquire, for each first device, distance information between the second device and each first device based on the at least four pieces of time information; and / or,

[0706] The seventh acquisition module is used to acquire, for each first device, distance information between the second device and each first device based on the at least six pieces of time information.

[0707] In another possible implementation of the embodiment of the present application, the device 180 further includes: an eighth acquisition module, wherein:

[0708] The eighth acquisition module is configured to acquire at least four pieces of time information for each third device by sending at least one ranging frame and receiving at least one ranging frame; and / or,

[0709] The eighth acquisition module is configured to acquire at least six pieces of time information for each third device by sending at least two ranging frames and receiving at least one ranging frame; and / or,

[0710] The eighth acquisition module is used to acquire at least six pieces of time information for each third device by sending at least one ranging frame and receiving at least two ranging frames.

[0711] In another possible implementation manner of the embodiment of the present application, the device 180 further includes: a ninth acquisition module, wherein:

[0712] The ninth acquisition module is configured to acquire, for each third device, distance information between the second device and each third device based on the at least four pieces of time information; and / or,

[0713] The ninth acquisition module is used to acquire, for each third device, distance information between the second device and each third device based on the at least six pieces of time information.

[0714] In another possible implementation manner of the embodiment of the present application, at least one received ranging frame is a ranging initiation frame; and at least one sent ranging frame is a ranging reply frame.

[0715] An embodiment of the present application provides a ranging device. Compared with the prior art, in the embodiment of the present application, the second device receives at least one ranging frame, and the second device sends at least one ranging frame. In the embodiment of the present application, the second device can achieve ranging between any two devices by sending and / or receiving at least one ranging frame.

[0716] The present application also provides another distance measuring device, such as Fig.19 As shown, it includes: a third receiving module 191 and a third sending module 192, wherein the third receiving module 191 is used to receive at least one ranging frame; and

[0717] The third sending module 192 is configured to send at least one ranging frame.

[0718] In another possible implementation manner of the embodiment of the present application, when receiving at least one ranging frame, the third receiving module 191 is specifically configured to:

[0719] receiving at least one ranging frame sent by at least one first device; and / or,

[0720] At least one ranging frame sent by at least one second device is received.

[0721] Wherein, when sending at least one ranging frame, the third sending module 192 is specifically used to:

[0722] Sending at least one ranging frame to the at least one first device; and / or,

[0723] At least one ranging frame is sent to the at least one second device.

[0724] In another possible implementation manner of the embodiment of the present application, when there are at least two first devices, at least one ranging frame among the at least one ranging frame received from each first device is the same frame.

[0725] In another possible implementation manner of the embodiment of the present application, when there are at least two second devices, at least one ranging frame among the at least one ranging frame received from each second device is the same frame.

[0726] In another possible implementation manner of the embodiment of the present application, at least one of the at least one ranging frame sent to the at least one second device and the at least one ranging frame sent to the at least one first device is the same ranging frame.

[0727] In another possible implementation manner of the embodiment of the present application, at least one ranging frame sent is a ranging initiation frame; and at least one received frame is a ranging reply frame.

[0728] An embodiment of the present application provides a ranging device. Compared with the prior art, in the embodiment of the present application, a third device receives at least one ranging frame, and the third device sends at least one ranging frame. In the embodiment of the present application, the third device can achieve ranging between any two devices by sending and / or receiving at least one ranging frame.

[0729] An embodiment of the present application also provides a first device, which includes a memory and a processor; a computer program is stored in the memory; and the processor is used to execute the method provided in the above method embodiment when running the computer program.

[0730] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method provided in the above method embodiment of the present application can be implemented.

[0731] As an example, Figure 3 A structural schematic diagram of a first device 3000 to which an embodiment of the present application can be applied is shown, and the first device 3000 includes a memory 3003 and a processor 3001, the memory 3003 stores a computer program, and the processor 3001 is used to execute any of the above methods when running the computer program.

[0732] Specifically, the first device may be a terminal, a server or other possible devices. Figure 3 Only an optional schematic structure of the first device is shown. Figure 3 The structure of the first device 3000 shown in the figure does not constitute a limitation of the embodiments of the present application.

[0733] The processor 3001 and the memory 3003 are connected, for example, through a bus 3002. Optionally, the first device 3000 may further include a transceiver 3004. It should be noted that in actual applications, the transceiver 3004 is not limited to one, and the transceiver 3004 may be specifically used for communication between the first device 3000 and other devices.

[0734] Processor 3001 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the content of the present application. Processor 3001 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0735] The bus 3002 may include a path to transmit information between the above components. The bus 3002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 3002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0736] The memory 3003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0737] The memory 3003 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 3001. The processor 3001 is used to execute the application code stored in the memory 3003 to implement the content shown in any of the above method embodiments.

[0738] An embodiment of the present application also provides a second device, where the first device includes a memory and a processor; a computer program is stored in the memory; and the processor is used to execute the method executed by the second device in the above method embodiment when running the computer program.

[0739] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method provided by the second device in the above method embodiment of the present application can be implemented.

[0740] An embodiment of the present application also provides a third device, where the first device includes a memory and a processor; a computer program is stored in the memory; and the processor is used to execute the method performed by the third device in the above method embodiment when running the computer program.

[0741] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method provided by the third device in the above method embodiment of the present application can be implemented.

[0742] Furthermore, the structures corresponding to the second device and the second device are similar to those of the first device. For details, please refer to the structural introduction of the first device in the above embodiment, which will not be repeated in the embodiments of the present application.

[0743] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0744] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A distance measurement method, characterized in that: The method is executed by a first device and includes: Sending at least one ranging frame; and receiving at least one ranging frame, specifically comprising: Sending at least one ranging initiation frame to at least one second device among at least two opposite devices, receiving at least one ranging reply frame sent by the at least one second device to implement ranging, and broadcasting the distance information between the first device and the second device to each of the second devices; receiving at least one ranging initiation frame sent by at least one third device among the at least two opposite devices, sending at least one ranging reply frame to the at least one third device so that the third device can perform ranging, and receiving distance information between the third device and the first device broadcasted by the third device; The ranging initiation frame sent to the at least one second device and the ranging reply frame sent to the at least one third device are the same frame.

2. The method according to claim 1, characterized in that: The method further comprises: At least four pieces of time information are acquired by sending at least one ranging frame and receiving at least one ranging frame.

3. The method according to claim 1, characterized in that: The method further comprises at least one of the following: Acquire at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame; At least six pieces of time information are acquired by sending at least one ranging frame and receiving at least two ranging frames.

4. The method according to claim 2, characterized in that: The method further comprises: receiving at least one time information; The acquiring of at least four pieces of time information by sending at least one ranging frame and receiving at least one ranging frame includes: At least four pieces of time information are acquired by sending at least one ranging frame, receiving at least one ranging frame, and receiving the at least one piece of time information.

5. The method according to claim 2, characterized in that: At least one received ranging frame carries time information; The acquiring of at least four pieces of time information by sending at least one ranging frame and receiving at least one ranging frame includes: At least four pieces of time information are acquired by sending at least one ranging frame, receiving at least one ranging frame and the time information carried in the at least one received ranging frame.

6. The method according to claim 3, characterized in that The method further comprises: receiving at least one time information; The acquiring of at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame includes: Acquire at least six time information by sending at least two ranging frames, receiving at least one ranging frame, and receiving at least one time information; The step of acquiring at least six pieces of time information by sending at least one ranging frame and receiving at least two ranging frames includes: At least six pieces of time information are acquired by sending at least one ranging frame, receiving at least two ranging frames, and receiving at least one piece of time information.

7. The method according to claim 3, characterized in that At least one received ranging frame carries time information; The acquiring of at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame includes: Acquire at least six pieces of time information by sending at least two ranging frames, at least one received ranging frame, and time information carried in the at least one received ranging frame; The step of acquiring at least six pieces of time information by sending at least one ranging frame and receiving at least two ranging frames includes: At least six pieces of time information are acquired by sending at least one ranging frame, receiving at least two ranging frames, and time information carried in the at least one received ranging frame.

8. The method according to claim 3, 6 or 7, characterized in that: The method further comprises at least one of the following: The at least two ranging frames sent include at least one Final frame; The at least two received ranging frames include at least one Final frame.

9. The method according to any one of claims 2 to 7, characterized in that: The time information is carried in a ranging frame; or, the time information is not carried in a ranging frame.

10. The method according to claim 9, characterized in that The method further comprises: When the time information is carried by the ranging frame, the time information is sent through the first channel; and / or, When the time information is not carried by the ranging frame, the time information is sent through the second channel; Wherein, the first channel includes a channel for sending and receiving ranging frames; The second channel is a channel that does not include sending or receiving ranging frames.

11. The method according to claim 10, characterized in that The second channel is a Bluetooth channel.

12. The method according to claim 4 or 6, characterized in that: The frame format of the received ranging frame is specifically the fourth frame format; The fourth frame format includes: synchronization SYNC, frame start symbol SFD, and scrambled time stamp sequence STS; The fourth frame format does not include payload data.

13. The method according to any one of claims 1 to 7, characterized in that: The frame format of the ranging frame includes at least one of the following: A first frame format, a second frame format, and a third frame format; The first frame format includes: synchronization SYNC, frame start symbol SFD, physical frame header PHR, packet load PHR Payload; The second frame format includes: SYNC, SFD, scrambled timestamp sequence STS, PHR, and PHY Payload; The third frame format includes: SYNC, SFD, PHR, PHY Payload, and STS.

14. The method according to claim 9, characterized in that The carried time information includes at least one of the following: The transmission time of at least one received ranging frame and the reception time information of at least one sent ranging frame; Sending time information of at least one ranging frame is sent, and receiving time information of at least one ranging frame is received.

15. The method according to any one of claims 2, 4-5, characterized in that: The method further comprises: According to the at least four pieces of time information, distance information between the first device and the opposite device is acquired.

16. The method according to claim 15, characterized in that The acquiring the distance information between the first device and the opposite device according to the at least four pieces of time information includes at least one of the following: Determine the distance information between the first device and the opposite device according to the sending time of the sending ranging frame, the receiving time of the receiving ranging frame and the received time information; Receive distance information between the first device and the opposite device sent by the opposite device.

17. The method according to any one of claims 3, 6-7, characterized in that: The method further comprises: According to the at least six pieces of time information, distance information between the first device and the opposite device is acquired.

18. The method according to claim 17, characterized in that Acquiring distance information between the first device and the opposite device according to the at least six pieces of time information includes at least one of the following: Determine the distance information between the first device and the opposite device according to the sending time information corresponding to sending at least two ranging frames, the receiving time information corresponding to receiving at least one ranging frame, and the received time information; Determine the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the receiving time corresponding to receiving at least two ranging frames, and the received time information; Receive distance information between the first device and the opposite device sent by an opposite device.

19. The method according to claim 1, characterized in that The method further comprises: Receive ranging instructions; Based on the ranging instruction, sending at least one ranging frame; and Based on the ranging instruction, at least one ranging frame is received.

20. The method according to claim 19, characterized in that The ranging instruction includes: ranging time slot information; The sending of at least one ranging frame based on the ranging instruction includes: Based on the ranging time slot information, sending at least one ranging frame; The step of receiving at least one ranging frame based on the ranging instruction includes: Based on the ranging time slot information, at least one ranging frame is received.

21. The method according to claim 20, characterized in that The ranging time slot information includes: a preset time slot; The sending at least one ranging frame based on the ranging time slot information includes: Sending at least one ranging frame in a preset time slot; The receiving at least one ranging frame based on the ranging time slot information includes: At least one ranging frame is received in the preset time slot.

22. The method according to claim 19, characterized in that sending at least one ranging frame based on the ranging instruction; And, based on the ranging instruction, receiving at least one ranging frame, comprising: Based on the ranging instruction, sending at least one ranging frame in a random time slot; as well as, Based on the ranging instruction, at least one ranging frame is received in a random time slot.

23. The method according to claim 22, characterized in that The method further comprises: The random time slot is determined according to the own device information.

24. The method according to any one of claims 19 to 23, characterized in that: The method further comprises: The device information is sent so that the opposite device determines the ranging instruction based on the device information.

25. The method according to claim 1, characterized in that The method further comprises: The ranging instruction is sent so that the device receiving the ranging instruction sends and / or receives the ranging frame.

26. The method according to claim 25, characterized in that The ranging instruction includes ranging time slot information: The method of determining the ranging time slot information includes: Get the device information sent by the peer device; The ranging time slot information is determined based on the device information sent by the opposite device and the device information of the device itself.

27. The method according to claim 26, characterized in that The device information includes: device identification; Wherein, determining the ranging time slot information based on the device information sent by the opposite device and the own device information includes: Sorting is performed based on the device identifiers corresponding to each device; The ranging time slot information is determined based on the sorting result.

28. The method according to any one of claims 25 to 27, characterized in that: The method further comprises: The device information is transmitted via the first channel and / or the second channel; The distance measurement instruction is transmitted through the first channel and / or the second channel.

29. The method according to claim 28, characterized in that The communication distance of the first channel matches the communication distance of the second channel.

30. The method according to claim 29, characterized in that The method further comprises: The first channel is specifically an ultra-wideband UWB channel; and / or, The second channel is specifically a Bluetooth channel.

31. The method according to claim 1, characterized in that The method further comprises: Uploading the distance information between the first device and the opposite device to the corresponding device; The corresponding device includes at least one of the following: Mobile terminals; Gateway; server.

32. The method according to claim 31, characterized in that The uploading the distance information between the first device and the opposite device to the corresponding device includes: The distance information between the first device and the opposite device is uploaded to the corresponding device through the first channel or the second channel.

33. The method according to claim 31 or 32, characterized in that The uploading of the distance information between the first device and the opposite device to the corresponding device further includes: Receiving an upload success message sent by the corresponding device, wherein the upload success message is used to inform the first device of distance information of successful upload; Based on the upload success message, the successfully uploaded distance information is deleted.

34. The method according to claim 33, characterized in that If the distance information is uploaded via at least two data packets, then, Based on the upload success message, deleting the successfully uploaded distance information includes: Based on the upload success message, determine the data packet that has been uploaded successfully; Delete the distance information corresponding to the successfully uploaded data packet.

35. A distance measuring device, characterized in that: include: A first sending module, configured to send at least one ranging frame; as well as, A first receiving module, configured to receive at least one ranging frame; The first sending module and the first receiving module are specifically used for: Sending at least one ranging initiation frame to at least one second device among at least two opposite devices, receiving at least one ranging reply frame sent by the at least one second device to implement ranging, and broadcasting the distance information between the first device and the second device to each of the second devices; receiving at least one ranging initiation frame sent by at least one third device among the at least two opposite devices, sending at least one ranging reply frame to the at least one third device so that the third device can perform ranging, and receiving distance information between the third device and the first device broadcasted by the third device; The ranging initiation frame sent to the at least one second device and the ranging reply frame sent to the at least one third device are the same frame.

36. The device according to claim 35, characterized in that The device further includes: a first acquisition module, wherein: The first acquisition module is used to acquire at least four time information by sending at least one ranging frame and receiving at least one ranging frame.

37. The device according to claim 36, characterized in that The device further includes: at least one of a second acquisition module and a third acquisition module, wherein: The second acquisition module is used to acquire at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame; The third acquisition module is used to acquire at least six pieces of time information by sending at least one ranging frame and receiving at least two ranging frames.

38. The device according to claim 36, characterized in that in, The first receiving module is further used to receive at least one time information; Wherein, when acquiring at least four pieces of time information by sending at least one ranging frame and receiving at least one ranging frame, the first acquisition module is specifically used to: At least four pieces of time information are acquired by sending at least one ranging frame, receiving at least one ranging frame, and receiving the at least one piece of time information.

39. The device according to claim 36, characterized in that At least one received ranging frame carries time information; Wherein, when acquiring at least four pieces of time information by sending at least one ranging frame and receiving at least one ranging frame, the first acquisition module is specifically used to: At least four pieces of time information are acquired by sending at least one ranging frame, receiving at least one ranging frame and the time information carried in the at least one received ranging frame.

40. The device according to claim 37, characterized in that in, The first receiving module is further used to receive at least one time information; Wherein, when acquiring at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame, the second acquisition module is specifically used to: Acquire at least six time information by sending at least two ranging frames, receiving at least one ranging frame, and receiving at least one time information; Wherein, when acquiring at least six pieces of time information by sending at least one ranging frame and receiving at least two ranging frames, the third acquisition module is specifically used to: At least six pieces of time information are acquired by sending at least one ranging frame, receiving at least two ranging frames, and receiving at least one piece of time information.

41. The device according to claim 37, characterized in that At least one received ranging frame carries time information; Wherein, when acquiring at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame, the second acquisition module is specifically used to: Acquire at least six pieces of time information by sending at least two ranging frames, at least one received ranging frame, and time information carried in the at least one received ranging frame; Wherein, when acquiring at least six pieces of time information by sending at least one ranging frame and receiving at least two ranging frames, the third acquisition module is specifically used to: At least six pieces of time information are acquired by sending at least one ranging frame, receiving at least two ranging frames, and time information carried in the at least one received ranging frame.

42. The device according to claim 37, 40 or 41, characterized in that The device further includes: the at least two ranging frames sent include at least one Final frame; and / or, The at least two received ranging frames include at least one Final frame.

43. The device according to any one of claims 36 to 41, characterized in that The time information is carried in a ranging frame; or, the time information is not carried in a ranging frame.

44. The device according to claim 43, characterized in that The device also includes: When the time information is carried by the ranging frame, the time information is sent through the first channel; and / or, When the time information is not carried by the ranging frame, the time information is sent through the second channel; Wherein, the first channel includes a channel for sending and receiving ranging frames; The second channel is a channel that does not include sending or receiving ranging frames.

45. The device according to claim 44, characterized in that The second channel is a Bluetooth channel.

46. ​​The device according to claim 40, characterized in that The frame format of the received ranging frame is specifically the fourth frame format; The fourth frame format includes: synchronization SYNC, frame start symbol SFD, and scrambled time stamp sequence STS; The fourth frame format does not include payload data.

47. The device according to any one of claims 35 to 41, characterized in that The frame format of the ranging frame includes at least one of the following: A first frame format, a second frame format, and a third frame format; The first frame format includes: synchronization SYNC, frame start symbol SFD, physical frame header PHR, packet load PHR Payload; The second frame format includes: SYNC, SFD, scrambled timestamp sequence STS, PHR, and PHY Payload; The third frame format includes: SYNC, SFD, PHR, PHY Payload, and STS.

48. The device according to claim 43, characterized in that The carried time information includes at least one of the following: The transmission time of at least one received ranging frame and the reception time information of at least one sent ranging frame; Sending time information of at least one ranging frame is sent, and receiving time information of at least one ranging frame is received.

49. The device according to any one of claims 36, 38-39, characterized in that The device further includes: a fourth acquisition module, wherein: The fourth acquisition module is used to acquire the distance information between the first device and the opposite device according to the at least four time information.

50. The device according to claim 49, characterized in that When the fourth acquisition module acquires the distance information between the first device and the opposite device according to the at least four pieces of time information, it is specifically used for at least one of the following: Determine the distance information between the first device and the opposite device according to the sending time of the sending ranging frame, the receiving time of the receiving ranging frame and the received time information; Receive distance information between the first device and the opposite device sent by the opposite device.

51. The device according to any one of claims 37, 40-41, characterized in that The device further includes: a fifth acquisition module, wherein: The fifth acquisition module is used to acquire the distance information between the first device and the opposite device according to the at least six time information.

52. The device according to claim 51, characterized in that When the fifth acquisition module acquires the distance information between the first device and the opposite device according to the at least six pieces of time information, it is specifically used for at least one of the following: Determine the distance information between the first device and the opposite device according to the sending time information corresponding to sending at least two ranging frames, the receiving time information corresponding to receiving at least one ranging frame, and the received time information; Determine the distance information between the first device and the opposite device according to the sending time information of sending at least one ranging frame, the receiving time corresponding to receiving at least two ranging frames, and the received time information; Receive distance information between the first device and the opposite device sent by an opposite device.

53. The device according to claim 35, characterized in that The device also includes: The first receiving module is further used to receive a ranging instruction; The first sending module is further configured to send at least one ranging frame based on the ranging instruction; and The first receiving module is further configured to receive at least one ranging frame based on the ranging instruction.

54. The device according to claim 53, characterized in that The ranging instruction includes: ranging time slot information; Wherein, when the first sending module sends at least one ranging frame based on the ranging instruction, it is specifically used to: Based on the ranging time slot information, sending at least one ranging frame; Wherein, when the first receiving module receives at least one ranging frame based on the ranging instruction, it is specifically used to: Based on the ranging time slot information, at least one ranging frame is received.

55. The device according to claim 54, characterized in that The ranging time slot information includes: a preset time slot; When the first sending module sends at least one ranging frame based on the ranging time slot information, the first sending module is specifically configured to: Sending at least one ranging frame in a preset time slot; Wherein, when the first receiving module receives at least one ranging frame based on the ranging time slot information, it is specifically used to: At least one ranging frame is received in the preset time slot.

56. The device according to claim 53, characterized in that When the first sending module sends at least one ranging frame based on the ranging instruction, the first sending module sends at least one ranging frame in a random time slot based on the ranging instruction; and when the first receiving module receives at least one ranging frame based on the ranging instruction, the first sending module is specifically configured to: Based on the ranging instruction, at least one ranging frame is received in a random time slot.

57. The device according to claim 56, characterized in that The device further comprises: a determination module, wherein: The determining module is used to determine the random time slot according to its own device information.

58. The device according to any one of claims 53 to 57, characterized in that The device also includes: The first sending module is further used to send device information so that the opposite end device determines the ranging instruction based on the device information.

59. The device according to claim 57, characterized in that The device also includes: The first sending module is further used to send a ranging instruction so that the device receiving the ranging instruction sends and / or receives a ranging frame.

60. The device according to claim 59, characterized in that The ranging instruction includes ranging time slot information: When determining the ranging time slot information, the determining module is specifically used to: Get the device information sent by the peer device; The ranging time slot information is determined based on the device information sent by the opposite device and the device information of the device itself.

61. The device according to claim 60, characterized in that The device information includes: device identification; Wherein, when the determination module determines the ranging time slot information based on the device information sent by the opposite device and the device information of the device itself, it is specifically used to: Sorting is performed based on the device identifiers corresponding to each device; The ranging time slot information is determined based on the sorting result.

62. The device according to any one of claims 59 to 61, characterized in that The device also includes: The device information is transmitted via the first channel and / or the second channel; The distance measurement instruction is transmitted through the first channel and / or the second channel.

63. The device according to claim 62, characterized in that The communication distance of the first channel matches the communication distance of the second channel.

64. The device according to claim 63, characterized in that The device also includes: The first channel is specifically an ultra-wideband UWB channel; and / or, The second channel is specifically a Bluetooth channel.

65. The device according to claim 35, characterized in that The device further comprises: an upload module, wherein: The uploading module is used to upload the distance information between the first device and the opposite device to the corresponding device; The corresponding device includes at least one of the following: Mobile terminals; Gateway; server.

66. The device according to claim 65, characterized in that When the uploading module uploads the distance information between the first device and the opposite device to the corresponding device, it is specifically used to: The distance information between the first device and the opposite device is uploaded to the corresponding device through the first channel or the second channel.

67. The device according to claim 65 or 66, characterized in that The first receiving module is further used to receive an upload success message sent by the corresponding device, wherein the upload success message is used to inform the first device of the distance information of the successful upload; The device further comprises: a deletion module, wherein: The deleting module is used to delete the successfully uploaded distance information based on the successfully uploaded message.

68. The device according to claim 67, characterized in that When the distance information is uploaded via at least two data packets, When the deletion module deletes the successfully uploaded distance information based on the successfully uploaded message, it is specifically used to: Based on the upload success message, determine the data packet that has been uploaded successfully; Delete the distance information corresponding to the successfully uploaded data packet.

69. A first device, characterized in that It includes: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to: execute the ranging method according to any one of claims 1 to 34.

70. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store computer instructions, and when the computer-readable storage medium is executed on a computer, the computer can execute the ranging method described in any one of claims 1 to 34.

71. A distance measurement method, characterized in that: The method is executed by the second device and includes: Receiving at least one ranging frame; and sending at least one ranging frame, specifically comprising: receiving at least one ranging initiation frame sent by at least one first device, sending at least one ranging reply frame to the at least one first device so that the first device can perform ranging, and receiving distance information between the first device and the second device broadcasted by the first device; Sending at least one ranging initiation frame to at least one third device, receiving at least one ranging reply frame sent by at least one third device to implement ranging, and broadcasting the distance information between the second device and the third device to each of the third devices; Among them, at least one of the at least one ranging initiation frame sent to the at least one third device and the at least one ranging reply frame sent to the at least one first device is the same frame.

72. The method according to claim 71, characterized in that If there are at least two first devices, then, Among the at least one ranging reply frame sent to each first device, at least one ranging reply frame is the same frame.

73. The method according to claim 71, characterized in that If the number of the third devices is at least two, then, Among the at least one ranging initiation frame sent to each third device, at least one ranging initiation frame is the same frame.

74. The method according to any one of claims 71 to 73, characterized in that The method further comprises: For each first device, at least four pieces of time information are acquired by receiving at least one ranging frame and sending at least one ranging frame; and / or, For each first device, at least six pieces of time information are acquired by receiving at least two ranging frames and sending at least one ranging frame; and / or, For each first device, at least six pieces of time information are acquired by receiving at least one ranging frame and sending at least two ranging frames.

75. The method according to claim 74, characterized in that The method further comprises at least one of the following: For each first device, based on the at least four pieces of time information, obtain distance information between the second device and each of the first devices; For each first device, based on the at least six pieces of time information, obtain distance information between the second device and each first device.

76. The method according to any one of claims 71 to 73, characterized in that The method further comprises at least one of the following: For each third device, acquiring at least four pieces of time information by sending at least one ranging frame and receiving at least one ranging frame; For each third device, acquiring at least six pieces of time information by sending at least two ranging frames and receiving at least one ranging frame; For each third device, at least six pieces of time information are acquired by sending at least one ranging frame and receiving at least two ranging frames.

77. The method according to claim 76, characterized in that The method further comprises at least one of the following: For each third device, based on the at least four pieces of time information, obtain distance information between the second device and each of the third devices; For each third device, based on the at least six pieces of time information, obtain distance information between the second device and each third device.

78. A distance measurement method, characterized in that: Executed by a third device, including: Receiving at least one ranging frame; and sending at least one ranging frame, specifically comprising: Sending at least one ranging initiation frame to at least one first device, receiving at least one ranging reply frame sent by at least one first device to implement ranging, and broadcasting the distance information between the first device and the third device to each of the first devices; receiving at least one ranging initiation frame sent by at least one second device, sending at least one ranging reply frame to the at least one second device so that the second device can perform ranging, and receiving distance information between the second device and the third device broadcasted by the second device; Among them, at least one frame of at least one ranging reply frame sent to at least one second device and at least one ranging initiation frame sent to at least one first device is the same frame.

79. The method according to claim 78, characterized in that If there are at least two first devices, then, Among the at least one ranging reply frame received and sent by each first device, at least one ranging reply frame is the same frame.

80. The method according to claim 78 or 79, characterized in that If there are at least two second devices, then, Among the at least one ranging initiation frame received and sent by each second device, at least one ranging initiation frame is the same frame.

81. A distance measuring device, characterized in that: include: A second receiving module, configured to receive at least one ranging frame; as well as, A second sending module, used to send at least one ranging frame; The second sending module and the second receiving module are specifically used for: receiving at least one ranging initiation frame sent by at least one first device, sending at least one ranging reply frame to the at least one first device so that the first device can perform ranging, and receiving distance information between the first device and a second device broadcasted by the first device; Sending at least one ranging initiation frame to at least one third device, receiving at least one ranging reply frame sent by at least one third device to implement ranging, and broadcasting the distance information between the second device and the third device to each of the third devices; Among them, at least one of the at least one ranging initiation frame sent to the at least one third device and the at least one ranging reply frame sent to the at least one first device is the same frame.

82. The device according to claim 81, characterized in that When there are at least two first devices, at least one ranging reply frame among the at least one ranging reply frame sent to each first device is the same frame.

83. The device according to claim 81, characterized in that When the number of the third devices is at least two, Among the at least one ranging initiation frame sent to each third device, at least one ranging initiation frame is the same frame.

84. The device according to any one of claims 81 to 83, characterized in that The device further includes: a sixth acquisition module; The sixth acquisition module is configured to acquire at least four pieces of time information for each first device by receiving at least one ranging frame and sending at least one ranging frame; and / or, The sixth acquisition module is configured to acquire at least six pieces of time information for each first device by receiving at least two ranging frames and sending at least one ranging frame; and / or, The sixth acquisition module is used to acquire at least six pieces of time information for each first device by receiving at least one ranging frame and sending at least two ranging frames.

85. The device according to claim 84, characterized in that The device further includes: a seventh acquisition module, wherein: The seventh acquisition module is configured to acquire, for each first device, distance information between the second device and each first device based on the at least four pieces of time information; and / or, The seventh acquisition module is used to acquire, for each first device, distance information between the second device and each first device based on the at least six pieces of time information.

86. The device according to any one of claims 81 to 83, characterized in that The device further includes: an eighth acquisition module, wherein: The eighth acquisition module is configured to acquire at least four pieces of time information for each third device by sending at least one ranging frame and receiving at least one ranging frame; and / or, The eighth acquisition module is configured to acquire at least six pieces of time information for each third device by sending at least two ranging frames and receiving at least one ranging frame; and / or, The eighth acquisition module is used to acquire at least six pieces of time information for each third device by sending at least one ranging frame and receiving at least two ranging frames.

87. The device according to claim 86, characterized in that The device further includes: a ninth acquisition module, wherein: The ninth acquisition module is configured to acquire, for each third device, distance information between the second device and each third device based on the at least four pieces of time information; and / or, The ninth acquisition module is used to acquire, for each third device, distance information between the second device and each third device based on the at least six pieces of time information.

88. A distance measuring device, characterized in that: include: A third receiving module, configured to receive at least one ranging frame; as well as, A third sending module, used to send at least one ranging frame; Wherein, the third sending module and the third receiving module are specifically used for: Sending at least one ranging initiation frame to at least one first device, receiving at least one ranging reply frame sent by at least one first device to implement ranging, and broadcasting distance information between the first device and the third device to each of the first devices; receiving at least one ranging initiation frame sent by at least one second device, sending at least one ranging reply frame to the at least one second device so that the second device can perform ranging, and receiving distance information between the second device and the third device broadcasted by the second device; Among them, at least one frame of at least one ranging reply frame sent to at least one second device and at least one ranging initiation frame sent to at least one first device is the same frame.

89. The device according to claim 88, characterized in that When there are at least two first devices, at least one ranging reply frame received from each of the first devices is the same frame.

90. The device according to claim 88 or 89, characterized in that When there are at least two second devices, at least one ranging initiation frame received from each second device is the same frame.

91. A second device, characterized in that: It includes: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to: execute the ranging method according to any one of claims 71 to 77.

92. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store computer instructions, and when it is run on a computer, it enables the computer to execute the ranging method described in any one of claims 71 to 77.

93. A third device, characterized in that: It includes: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to: execute the ranging method according to any one of claims 78 to 80.

94. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store computer instructions, and when it is run on a computer, it enables the computer to execute the ranging method described in any one of claims 78 to 80.

Citation Information

Patent Citations

  • Downhole UWB (Ultra Wideband) multi-basestation location zone determining method based on ADS-TWR (Asymmetric Double Sided Two-Way Range)

    CN107948920A

  • Ranging method and ranging system

    CN108964867A

  • Wireless positioning method and device

    CN111372185A

  • Distance measurement method, device and system, storage medium and computer equipment

    CN113630768A

  • Ranging method and apparatus, storage medium and device

    WO2022089519A1