FTTR networking optimization method and system based on WIFI TOF ranging technology, and medium

By optimizing FTTR networking using WIFI TOF ranging technology, the problems of high roaming handover latency, unreasonable channel allocation, and poor dynamic adaptability in FTTR networking are solved, achieving low interference, high network performance, and optimized roaming experience.

CN121968012APending Publication Date: 2026-05-01FUJIAN STAR NET WISDOM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FUJIAN STAR NET WISDOM TECH CO LTD
Filing Date
2025-12-05
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing FTTR networks suffer from high roaming handover delays, lack of spatial correlation in channel allocation, and poor dynamic adaptability, leading to signal interference and network performance degradation.

Method used

The system uses WIFI TOF ranging technology to obtain spatial location, optimizes channel allocation and roaming strategies, and dynamically adjusts channel allocation and terminal roaming by measuring the distance between the main gateway and the sub-gateway, thereby realizing location-based channel allocation and terminal handover.

Benefits of technology

Significantly reduces interference, increases network throughput by 25-40%, optimizes roaming experience, reduces roaming latency to within 30ms, and dynamically adapts to spatial changes without manual adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121968012A_ABST
    Figure CN121968012A_ABST
Patent Text Reader

Abstract

The invention discloses an FTTR networking optimization method and system based on a WIFI TOF ranging technology, and a medium, and relates to the technical field of FTTR networking. The method comprises the following steps: executing WIFI TOF distance measurement, and measuring the distance from a main gateway to each sub-gateway and the distance between the sub-gateways; the method comprises the following steps: periodically scanning the interference intensity of each working channel through a main gateway, then executing a channel strategy based on a position, allocating non-overlapping channels to nodes which are close to each other, and dynamically multiplexing low-interference channels to nodes which are far from each other; when the wireless terminal accesses the network, the main gateway acquires the distance between the wireless terminal and each node in real time through TOF ranging, and switches the nodes connected with the wireless terminal according to the triggering condition, so that the terminal is instantly associated with the optimal node, and mistaken switching caused by transient signal fluctuation is avoided. According to the FTTR networking optimization method and system based on the WIFI TOF ranging technology and the medium provided by the invention, optimization of FTTR networking in two aspects of channel allocation and terminal roaming is realized.
Need to check novelty before this filing date? Find Prior Art

Description

A method, system, and medium for optimizing FTTR networking based on WIFI TOF ranging technology Technical Field

[0001] This invention relates to the field of FTTR networking technology, and in particular to an FTTR networking optimization method, system and medium based on WIFI TOF ranging technology. Background Technology

[0002] Currently, WIFI technology has evolved from 802.11n to Wi-Fi 6 / 6E, supporting higher speeds (such as 10Gbps) and multiple concurrent devices. However, home networking still faces problems such as "uneven signal attenuation due to complex physical space" and "low efficiency of multi-node collaboration".

[0003] With the widespread adoption of 5G, gigabit broadband, and smart homes, users have significantly increased their demands for home network coverage, bandwidth stability, and roaming experience. FTTR (Fiber to the Room), as a next-generation home networking solution, achieves high-speed network coverage throughout the house without dead zones by connecting the main gateway (fiber access) to the slave nodes (wireless APs) in each room via fiber optic cables. It has become a core technology for solving network bottlenecks in large apartments and multi-story residential buildings.

[0004] The existing FTTR networking and optimization methods have the following defects: (1) High roaming handover delay: When the terminal moves between rooms, the existing solution judges the handover time by signal strength (RSSI), but RSSI is greatly affected by environmental interference (such as microwave ovens and Bluetooth devices can cause instantaneous attenuation of 10-15dB), which easily leads to "handover too late" (having left the coverage area of ​​the current node) or "mishandling" (triggered by brief signal fluctuations), resulting in problems such as video stuttering and game disconnection. The handover delay usually exceeds 100ms.

