A data transmission method, apparatus, device, storage medium, and product
By evaluating the data transmission path between master and slave network devices, calculating communication quality weights, and selecting the optimal path, the problem of low data exchange efficiency in traditional networking is solved, and efficient and stable data transmission is achieved.
Patent Information
- Application Number
- CN202410573777.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-10
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2044-05-10
AI Technical Summary
Traditional networking lacks a dynamic path selection mechanism between master and slave network devices, resulting in low data exchange efficiency and an inability to adapt to different working environments and conditions.
By acquiring network status information of the data transmission path between master and slave network devices, calculating communication quality weights, and selecting the optimal transmission path, efficient and stable data transmission can be achieved.
Ensure efficient and stable data transmission between master and slave network devices, adapt to complex communication environments, and improve communication performance.
Smart Images

Figure CN118828275B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and more specifically, to a data transmission method, apparatus, device, storage medium, and product. Background Technology
[0002] Currently, in network architectures such as Fiber to the Room (FTTR) networks, the master network device typically needs to exchange data with a series of slave network devices. In traditional network configurations, one or more relay devices may be used to assist data transmission. However, traditional networks do not provide a dynamic path selection mechanism between the master and slave network devices, which limits the efficiency of data exchange between master and slave network devices when facing different operating environments and conditions. Summary of the Invention
[0003] Based on this, the present invention provides a data transmission method, apparatus, device, storage medium and product, which can evaluate the data transmission path by considering the network status between master and slave network devices, so as to select the optimal transmission path for data exchange between master and slave network devices, and ensure efficient and stable transmission between master and slave network devices.
[0004] To achieve the above objectives, embodiments of the present invention provide a data transmission method, comprising:
[0005] Obtain network status information of the data transmission path between the master network device and the slave network device in the network;
[0006] Calculate the communication quality weight of the data transmission path based on the network condition information;
[0007] The data transmission path with the highest communication quality weight is selected as the optimal transmission path for data transmission between the master network device and the slave network device.
[0008] To achieve the above objectives, embodiments of the present invention also provide a data transmission device, comprising:
[0009] The information acquisition module is used to acquire network status information of the data transmission path between the master network device and the slave network device in the network.
[0010] The weight calculation module is used to calculate the communication quality weight of the data transmission path based on the network condition information.
[0011] The transmission path selection module is used to select the data transmission path with the highest communication quality weight as the optimal transmission path for data transmission between the master network device and the slave network device.
[0012] To achieve the above objectives, embodiments of the present invention also provide a data transmission device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the data transmission method as described in any of the above embodiments.
[0013] To achieve the above objectives, embodiments of the present invention also provide a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the data transmission method as described in any of the above embodiments.
[0014] To achieve the above objectives, embodiments of the present invention also provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the data transmission method as described in any of the above embodiments.
[0015] Compared with existing technologies, the data transmission method, apparatus, device, storage medium, and product disclosed in this invention calculate the communication quality weight of the data transmission path by acquiring network status information of the data transmission path between the master network device and the slave network device in a network, and then selects the data transmission path with the largest communication quality weight as the optimal transmission path for data transmission between the master network device and the slave network device. Therefore, this invention evaluates the data transmission path by considering the network status between the master and slave network devices to select the optimal transmission path for data exchange between them, ensuring efficient and stable transmission between the master and slave network devices. Attached Figure Description
[0016] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the 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.
[0017] Figure 1 This is a schematic flowchart of a data transmission method provided in an embodiment of the present invention;
[0018] Figure 2 This is a schematic diagram of a network topology provided in an embodiment of the present invention;
[0019] Figure 3 This is a schematic diagram of a network topology provided in an embodiment of the present invention;
[0020] Figure 4 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present invention;
[0021] Figure 5 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.
[0023] See Figure 1 This is a flowchart illustrating a data transmission method according to an embodiment of the present invention. Specifically, the data transmission method includes steps S11 to S13:
[0024] S11. Obtain network status information of the data transmission path between the master network device and the slave network device in the network;
[0025] S12. Calculate the communication quality weight of the data transmission path based on the network condition information;
[0026] S13. Select the data transmission path with the highest communication quality weight as the optimal transmission path for data transmission between the master network device and the slave network device.
[0027] Specifically, the data transmission method is applied to a network and can be executed by any one network device in the network or completed collaboratively by multiple network devices.
[0028] Taking a Fiber to the Room (FTTR) network as an example, an FTTR network includes master network devices and slave network devices. The master network device is at the core, and the master gateway device connects directly or through repeater devices to the slave network devices to extend the network coverage to the areas required by the user. In an FTTR network configuration, one or more repeater devices may be used to assist data transmission. Multiple data transmission paths exist between the master and slave network devices; therefore, it is necessary to evaluate the network conditions of different data transmission paths, select the optimal data transmission path, and utilize the optimal transmission path to achieve communication between the master and slave network devices.
[0029] Compared with the prior art, the embodiments of the present invention evaluate the data transmission path by considering the network status between the master and slave network devices, so as to select the optimal transmission path for data exchange between the master and slave network devices, thereby ensuring efficient and stable transmission between the master and slave network devices.
[0030] In a preferred embodiment, the network is a whole-house fiber optic network, and the network further includes relay devices. The connection between the relay devices and the main network device is a wired connection, the connection between the relay devices is a wired connection, and the connection between the relay devices and the slave network devices is a wireless connection.
[0031] Specifically, the master network device and the slave network device can be connected directly, or they can be connected through a relay device. For example, such as... Figure 2 The network topology diagram shown depicts an FTTR network comprising relay devices Relay1, Relay2, a master network device, and slave network devices DeviceA, DeviceB, DeviceC, and DeviceD. Figure 2 In this scenario, network devices Device A, Device B, Device C, and Device D are located in a large office, while the master network device is located on another floor. Due to communication interference between floors, Device A, Device B, Device D, and Device D cannot communicate effectively with the master network device directly. Therefore, relay devices Relay1 and Relay2 are deployed in the middle of the floors. The master network device is wired to Relay1, and Relay1 is wired to Relay2. Relay1 is wirelessly connected to Device A and Device B, respectively, and Relay2 is wirelessly connected to Device C and Device D, respectively.
[0032] It is worth noting that networking is not limited to FTTR networks. Figure 2 The network topology shown is only for illustrating the connection method between various devices in the network; the specific network topology is not limited to this. Figure 2 The specific structure can be determined based on the actual network layout. If a direct connection between the master and slave network devices can meet communication requirements, a relay device can be used to connect them.
[0033] In a preferred embodiment, the step of acquiring network status information of the data transmission path between the master network device and the slave network device in the network; and the step of calculating the communication quality weight of the data transmission path based on the network status information, includes:
[0034] The main network device initiates path analysis requests to each of the relay devices;
[0035] The main network device obtains network status information of its downstream path to calculate the weight score of the downstream path of the main network device; wherein, the downstream path of the main network device refers to the path between the main network device and the adjacent downstream node, and the downstream node refers to the node that is far away from the main network device.
[0036] The relay device obtains network status information of its downstream path to calculate the weight score of the downstream path of the relay device; wherein, the downstream path of the relay device refers to the path between the relay device and its adjacent downstream node.
[0037] The relay device feeds back the weight score of the downstream path of the relay device to the main network device;
[0038] The main network device performs a comprehensive calculation on the weight scores of each element on the data transmission path to obtain the communication quality weight of the data transmission path.
[0039] For example, see Figure 3The network topology diagram shown illustrates a specific FTTR network environment with the following devices: 1 master network device (Master); 2 relay devices (Relay1 and Relay2); and 4 slave network devices (DeviceA, DeviceB, DeviceC, and DeviceD). The Master's adjacent downstream nodes include Relay1 and Relay2; Relay1's adjacent downstream nodes include DeviceA and DeviceB; and Relay2's adjacent downstream nodes include DeviceC and DeviceD. Assume that at a certain moment, the communication quality weight (weight score) from the Master to Relay1 is 0.8, and the communication quality weight to Relay2 is 0.7. The communication quality weights from Relay1 to Device A and Device B are 0.9 and 0.85, respectively. The communication quality weights from Relay2 to Device C and Device D are 0.95 and 0.9, respectively. The communication quality weights for each data transmission path are calculated using the FTTR-SmartRoute algorithm (intelligent routing algorithm). The specific process is as follows: The Master network device first sends a path request to Relay1 and Relay2. After receiving the request, each relay device uses the FTTR-SmartRoute algorithm to calculate a weight score for all connected slave network devices. All weight scores are then aggregated and combined with the Master network device for a comprehensive calculation, as follows:
[0040] The overall weight (communication quality weight) of the master network device (Master) to the slave network device (Device A) via relay device (Relay1) is 0.8 × 0.9 = 0.72.
[0041] The overall weight of the master network device (Master) to the slave network device (DeviceB) via relay device (Relay1) is 0.8 × 0.85 = 0.68.
[0042] The overall weight of the master network device (Master) to the slave network device (DeviceC) via relay device (Relay2) is 0.7 × 0.95 = 0.665.
[0043] The overall weight of the master network device (Master) to the slave network device (D) via relay device (Relay2) is 0.7 × 0.9 = 0.63.
[0044] By using the FTTR-SmartRoute algorithm, we can dynamically select the optimal communication path based on the actual communication environment, thereby achieving more efficient and stable data transmission.
[0045] Optionally, the communication quality weight of the data transmission path can be the product of the weight scores between each node on the path, or the sum of the weight scores between each node on the path. This is not limited, but it must be ensured that the communication quality weight of the data transmission path is calculated by comprehensively considering the weight scores between adjacent nodes on the path, and that the communication quality weight of the data transmission path is positively correlated with the weight scores between each adjacent node on the path. Preferably, the communication quality weight of the data transmission path is the product of the weight scores between each adjacent node on the path, avoiding the problem that a data transmission path may have the highest communication quality weight, but there may be poor network quality between two adjacent nodes, leading to low data transmission efficiency for the entire path.
[0046] Furthermore, Relay1 will select Device A as the optimal communication path, while Relay2 will select Device C. Upon receiving the responses from the relays, the master network device selects the best relay and slave network device for communication based on a weighted average. In this example, the master network device will choose to communicate with Device A via Relay1 because it has the highest weighted average (0.72).
[0047] It is worth noting that, Figure 3 The network topology shown is only used to illustrate the specific calculation method of communication quality weight in a network. Specific network topologies are not limited to this. Figure 3 The specific structure can be determined by the network layout based on the actual situation.
[0048] In a preferred embodiment, obtaining network status information of the data transmission path between the master network device and the slave network device in the network includes:
[0049] Obtain network status information between adjacent nodes on the data transmission path between the master network device and the slave network device in the network;
[0050] The step of calculating the communication quality weight of the data transmission path based on the network condition information includes:
[0051] Calculate the weight score between the adjacent nodes based on the network status information between the adjacent nodes;
[0052] The communication quality weight of the data transmission path is calculated by comprehensively considering the weight scores between adjacent nodes on the data transmission path.
[0053] Specifically, the calculation methods for the communication quality weight of a data transmission path can be as follows: 1. The main network device sends a path analysis request to each relay device. The main network device and relay devices acquire network status information of their respective downstream paths and calculate weight scores. They then feed back the calculated weight scores to the main network device, which calculates the communication quality weight of the data transmission path based on the multiple weight scores. 2. The main network device sends a path analysis request to each relay device. The main network device and relay devices acquire network status information of their respective downstream paths and feed back all acquired network status information to the main network device. The main network device calculates the communication quality weight of each data transmission path based on the collected network status information. 3. The main network device and relay devices acquire network status information of their respective downstream paths and feed back all acquired network status information to a specific relay device. This relay device then calculates the communication quality weight of each data transmission path based on the collected network status information. 4. The master network device and relay devices each acquire network status information for their downstream paths and feed it back to a slave network device. The slave network then calculates the communication quality weights for each data transmission path based on the collected network status information. Other calculation methods are also possible and are not limited here.
[0054] Preferably, the communication quality weight of the data transmission path is obtained using the first calculation method described above. Since the upstream network status affects downstream data transmission, and the more data transmitted, the greater the probability of data loss and data errors during transmission, the relay device collects network status information of its downstream path, calculates the path score, and then uploads the path score to the main network device. This avoids excessive data transmission between the main network device and the relay device, reduces latency caused by data loss and retransmission, and improves the accuracy of the calculated communication quality weight. The main network device calculates the communication quality weight of the data transmission path based on the received weight score and the network status information collected by the main network device for its downstream path, reducing data processing latency and improving the accuracy of the communication quality weight.
[0055] Furthermore, the network condition information includes at least two of the following: signal strength, data transmission latency, and packet loss rate;
[0056] The step of calculating the weight score between adjacent nodes based on the network status information between adjacent nodes includes:
[0057] Based on the set weight coefficients, the weight scores between the adjacent nodes are calculated according to the network condition information between the adjacent nodes; wherein, when the degree of deterioration of the first network condition information reaches a set degree of deterioration, the weight coefficient of the first network condition information increases, and the weight coefficients of other network condition information besides the first network condition information decrease; when the degree of optimization of the first network condition information reaches a set degree of optimization, the weight coefficient of the first network condition information decreases, and the weight coefficients of other network condition information besides the first network condition information increase; wherein, the first network condition information is any one of all the network condition information.
[0058] Specifically, the weighted score is calculated by multiplying each network condition information by its corresponding weighting coefficient. When network condition information changes significantly, the weighting coefficients need to be adjusted. The adjustment principles are as follows: 1. If signal strength decreases, increase the weighting coefficient for signal strength to emphasize its importance. This helps reduce error rates and retransmissions in data transmission, thereby improving data transmission reliability and efficiency. 2. If data transmission latency increases, increase the weighting coefficient for data transmission latency to emphasize its importance in path selection. This helps optimize application performance, especially for applications with high real-time requirements, significantly improving user experience. 3. If packet loss rate increases, increase the weighting coefficient for packet loss rate. By considering packet loss rate more carefully, paths with high packet loss rates can be avoided, reducing data retransmission requirements and improving overall data transmission efficiency and network quality. 4. If signal strength increases, decrease the weighting coefficient for signal strength while increasing the weighting coefficients for data transmission latency and packet loss rate. The technical effects it can achieve are as follows: 5. If signal strength improves, its priority in path selection can be appropriately reduced, allowing the system to consider latency and packet loss rate—two factors that may have a greater impact on communication quality—more to assist in selecting a better path. 6. If data transmission latency decreases, the weighting coefficient of data transmission latency is reduced, while the weighting coefficients of signal strength and packet loss rate are increased. The technical effect it can achieve is that reduced latency indicates improved network congestion, therefore the impact of latency can be reduced when deciding on path selection, while other factors are considered to balance path selection and assist in selecting a better path. 7. If packet loss rate decreases, the weighting coefficient of packet loss rate is reduced, while the weighting coefficients of signal strength and data transmission latency are increased. The technical effect it can achieve is that improved packet loss rate means improved network reliability, allowing its importance in path decision-making to be appropriately reduced, while more attention is paid to signal strength and latency—two factors that may now be more critical—to assist in selecting a better path.
[0059] For example, in combination Figure 3This embodiment provides a specific FTTR-SmartRoute algorithm based on real simulation data, considering an FTTR network environment including: 1 master network device; 2 relay devices: Relay1 and Relay2; and 4 slave devices: DeviceA, DeviceB, DeviceC, and DeviceD. Preliminary network status information is obtained by averaging multiple initial communication measurements, as detailed below:
[0060]
[0061] Assume the initial weighting coefficients for signal strength, data transmission delay, and packet loss rate are α = 0.6, β = 0.3, and γ = 0.1, respectively. Each weighting coefficient is between 0 and 1, and the sum of all weighting coefficients is 1. Preset thresholds (setting the degree of degradation): N = 5, T1 = 5%, T2 = 3ms, T3 = 2%.
[0062] In the subsequent N (N=5) communications, the signal strength from the master network device to the relay device Relay1 decreased by an average of 6%, which is greater than T1. Therefore, according to the dynamic adjustment mechanism of the FTTR-SmartRoute algorithm, the value of α needs to be increased.
[0063] The new weighting coefficients are: α = 0.65, β = 0.27, γ = 0.08. Next, we will use these new weighting coefficients to calculate the overall weight score. For example, the weight score for communication between the master network device (Master) and the relay device (Relay1) is: W 主网络设备Master-中继设备Relay1 =0.65×0.85-0.27×10-0.08×2=0.5525-2.7-0.1=-2.3075.
[0064] Specifically, the formula for calculating the weight score between adjacent nodes is W. ij =α·S ij -β·L ij -γ·P ij Among them, W ij S represents the overall communication quality weight from two adjacent devices i to device j. ij L is the signal strength between device i and device j. ij P is the data transmission delay between device i and device j. ij α represents the packet loss rate between device i and device j. α, β, and γ are weighting factors with values between 0 and 1, and satisfy: α + β + γ = 1.
[0065] Similarly, the same data processing is performed on other devices, and the weight coefficients of each parameter are adjusted in a timely manner to calculate the weight score between each pair of devices, so as to calculate the communication quality weight of each data transmission path.
[0066] Furthermore, the weight scores between adjacent devices are positively correlated with signal strength, negatively correlated with data transmission delay, and negatively correlated with packet loss rate.
[0067] Furthermore, to make the weighted score calculation formula more reasonable, the collected network condition information (such as signal strength, data transmission delay, and packet loss rate) is normalized separately. Then, the normalized data is multiplied by the corresponding weight coefficient and the weighted score is calculated comprehensively. Optionally, the normalization process can be as follows: within the same specified time period, normalize all signal strengths, data transmission delays, and packet loss rates acquired in the network; or, within the same specified time period, first calculate the average signal strength, average data transmission delay, and average packet loss rate of adjacent nodes, and then normalize the average signal strength, average data transmission delay, and average packet loss rate within the network separately. This method is preferred as it avoids excessive data interaction between devices.
[0068] In a preferred embodiment, the network condition information includes signal strength, and the communication quality weight is positively correlated with the signal strength on the data transmission path; and / or, the network condition information includes data transmission delay, and the communication quality weight is negatively correlated with the data transmission delay on the data transmission path; and / or, the network condition information includes packet loss rate, and the communication quality weight value is negatively correlated with the packet loss rate on the data transmission path. It is understood that a higher signal strength, lower data transmission delay, and lower packet loss rate indicate better communication performance.
[0069] In a preferred embodiment, before obtaining the network status information of the data transmission path between the master network device and the slave network device in the network, the method further includes: registering the slave network device by having the slave network device initiate a registration request to the master network device so that the master network device can perform security verification on the slave network device.
[0070] Specifically, the system comprises a master network device, relay devices, and slave network devices. The master device includes: a communication interface module for wired connection with relay devices; a registration management module for processing registration requests from slave and relay devices; a security verification module for performing device security verification; a configuration and update module for managing network configuration and device updates; a storage module for storing network configuration and device information; and a processor module for controlling the aforementioned registration management module, security verification module, configuration and update module, and storage module. The relay devices include: a communication interface module for wired connection with the master network device; a WiFi module for wireless connection with slave network devices; a data forwarding module for forwarding data between slave and master network devices; a dynamic matching module for matching the optimal path based on network conditions; a storage module for storing path information and device status; and a processor module for controlling the aforementioned communication interface module, data forwarding module, dynamic matching module, and storage module. The slave devices include: a WiFi module for wireless connection with relay devices; a storage module for storing device status and path information; and a processor module for controlling the WiFi module and storage module.
[0071] Specifically, the entire process of the data transmission method is as follows:
[0072] 1. Device Registration and Information Reporting. A slave network device establishes a connection with the master network device or relay device via wired or wireless means. The slave device sends a registration request and its own information to the master network device or relay device to complete device registration. For example, a slave network device, DeviceA, first sends a registration request containing timestamps to the master network device (Master) and two relay devices to register. Upon receiving the request, the master network device (Master) generates a registration confirmation message containing a timestamp through its registration management module and returns it to the slave network device (DeviceA). The slave network device (DeviceA) encrypts this message using its private key and sends it back to the master, completing registration and security verification. In essence, this method allows the master network device (Master) to verify the identity of DeviceA.
[0073] 2. Dynamic Path Selection. For example: The master network device (Master) starts measuring the communication quality between itself and the relay device and the slave network device (Device A), and uses the FTTR-SmartRoute algorithm to select the optimal communication path. Assume the obtained communication quality weights are as follows: Master-Relay1-Device A: 7.5, Master-Relay2-Device A: 8.2. Since Master-Relay2-Device A has a higher weight, Relay2 is selected as the relay for Device A's communication. After receiving the optimal data transmission path, the slave network device establishes a data transmission connection with the selected relay device or master device through its WiFi module.
[0074] 3. Data Transmission. Data is transmitted between the master network device (Master) and the slave network device (DeviceA) via a selected optimal data transmission path. During this data transmission, all data is encrypted to ensure its security. Relay2 acts only as a transparent relay and does not process or decrypt any data.
[0075] 4. Security verification: Data integrity and security verification is performed using a timestamp-based method. Furthermore, after successfully receiving data from the master network device (DeviceA), it sends an acknowledgment message to the master device via Relay2. Additionally, DeviceA sends feedback on the quality of its received data, including signal strength, latency, and packet loss rate.
[0076] Compared with existing technologies, the method provided in this invention primarily addresses the problem of effectively selecting the optimal data transmission path for communication between master and slave network devices in complex communication environments, thereby improving data transmission efficiency and stability. The method introduces the SmartRout algorithm to dynamically calculate and select the path with the highest communication quality weight, ensuring efficient and stable data transmission between master network devices, relay devices, and slave network devices. To further enhance transmission security, a timestamp-based security verification mechanism is established to ensure data integrity and security. This method aims to meet the demands for efficient, stable, and secure data transmission in diverse and complex environments, especially in scenarios with a large number of relay devices and a wide distribution of slave network devices. It can significantly improve network communication performance and meet the high standards required by modern communication applications.
[0077] See Figure 4 The present invention also provides a data transmission device, comprising:
[0078] Information acquisition module 21 is used to acquire network status information of the data transmission path between the master network device and the slave network device in the network;
[0079] The weight calculation module 22 is used to calculate the communication quality weight of the data transmission path based on the network condition information.
[0080] The transmission path selection module 23 is used to select the data transmission path with the highest communication quality weight as the optimal transmission path for data transmission between the master network device and the slave network device.
[0081] In one embodiment, the network is a whole-house fiber optic network, and the network further includes relay devices. The connection between the relay devices and the main network device is a wired connection, the connection between the relay devices is a wired connection, and the connection between the relay devices and the slave network devices is a wireless connection.
[0082] In one embodiment, the information acquisition module 21 includes a first information acquisition module and a second information acquisition module, and the weight calculation module 22 includes a first weight calculation module and a second weight calculation module.
[0083] The main network device includes a first information acquisition module and a first weight calculation module. The first information acquisition module is used to: initiate path analysis requests to each of the relay devices to acquire network status information of their downstream paths; the first weight calculation module is used to calculate the weight score of the downstream path of the main network device based on the acquired network status information of the downstream path of the main network device; wherein, the downstream path of the main network device refers to the path between the main network device and the adjacent downstream node, and the downstream node refers to the node that is far away from the main network device;
[0084] The relay device includes a second information acquisition module and a second weight calculation module; the second information acquisition module is used to acquire network status information of its downstream path; wherein, the downstream path of the relay device refers to the path between the relay device and its adjacent downstream node; the second weight calculation module is used to calculate the weight score of the downstream path of the relay device based on the network status information of the downstream path acquired by the relay device, and feed back the weight score of the downstream path of the relay device to the main network device;
[0085] The first weight calculation module is further configured to: perform comprehensive calculation on the weight scores of each data transmission path to obtain the communication quality weight of the data transmission path.
[0086] In one embodiment, the information acquisition module 21 is used to acquire network status information between adjacent nodes on the data transmission path between the master network device and the slave network device in the network.
[0087] The weight calculation module 22 is used to: calculate the weight score between the adjacent nodes based on the network status information between the adjacent nodes; and comprehensively calculate the communication quality weight of the data transmission path based on the weight scores between each adjacent node on the data transmission path.
[0088] In one implementation, the network condition information includes at least two of signal strength, data transmission latency, and packet loss rate; the step of calculating the weight score between adjacent nodes based on the network condition information between adjacent nodes includes:
[0089] Based on the set weight coefficients, the weight scores between the adjacent nodes are calculated according to the network condition information between the adjacent nodes; wherein, when the degree of deterioration of the first network condition information reaches a set degree of deterioration, the weight coefficient of the first network condition information increases, and the weight coefficients of other network condition information besides the first network condition information decrease; when the degree of optimization of the first network condition information reaches a set degree of optimization, the weight coefficient of the first network condition information decreases, and the weight coefficients of other network condition information besides the first network condition information increase; wherein, the first network condition information is any one of all the network condition information.
[0090] In one embodiment, the network condition information includes signal strength, and the communication quality weight is positively correlated with the signal strength on the data transmission path; and / or, the network condition information includes data transmission delay, and the communication quality weight is negatively correlated with the data transmission delay on the data transmission path; and / or, the network condition information includes packet loss rate, and the communication quality weight value is negatively correlated with the packet loss rate on the data transmission path.
[0091] In one embodiment, the device further includes a registration module, which is used to register the slave network device by having the slave network device initiate a registration request to the master network device to enable the master network device to perform security verification of the slave network device before obtaining network status information of the data transmission path between the master network device and the slave network device in the network.
[0092] It is worth noting that the specific operation of the data transmission device can be referred to the operation of the data transmission method described in the above embodiments, and will not be repeated here.
[0093] Compared with the prior art, the data transmission device disclosed in the embodiments of the present invention evaluates the data transmission path by considering the network status between the master and slave network devices, so as to select the optimal transmission path for data exchange between the master and slave network devices, thereby ensuring efficient and stable transmission between the master and slave network devices.
[0094] See Figure 5 This invention also provides a data transmission device, including a processor 31, a memory 32, and a computer program stored in the memory 32 and configured to be executed by the processor 31. When the processor 31 executes the computer program, it implements the steps described in the above-described data transmission method embodiments, for example... Figure 1 The steps S11 to S13 described above; or, when the processor 31 executes the computer program, it implements the functions of each module in the above-described device embodiments.
[0095] For example, the computer program can be divided into one or more modules, which are stored in the memory 32 and executed by the processor 31 to complete the present invention. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the data transmission device. For example, the computer program can be divided into multiple modules, each with the following specific functions:
[0096] Information acquisition module 21 is used to acquire network status information of the data transmission path between the master network device and the slave network device in the network;
[0097] The weight calculation module 22 is used to calculate the communication quality weight of the data transmission path based on the network condition information.
[0098] The transmission path selection module 23 is used to select the data transmission path with the highest communication quality weight as the optimal transmission path for data transmission between the master network device and the slave network device.
[0099] The specific working process of each module can be referred to the working process of the data transmission device described in the above embodiments, and will not be repeated here.
[0100] The data transmission device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The data transmission device may include, but is not limited to, a processor 31 and a memory 32. Those skilled in the art will understand that the data transmission device may also include input / output devices, network access devices, buses, etc.
[0101] The processor 31 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 31 is the control center of the data transmission device, connecting various parts of the entire data transmission device through various interfaces and lines.
[0102] The memory 32 can be used to store the computer programs and / or modules. The processor 31 implements various functions of the data transmission device by running or executing the computer programs and / or modules stored in the memory 32 and calling the data stored in the memory 32. The memory 32 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory 32 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0103] If the modules integrated into the data transmission device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by the processor 31, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0104] This invention also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the data transmission method as described in any of the above embodiments.
[0105] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A data transmission method, characterized in that, include: Obtain network status information of the data transmission path between the master network device and the slave network device in the network; Calculate the communication quality weight of the data transmission path based on the network condition information; The data transmission path with the highest communication quality weight is selected as the optimal transmission path for data transmission between the master network device and the slave network device. The acquisition of network status information of the data transmission path between the master network device and the slave network device in the network includes: Obtain network status information between adjacent nodes on the data transmission path between the master network device and the slave network device in the network; The step of calculating the communication quality weight of the data transmission path based on the network condition information includes: Calculate the weight score between the adjacent nodes based on the network status information between the adjacent nodes; The communication quality weight of the data transmission path is calculated by comprehensively considering the weight scores between each adjacent node on the data transmission path. The step of calculating the weight score between adjacent nodes based on the network status information between adjacent nodes includes: Based on the set weight coefficients, the weight scores between the adjacent nodes are calculated according to the network condition information between the adjacent nodes; wherein, when the degree of deterioration of the first network condition information reaches a set degree of deterioration, the weight coefficient of the first network condition information increases, and the weight coefficients of other network condition information besides the first network condition information decrease; when the degree of optimization of the first network condition information reaches a set degree of optimization, the weight coefficient of the first network condition information decreases, and the weight coefficients of other network condition information besides the first network condition information increase; wherein, the first network condition information is any one of all the network condition information.
2. The data transmission method as described in claim 1, characterized in that, The network is a whole-house fiber optic network. The network also includes relay devices. The relay devices are connected to the main network devices via wired connections. The relay devices are connected to each other via wired connections. The relay devices are connected to the slave network devices via wireless connections.
3. The data transmission method as described in claim 2, characterized in that, The step of obtaining network status information of the data transmission path between the master network device and the slave network device in the network; and the step of calculating the communication quality weight of the data transmission path based on the network status information, includes: The main network device initiates path analysis requests to each of the relay devices; The main network device obtains network status information of its downstream path to calculate the weight score of the downstream path of the main network device; wherein, the downstream path of the main network device refers to the path between the main network device and the adjacent downstream node, and the downstream node refers to the node that is far away from the main network device. The relay device obtains network status information of its downstream path to calculate the weight score of the downstream path of the relay device; wherein, the downstream path of the relay device refers to the path between the relay device and its adjacent downstream node. The relay device feeds back the weight score of the downstream path of the relay device to the main network device; The main network device performs a comprehensive calculation on the weight scores of each element on the data transmission path to obtain the communication quality weight of the data transmission path.
4. The data transmission method as described in claim 1, characterized in that, The network condition information includes at least two of the following: signal strength, data transmission latency, and packet loss rate.
5. The data transmission method as described in claim 1, characterized in that, The network condition information includes signal strength, and the communication quality weight is positively correlated with the signal strength on the data transmission path; and / or, the network condition information includes data transmission delay, and the communication quality weight is negatively correlated with the data transmission delay on the data transmission path; and / or, the network condition information includes packet loss rate, and the communication quality weight value is negatively correlated with the packet loss rate on the data transmission path.
6. The data transmission method as described in claim 1, characterized in that, Before obtaining network status information of the data transmission path between the master network device and the slave network device in the network, the method further includes: registering the slave network device by having the slave network device initiate a registration request to the master network device so that the master network device can perform security verification on the slave network device.
7. A data transmission device, characterized in that, include: The information acquisition module is used to acquire network status information of the data transmission path between the master network device and the slave network device in the network. The weight calculation module is used to calculate the communication quality weight of the data transmission path based on the network condition information. The transmission path selection module is used to select the data transmission path with the highest communication quality weight as the optimal transmission path for data transmission between the master network device and the slave network device. The information acquisition module is specifically used to: acquire network status information between adjacent nodes on the data transmission path between the master network device and the slave network device in the network; The weight calculation module is specifically used for: calculating the weight score between adjacent nodes based on the network condition information between adjacent nodes according to the set weight coefficient; and comprehensively calculating the communication quality weight of the data transmission path based on the weight scores between adjacent nodes on the data transmission path; wherein, when the degree of deterioration of the first network condition information reaches a set degree of deterioration, the weight coefficient of the first network condition information increases, and the weight coefficients of other network condition information besides the first network condition information decrease; when the degree of optimization of the first network condition information reaches a set degree of optimization, the weight coefficient of the first network condition information decreases, and the weight coefficients of other network condition information besides the first network condition information increase; the first network condition information is any one of all the network condition information.
8. A data transmission device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the data transmission method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the data transmission method as described in any one of claims 1 to 6.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the data transmission method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Network line selection method and system, terminal and storage medium
CN115604171A