Ranging method and device and electronic equipment
By dividing the base station power supply mode into time slices in the ranging and positioning system in the chemical plant area, and optimizing the ranging message interaction sequence, the signal collision problem in densely populated chemical plant areas was solved, achieving fast and accurate positioning processing, improving the ranging success rate and reducing base station power consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING BESTWAY AUTOMATION SYST
- Filing Date
- 2026-03-10
- Publication Date
- 2026-05-19
AI Technical Summary
In chemical plant areas, during maintenance, repair, and emergency response scenarios, the high density of personnel can cause signal collisions in existing ultra-wideband (UWB) ranging technology, leading to positioning equipment being unable to accurately measure distances, resulting in ranging failures and a low success rate.
By dividing the time slice according to the base station power supply method in the ranging and positioning system, the ranging time of the active power supply base station and the battery power supply base station are determined, the ranging message interaction sequence is optimized, and each positioning device is ensured to respond quickly to the base station ranging request under preset conditions, thereby reducing the number of messages sent and reducing the power consumption of the base station.
It enables fast and accurate positioning processing in densely populated areas, improves ranging success rate, and reduces overall time consumption and base station power consumption.
Smart Images

Figure CN122069477A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a ranging method, apparatus, and electronic device. Background Technology
[0002] When carrying out production operations in a chemical plant area, due to the dense production equipment, complex processes, and safety risks such as flammable, explosive, toxic, and harmful media, it is usually necessary to perform distance measurement and positioning on the workers to ensure their safety.
[0003] Currently, existing technologies primarily utilize ultra-wideband (UWB) ranging technology for personnel distance measurement. However, chemical plant areas often experience high personnel density during maintenance, repair, and emergency response scenarios. In such situations, existing technologies suffer from signal collisions, meaning that multiple positioning base stations simultaneously transmitting UWB signals can prevent positioning devices from accurately adjusting to a valid signal, leading to ranging failure. In other words, when a large number of personnel suddenly arrive at the plant, existing technologies cannot quickly establish distances with the positioning devices carried by all personnel within the plant due to the probability of collisions in UWB signal responses. Summary of the Invention
[0004] This invention provides a ranging method, device, and electronic device that enables rapid and accurate ranging processing of positioning devices in a target area, thereby improving the success rate of ranging processing.
[0005] According to one aspect of the present invention, a ranging method is provided, applied to a ranging and positioning system deployed in a target area, the ranging and positioning system comprising: at least one first positioning device and a plurality of first base stations, the method comprising: For at least one first positioning device, when the second positioning device receives the first ranging request message, it determines the second base station corresponding to the first ranging request message; wherein the second base station is a base station among a plurality of first base stations, and the second positioning device is a positioning device among at least one first positioning device; When the second positioning device determines that the second base station meets the preset base station conditions, it generates a first ranging response message corresponding to the first ranging request message and sends the first ranging response message to at least one third positioning device and the second base station; wherein, the third positioning device is a first positioning device whose device distance from the third base station is less than a first distance threshold, and the third base station is a first base station whose device distance from the second positioning device is less than a second distance threshold; For at least one third positioning device, when the third positioning device determines that the message sending conditions are met based on the first ranging response message, it sends a second ranging response message to the second base station. If the second base station determines that at least one received second ranging response message matches the message information of the first ranging response message, it sends out a ranging termination message so that the third positioning device and the second positioning device corresponding to the second ranging response message can respectively determine the target distance information with the second base station.
[0006] According to another aspect of the present invention, a ranging device is provided for use in a ranging and positioning system deployed in a target area, the ranging and positioning system comprising: at least one first positioning device and a plurality of first base stations, the device comprising: The second base station determination module is used to determine the second base station corresponding to the first ranging request message when the second positioning device receives the first ranging request message for at least one first positioning device; wherein the second base station is a base station among a plurality of first base stations, and the second positioning device is a positioning device among at least one first positioning device; The response message sending module is used to generate a first ranging response message corresponding to the first ranging request message when the second positioning device determines that the second base station meets the preset base station conditions, and send the first ranging response message to at least one third positioning device and the second base station; wherein, the third positioning device is a first positioning device whose device distance from the third base station is less than a first distance threshold, and the third base station is a first base station whose device distance from the second positioning device is less than a second distance threshold. The sending condition judgment module is used to send a second ranging response message to the second base station when the third positioning device determines that the message sending condition is met based on the first ranging response message for at least one third positioning device. The distance information determination module is used to send a ranging end message when the second base station determines that at least one received second ranging response message matches the message information of the first ranging response message, so that the third positioning device and the second positioning device corresponding to the second ranging response message can respectively determine the target distance information with the second base station.
[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory that is communicatively connected to at least one processor; wherein, The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the ranging method of any embodiment of the present invention.
[0008] According to another aspect of the present invention, a computer-readable storage medium is provided that stores computer instructions for causing a processor to execute and implement the ranging method of any embodiment of the present invention.
[0009] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, characterized in that the computer program, when executed by a processor, implements a ranging method as described in any embodiment of the present invention.
[0010] The technical solution of this invention is applied to a ranging and positioning system deployed in a target area. This ranging and positioning system includes at least one first positioning device and multiple first base stations. For the at least one first positioning device, when a second positioning device receives a first ranging request message, it determines the second base station corresponding to the first ranging request message. When the second positioning device determines that the second base station meets preset base station conditions, it generates a first ranging response message corresponding to the first ranging request message and sends the first ranging response message to at least one third positioning device and the second base station. This allows the second base station to clearly identify the positioning device that needs subsequent ranging processing, eliminating the need for the second base station to open an additional receiving time period, thus avoiding unnecessary power consumption. This also enables the third positioning device that meets the conditions to quickly interact with the second base station to exchange ranging messages, achieving rapid interaction with each person holding a corresponding positioning device in scenarios where a large number of people suddenly enter the target area, thereby realizing personnel positioning processing. For the at least one third positioning device, when the third positioning device determines that the message sending conditions are met based on the first ranging response message, it sends a second ranging response message to the second base station. When the second base station determines that at least one received second ranging response message matches the message information of the first ranging response message, it sends a ranging end message, enabling the third positioning device and the second positioning device corresponding to the second ranging response message to determine the target distance information corresponding to the second base station. This invention solves the problem of low ranging success rate in the prior art. Through the above ranging process, the sending order of ranging response messages of each first positioning device is clarified, reducing the number of ranging messages sent and lowering the overall ranging processing time. Simultaneously, it enables the base station to clearly identify the ranging response message to be received from the positioning device based on the first ranging response message information, reducing unnecessary power consumption of the base station and achieving fast and accurate ranging processing for positioning devices in the target area, thus improving the success rate of ranging processing.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a flowchart of a ranging method provided in an embodiment of the present invention; Figure 2 This is an architecture diagram of the ranging and positioning system provided in an embodiment of the present invention; Figure 3 This is a flowchart of a ranging method provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a ranging device provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device that implements the ranging method of the present invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0016] Before introducing the embodiments of the present invention, the application scenarios of the embodiments of the present invention can be described first. The present invention can be applied to a ranging and positioning system deployed in a target area. The ranging and positioning system includes: at least one first positioning device and multiple first base stations. The target area can be an area where personnel need to be located to ensure personnel safety. For example, the target area can be a chemical plant area.
[0017] The first positioning device can be a device with positioning capabilities, used to locate the person holding it. Optionally, the first positioning device can be a card-type device integrating an ultra-wideband (UWB) positioning module. In this embodiment of the invention, the first positioning device can perform distance measurement with a corresponding first base station to determine distance information and achieve personnel positioning.
[0018] The first base station can be a base station used for ranging processing with the first positioning device. Optionally, the first base station can initiate UWB ranging within its respective ranging time slice to achieve ranging message exchange with the corresponding first positioning device.
[0019] Example 1 Figure 1 This is a flowchart of a ranging method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where ranging processing of positioning devices is performed based on base stations within a target area. The method can be executed by a ranging device, which can be implemented in hardware and / or software. This ranging device can be configured in electronic devices such as mobile phones, computers, or servers. Figure 1 As shown, the method includes: S110. For at least one first positioning device, when the second positioning device receives the first ranging request message, it determines the second base station corresponding to the first ranging request message.
[0020] The first positioning device can be a positioning device held by a staff member within the target area. The first positioning device is used to perform distance measurement on the staff member holding it. The second positioning device is one of at least the first positioning devices. In this embodiment of the invention, the first positioning device that receives the first distance measurement request message can be identified as the second positioning device.
[0021] The first ranging request message can be sent by the second base station and is used to request ranging. The first ranging request message indicates the start of the ranging request. Optionally, in a UWB ranging scenario, the first ranging request message can be a P-frame, i.e., a ranging initiation frame, sent by the second base station as the start signal of the ranging process. If the second base station is an actively powered base station, the first ranging request message also carries the second base station's time reference information (such as a burst unique code) for synchronizing the ranging operation of the positioning device. The second base station can be one of multiple first positioning devices that sends the first ranging request message.
[0022] Specifically, for at least one first positioning device, if the current positioning device receives a first ranging request message, the current positioning device is identified as the second positioning device, and based on the received first ranging request message, the first base station that sent the first ranging request message is identified, and the first base station is identified as the second base station.
[0023] For example, the positioning device is a positioning card, and the ranging process is UWB ranging. To perform ranging with as many positioning cards as possible in a short time, multi-R-frame ranging can be used. That is, typically, UWB TWR ranging usually involves three frames (P frame, R frame, F frame), and the ranging frame positions for multi-R-frame ranging are: P frame, R frame, R frame, R frame, ..., R frame, F frame. The P frame corresponds to the first ranging request message mentioned above. After the positioning card receives the P frame, it determines the base station corresponding to that P frame, which is the second base station mentioned above.
[0024] For example, see Figure 2 , Figure 2 This is an architecture diagram of the ranging and positioning system for the target area. uTRACKER_0 and uTRACKER_1 are the two first base stations in the ranging and positioning system, and uBEACON_0, uBEACON_1, uBEACON_2, and uBEACON_3 are the four positioning devices in the target area. When uBEACON_0 receives the first ranging request message sent by uTRACKER_0, uBEACON_0 is designated as the second positioning device, and uTRACKER_0 is designated as the second base station.
[0025] In this embodiment of the invention, the method further includes: classifying multiple first base stations in the target area according to the base station power supply method to determine the number of first base stations of the first type and the base station distribution information of the first base stations of the second type; wherein, the first type represents the base station type that relies on external power supply and the second type represents the base station type that relies on the equipped battery power supply; and performing time division processing on a preset ranging period based on the number of base stations and the base station distribution information to determine the first ranging time slice of the first base station of the first type, the second ranging time slice of the first base station of the second type, and the device synchronization time slice corresponding to the positioning device.
[0026] The base station power supply method can be understood as the way the first base station is powered. There are two types of base station power supply methods: one is to power the first base station through an external power source; in this case, the first base station can be understood as an actively powered base station, and correspondingly, the first type is actively powered. The other is to power the first base station through its own battery; in this case, the first base station can be understood as a battery-powered base station, and correspondingly, the second type is battery-powered.
[0027] The number of base stations can be the total number of base stations of the first type belonging to the first category, i.e., the number of actively powered base stations. Typically, to save power consumption in the target area, one or two actively powered base stations are deployed. Base station distribution information can be understood as the distribution of the first base stations of the second type in the target area. Optionally, base station distribution information can be characterized by the base station distribution density of battery-powered base stations.
[0028] The preset ranging period can be a pre-set ranging period of the first base station. For example, the preset ranging period can be 2 seconds, meaning that the first base station initiates a ranging operation every 2 seconds.
[0029] The first ranging time slice can be the ranging time range corresponding to the first base station of the first type. That is, the actively powered base station performs ranging processing with the corresponding first positioning device within the first ranging time slice. The second ranging time slice can be the ranging time range corresponding to the first base station of the second type. That is, the battery-powered base station performs ranging processing with the corresponding first positioning device within the second ranging time slice. The device synchronization time slice can be the time range used for device information synchronization between the first positioning devices.
[0030] Specifically, to ensure that no signal collisions occur during the transmission of ranging messages, different time slices can be determined for different base station types within a preset ranging period. That is, based on the base station power supply method, all first base stations in the target area are classified, determining the number of first base stations belonging to the first type, i.e., determining the number of actively powered base stations. Furthermore, the distribution information of first base stations belonging to the second type is determined, i.e., determining the distribution information of battery-powered base stations.
[0031] Based on the number and distribution information of base stations, a preset ranging period is divided into time slices to determine a first ranging time slice for a first base station of a first type, so that the first base station of the first type performs ranging processing within the first ranging time slice. A second ranging time slice is also determined for a first base station of a second type, so that the second base station of the second type performs ranging processing within the second ranging time slice. Furthermore, a device synchronization time slice corresponding to the positioning device is determined, so that each first positioning device performs device information synchronization processing based on the device synchronization time slice.
[0032] For example, taking a preset ranging period of 2 seconds and a time slice as a time slot, multiple first base stations in the target area are classified according to their power supply method to determine the number of actively powered base stations (1) and the distribution information of battery-powered base stations. Based on the number and distribution information of base stations, the 2 seconds are divided into 100 time slots, each with a duration of 20 milliseconds. A time slot number is assigned to each first base station and written into the storage space of the corresponding first base station, enabling the first base station to initiate ranging in its corresponding time slot. Optionally, the location card name frame is fixed in time slots 0, 25, 50, and 75 (corresponding to the device synchronization time slice); the actively powered base station is fixed in time slot 1 (corresponding to the first ranging time slice); other time slot numbers are assigned to battery-powered base stations, with different time slot numbers corresponding to different battery-powered base stations (corresponding to the second ranging time slice). For example, see [link to example]. Figure 2 If uTRACKER_0 is determined to be an active power supply base station, then uTRACKER_0 can perform ranging processing with the corresponding first positioning device in time slot 1.
[0033] Optionally, for at least one first positioning device, based on the message signal strength information of the second ranging request message received by the first positioning device within the device synchronization time slice and the received broadcast information, at least one third base station corresponding to the first positioning device and at least one third positioning device corresponding to each third base station are determined; wherein, the broadcast information is sent by other first positioning devices and is used to characterize the message signal strength of the second ranging request message received by other first positioning devices.
[0034] The second ranging request message can be a ranging request message sent by the first base station to the first positioning device within the device synchronization time slice. Message signal strength information can be used to characterize the signal strength of the second ranging request message. The broadcast information includes at least: the message signal strength information of the second ranging request message received by other first positioning devices.
[0035] The third positioning device can be a first positioning device whose device distance to the third base station is less than a first distance threshold, and the third base station can be a first base station whose device distance to the second positioning device is less than a second distance threshold. The first distance threshold can be a pre-set standard value for device distance. The second distance threshold can also be a pre-set standard value for device distance.
[0036] Specifically, for at least one first positioning device, when the current first positioning device receives a second ranging request message within the device synchronization time slice, it determines the message signal strength information corresponding to the second ranging request message and broadcasts the message signal strength information to other first positioning devices. Correspondingly, based on the message signal strength information of the second ranging request message received within the device synchronization time slice, and the broadcast information received from other first positioning devices, the current first positioning device determines a first base station whose device distance between the current first positioning devices is less than a second distance threshold, and designates this at least one first base station as at least one third base station. Furthermore, it determines a first positioning device whose device distance to each third base station is less than the first distance threshold, and designates this at least one first positioning device as at least one third positioning device.
[0037] For example, in conjunction with the above example, in order to enable each positioning card to clearly identify which positioning card is closest to the first base station and to determine which positioning cards can respond to the ranging request message of the first base station, the signal strength information of the second ranging request message received by each positioning card can be broadcast. Through the interaction of broadcast information, each positioning card can identify at least one base station (corresponding to the third base station) that is close to its device, and identify at least one positioning card that is close to each third base station.
[0038] Based on this, each first positioning device can construct a first hash table based on at least one third base station that is close to it. The first hash table includes device identifiers of a first preset number of third base stations. For example, the first hash table may include device identifiers of 15 third base stations. The first positioning device can also construct a second hash table based on at least one third base station and at least one third positioning device corresponding to each third base station. The second hash table includes device identifiers of a second preset number of third positioning devices corresponding to each third base station. For example, the second hash table may include device identifiers of the 25 closest third positioning devices to each of the 15 third base stations. The resulting first and second hash tables are stored in the first positioning device.
[0039] S120: When the second positioning device determines that the second base station meets the preset base station conditions, it generates a first ranging response message corresponding to the first ranging request message and sends the first ranging response message to at least one third positioning device and the second base station.
[0040] The third positioning device is a first positioning device whose device distance from the third base station is less than a first distance threshold, and the third base station is a first base station whose device distance from the second positioning device is less than a second distance threshold.
[0041] The preset base station conditions can be conditions that the second base station needs to meet. Optionally, if the second base station is one of at least three third base stations, it is determined that the second base station meets the preset base station conditions. The first ranging response message can be a response message generated by the second positioning device based on the first ranging request message, used to feed back to the second base station and broadcast to at least one third positioning device.
[0042] Specifically, if the second positioning device determines that the device identifier of the second base station matches the device identifier of at least one third base station, it determines that the second base station meets the preset base station conditions and generates a first ranging response message corresponding to the first ranging request message. The first ranging response message is then sent to the second base station and at least one third positioning device.
[0043] For example, in conjunction with the above example, if the second positioning device determines that the device identifier of the second base station is in its own stored first hash table, it saves the timestamp of receiving the first ranging request message. The second positioning device generates an R frame corresponding to the P frame (corresponding to the aforementioned first ranging response message) and sends the R frame back to the second base station after a 1-millisecond delay. Simultaneously, the R frame is also sent to at least one third positioning device in the second hash table of the second positioning device.
[0044] S130. For at least one third positioning device, when the third positioning device determines that the message sending conditions are met based on the first ranging response message, it sends a second ranging response message to the second base station.
[0045] The message sending conditions can be the conditions that the third positioning device needs to meet to send a ranging response message to the second base station. The second ranging response message can be the ranging response message sent by the third positioning device to the second base station.
[0046] Specifically, for at least one third positioning device, when the current third positioning device determines that it meets the message sending conditions based on the message information of the first ranging response message, it sends a second ranging response message to the second base station. Based on this, all third positioning devices that meet the message sending conditions can send their corresponding second ranging response messages to the second base station.
[0047] S140, if the second base station determines that at least one received second ranging response message matches the message information of the first ranging response message, it feeds back a ranging end message so that the third positioning device and the second positioning device corresponding to the second ranging response message respectively determine the target distance information with the second base station.
[0048] The ranging completion message can be used to indicate the end of the current ranging processing flow. The target distance information can be the distance between the third positioning device and the second base station.
[0049] Specifically, the second base station determines whether the received at least one second ranging response message matches the message information of the first ranging response message based on the received at least one second ranging response message. If the message information matches, a ranging end message is generated and sent to the second positioning device and the third positioning device corresponding to the second ranging response message, so that the third positioning device and the second positioning device corresponding to the second ranging response message can respectively determine the target distance information with the second base station.
[0050] The technical solution of this embodiment utilizes a ranging and positioning system deployed in a target area. This system includes at least one first positioning device and multiple first base stations. For the at least one first positioning device, when a second positioning device receives a first ranging request message, it determines the second base station corresponding to the first ranging request message. When the second positioning device determines that the second base station meets preset base station conditions, it generates a first ranging response message corresponding to the first ranging request message and sends the first ranging response message to at least one third positioning device and the second base station. This allows the second base station to clearly identify the positioning devices that require subsequent ranging processing, eliminating the need for the second base station to open an additional receiving time period, thus avoiding unnecessary power consumption. This enables the third positioning devices that meet the conditions to quickly interact with the second base station via ranging messages, achieving rapid interaction with each person holding a corresponding positioning device in scenarios where a large number of people suddenly enter the target area, thereby enabling personnel positioning processing. For the at least one third positioning device, when the third positioning device determines that the message sending conditions are met based on the first ranging response message, it sends a second ranging response message to the second base station. When the second base station determines that at least one received second ranging response message matches the message information of the first ranging response message, it sends a ranging end message, enabling the third positioning device and the second positioning device corresponding to the second ranging response message to determine the target distance information corresponding to the second base station. This invention solves the problem of low ranging success rate in the prior art. Through the above ranging process, the sending order of ranging response messages of each first positioning device is clarified, reducing the number of ranging messages sent and lowering the overall ranging processing time. Simultaneously, it enables the base station to clearly identify the ranging response message to be received from the positioning device based on the first ranging response message information, reducing unnecessary power consumption of the base station and achieving fast and accurate ranging processing for positioning devices in the target area, thus improving the success rate of ranging processing.
[0051] Example 2 Figure 3 This is a flowchart of a ranging method provided in Embodiment 2 of the present invention. This embodiment is a preferred embodiment of the above embodiments. For specific implementation details, please refer to the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here. Figure 3 As shown, the method includes: S210. For at least one first positioning device, when the second positioning device receives the first ranging request message, it determines the second base station corresponding to the first ranging request message.
[0052] The second base station is one of the multiple first base stations, and the second positioning device is one of the positioning devices in at least one of the first positioning devices.
[0053] S220: When the second positioning device determines that the second base station meets the preset base station conditions, it generates a first ranging response message corresponding to the first ranging request message and sends the first ranging response message to at least one third positioning device and the second base station.
[0054] The third positioning device is a first positioning device whose device distance from the third base station is less than a first distance threshold, and the third base station is a first base station whose device distance from the second positioning device is less than a second distance threshold.
[0055] Optionally, the first ranging response message includes at least: a target device identifier of at least one third positioning device to be ranging and ranging sequence information. The target device identifier can be the device identifier of the third positioning device to be ranging, used to uniquely identify the third positioning device to be ranging. The ranging sequence information is used to indicate the order in which ranging processing is performed between the second base station and at least one third positioning device.
[0056] S230. If the third device identifier of the third positioning device matches the target device identifier in the first ranging response message, then the third positioning device is determined to meet the message sending conditions.
[0057] The third device identifier can be a device identifier used to uniquely identify the third positioning device.
[0058] Specifically, for at least one third positioning device, if the current third positioning device determines that its third device identifier is consistent with the target device identifier in the first ranging response message, then the current third positioning device is determined to meet the message sending conditions.
[0059] S240. Based on the ranging order information in the first ranging response message and the message reception time information of the second base station, determine the sending time of the second message.
[0060] It should be noted that for the second base station, in order to save power, the interval between message receptions and the duration of each reception are usually set. For example, the RX is activated every 800µs to receive messages, and this continues for 500µs. Accordingly, the above information can be used as message reception time information. The message reception time information can at least include the interval between each reception of ranging messages by the second base station and the duration of the receivable ranging messages. The second message transmission time can be understood as the time when the third positioning device sends the second ranging response message.
[0061] Specifically, the ranging order of the third positioning device is determined based on the ranging order information in the first ranging response message. The sending time of the second message is determined based on the ranging order and the message reception time information of the second base station.
[0062] For example, in conjunction with the above example, after the second base station receives the most recently replied R frame (corresponding to the first ranging response message), it determines the positioning device that needs to be ranged this time based on the target device identifier of the third positioning device to be ranged in the R frame message. It then activates the RX every 800µs to receive messages, continuing for 500µs until all second ranging response messages from the third positioning devices corresponding to the R frames have been received.
[0063] Accordingly, for at least one third positioning device, when the current third positioning device receives an R frame sent by the nearest second positioning device, it determines whether its own target device identifier matches the target device identifier based on the target device identifier in the R frame. If they match, the current third positioning device calculates the second message transmission time at which it needs to send the second ranging response message based on the ranging order information in the R frame, the interval between each receiving of ranging messages by the second base station, and the duration of the receivable ranging messages. The device then sends the corresponding R frame at the second message transmission time, i.e., the second ranging response message mentioned above.
[0064] S250, at the second message sending time, send the second ranging response message to the second base station.
[0065] Specifically, after determining the time for sending the second message, the third positioning device sends a second ranging response message to the second base station at the time of sending the second message.
[0066] S260, if the second base station determines that the number of devices of the third positioning device to which the received second ranging response message belongs matches the number of identifiers of the target device, and that all the third device identifiers of the third positioning devices match the target device identifier, then a ranging end message is generated.
[0067] Specifically, when the second base station determines that the number of devices of the third positioning device to which the received second ranging response message belongs is consistent with the number of identifiers of the target device in the first ranging response message, and the third device identifier of the third positioning device matches the target device identifier, it determines that the current ranging process is over, generates a ranging end message, and sends the ranging end message to the second positioning device and the third positioning device with which it has interacted with ranging messages.
[0068] S270. Send a ranging end message to the third positioning device and the second positioning device corresponding to the second ranging response message, so that the third positioning device and the second positioning device corresponding to the second ranging response message can respectively determine the target distance information with the second base station.
[0069] The ranging termination message includes at least: the request sending time of the first ranging request message, the response receiving time of the first ranging response message, the response receiving time of at least one second ranging response message, and the termination sending time of the ranging termination message. The request sending time can be understood as the time when the second base station sends the first ranging request message. The response receiving time of the first ranging response message can be understood as the time when the second base station receives the first ranging response message. The response receiving time of the second ranging response message can be understood as the time when the second base station receives the second ranging response message. The termination sending time can be understood as the time when the second base station sends the ranging termination message.
[0070] Specifically, the generated ranging end message is sent to the third positioning device and the second positioning device corresponding to the second ranging response message, so that the third positioning device and the second positioning device corresponding to the second ranging response message can respectively determine the target distance information with the second base station.
[0071] For example, in conjunction with the above example, the second base station, after determining the end of the current ranging operation based on the number of third positioning devices and the third device identifier to which the received second ranging response message belongs, sends an F-frame (corresponding to the ranging end message) to the third positioning device and the second positioning device corresponding to the second ranging response message. For the second base station, if it does not receive an R-frame sent by the third positioning device, its corresponding R-frame reception time is set to 0; if it receives an R-frame sent by the third positioning device, it determines the R-frame reception time (corresponding to the response reception time). The F-frame sent by the second base station carries the ranging P-frame transmission time (request transmission time), R-frame reception time (response reception time), and F-frame transmission time (end transmission time).
[0072] Optionally, the second positioning device determines the target distance information with the second base station in the following manner: parsing the ranging end message to determine the response reception time of the first ranging response message; determining the message transmission duration based on the first message transmission time and response reception time of the first ranging response message; and determining the target distance information between the second positioning device and the second base station based on the message transmission duration and the preset message speed.
[0073] The first message transmission time can be the time recorded by the second positioning device when the first ranging response message is sent. The message transmission duration can be the time difference between the first message transmission time and the response reception time. The preset message speed can be a preset setting of the message signal transmission speed. Optionally, the preset message speed can be the speed of light.
[0074] Specifically, the ranging end message is parsed to determine the response and reception time of the first ranging response message. The difference between the first message transmission time and the response reception time of the first ranging response message is calculated to determine the message transmission duration. The message transmission duration is multiplied by a preset message rate to determine the target distance information between the second positioning device and the second base station.
[0075] Optionally, the third positioning device can determine the target distance information with the second base station by parsing the ranging end message to determine the response reception time of the second ranging response message. Based on the message transmission time of the second ranging response message and the corresponding response reception time, the message transmission duration is determined, and the target distance information between the third positioning device and the second base station is determined based on the message transmission duration and a preset message speed.
[0076] Optionally, when the second positioning device receives the first ranging request message, the method further includes: determining the base station type of the second base station corresponding to the first ranging request message; when the base station type is determined to be the first type, determining the starting time slice based on the first ranging time slice to which the second base station belongs and the slice duration of each time slice, so as to perform time calibration processing on the positioning device or base station that has exchanged message information with the second positioning device based on the starting time slice.
[0077] The slice duration can be the length of time corresponding to each time slice. It should be noted that, typically, the first ranging time slice, the second ranging time slice, and the device synchronization time slice have the same slice duration. The starting time slice can be the time range corresponding to the first time slice in the preset ranging cycle.
[0078] Specifically, when the second positioning device receives the first ranging request message, it determines the base station type of the second base station corresponding to the first ranging request message. If the base station type is the first type, that is, the second base station that sent the first ranging request message is determined to be an actively powered base station, the second positioning device can determine the starting time slice based on the first ranging time slice to which the second base station belongs and the slice duration of each time slice, so as to perform time calibration processing on the positioning devices or base stations that have exchanged message information with the second positioning device based on the starting time slice.
[0079] For example, in conjunction with the above example, the time synchronization of the ranging and positioning system is allocated by an actively powered base station. The actively powered base station determines its reference time through the pulse per second (PPS) signal sent by the Global Navigation Satellite System (GNSS) module, and uses this reference time to synchronize the time of the first positioning device and the battery-powered base station, so that the time of all devices in the entire ranging and positioning system is relatively synchronized.
[0080] After receiving the PPS signal, the actively powered base station sends a P frame. Other devices (the first positioning device and the battery-powered base station) will interpret the P frame received by the actively powered base station as being in time slot 1. The first positioning device uses this mechanism to calculate the relative time of time slot 0. If the battery-powered base station fails to measure distance with the first positioning device for 20 seconds (i.e., fails to synchronize time for 20 seconds), the actively powered base station will measure distance with the battery-powered base station and synchronize time.
[0081] The technical solution of this embodiment is applied to a ranging and positioning system deployed in a target area. This ranging and positioning system includes at least one first positioning device and multiple first base stations. For the at least one first positioning device, when a second positioning device receives a first ranging request message, it determines the second base station corresponding to the first ranging request message. When the second positioning device determines that the second base station meets preset base station conditions, it generates a first ranging response message corresponding to the first ranging request message and sends the first ranging response message to at least one third positioning device and the second base station. This allows the second base station to clearly identify the positioning device that needs subsequent ranging processing, eliminating the need for the second base station to open an additional receiving time period, thus avoiding unnecessary power consumption. This also enables the third positioning device that meets the conditions to quickly interact with the second base station via ranging messages, achieving rapid interaction with each person holding a corresponding positioning device through the base station in scenarios where a large number of people suddenly enter the target area, thereby realizing personnel positioning processing. For at least one third positioning device, if the third device identifier of the third positioning device matches the target device identifier in the first ranging response message, then the third positioning device is determined to meet the message transmission conditions. Based on the ranging order information in the first ranging response message and the message reception time information of the second base station, the second message transmission time is determined, and the second ranging response message is sent to the second base station at the second message transmission time. If the third positioning device to which the second ranging response message belongs matches the target device identifier, a ranging end message is generated. The ranging end message is sent to the third positioning device and the second positioning device corresponding to the second ranging response message, so that the third positioning device and the second positioning device corresponding to the second ranging response message respectively determine the target distance information with the second base station. This invention solves the problem of low ranging success rate in existing technologies. Through the above ranging process, the sending order of ranging response messages of each first positioning device is clarified, improving ranging capacity under strict base station power consumption requirements without affecting the overall service life. This allows the ranging and positioning system to support ranging from one base station to 20 positioning devices. Furthermore, in scenarios where a large number of people carrying positioning devices suddenly enter and ranging processing is required, ranging can be performed quickly in a short time to upload positioning information, improving the ranging success rate by 80% compared to existing technologies. In addition, time synchronization can be provided to all positioning devices and battery-powered base stations within the signal range with only one actively powered base station, improving the convenience of on-site deployment.
[0082] Example 3 Figure 4 This is a schematic diagram of a ranging device provided in Embodiment 3 of the present invention. Figure 4As shown, a ranging and positioning system is applied to a target area. The ranging and positioning system includes at least one first positioning device and multiple first base stations. The device includes a second base station determination module 310, a response message sending module 320, a sending condition judgment module 330, and a distance information determination module 340.
[0083] The second base station determination module 310 is configured to, for the at least one first positioning device, determine the second base station corresponding to the first ranging request message when the second positioning device receives the first ranging request message; wherein the second base station is a base station among the plurality of first base stations, and the second positioning device is a positioning device among the at least one first positioning device; the response message sending module 320 is configured to, when the second positioning device determines that the second base station meets the preset base station conditions, generate a first ranging response message corresponding to the first ranging request message, and send the first ranging response message to at least one third positioning device and the second base station; wherein the third positioning device is one whose device distance to the third base station is less than a first distance. The first positioning device is a threshold value, and the third base station is a first base station whose device distance to the second positioning device is less than a second distance threshold value; the sending condition judgment module 330 is used to send a second ranging response message to the second base station when the third positioning device determines that the message sending condition is met based on the first ranging response message; the distance information determination module 340 is used to feed back a ranging end message when the second base station determines that the received at least one second ranging response message matches the message information of the first ranging response message, so that the third positioning device corresponding to the second ranging response message and the second positioning device respectively determine the target distance information to the second base station.
[0084] The technical solution of this embodiment is applied to a ranging and positioning system deployed in a target area. This ranging and positioning system includes at least one first positioning device and multiple first base stations. For the at least one first positioning device, when a second positioning device receives a first ranging request message, it determines the second base station corresponding to the first ranging request message. When the second positioning device determines that the second base station meets preset base station conditions, it generates a first ranging response message corresponding to the first ranging request message and sends the first ranging response message to at least one third positioning device and the second base station. This allows the second base station to clearly identify the positioning devices that require subsequent ranging processing, eliminating the need for the second base station to open an additional receiving time period, thus avoiding unnecessary power consumption. This also enables the third positioning devices that meet the conditions to quickly interact with the second base station via ranging messages, achieving rapid interaction with each person holding a corresponding positioning device in scenarios where a large number of people suddenly enter the target area, thereby realizing personnel positioning processing. For the at least one third positioning device, when the third positioning device determines that the message sending conditions are met based on the first ranging response message, it sends a second ranging response message to the second base station. When the second base station determines that at least one received second ranging response message matches the message information of the first ranging response message, it sends a ranging end message, enabling the third positioning device and the second positioning device corresponding to the second ranging response message to determine the target distance information corresponding to the second base station. This invention solves the problem of low ranging success rate in the prior art. Through the above ranging process, the sending order of ranging response messages of each first positioning device is clarified, reducing the number of ranging messages sent and lowering the overall ranging processing time. Simultaneously, it enables the base station to clearly identify the ranging response message to be received from the positioning device based on the first ranging response message information, reducing unnecessary power consumption of the base station and achieving fast and accurate ranging processing for positioning devices in the target area, thus improving the success rate of ranging processing.
[0085] Optionally, based on the above embodiments, the device further includes: a time division module, used to perform type division processing on multiple first base stations in the target area according to the base station power supply method, so as to determine the number of first base stations of the first type and the base station distribution information of the first base stations of the second type; wherein, the first type represents the base station type that relies on external power supply, and the second type represents the base station type that relies on the equipped battery power supply; and to perform time division processing on a preset ranging period based on the number of base stations and the base station distribution information, so as to determine the first ranging time slice of the first base station of the first type, the second ranging time slice of the first base station of the second type, and the device synchronization time slice corresponding to the positioning device.
[0086] Optionally, the device further includes: a device synchronization module, configured to, for the at least one first positioning device, determine at least one third base station corresponding to the first positioning device and at least one third positioning device corresponding to each third base station based on the message signal strength information of the second ranging request message received by the first positioning device within the device synchronization time slice and the received broadcast information; wherein the broadcast information is sent by other first positioning devices and is used to characterize the message signal strength of the second ranging request message received by other first positioning devices.
[0087] Optionally, the response message sending module includes: a base station condition judgment unit, used to determine that the second base station meets preset base station conditions when the second base station is a base station among the at least one third base station.
[0088] Optionally, the first ranging response message includes at least: a target device identifier and ranging sequence information of at least one third positioning device to be ranging; and a sending condition judgment module, used to determine that the third positioning device meets the message sending condition if the third device identifier of the third positioning device matches the target device identifier in the first ranging response message; determine the second message sending time based on the ranging sequence information and the message receiving time information of the second base station; and send the second ranging response message to the second base station at the second message sending time.
[0089] Optionally, the first ranging response message includes at least: a target device identifier of at least one third positioning device to be ranging and ranging sequence information. The distance information determination module includes: an end message feedback unit, used to generate a ranging end message when the second base station determines that the number of devices of the third positioning device to which the received second ranging response message belongs matches the number of identifiers of the target device identifier, and all third device identifiers of the third positioning devices match the target device identifier; and sends the ranging end message to the third positioning device corresponding to the second ranging response message and the second positioning device; wherein the ranging end message includes at least: the request sending time of the first ranging request message, the response receiving time of the first ranging response message, the response receiving time of at least one second ranging response message, and the end sending time of the ranging end message.
[0090] Optionally, the distance information determination module includes: a distance information determination unit, used to parse the ranging end message to determine the response reception time of the first ranging response message; determine the message transmission duration based on the first message transmission time of the first ranging response message and the response reception time; and determine the target distance information between the second positioning device and the second base station based on the message transmission duration and a preset message speed.
[0091] Optionally, the device further includes: a time synchronization module, used to determine the base station type of the second base station corresponding to the first ranging request message; when the base station type is determined to be a first type, a starting time slice is determined based on the first ranging time slice to which the second base station belongs and the slice duration of each time slice, so as to perform time calibration processing on the positioning device or base station that interacts with the second positioning device based on the starting time slice.
[0092] The ranging device provided in the embodiments of the present invention can execute the ranging method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method.
[0093] Example 4 Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0094] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0095] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0096] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as ranging methods.
[0097] In some embodiments, the ranging method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the ranging method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the ranging method by any other suitable means (e.g., by means of firmware).
[0098] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0099] Computer programs for implementing the ranging method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0100] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.
[0101] Example 5 Embodiment 5 of the present invention also provides a computer-readable storage medium storing computer instructions for causing a processor to execute a ranging method applied to a ranging and positioning system deployed in a target area. The ranging and positioning system includes at least one first positioning device and multiple first base stations. The method includes: For the at least one first positioning device, when the second positioning device receives the first ranging request message, it determines the second base station corresponding to the first ranging request message; wherein, the second base station is a base station among the plurality of first base stations, and the second positioning device is a positioning device among the at least one first positioning device; When the second positioning device determines that the second base station meets the preset base station conditions, it generates a first ranging response message corresponding to the first ranging request message and sends the first ranging response message to at least one third positioning device and the second base station; wherein, the third positioning device is a first positioning device whose device distance to the third base station is less than a first distance threshold, and the third base station is a first base station whose device distance to the second positioning device is less than a second distance threshold; For the at least one third positioning device, when the third positioning device determines that the message sending conditions are met based on the first ranging response message, it sends a second ranging response message to the second base station. If the second base station determines that at least one second ranging response message it has received matches the message information of the first ranging response message, it sends out a ranging end message so that the third positioning device corresponding to the second ranging response message and the second positioning device respectively determine the target distance information with the second base station.
[0102] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0103] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0104] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0105] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0106] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0107] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A distance measurement method, characterized in that, A ranging and positioning system deployed in a target area, the ranging and positioning system comprising: at least one first positioning device and multiple first base stations, the method comprising: For the at least one first positioning device, when the second positioning device receives the first ranging request message, it determines the second base station corresponding to the first ranging request message; wherein, the second base station is a base station among the plurality of first base stations, and the second positioning device is a positioning device among the at least one first positioning device; When the second positioning device determines that the second base station meets the preset base station conditions, it generates a first ranging response message corresponding to the first ranging request message and sends the first ranging response message to at least one third positioning device and the second base station; wherein, the third positioning device is a first positioning device whose device distance to the third base station is less than a first distance threshold, and the third base station is a first base station whose device distance to the second positioning device is less than a second distance threshold; For the at least one third positioning device, when the third positioning device determines that the message sending conditions are met based on the first ranging response message, it sends a second ranging response message to the second base station. If the second base station determines that at least one second ranging response message it has received matches the message information of the first ranging response message, it sends out a ranging end message so that the third positioning device corresponding to the second ranging response message and the second positioning device respectively determine the target distance information with the second base station.
2. The method according to claim 1, characterized in that, The method further includes: Based on the base station power supply method, multiple first base stations in the target area are classified into types to determine the number of first base stations belonging to the first type and the distribution information of first base stations belonging to the second type; wherein, the first type represents the base station type that relies on external power supply, and the second type represents the base station type that relies on the equipped battery for power supply. Based on the number of base stations and the distribution information of the base stations, the preset ranging period is divided into time slices to determine the first ranging time slice of the first base station of the first type, the second ranging time slice of the first base station of the second type, and the device synchronization time slice corresponding to the positioning device.
3. The method according to claim 2, characterized in that, The method further includes: For the at least one first positioning device, based on the message signal strength information of the second ranging request message received by the first positioning device within the device synchronization time slice and the received broadcast information, at least one third base station corresponding to the first positioning device and at least one third positioning device corresponding to each third base station are determined. The broadcast information is sent by other first positioning devices and is used to characterize the message signal strength of the other first positioning devices when they receive the second ranging request message.
4. The method according to claim 3, characterized in that, Determining that the second base station meets the preset base station conditions includes: If the second base station is one of the at least three third base stations, then the second base station is determined to meet the preset base station conditions.
5. The method according to claim 1, characterized in that, The first ranging response message includes at least: a target device identifier and ranging order information of at least one third positioning device to be ranging. The step of sending a second ranging response message to the second base station when the third positioning device determines that the message sending conditions are met based on the first ranging response message includes: If the third device identifier of the third positioning device matches the target device identifier in the first ranging response message, then the third positioning device is determined to meet the message sending conditions. Based on the ranging sequence information and the message reception time information of the second base station, the sending time of the second message is determined; At the time when the second message is sent, a second ranging response message is sent to the second base station.
6. The method according to claim 1, characterized in that, The first ranging response message includes at least: a target device identifier and ranging sequence information of at least one third positioning device to be ranging. The step of feeding back a ranging end message when the second base station determines that at least one received second ranging response message matches the message information of the first ranging response message includes: If the second base station determines that the number of devices of the third positioning device to which the received second ranging response message belongs matches the number of identifiers of the target device identifier, and all the third device identifiers of the third positioning device match the target device identifier, a ranging end message is generated. The ranging end message is sent to the third positioning device and the second positioning device corresponding to the second ranging response message; The ranging end message includes at least: the request sending time of the first ranging request message, the response receiving time of the first ranging response message, the response receiving time of at least one second ranging response message, and the ending sending time of the ranging end message.
7. The method according to claim 6, characterized in that, The second positioning device determines the target distance information with respect to the second base station in the following manner: The ranging end message is parsed to determine the response reception time of the first ranging response message; The message transmission duration is determined based on the first message transmission time and the response reception time of the first ranging response message; The target distance information between the second positioning device and the second base station is determined based on the message transmission duration and the preset message speed.
8. The method according to claim 1, characterized in that, When the second positioning device receives the first ranging request message, the method further includes: Determine the base station type of the second base station corresponding to the first ranging request message; When the base station type is determined to be the first type, a starting time slice is determined based on the first ranging time slice to which the second base station belongs and the slice duration of each time slice, so as to perform time calibration processing on the positioning device or base station that interacts with the second positioning device based on the starting time slice.
9. A ranging device, characterized in that, A ranging and positioning system deployed in a target area, the ranging and positioning system comprising: at least one first positioning device and multiple first base stations, the device comprising: The second base station determination module is used to determine, when the second positioning device receives the first ranging request message, a second base station corresponding to the first ranging request message for the at least one first positioning device; wherein the second base station is a base station among the plurality of first base stations, and the second positioning device is a positioning device among the at least one first positioning device; The response message sending module is used to generate a first ranging response message corresponding to the first ranging request message when the second positioning device determines that the second base station meets the preset base station conditions, and to send the first ranging response message to at least one third positioning device and the second base station; wherein, the third positioning device is a first positioning device whose device distance to the third base station is less than a first distance threshold, and the third base station is a first base station whose device distance to the second positioning device is less than a second distance threshold; The sending condition judgment module is used to send a second ranging response message to the second base station when the third positioning device determines that the message sending condition is met based on the first ranging response message; The distance information determination module is used to send a ranging end message when the second base station determines that at least one second ranging response message it has received matches the message information of the first ranging response message, so that the third positioning device corresponding to the second ranging response message and the second positioning device respectively determine the target distance information with the second base station.
10. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the ranging method according to any one of claims 1-8.