[0005] (2) Lack of spatial correlation in channel allocation: Channel allocation for multiple slave nodes is based solely on interference scanning in the current frequency band, without considering the physical location of the nodes. For example, slave nodes in adjacent rooms (distance < 3 meters) may reuse the same channel, leading to co-channel interference and a throughput decrease of more than 30%; while distant nodes (distance > 10 meters) are allocated non-overlapping channels, resulting in a waste of channel resources. (3) Poor dynamic adaptability: When furniture is moved, nodes are blocked, or new equipment is added, the existing solution cannot detect spatial changes in real time, requiring manual readjustment and resulting in high maintenance costs. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide a method, system and medium for optimizing FTTR network based on WIFI TOF ranging technology. The method obtains spatial location through WIFI TOF ranging and optimizes channel allocation and roaming strategy based on location to achieve FTTR network optimization.

[0007] In a first aspect, the present invention provides an FTTR network optimization method based on WIFI TOF ranging technology, comprising: a spatial location awareness process: performing WIFI TOF ranging to measure the distance from the main gateway to each sub-gateway and the distance between each sub-gateway; a channel intelligent allocation process: periodically scanning the interference intensity of each working channel through the main gateway, and then executing a location-based channel strategy, including: for nodes whose distance is less than or equal to a first threshold, forcibly allocating non-overlapping channels; for nodes whose distance is greater than the first threshold, and whose interference value of the target channel at the node location is less than or equal to a second threshold, allowing channel reuse; and a terminal roaming process: when a wireless terminal accesses the network, the main gateway obtains the distance between the wireless terminal and each node in real time through TOF ranging, and switches the node connected to the wireless terminal according to triggering conditions, wherein the triggering conditions are: the distance between the wireless terminal and the currently connected node is greater than n meters, and there exists a target node whose distance to the wireless terminal is less than nm meters, and the signal strength of the target node is greater than the strength of the current node.

[0008] Further, the spatial location perception process specifically includes: the initiator sending a request frame to the responder, the request frame including a local timestamp T1; the responder recording a timestamp T2 when receiving the request frame; the responder generating a response frame at time T3 and sending it to the initiator, the response frame including T2 and T3; the initiator recording a timestamp T4 when receiving the response frame; then the distance from the initiator to the responder = (T4 - T1) - (T3 - T2) ÷ 2 × speed of light; the initiator and the responder are respectively the main gateway and the sub-gateway, or each is a separate sub-gateway; the distance measurement of all node combinations is completed in sequence to form a complete distance matrix between nodes.

[0009] Furthermore, in the spatial location perception process, by repeating the measurement multiple times, outliers are eliminated, and the average value is taken as the final ranging result.

[0010] Furthermore, during the spatial location sensing process, WIFI TOF ranging is re-executed at set intervals.

[0011] Furthermore, during the intelligent channel allocation process, when interference on a certain channel suddenly increases, the master node triggers channel reallocation, prioritizing switching to the alternative channel with the lowest interference.

[0012] Secondly, this invention provides an FTTR network optimization system based on WIFI TOF ranging technology, comprising: a spatial location sensing module for performing WIFI TOF ranging to measure the distance from the main gateway to each sub-gateway and the distance between each sub-gateway; a channel intelligent allocation module for periodically scanning the interference intensity of each working channel through the main gateway and then executing a location-based channel strategy, including: for nodes whose distance is less than or equal to a first threshold, forcibly allocating non-overlapping channels; for nodes whose distance is greater than the first threshold and whose interference value of the target channel at the node location is less than or equal to a second threshold, allowing channel reuse; and a terminal roaming module for, when a wireless terminal accesses the network, the main gateway obtains the distance between the wireless terminal and each node in real time through TOF ranging, and switches the node connected to the wireless terminal according to triggering conditions, wherein the triggering conditions are: the distance between the wireless terminal and the currently connected node is greater than n meters, and there exists a target node whose distance to the wireless terminal is less than nm meters, and the signal strength of the target node is greater than the strength of the current node.

[0013] Further, the spatial location awareness module is specifically used to perform the following: the initiator sends a request frame to the responder, the request frame including a local timestamp T1; the responder records a timestamp T2 when it receives the request frame; the responder generates a response frame at time T3 and sends it to the initiator, the response frame including T2 and T3; the initiator records a timestamp T4 when it receives the response frame; then the distance from the initiator to the responder = (T4 - T1) - (T3 - T2) ÷ 2 × speed of light; the initiator and the responder are respectively the main gateway and the sub-gateway, or each is a sub-gateway; the distance measurement of all node combinations is completed in sequence to form a complete distance matrix between nodes.

[0014] Furthermore, in the spatial position sensing module, outliers are eliminated by repeated measurements, and the average value is taken as the final distance measurement result.

[0015] Furthermore, in the intelligent channel allocation module, when interference on a certain channel suddenly increases, the master node triggers channel reallocation, prioritizing switching to the alternative channel with the lowest interference.

[0016] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.

[0017] The technical solution provided in this embodiment of the invention has at least the following technical effects: 1. Significantly reduced interference: Based on the TOF ranging distance between slave nodes, non-overlapping channels are allocated to nearby nodes, and low-interference channels are dynamically reused for distant nodes. By combining location-based channel allocation, co-channel interference is reduced by 60%, and network throughput is increased by 25-40% when multiple nodes are running concurrently. 2. Optimized roaming experience: Roaming handover is triggered by the real-time TOF distance and signal strength between the terminal and slave nodes, so that the terminal is immediately associated with the optimal node. The location-based pre-handover mechanism reduces roaming latency from more than 100ms to less than 30ms, ensuring smooth real-time services such as video conferencing and VR games, and avoiding false handovers caused by brief signal fluctuations.

[0018] 3. Strong dynamic adaptability: By periodically updating the distance through WIFI TOF ranging and performing dynamic channel allocation and roaming switching, it can automatically sense and adapt to spatial changes when furniture is moved, nodes are blocked, or new devices are added, without the need for manual readjustment.

[0019] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0021] Figure 1 is a general flowchart of the method in Embodiment 1 of the present invention; Figure 2 is a structural schematic diagram of the system in Embodiment 2 of the present invention; Figure 3 is a structural schematic diagram of the medium in Embodiment 3 of the present invention. Detailed Implementation

[0022] This invention provides a method, system, and medium for optimizing FTTR networks based on WIFI TOF ranging technology. It obtains spatial location through WIFI TOF ranging and optimizes channel allocation and roaming strategies based on location to achieve FTTR network optimization.

[0023] The overall concept of the technical solution in this invention embodiment is as follows: WIFI TOF (Time of Flight) ranging technology (such as Fine Timing Measurement, FTM based on the 802.11mc protocol) is mature. By measuring the time difference of signal propagation between devices, accurate distance calculation within 1 meter can be achieved, providing a technical foundation for spatial location sensing. This invention embodiment achieves optimization of FTTR networking in terms of both channel allocation and terminal roaming through the process of "WIFI TOF ranging to obtain spatial location → location-based optimization of channel allocation and roaming strategy → dynamic adaptive adjustment". Embodiment 1

[0024] This embodiment provides an FTTR networking optimization method based on WIFI TOF ranging technology, as shown in Figure 1, including: S1, spatial location perception process: WIFI TOF ranging is performed to measure the distance from the main gateway to each sub-gateway and the distance between each sub-gateway.

[0025] The spatial location sensing process specifically includes: the initiator sending a request frame to the responder, the request frame including a local timestamp T1; the responder recording a timestamp T2 when receiving the request frame; the responder generating a response frame at time T3 and sending it to the initiator, the response frame including T2 and T3; the initiator recording a timestamp T4 when receiving the response frame; then the distance from the initiator to the responder = (T4 - T1) - (T3 - T2) ÷ 2 × speed of light; the initiator and the responder are respectively the main gateway and the sub-gateway, or each is a sub-gateway; the ranging of all node combinations is completed in sequence to form a complete distance matrix between nodes (nodes include the main gateway and all sub-gateways).

[0026] For example, the distance measurement between the FTTR main gateway and the sub-gateways, as well as between each sub-gateway, is based on the FTM (Fine Timing Measurement) mechanism in the 802.11mc protocol. The specific process can be broken down into the following steps: (1) After the FTTR main gateway and sub-gateways are deployed, each sub-gateway is connected to the main gateway through optical fiber, and the sub-gateway and the main gateway communicate through optical links. (2) The main gateway measures the distance from the sub-gateway A. Initiating a distance measurement request The main gateway sends an FTM request frame to node A at time T1. The frame contains the local timestamp T1 of the main gateway and requests node A to return a response.

[0027] B. Node A receives and responds to the request frame. Node A receives the request frame at time T2 and records the receiving timestamp T2. Then, at time T3, it generates an FTM response frame containing two timestamps, T2 and T3, and sends it back to the main gateway.

[0028] C. The main gateway receives and calculates the response frame received at time T4, recording the reception timestamp T4. At this time, the total round-trip flight time between the main gateway and node A is calculated using the formula: Total flight time = (T4 - T1) - (T3 - T2). Note: T3 - T2 is the internal delay of node A processing the request, which needs to be deducted from the total time to avoid the device's own response speed affecting the measurement. D. Conversion to distance: Since the speed of radio waves in air ≈ the speed of light (3 × 10⁻⁶), the conversion is based on the fact that the speed of radio waves in air is approximately equal to the speed of light (3 × 10⁻⁶). 8 The one-way distance from the main gateway to node A is: distance = (total flight time ÷ 2) × speed of light E. Repeat the above steps 3-5 times, take the best value after multiple measurements, and use the algorithm to remove outliers (such as excessive values ​​caused by wall reflections). Take the average value as the final result, with an accuracy of ±0.5 meters.

[0029] (3) Relative distance measurement between sub-gateways The ranging logic between sub-gateways (such as node A↔ node B, node A↔ node C) is the same as that between the main gateway and the sub-gateway. Only the "initiator" role needs to be switched. The steps are as follows: A. Role allocation between nodes The main gateway sends a "measurement instruction" to node A, designating it as the "initiator" to initiate ranging to node B; node B automatically switches to the "responder".

[0030] B. Repeated FTM timestamp interaction: Node A sends a request frame at T1', Node B receives it at T2' and responds at T3', and Node A receives it at T4'. Calculate the distance from Node A to Node B using the same formula: (T4' - T1') - (T3' - T2') ÷ 2 × speed of light. C. Batch completion of all node mutual measurements: Following the above process, complete the distance measurement for all node combinations such as "Node A ↔ Node C", "Node B ↔ Node C", etc.

[0031] D. The sub-gateway reports the measured distance results to the main gateway, thus forming a complete "inter-node distance matrix" (recording the straight-line distance between any two nodes).

[0032] (4) Regularly calibrate and re-perform TOF ranging every 2 hours to update the relative distance measurement data between the main gateway and the sub-gateways and between each sub-gateway.

[0033] S2. Channel intelligent allocation process: The main gateway periodically scans the interference intensity of each working channel and then executes a location-based channel strategy.

[0034] In one specific embodiment, the master node scans the interference intensity (indicating channel occupancy and noise level) of 2.4 GHz (channels 1-14) and 5 GHz (channels 36-165) every 30 minutes. The location-based channel strategy specifically includes: if the distance between nodes is less than or equal to a first threshold (e.g., 5 meters), non-overlapping channels are forcibly allocated; if the distance between nodes is greater than the first threshold (e.g., 5 meters) and the interference value of the target channel at the node's location is less than or equal to a second threshold (e.g., -85 dBm), channel reuse is allowed.

[0035] Dynamic adjustment: When interference on a certain channel suddenly increases (e.g., occupancy rate > 80%), the master node triggers channel reallocation and prioritizes switching to the backup channel with the lowest interference.

[0036] S3. Terminal roaming process: When a wireless terminal accesses the network, the main gateway obtains the distance between the wireless terminal and each node in real time through TOF ranging, realizes real-time location tracking, and switches the node connected to the wireless terminal according to the trigger conditions.

[0037] The sampling frequency is 10Hz (updated every 100ms). The ranging process is the same as the ranging process from the main gateway to the sub-gateway, that is, the main gateway sends the ranging command from the sub-gateway to the corresponding wireless terminal to the sub-gateway. The triggering conditions are: the distance d_current between the wireless terminal and the currently connected node is greater than n meters (e.g., 5 meters), and there exists a target node whose distance d_target between the wireless terminal and the wireless terminal is less than nm meters (e.g., 5-2 meters), and the signal strength of the target node is greater than the signal strength of the current node (e.g., the signal strength of the target node ≥ the signal strength of the current node - 10dBm), where n and m are natural numbers and can be set according to the specific situation of the FTTR network.

[0038] Based on the same inventive concept, this application also provides a system corresponding to the method in Embodiment 1, as detailed in Embodiment 2. Embodiment 2

[0039] This embodiment provides an FTTR network optimization system based on WIFI TOF ranging technology, as shown in Figure 2. It includes: a spatial location sensing module for performing WIFI TOF ranging to measure the distance from the main gateway to each sub-gateway and the distance between each sub-gateway; a channel intelligent allocation module for periodically scanning the interference intensity of each working channel through the main gateway and then executing a location-based channel strategy, including: for nodes whose distance is less than or equal to a first threshold, forcibly allocating non-overlapping channels; for nodes whose distance is greater than the first threshold and whose interference value of the target channel at that node's location is less than or equal to a second threshold, allowing channel reuse; and a terminal roaming module for when a wireless terminal accesses the network, the main gateway obtains the distance between the wireless terminal and each node in real time through TOF ranging, and switches the node connected to the wireless terminal according to trigger conditions. The trigger conditions are: the distance between the wireless terminal and the currently connected node is greater than n meters, and there exists a target node whose distance to the wireless terminal is less than nm meters, while the signal strength of the target node is greater than the strength of the current node.

[0040] Preferably, the spatial location awareness module is specifically used to perform the following: the initiator sends a request frame to the responder, the request frame including a local timestamp T1; the responder records a timestamp T2 when it receives the request frame; the responder generates a response frame at time T3 and sends it to the initiator, the response frame including T2 and T3; the initiator records a timestamp T4 when it receives the response frame; then the distance from the initiator to the responder = (T4 - T1) - (T3 - T2) ÷ 2 × speed of light; the initiator and the responder are respectively the main gateway and the sub-gateway, or each is a sub-gateway; the distance measurement of all node combinations is completed in sequence to form a complete distance matrix between nodes.

[0041] Preferably, in the spatial position sensing module, outliers are removed by repeated measurements, and the average value is taken as the final ranging result.

[0042] Preferably, in the intelligent channel allocation module, when the interference of a certain channel suddenly increases, the master node triggers channel reallocation and prioritizes switching to the alternative channel with the lowest interference.

[0043] Since the system described in Embodiment 2 of this invention is a system used to implement the method of Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this system based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All systems used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0044] Based on the same inventive concept, this application provides a storage medium corresponding to Embodiment 1, as detailed in Embodiment 3. Embodiment 3

[0045] This embodiment provides a computer-readable storage medium, as shown in FIG3, on which a computer program is stored. When the computer program is executed by a processor, it can implement any of the implementation methods in Embodiment 1.

[0046] Since the computer-readable storage medium described in this embodiment is the same computer-readable storage medium used to implement the method in Embodiment 1 of this application, those skilled in the art can understand the specific implementation methods and various variations of the computer-readable storage medium in this embodiment based on the method described in Embodiment 1 of this application. Therefore, how this computer-readable storage medium implements the method in the embodiments of this application will not be described in detail here. Any computer-readable storage medium used by those skilled in the art to implement the method in the embodiments of this application falls within the scope of protection of this application.

[0047] The technical solution provided in this embodiment of the invention has at least the following technical effects: 1. Significantly reduced interference: Based on the TOF ranging distance between slave nodes, non-overlapping channels are allocated to nearby nodes, and low-interference channels are dynamically reused for distant nodes. By combining location-based channel allocation, co-channel interference is reduced by 60%, and network throughput is increased by 25-40% when multiple nodes are running concurrently. 2. Optimized roaming experience: Roaming handover is triggered by the real-time TOF distance and signal strength between the terminal and slave nodes, so that the terminal is immediately associated with the optimal node. The location-based pre-handover mechanism reduces roaming latency from more than 100ms to less than 30ms, ensuring smooth real-time services such as video conferencing and VR games, and avoiding false handovers caused by brief signal fluctuations.

[0048] 3. Strong dynamic adaptability: By periodically updating the distance through WIFI TOF ranging and performing dynamic channel allocation and roaming switching, it can automatically sense spatial changes when furniture is moved, nodes are blocked, or new devices are added, without the need for manual readjustment.

[0049] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0050] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0051] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0052] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0053] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for optimizing FTTR networking based on WIFI TOF ranging technology, characterized in that, include: Spatial location awareness process: Perform WIFI TOF ranging to measure the distance from the main gateway to each sub-gateway and the distance between each sub-gateway; Intelligent channel allocation process: The main gateway periodically scans the interference intensity of each working channel and then executes a location-based channel strategy, including: for nodes where the distance between them is less than or equal to a first threshold, a non-overlapping channel is forcibly allocated; for nodes where the distance between them is greater than the first threshold and the interference value of the target channel at that node is less than or equal to a second threshold, channel reuse is allowed; Terminal roaming process: When a wireless terminal accesses the network, the main gateway obtains the distance between the wireless terminal and each node in real time through TOF ranging, and switches the node connected to the wireless terminal according to trigger conditions. The trigger conditions are: the distance between the wireless terminal and the currently connected node is greater than n meters, and there exists a target node whose distance from the wireless terminal is less than nm meters, and the signal strength of the target node is greater than the signal strength of the current node.

2. The method according to claim 1, characterized in that: The spatial location perception process specifically includes: the initiator sending a request frame to the responder, the request frame including a local timestamp T1; the responder recording a timestamp T2 when receiving the request frame; the responder generating a response frame at time T3 and sending it to the initiator, the response frame including T2 and T3; the initiator recording a timestamp T4 when receiving the response frame; then the distance from the initiator to the responder = (T4 - T1) - (T3 - T2) ÷ 2 × speed of light; the initiator and the responder are respectively the main gateway and the sub-gateway, or each is a separate sub-gateway; the ranging of all node combinations is completed sequentially to form a complete distance matrix between nodes.

3. The method according to claim 1 or 2, characterized in that: In the spatial location sensing process, the measurement is repeated multiple times, outliers are eliminated, and the average value is taken as the final distance measurement result.

4. The method according to claim 1, characterized in that: During the spatial location sensing process, WIFI TOF ranging is re-executed at set intervals.

5. The method according to claim 1, characterized in that: During the intelligent channel allocation process, when interference on a certain channel suddenly increases, the master node triggers channel reallocation and prioritizes switching to the alternative channel with the lowest interference.

6. An FTTR network optimization system based on WIFI TOF ranging technology, characterized in that, include: The spatial location sensing module is used to perform WIFI TOF ranging, measuring the distance from the main gateway to each sub-gateway and the distance between each sub-gateway; The intelligent channel allocation module is used to periodically scan the interference intensity of each working channel through the main gateway, and then execute a location-based channel strategy, including: for nodes whose distance is less than or equal to a first threshold, forcibly allocating non-overlapping channels; for nodes whose distance is greater than the first threshold, and whose interference value of the target channel at the node location is less than or equal to a second threshold, allowing channel reuse; the terminal roaming module is used when a wireless terminal accesses the network, the main gateway obtains the distance between the wireless terminal and each node in real time through TOF ranging, and switches the node connected to the wireless terminal according to the trigger conditions, the trigger conditions being: the distance between the wireless terminal and the currently connected node is greater than n meters, and there exists a target node whose distance from the wireless terminal is less than nm meters, and the signal strength of the target node is greater than the strength of the current node.

7. The system according to claim 6, characterized in that, The spatial location awareness module is specifically used to perform the following: the initiator sends a request frame to the responder, the request frame including a local timestamp T1; the responder records a timestamp T2 when it receives the request frame; the responder generates a response frame at time T3 and sends it to the initiator, the response frame including T2 and T3; the initiator records a timestamp T4 when it receives the response frame; then the distance from the initiator to the responder = (T4 - T1) - (T3 - T2) ÷ 2 × speed of light; the initiator and the responder are respectively the main gateway and the sub-gateway, or each is a sub-gateway; the distance measurement of all node combinations is completed in sequence to form a complete distance matrix between nodes.

8. The system according to claim 6 or 7, characterized in that: In the spatial location sensing module, outliers are eliminated by repeated measurements, and the average value is taken as the final distance measurement result.

9. The system according to claim 6, characterized in that: In the intelligent channel allocation module, when interference on a certain channel suddenly increases, the master node triggers channel reallocation and prioritizes switching to the alternative channel with the lowest interference.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 5.